Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crosschain resolver with reverse registrar with deploy script #18

Conversation

makoto
Copy link
Member

@makoto makoto commented Nov 13, 2023

This change includes a set of script to deploy and setup l2 names on L2 and read the data via CCIP-read on L1.

Please use README of crosschain-resolver and crosschain-reverse-resolver for the further detail.
Using these script, following names are setup currently.

  • op.evmgateway.eth name is owned and set to 0xDBBC2C0fe2a1D0fB4056B35a22e543bEb715E7FC
  • matoken.op.evmgateway.eth subname is approved and set to 0x5A384227B65FA093DEC03Ec34e111Db80A040615 to operate
  • primary name for 0xDBBC2C0fe2a1D0fB4056B35a22e543bEb715E7FC pointing to foo.op.evmgateway.eth using namehash(0xDBBC2C0fe2a1D0fB4056B35a22e543bEb715E7FC).op.reverse.evmgateway.eth

@makoto makoto requested a review from TateB November 13, 2023 19:13
@makoto makoto marked this pull request as draft November 13, 2023 19:15
@makoto makoto marked this pull request as ready for review November 27, 2023 17:21
@makoto makoto merged commit c52f671 into feature/crosschain-resolver-with-reverse-registrar Nov 27, 2023
5 checks passed
@makoto makoto deleted the crosschain-resolver-with-reverse-registrar-with-deploy-script branch December 10, 2023 22:03
makoto added a commit that referenced this pull request Apr 26, 2024
* Make testResolver work

* Update bun.lockb

* Add coinType

* Make text record work

* Add hardhat-storage-layout

* Use the real Resolver contracts

* Add contenthash

* Add comment

* Update README

* Change the license to ENS labs

* Remove console.log

* Add an explanation

* typo

* Remove L1Verifier.sol

* Remove L1Verifier.sol

* Rename test

* Add hardhat-deploy

* Add deployment script

* Remove deployment addresses

* Apply suggestions from code review

Add indentation

Co-authored-by: Nick Johnson <[email protected]>

* Add immutable and constants

* Remove getStatic

* Fix the wrong constants

* Update bun.lockb

* Remove contracts-bedrock

* Update bun.lockb

* Add bun

* Remove package-lock.json

* update bun.lockb

* Use BrowserProvider

* Revert to use fork

* Put immutable and constant together

* Use bytes20 instead

* Apply suggestions from code review

Co-authored-by: Nick Johnson <[email protected]>

* Remove gasLimit and gas

* Add test for the empty record

* Remove remote

* Remove RECORD_VERSIONS_REF constant

* Copy crosschain resolver to crosschain reverse resolver

* Rename the function name

* Add crosschain reverse registrar

* Update README.md

* Replace OwnedResolver with DelegatableResolverFactory

* replace target with targets

* Add isAuthorised

* Add test for setTarget

* Modify deployment code

* Remove getTarget and add TargetSet event

* WIP: Adding NameWrapper into test

* Use L2ReverseRegistrar

* Revert L1Resolver.sol and update L1ReverseResolver.sol storage slot location

* Update storage slot info

* Enable ccip read on name

* Add clearRecords and fixed typo

* Fix failing test temporarily

* Update ens-contracts

* Update bun

* Commit bun

* Update ens-contracts on crosschain-reverse-resolver

* Recreate bun.lockb

* Crosschain resolver with reverse registrar with deploy script (#18)

* Update deploy scripts

* Remove console.log

* Remove blank space from the file

* Add deployment script

* Update deployment readme

* Add getname

* Add setname

* Add setup script

* Add getaddr

* Add approve

* Fix wildcard for subname

* Update bun

* Deploy l2 reverse registrar to base goerli

* Add base deployment

* Added instruction on subname registrar

* Added instruction on how to register names

* Add support interface (#21)

* Add support interface

* Use ens-contracts IExtendedResolver

* Add support interface to reverse registrar

* Change test name

* Update L1 deployment contract address for base and OP

* Remove offset from getTarget

* Inherit Interfaces

* Inherit interfaces for ReverseResolver

* Add ERC165 signature

* Add metadata (#22)

* Add Metadata service

* Add MetadataChanged event, change setTarget argument and TargetSet event

* Update bun.lockb

* Update bun.lockb

* Remove comment

* remove id function and get rid of node from TargetSet

* Update comment, link to ENSIP16 and add variable name on the return argument of metadata function

* Fix failing tests

* Remove resolver name from metadata

* Update comment and move MetadataChanged

* Remove id

* Arb deployment (#23)

* Add support interface

* Use ens-contracts IExtendedResolver

* Add support interface to reverse registrar

* Change test name

* Update L1 deployment contract address for base and OP

* Add arbitrum deployment script and deployed contract info

* Update README

* Add IERC165

* Remove DelegatableResolverRegistrar

* Add Sepolia verifier contracts and gateway deployment details (#26)

* Add OP sepolia gateway info

* Add deployed addresses for base

* Add arbitrum sepolia deployment address

* Remove console.log

* Update comment

* Add environment on wrangler.toml

* Add .wrangler to gitignore

* Sepolia resolvers (#27)

* Add crosschain resolver details

* Updated @ensdomains/ens-contracts ensdomains/ens-contracts#feature/crosschain-resolver-with-reverse-registrar to the latest commit

* Change slot

* Add ReverseRegistrar deployment details

* Update reverse registrar deployed addresses

* Add Op sepolia reverse registrar deployment info

* Added L1Resolver contract deployment details

* Remove comment out

* Add bun.lockb

* Update bun.lockb

* Change ens- ontracts to point to l2-deployment branch

* Fix failing test

* Update bun.lockb

* Add L2ReverseRegistrar to deps.sol on crosschain-resolver (was throwing error)

* Fix failing test

* Remove unused subheader

* Redeploy base l1 resolver

* Update README.md

* Added Base Reverse Resolver contract address

* Add Arbitrum Reverse Resolver deployement

* Redeploy ArbL1ReverseResolver with correct L2 Resolver Address

* Redeploy l2 contracts with official reverse record namespace (cointype.reverse)

* Sepolia resolvers with analytics (#30)

* WIP

* Fix errors

* Ignore favicon

* Update bun.lockb

* Fix lint error

* Update gateway url

* Add console.log

* Changed endpoint

* Update apiEndpoint

* Add sender and calldata to props

* Move Tracker to evm-gateway

* Revert "Move Tracker to evm-gateway"

This reverts commit 5d3ba37.

* WIP

* Downgrade to 4.20231121.0

* Bump it to the latest

* Add type

* Replace tracker with @ensdomains/server-analytics

* Pass custom apiEndpoint and props

* Add GATEWAY_DOMAIN and ENDPOINT_URL

* Point to correct branch

* Fix CORS problem

* Add gateway log tracker to OP

* Fix lint error

* Update readme

* Default reverse resolver (#33)

* Change ens-contracts to use default-reverse-resolver

* Add suport for DefaultReverseResolver

* Add hexToAddress to extract address

* Add faulback to name function

* Add fallback for text

* Use imported IDefaultReverseResolver

* Update bun.lockb and README

* Update comment

* Move DefaultReverseResolver

* Add DefaultReverseResolver

* Update bun.lockb

* Add support for resolve on DefaultReverseResolver

* Deployed new contracts

* Add setdefaultname

* Update README.md

* Update README.md

* Remove console.log

* Point to default-reverse-resolver-2

* Reswitch to default-reverse-resolver

* Update bun.ockb

* Add whitespace

* Check if invalid address

* Override .text

* Fix  TypeError: ambiguous function error

* Re-point to default-reverse-resolver

* Added wait

* Update storage location after removing Owner

* Added wait on crosschain resolver

* Use L2ReverseRevolver and fix broken test

* Update ens-contracts branch

* Eip 5559 support (#34)

* Add IResolverSetter

* Simplify metadata function

* Fix failing tests

* Add test for EIP 5559

* Added wait

* Rename from IResolverSetter to IAddrSetter

* Add resolveDeferral

* Store chainId directly

* Rename from resolveDeferral to setAddr

* Remove crosschain-resolver and crosschain-reverse-resolver

* Add .yalc to .gitignore

* v0.1.0-beta.1

* Pushed all versions to 0.1.0-beta.2

* Add repo info and bump to beta.3

* Add links to arb related repos

* Remove old deployment info

* Revert removed scripts

* Recreate bun.lockb

* Remove console.log and tidy up props

* Fix linting error

* Fix linting error

* remove log result util (#40)

* remove log result util

* bump server-analytics version, update types and functions

* bypass frozen-lockfile flag for deps update

* bypass frozen-lockfile flag for deps update

* lint

* revert frozen-lockfile flag

* keep  rozen-lockfile disabled

* lint

* Rename sepoliaforbase to sepoliaForBase

* Update op-gateway/README.md

Co-authored-by: Nick Johnson <[email protected]>

* move propsDecoder (#41)

* move propsDecoder

* Add Request as type

* Update workers-types

* Fix lint error

* v0.1.0-beta.4

* v0.1.0-beta.4

* v0.1.0-beta.4

* Bump the version to beta.4

---------

Co-authored-by: Nick Johnson <[email protected]>
Co-authored-by: tate <[email protected]>
Co-authored-by: Muhammed Tanrıkulu <[email protected]>
makoto added a commit that referenced this pull request May 27, 2024
* Make testResolver work

* Update bun.lockb

* Add coinType

* Make text record work

* Add hardhat-storage-layout

* Use the real Resolver contracts

* Add contenthash

* Add comment

* Update README

* Change the license to ENS labs

* Remove console.log

* Add an explanation

* typo

* Remove L1Verifier.sol

* Remove L1Verifier.sol

* Rename test

* Add hardhat-deploy

* Add deployment script

* Remove deployment addresses

* Apply suggestions from code review

Add indentation

Co-authored-by: Nick Johnson <[email protected]>

* Add immutable and constants

* Remove getStatic

* Fix the wrong constants

* Update bun.lockb

* Remove contracts-bedrock

* Update bun.lockb

* Add bun

* Remove package-lock.json

* update bun.lockb

* Use BrowserProvider

* Revert to use fork

* Put immutable and constant together

* Use bytes20 instead

* Apply suggestions from code review

Co-authored-by: Nick Johnson <[email protected]>

* Remove gasLimit and gas

* Add test for the empty record

* Remove remote

* Remove RECORD_VERSIONS_REF constant

* Copy crosschain resolver to crosschain reverse resolver

* Rename the function name

* Add crosschain reverse registrar

* Update README.md

* Replace OwnedResolver with DelegatableResolverFactory

* replace target with targets

* Add isAuthorised

* Add test for setTarget

* Modify deployment code

* Remove getTarget and add TargetSet event

* WIP: Adding NameWrapper into test

* Use L2ReverseRegistrar

* Revert L1Resolver.sol and update L1ReverseResolver.sol storage slot location

* Update storage slot info

* Enable ccip read on name

* Add clearRecords and fixed typo

* Fix failing test temporarily

* Update ens-contracts

* Update bun

* Commit bun

* Update ens-contracts on crosschain-reverse-resolver

* Recreate bun.lockb

* Crosschain resolver with reverse registrar with deploy script (#18)

* Update deploy scripts

* Remove console.log

* Remove blank space from the file

* Add deployment script

* Update deployment readme

* Add getname

* Add setname

* Add setup script

* Add getaddr

* Add approve

* Fix wildcard for subname

* Update bun

* Deploy l2 reverse registrar to base goerli

* Add base deployment

* Added instruction on subname registrar

* Added instruction on how to register names

* Add support interface (#21)

* Add support interface

* Use ens-contracts IExtendedResolver

* Add support interface to reverse registrar

* Change test name

* Update L1 deployment contract address for base and OP

* Remove offset from getTarget

* Inherit Interfaces

* Inherit interfaces for ReverseResolver

* Add ERC165 signature

* Add metadata (#22)

* Add Metadata service

* Add MetadataChanged event, change setTarget argument and TargetSet event

* Update bun.lockb

* Update bun.lockb

* Remove comment

* remove id function and get rid of node from TargetSet

* Update comment, link to ENSIP16 and add variable name on the return argument of metadata function

* Fix failing tests

* Remove resolver name from metadata

* Update comment and move MetadataChanged

* Remove id

* Arb deployment (#23)

* Add support interface

* Use ens-contracts IExtendedResolver

* Add support interface to reverse registrar

* Change test name

* Update L1 deployment contract address for base and OP

* Add arbitrum deployment script and deployed contract info

* Update README

* Add IERC165

* Remove DelegatableResolverRegistrar

* Add Sepolia verifier contracts and gateway deployment details (#26)

* Add OP sepolia gateway info

* Add deployed addresses for base

* Add arbitrum sepolia deployment address

* Remove console.log

* Update comment

* Add environment on wrangler.toml

* Add .wrangler to gitignore

* Copy arb-gateway to scroll-gateway

* Replace arb to scroll

* Rename from arb to scroll

* replace arb to scroll

* Rename from Arb to Scroll

* Modify ScrollProofService

* Add scroll- to workspace

* Update rollupABI

* Sepolia resolvers (#27)

* Add crosschain resolver details

* Updated @ensdomains/ens-contracts ensdomains/ens-contracts#feature/crosschain-resolver-with-reverse-registrar to the latest commit

* Change slot

* Add ReverseRegistrar deployment details

* Update reverse registrar deployed addresses

* Add Op sepolia reverse registrar deployment info

* Added L1Resolver contract deployment details

* Remove comment out

* Add bun.lockb

* Update bun.lockb

* Change ens- ontracts to point to l2-deployment branch

* Fix failing test

* Update bun.lockb

* Add L2ReverseRegistrar to deps.sol on crosschain-resolver (was throwing error)

* Fix failing test

* Remove unused subheader

* Redeploy base l1 resolver

* Update README.md

* Added Base Reverse Resolver contract address

* Add Arbitrum Reverse Resolver deployement

* Redeploy ArbL1ReverseResolver with correct L2 Resolver Address

* Redeploy l2 contracts with official reverse record namespace (cointype.reverse)

* Sepolia resolvers with analytics (#30)

* WIP

* Fix errors

* Ignore favicon

* Update bun.lockb

* Fix lint error

* Update gateway url

* Add console.log

* Changed endpoint

* Update apiEndpoint

* Add sender and calldata to props

* Move Tracker to evm-gateway

* Revert "Move Tracker to evm-gateway"

This reverts commit 5d3ba37.

* WIP

* Downgrade to 4.20231121.0

* Bump it to the latest

* Add type

* Replace tracker with @ensdomains/server-analytics

* Pass custom apiEndpoint and props

* Add GATEWAY_DOMAIN and ENDPOINT_URL

* Point to correct branch

* Fix CORS problem

* Add gateway log tracker to OP

* Fix lint error

* Update readme

* Default reverse resolver (#33)

* Change ens-contracts to use default-reverse-resolver

* Add suport for DefaultReverseResolver

* Add hexToAddress to extract address

* Add faulback to name function

* Add fallback for text

* Use imported IDefaultReverseResolver

* Update bun.lockb and README

* Update comment

* Move DefaultReverseResolver

* Add DefaultReverseResolver

* Update bun.lockb

* Add support for resolve on DefaultReverseResolver

* Deployed new contracts

* Add setdefaultname

* Update README.md

* Update README.md

* Remove console.log

* Point to default-reverse-resolver-2

* Reswitch to default-reverse-resolver

* Update bun.ockb

* Add whitespace

* Check if invalid address

* Override .text

* Fix  TypeError: ambiguous function error

* Re-point to default-reverse-resolver

* Added wait

* Update storage location after removing Owner

* Added wait on crosschain resolver

* Use L2ReverseRevolver and fix broken test

* Update ens-contracts branch

* Eip 5559 support (#34)

* Add IResolverSetter

* Simplify metadata function

* Fix failing tests

* Add test for EIP 5559

* Added wait

* Rename from IResolverSetter to IAddrSetter

* Add resolveDeferral

* Store chainId directly

* Rename from resolveDeferral to setAddr

* Remove crosschain-resolver and crosschain-reverse-resolver

* Add .yalc to .gitignore

* v0.1.0-beta.1

* Pushed all versions to 0.1.0-beta.2

* Add repo info and bump to beta.3

* Add links to arb related repos

* Remove old deployment info

* Revert removed scripts

* Recreate bun.lockb

* Remove console.log and tidy up props

* Update package

* Fix worker error

* Rename to makeScrollGateway

* Make simple proofs for fixed values test pass

* Fix linting error

* Fix linting error

* remove log result util (#40)

* remove log result util

* bump server-analytics version, update types and functions

* bypass frozen-lockfile flag for deps update

* bypass frozen-lockfile flag for deps update

* lint

* revert frozen-lockfile flag

* keep  rozen-lockfile disabled

* lint

* Pass  multiple storage slots

* Rename sepoliaforbase to sepoliaForBase

* Update op-gateway/README.md

Co-authored-by: Nick Johnson <[email protected]>

* Add EVMProofHelper2

* move propsDecoder (#41)

* move propsDecoder

* Add Request as type

* Update workers-types

* Fix lint error

* Add compressProof

* Make scroll verifier working

* Add estimateCCIPReadCallbackGas

  ScrollVerifier
Gas estimate 2418085
    ✔ simple proofs for fixed values (2652ms)
Gas estimate 2419066
    ✔ simple proofs for dynamic values (1641ms)
Gas estimate 2282506
    ✔ nested proofs for dynamic values (1800ms)
Gas estimate 4773362
    ✔ nested proofs for long dynamic values (1960ms)
Gas estimate 3607123
    ✔ nested proofs with lookbehind (2488ms)
Gas estimate 3527831
    ✔ nested proofs with lookbehind for dynamic values (1810ms)
Gas estimate 2353134
    ✔ mappings with variable-length keys (1721ms)
Gas estimate 3608890
    ✔ nested proofs of mappings with variable-length keys (2086ms)
Gas estimate 2223797
    ✔ treats uninitialized storage elements as zeroes (1534ms)
Gas estimate 2228241
    ✔ treats uninitialized dynamic values as empty strings (1800ms)

* Pass compressedProof as storageProof

* Create MerkleTrieProofHelper

* Remove nested array from StateProof.storageProofs

* Simplify log tracker on scroll gateway worker

* Remove wrong comment

* Update comment and documentation

* Remove unused cache from scroll-gateway

* Remove L2_ROLLUP and L1_PROVIDER_URL

* Fix linting error

* Update evm-gateway/src/utils.ts

Co-authored-by: Nick Johnson <[email protected]>

* Update evm-verifier/contracts/MerkleTrieProofHelper.sol

Co-authored-by: Nick Johnson <[email protected]>

* Fix error

* Add SEARCH_URL

* Add StateRootMismatch error

* Change l2 rollup address

---------

Co-authored-by: Nick Johnson <[email protected]>
Co-authored-by: tate <[email protected]>
Co-authored-by: Muhammed Tanrıkulu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant