Skip to content

usePicnic/picnic-ens-contract

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Coinbase Offchain Resolver

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.

Requirements

  • Node.js v16
  • Yarn v1.22.x

Usage

Install dependencies

$ yarn install

Compile

Compile the smart contracts with Hardhat:

$ yarn compile

TypeChain

Compile the smart contracts and generate TypeChain artifacts:

$ yarn typechain

Format

$ yarn prettier

Lint

$ yarn lint

Test

$ yarn test

Test Coverage

Ensure test coverage is at 100%

$ yarn coverage

$ open coverage/index.html

Deployment

$ forge script scripts_forge/deploy.s.sol:Deploy --rpc-url <RPC> --private-key <PRIVATE_KEY>  -- --vvvv

Addresses

Contract Addresses

| Contract | Address | | --- | --- | | Network | 0xFf00e326f4EF31e69B96896c09EC67d65ae41946 | | 11155111 |

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 52.9%
  • Solidity 46.5%
  • Other 0.6%