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
CoinbaseResolver.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 --network <NETWORK>