1.4.1 • Published 26 days ago

@ethereum-attestation-service/eas-contracts v1.4.1

Weekly downloads
-
License
MIT
Repository
github
Last release
26 days ago

Ethereum Attestation Service

Docs NPM Package Test License

Introduction

The Ethereum Attestation Service is a free and open protocol for on-chain attestations on EVM compatible blockchains. It is a generalized service that allows anyone to register a schema for their particular use case, and then make attestations following their schema.

Schemas can be registered using the SchemaRegistry.sol contract, and attestations are made using the EAS.sol contract.

In addition, we provide a resolver contract for advanced use cases, such as on-chain verification of attestation data, and also attaching payments to attestations (which makes a new suite of powerful web3 applications possible).

We also provide an SDK for developers.

On-chain attestations will enable a powerful new range of web3 applications, including:

  • Identity
  • Trust Scores
  • Goodness Scores
  • Credit Scores
  • Clout
  • Land Registries
  • Social Networks
  • Portable Trust Layers
  • Retroactive Public Goods Funding
  • KYC Services
  • Uncollateralized Lending / Borrowing
  • Voting
  • Oracles (who can be atomically paid for making attestations inside the protocol)
  • Likes/Dislikes
  • Content Filtering
  • And many more!

Deployments

Please note that you can also import and use the addresses directly in your code using the @ethereum-attestation-service/eas-contracts/deployments deployment artifacts corresponding to your desired network.

Ethereum

v0.26

Arbitrum One

v0.26

Sepolia

v0.26

Optimism

v1.0.1

Optimism Goerli

v1.0.1

Base Goerli

v0.27

Installation

pnpm add @ethereum-attestation-service/eas-contracts

Testing

Testing the protocol is possible via multiple approaches:

Unit Tests

You can run the full test suite via:

pnpm test

Test Coverage

Latest Test Coverage Report (2023-01-26)

  • 100% Statements 207/207
  • 100% Branches 110/110
  • 100% Functions 74/74
  • 100% Lines 333/333
------------------------------|----------|----------|----------|----------|----------------|
File                          |  % Stmts | % Branch |  % Funcs |  % Lines |Uncovered Lines |
------------------------------|----------|----------|----------|----------|----------------|
 contracts/                   |      100 |      100 |      100 |      100 |                |
  EAS.sol                     |      100 |      100 |      100 |      100 |                |
  EIP712Verifier.sol          |      100 |      100 |      100 |      100 |                |
  IEAS.sol                    |      100 |      100 |      100 |      100 |                |
  ISchemaRegistry.sol         |      100 |      100 |      100 |      100 |                |
  SchemaRegistry.sol          |      100 |      100 |      100 |      100 |                |
  Types.sol                   |      100 |      100 |      100 |      100 |                |
 contracts/resolver/          |      100 |      100 |      100 |      100 |                |
  ISchemaResolver.sol         |      100 |      100 |      100 |      100 |                |
  SchemaResolver.sol          |      100 |      100 |      100 |      100 |                |
 contracts/resolver/examples/ |      100 |      100 |      100 |      100 |                |
  AttestationResolver.sol     |      100 |      100 |      100 |      100 |                |
  AttesterResolver.sol        |      100 |      100 |      100 |      100 |                |
  DataResolver.sol            |      100 |      100 |      100 |      100 |                |
  ExpirationTimeResolver.sol  |      100 |      100 |      100 |      100 |                |
  PayingResolver.sol          |      100 |      100 |      100 |      100 |                |
  RecipientResolver.sol       |      100 |      100 |      100 |      100 |                |
  RevocationResolver.sol      |      100 |      100 |      100 |      100 |                |
  TokenResolver.sol           |      100 |      100 |      100 |      100 |                |
  ValueResolver.sol           |      100 |      100 |      100 |      100 |                |
------------------------------|----------|----------|----------|----------|----------------|
All files                     |      100 |      100 |      100 |      100 |                |
------------------------------|----------|----------|----------|----------|----------------|

Instructions

In order to audit the test coverage of the full test suite, run:

pnpm test:coverage

Profiling

You can profile the gas costs of all of the user-focused flows via:

pnpm test:profile

Deploying

The contracts have built-in support for deployments on different chains and mainnet forks. You can deploy the project by:

pnpm deploy

There’s also a special deployment mode which deploys the protocol to a mainnet fork, with additional goodies. It can be run via:

pnpm deploy:fork

The framework was inspired and adopted from Bancor V3.

License

EAS is open source and distributed under the MIT License (see LICENSE).

1.0.0-beta.1

26 days ago

1.4.1

1 month ago

1.3.7

5 months ago

1.2.2-beta.0

6 months ago

1.2.3-beta.0

6 months ago

1.3.3

6 months ago

1.3.2

6 months ago

1.3.1

6 months ago

1.2.0-beta.1

7 months ago

1.2.0-beta.0

8 months ago

1.0.0-beta.0

10 months ago

1.3.0-beta.0

6 months ago

0.28.1

11 months ago

0.26.3

1 year ago

0.27.1

1 year ago

0.26.1

1 year ago

0.25.2

1 year ago

0.26.0

1 year ago

0.21.0

1 year ago

0.20.1

1 year ago

0.20.0

1 year ago

0.19.0

1 year ago

0.19.1

1 year ago

0.19.2

1 year ago

0.19.3

1 year ago

0.19.4

1 year ago

0.19.5

1 year ago

0.19.6

1 year ago

0.12.0

1 year ago

0.18.0

1 year ago

0.25.1

1 year ago

0.25.0

1 year ago

0.24.0

1 year ago

0.23.1

1 year ago

0.23.0

1 year ago

0.22.0

1 year ago

0.20.2

1 year ago

0.17.1

1 year ago

0.17.0

1 year ago

0.14.8

2 years ago

0.14.7

2 years ago

0.14.6

2 years ago

0.14.5

2 years ago

0.14.4

2 years ago