The EIP-5539 draft proposes a new RBAC-enabled revocation registry that can be used by any valid Ethereum address to maintain a set of revocation lists. In those, arbitrary revocation keys can be marked as either revoked or not. Additionally, the registry includes a set of management features that enables owners to have features like delegates, owner changes, and meta transactions.
This repository includes a well-tested reference implementation that implements all described features in EIP-5539.
A namespace is a representation of an Ethereum address
inside the registry that corresponds to its owners address
. All revocation lists within a namespace are initially owned by the namespace's owner address
. All namespaces are already claimed by their corresponding owners.
A namespace can contain an (almost) infinite number of revocation lists. Each revocation list is identified by a unique key of the type bytes32
that can be used to address it in combination with the namespace address
.
A revocation list can contain an (almost) infinite number of revocation keys of the type bytes32
. In combination with the namespace address
and the revocation list key, it resolves to a boolean value that indicates whether the revocation key is revoked or not. Revocations can always be undone.
An Ethereum address
that has modifying rights to revocation lists within its own and possibly foreign namespaces. An owner can give up modifying rights of revocation lists within its namespace by transferring ownership to another address
. The revocation list will still reside in its original namespace though.
An Ethereum address
that received temporary access to a revocation list in a namespace. It has to be granted by the current owner of the revocation list in question.
Owners and delegates can provide a signed payload off-band to another address
(transaction sender) that initiates the Ethereum interaction with the smart contract. This might be helpful for services providing easy-to-use access to the registry.
Implementers can call all methods of the registry directly with already existing web3 libraries. Alternatively, the Typescript library Ethereum-Revocation-Registry-Controller can be used as an easy-to-use interface to interact with the registry.
Network Name | name | chainId | hexChainId | Registry Address | Registry version |
---|---|---|---|---|---|
Mainnet | mainnet | 1 | 0x01 |
To get the test suite running you need a local instance of Ganache.
This projects supplies a docker-compose
that starts up a local instance:
npm run init
The migration will deploy the contract to the local chain:
npm run migrate
Then you can generate the contract's types:
npm run generate-types
Everytime you change something at the contract you need to run a migration & generate the types anew if the interfaces changed.
To start the test suite, you can call:
npm run test
To get a coverage report you need to run:
npm run test:coverage