This repo was forked from
Coinbase. The
contract was renamed to ENSResolver
to make it clear it is a generic ENS
resolver and not specific to Coinbase names.
Client Offchain Resolver Contract Gateway
| resolve(dnsname, lookup) | |
|-------------------------------------------->| |
| | |
| error: OffchainLookup(addr, url, data, ...) | |
|<--------------------------------------------| |
| | |
| | GET /{addr}/{data} |
|---------------------------------------------------------------------->|
| | |
| response: (result, expires, sig) | |
|<----------------------------------------------------------------------|
| | |
| resolveWithProof(response, data) | |
|-------------------------------------------->| |
| | |
| result (or an error if invalid) | |
|<--------------------------------------------| |
| | |
Please refer to the tests for .resolve
and .resolveWithProof
in
ENSResolver.test.ts
to learn more about how this works.
- Node.js v16
- Yarn v1.22.x
$ yarn install
Compile the smart contracts with Hardhat:
$ yarn compile
Compile the smart contracts and generate TypeChain artifacts:
$ yarn typechain
$ yarn prettier
$ yarn lint
$ yarn test
Ensure test coverage is at 100%
$ yarn coverage
$ open coverage/index.html
$ yarn deploy-resolver --network <NETWORK> --url https://youendpoint/path/{sender}/{data} [--owner addr | --smanager addr | --gwmanager addr | --signer addr]