From 2af9e7b3e9a0d74e86d8705efdc31a09ed6b0683 Mon Sep 17 00:00:00 2001 From: Makoto Inoue <2630+makoto@users.noreply.github.com> Date: Thu, 11 Apr 2024 16:59:13 +0100 Subject: [PATCH] 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 5d3ba373c43b84e05ce98d6b517db98b9d767cf1. * 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 --- .gitignore | 1 - README.md | 25 +- arb-gateway/README.md | 9 +- arb-gateway/package.json | 3 +- arb-gateway/src/worker.ts | 79 ++- arb-gateway/wrangler.toml | 4 +- arb-verifier/hardhat.config.ts | 2 + arb-verifier/test/testArbVerifier.ts | 8 +- bun.lockb | Bin 695704 -> 615624 bytes crosschain-resolver/.gitignore | 1 - crosschain-resolver/README.md | 59 +- crosschain-resolver/contracts/IAddrSetter.sol | 7 + .../contracts/IMetadataResolver.sol | 16 +- crosschain-resolver/contracts/L1Resolver.sol | 66 +- crosschain-resolver/contracts/deps.sol | 2 + .../deploy_l1/10_l1resolver.ts | 14 +- .../deploy_l2/02_l2resolver_factory.ts | 18 - .../deployments/sepolia/.chainId | 1 + .../deployments/sepolia/ArbL1Resolver.json | 637 ++++++++++++++++++ .../deployments/sepolia/BaseL1Resolver.json | 637 ++++++++++++++++++ .../deployments/sepolia/OpL1Resolver.json | 637 ++++++++++++++++++ .../667f81f7298fe1b6e4eb2d4b4f7418ce.json | 175 +++++ .../f62af331815cb4e74689ba5fa814dd3e.json | 280 ++++++++ crosschain-resolver/hardhat.config.ts | 65 +- crosschain-resolver/package.json | 4 +- crosschain-resolver/scripts/approve.ts | 5 +- crosschain-resolver/scripts/setupl2.ts | 14 +- crosschain-resolver/test/testResolver.ts | 49 +- crosschain-reverse-resolver/.gitignore | 1 - crosschain-reverse-resolver/README.md | 99 ++- .../contracts/DefaultReverseResolver.sol | 97 +++ .../contracts/IDefaultReverseResolver.sol | 10 + .../contracts/L1ReverseResolver.sol | 84 ++- .../contracts/deps.sol | 19 +- .../deploy_l1/01_defaultReverseResolver.ts | 8 +- .../deploy_l1/10_l1resolver.ts | 14 +- .../deploy_l2/01_l2resolver .ts | 25 - .../deployments/sepolia/.chainId | 1 + .../sepolia/ArbL1ReverseResolver.json | 271 ++++++++ .../sepolia/BaseL1ReverseResolver.json | 271 ++++++++ .../sepolia/DefaultReverseResolver.json | 636 +++++++++++++++++ .../sepolia/OpL1ReverseResolver.json | 271 ++++++++ .../1051d0da171e6c4c0eb815a27588fee5.json | 135 ++++ .../776c7519acf1eee16c4cde4c93293488.json | 102 +++ .../7cc7da1092d13c01f4d5f27229751af2.json | 150 +++++ .../82230a92851c1800498f571d3f1bd7cb.json | 126 ++++ .../dcec9c73907104c64dc9e5d2a7545303.json | 126 ++++ crosschain-reverse-resolver/hardhat.config.ts | 33 +- crosschain-reverse-resolver/package.json | 3 +- .../scripts/getname.ts | 32 +- .../scripts/setdefaultname.ts | 60 ++ .../scripts/setname.ts | 21 +- .../test/testReverseResolver.ts | 162 ++++- evm-gateway/package.json | 1 + evm-gateway/src/utils.ts | 4 +- l1-gateway/src/worker.ts | 3 +- op-gateway/README.md | 11 +- op-gateway/src/worker.ts | 82 ++- op-gateway/wrangler.toml | 5 +- tsconfig.json | 1 - 60 files changed, 5330 insertions(+), 352 deletions(-) create mode 100644 crosschain-resolver/contracts/IAddrSetter.sol delete mode 100644 crosschain-resolver/deploy_l2/02_l2resolver_factory.ts create mode 100644 crosschain-resolver/deployments/sepolia/.chainId create mode 100644 crosschain-resolver/deployments/sepolia/ArbL1Resolver.json create mode 100644 crosschain-resolver/deployments/sepolia/BaseL1Resolver.json create mode 100644 crosschain-resolver/deployments/sepolia/OpL1Resolver.json create mode 100644 crosschain-resolver/deployments/sepolia/solcInputs/667f81f7298fe1b6e4eb2d4b4f7418ce.json create mode 100644 crosschain-resolver/deployments/sepolia/solcInputs/f62af331815cb4e74689ba5fa814dd3e.json create mode 100644 crosschain-reverse-resolver/contracts/DefaultReverseResolver.sol create mode 100644 crosschain-reverse-resolver/contracts/IDefaultReverseResolver.sol rename crosschain-resolver/deploy_l2/01_l2resolver.ts => crosschain-reverse-resolver/deploy_l1/01_defaultReverseResolver.ts (64%) delete mode 100644 crosschain-reverse-resolver/deploy_l2/01_l2resolver .ts create mode 100644 crosschain-reverse-resolver/deployments/sepolia/.chainId create mode 100644 crosschain-reverse-resolver/deployments/sepolia/ArbL1ReverseResolver.json create mode 100644 crosschain-reverse-resolver/deployments/sepolia/BaseL1ReverseResolver.json create mode 100644 crosschain-reverse-resolver/deployments/sepolia/DefaultReverseResolver.json create mode 100644 crosschain-reverse-resolver/deployments/sepolia/OpL1ReverseResolver.json create mode 100644 crosschain-reverse-resolver/deployments/sepolia/solcInputs/1051d0da171e6c4c0eb815a27588fee5.json create mode 100644 crosschain-reverse-resolver/deployments/sepolia/solcInputs/776c7519acf1eee16c4cde4c93293488.json create mode 100644 crosschain-reverse-resolver/deployments/sepolia/solcInputs/7cc7da1092d13c01f4d5f27229751af2.json create mode 100644 crosschain-reverse-resolver/deployments/sepolia/solcInputs/82230a92851c1800498f571d3f1bd7cb.json create mode 100644 crosschain-reverse-resolver/deployments/sepolia/solcInputs/dcec9c73907104c64dc9e5d2a7545303.json create mode 100644 crosschain-reverse-resolver/scripts/setdefaultname.ts diff --git a/.gitignore b/.gitignore index 83be1e44..9f77ce06 100644 --- a/.gitignore +++ b/.gitignore @@ -9,7 +9,6 @@ _cjs op-verifier/deployments/opDevnetL1 op-verifier/deployments/opDevnetL2 artifacts -deployments cache .env typechain-types diff --git a/README.md b/README.md index 8142636f..75e3b10d 100644 --- a/README.md +++ b/README.md @@ -95,4 +95,27 @@ This repository also contains the end-to-end tests for the entire stack. An instantiation of `evm-gateway` that targets Optimism. Combined with `op-verifier`, makes it possible for L1 contracts to fetch contract state data from Optimism. ### [op-verifier](/op-verifier/) -A complete Solidity library that facilitates sending CCIP-Read requests for Optimism state, and verifying the responses. \ No newline at end of file +A complete Solidity library that facilitates sending CCIP-Read requests for Optimism state, and verifying the responses. + + +## How to setup locally + +``` +gh repo clone ensdomains/evmgateway +bun install # `@ensdomains/@ensdomains` not found error will be thrown +bun run workspace evm-gateway build +bun install +bun run test +``` + +## Troubleshooting + +### Error HH12: Trying to use a non-local installation of Hardhat, which is not supported. + +`yarn test` spawns `hardhat test` in the forked process. When `hardhat` command is installed under the node_modules of under each workspace, it complains that it's using locally installed hardhat. Remove hardhat from local node_modules and make sure it's only installed under the root `node_modules` + +``` +rm -rf *-*/node_modules/hardhat +rm bun.lockb +bun install +``` \ No newline at end of file diff --git a/arb-gateway/README.md b/arb-gateway/README.md index 37d96604..e580afeb 100644 --- a/arb-gateway/README.md +++ b/arb-gateway/README.md @@ -24,10 +24,11 @@ cd arb-gateway npm install -g wrangler wrngler login -wrangler secret put L1_PROVIDER_URL -wrangler secret put L2_PROVIDER_URL -wrangler secret put L2_ROLLUP -yarn deploy +wrangler secret put L1_PROVIDER_URL --env sepolia +wrangler secret put L2_PROVIDER_URL --env sepolia +wrangler secret put L2_ROLLUP --env sepolia +wrangler secret put ENDPOINT_URL --env sepolia +yarn deploy --env sepolia ``` ## How to test diff --git a/arb-gateway/package.json b/arb-gateway/package.json index b61ec7fa..3db4f8ee 100644 --- a/arb-gateway/package.json +++ b/arb-gateway/package.json @@ -57,7 +57,9 @@ }, "dependencies": { "@chainlink/ccip-read-server": "^0.2.1", + "@cloudflare/workers-types": "^4.20240117.0", "@ensdomains/evm-gateway": "^0.1.0", + "@ensdomains/server-analytics": "0.0.1-alpha.2", "@ethereumjs/block": "^5.0.0", "@nomicfoundation/ethereumjs-block": "^5.0.2", "commander": "^11.0.0", @@ -65,6 +67,5 @@ }, "devDependencies": { "@commander-js/extra-typings": "^11.0.0" - } } diff --git a/arb-gateway/src/worker.ts b/arb-gateway/src/worker.ts index 40b9f348..46287d00 100644 --- a/arb-gateway/src/worker.ts +++ b/arb-gateway/src/worker.ts @@ -1,14 +1,49 @@ +import { Request as CFWRequest } from '@cloudflare/workers-types'; import { Server } from '@ensdomains/ccip-read-cf-worker'; import type { Router } from '@ensdomains/evm-gateway'; import { InMemoryBlockCache } from './blockCache/InMemoryBlockCache.js'; +import { Tracker } from '@ensdomains/server-analytics'; interface Env { L1_PROVIDER_URL: string; L2_PROVIDER_URL: string; L2_ROLLUP: string; + GATEWAY_DOMAIN: string; + ENDPOINT_URL: string; } +interface LogResult { + (request: CFWRequest, result: Response): Promise; +} + +let app: Router, logResult: LogResult; + +const decodeUrl = (url: string) => { + const trackingData = url.match( + /\/0x[a-fA-F0-9]{40}\/0x[a-fA-F0-9]{1,}\.json/ + ); + if (trackingData) { + return { + sender: trackingData[0].slice(1, 42), + calldata: trackingData[0].slice(44).replace('.json', ''), + }; + } else { + return {}; + } +}; + +async function fetch(request: CFWRequest, env: Env) { + // Set PROVIDER_URL under .dev.vars locally. Set the key as secret remotely with `wrangler secret put WORKER_PROVIDER_URL` + const { + L1_PROVIDER_URL, + L2_PROVIDER_URL, + L2_ROLLUP, + GATEWAY_DOMAIN, + ENDPOINT_URL, + } = env; + const tracker = new Tracker(GATEWAY_DOMAIN, { + apiEndpoint: ENDPOINT_URL, + enableLogging: true, + }); -let app: Router; -async function fetch(request: Request, env: Env) { // Loading libraries dynamically as a temp work around. // Otherwise, deployment thorws "Error: Script startup exceeded CPU time limit." error if (!app) { @@ -17,13 +52,37 @@ async function fetch(request: Request, env: Env) { const EVMGateway = (await import('@ensdomains/evm-gateway')).EVMGateway; const ArbProofService = (await import('./ArbProofService.js')) .ArbProofService; - // Set PROVIDER_URL under .dev.vars locally. Set the key as secret remotely with `wrangler secret put WORKER_PROVIDER_URL` - const { L1_PROVIDER_URL, L2_PROVIDER_URL, L2_ROLLUP } = env; const l1Provider = new ethers.JsonRpcProvider(L1_PROVIDER_URL); const l2Provider = new ethers.JsonRpcProvider(L2_PROVIDER_URL); - console.log({ L1_PROVIDER_URL, L2_PROVIDER_URL }); + logResult = async ( + request: CFWRequest, + result: Response + ): Promise => { + if (request.url.match(/favicon/)) { + return result; + } + if (!result.body) { + return result; + } + const [streamForLog, streamForResult] = result.body.tee(); + const logResultData = ( + await new Response(streamForLog).json() + ).data.substring(0, 200); + const props = decodeUrl(request.url); + await tracker.trackEvent( + request, + 'result', + { props: { ...props, result: logResultData } }, + true + ); + const myHeaders = new Headers(); + myHeaders.set('Access-Control-Allow-Origin', '*'); + myHeaders.set('Access-Control-Allow-Methods', 'GET,HEAD,POST,OPTIONS'); + myHeaders.set('Access-Control-Max-Age', '86400'); + return new Response(streamForResult, { ...result, headers: myHeaders }); + }; const gateway = new EVMGateway( new ArbProofService( l1Provider, @@ -37,7 +96,15 @@ async function fetch(request: Request, env: Env) { gateway.add(server); app = server.makeApp('/'); } - return app.handle(request); + + const props = decodeUrl(request.url); + await tracker.trackEvent( + request, + 'request', + { props: { ...props, ...{} } }, + true + ); + return app.handle(request).then(logResult.bind(null, request)); } export default { diff --git a/arb-gateway/wrangler.toml b/arb-gateway/wrangler.toml index 00e1d010..47885357 100644 --- a/arb-gateway/wrangler.toml +++ b/arb-gateway/wrangler.toml @@ -2,7 +2,7 @@ name = "arb-gateway-worker" account_id = "15dcc9085cb794bb4f29d3e8177ac880" main = "./src/worker.ts" node_compat = true -compatibility_date = "2023-10-13" +compatibility_date = "2024-01-25" [dev] @@ -13,3 +13,5 @@ command = "yarn build" [env.sepolia] name = "arb-sepolia-gateway-worker" +[env.sepolia.vars] +GATEWAY_DOMAIN="arb-sepolia-gateway-worker.ens-cf.workers.dev" \ No newline at end of file diff --git a/arb-verifier/hardhat.config.ts b/arb-verifier/hardhat.config.ts index 000a54e2..3da3d073 100644 --- a/arb-verifier/hardhat.config.ts +++ b/arb-verifier/hardhat.config.ts @@ -42,6 +42,7 @@ const config: HardhatUserConfig = { url: L1_PROVIDER_URL, accounts: [DEPLOYER_PRIVATE_KEY], deploy: ['deploy_l1/'], + chainId:11155111, companionNetworks: { l2: 'arbitrumSepolia', }, @@ -52,6 +53,7 @@ const config: HardhatUserConfig = { deploy: ['deploy_l2/'], }, arbitrumSepolia: { + chainId: 421614, url: 'https://sepolia-rollup.arbitrum.io/rpc', accounts: [DEPLOYER_PRIVATE_KEY], deploy: [ "deploy_l2/" ], diff --git a/arb-verifier/test/testArbVerifier.ts b/arb-verifier/test/testArbVerifier.ts index 4729498b..bdf92c15 100644 --- a/arb-verifier/test/testArbVerifier.ts +++ b/arb-verifier/test/testArbVerifier.ts @@ -46,12 +46,14 @@ describe('ArbVerifier', () => { const rollupAddress = process.env.ROLLUP_ADDRESS; // When testing against Goerli, replace with this address // const rollupAddress = '0x45e5cAea8768F42B385A366D3551Ad1e0cbFAb17'; - + const chainId = hre.network.config.chainId + console.log(hre.network.config) + console.log({chainId}) const gateway = await makeArbGateway( - (hre.network.config as any).url, + (hre.network.config as any).url, (hre.config.networks[hre.network.companionNetworks.l2] as any).url, rollupAddress, - 5, + chainId, ); const server = new Server() gateway.add(server) diff --git a/bun.lockb b/bun.lockb index 9ce59e590beed45b36ca3fbb560da34a251aa7d0..d29404047b3b8451abd27e3c9fac7fcd755c974b 100755 GIT binary patch delta 153220 zcmb4s2Y6IP_x{~Y7WM*xP!tF?G-;v31_PS_p;zeyDVtFuI&A1j#|vHvHG(uj zK%^*25etYQC`wm?4Mhr}5#?SkXB?Bu5G=9Ue zYy5{cTT`Qry{x}h8BGh)wCs4VH$BWdI=KRPQSf5G62RqlO{)U*c~i!CGc;||)0&3X zvd4RplaqXzT1IlZXnQ`&6@z?sSxqYf%*sp%XGWEBvc2UBO9NRhw7jMTYnnfMJQD0E zHnqV>A1df5zy|K3p{Ia*LS%*eKq|HhNQJj3`69)?M0x0zeF}(%v*%Tm?Mwo){mcxn zHz{GfHU;?{KsvCv7Ko9THM#^eu=lNEObBS;KTu6p+oiB|b;&m={u4NxPxg*U<@m0t z{6h+l12H0L&m^C=9QD}!A|Si{six$;YRPun0*gaF9r>_}KYJ(=D3d+X7dGCLlB{_$ zMx=W(eBNG=vtW`hY(#QetTwH-Y@j{lv`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AZ%OT$HBurmUoz3K^GG5eI6F8ke(dR038uMHa86 ztiTRIY_sL#DRhy41z>sANyVw1S8QwXE%2XvJ#Hgt#j+rf!d+X#J1(Na68X;GD!_R0 z^?->OSWwm6=m2OFO-q44L%gd(srbX&bKo~T51~+dUKs|r5zsQk!MxEMgykHLN)QA}n}F9;A0m*=x66lA@9Qrc{!ZDh(HT zu%rl9y%vJ~(;bEcjuf0PUW7&mk!yog4tqpfxE&HZoNd7x`KMlsE0HdIO>fo%VJm** zV;7|kyHFGB;>+h=7Z?P(;Xtn543s?LqLj>ftlgf}3Kg!3n;Ug;IZZxJ6WhYlu_0lj z5LOrwXPqZ}Y~tk?xlG!$)O zQyc8arSf8w#lh8T6j#8v&8B|U2`7Ozkpr`i2InTi3a~fvtV@ zl+KsAf&OFM>P;Cver}bXc{p9XkLqm}>1uLPM#&>qao`czxFchuT|kf8?RLA>WXJyj Du$Pmm diff --git a/crosschain-resolver/.gitignore b/crosschain-resolver/.gitignore index 3e41ef81..72719819 100644 --- a/crosschain-resolver/.gitignore +++ b/crosschain-resolver/.gitignore @@ -8,5 +8,4 @@ typechain-types # Hardhat files cache artifacts -deployments diff --git a/crosschain-resolver/README.md b/crosschain-resolver/README.md index a59cac34..f93fdd9d 100644 --- a/crosschain-resolver/README.md +++ b/crosschain-resolver/README.md @@ -58,28 +58,28 @@ Storage verificaton can only verify the data of l2. When the function result nee } ``` +## Deploying (Sepolia) +Before deploying l1 contracts, deploy l2 contracts on https://github.com/ensdomains/ens-contracts -## Deploying (Goerli) +``` +git clone https://github.com/ensdomains/ens-contracts +cd ens-contracts +DEPLOYER_KEY=$DEPLOYER_KEY ETHERSCAN_API_KEY=$ETHERSCAN_API_KEY npx hardhat deploy --tags l2 --network optimismSepolia/baseSepolia/arbSepolia +``` -Create `.env` and set the following variables +Once l2 contracts are deployed, create `.env` and set the following variables - DEPLOYER_PRIVATE_KEY - L1_PROVIDER_URL - L2_PROVIDER_URL - L1_ETHERSCAN_API_KEY -- L2_ETHERSCAN_API_KEY - VERIFIER_ADDRESS - ENS_ADDRESS - WRAPPER_ADDRESS +- L2_GRAPHQL_URL ``` -bun run hardhat deploy --network optimismGoerli -``` - -Followed by the L1 contract: - -``` -bun run hardhat deploy --network goerli +bun run hardhat deploy --network sepolia ``` ## Deployments @@ -102,35 +102,37 @@ const l2Factory = new ethers.Contract(L2_RESOLVER_FACTORY_ADDRESS, abi, l2provid const l2resolverAddress = await l2Factory.predictAddress(ETH_ADDRESS) ``` -### OP +### OP on Sepolia + #### L2 -- DelegatableResolver = [0xE00739Fc93e27aBf44343fD5FAA151c67C0A0Aa3](https://goerli-optimism.etherscan.io/address/0xE00739Fc93e27aBf44343fD5FAA151c67C0A0Aa3) = this is used as a template so cannot interact directly -- DelegatableResolverFactory = [0xacB9771923873614d77C914D716d8E25dAF09b8d](https://goerli-optimism.etherscan.io/address/0xacB9771923873614d77C914D716d8E25dAF09b8d) +- DelegatableResolver = [0x017845E4518dB01EFCAFd7Acb192aF924B432d66](https://sepolia-optimism.etherscan.io/address/0x017845E4518dB01EFCAFd7Acb192aF924B432d66#code +) = this is used as a template so cannot interact directly +- DelegatableResolverFactory = [0x79b784075600c5C420aC3CEd45f04EEA50306a96](https://sepolia-optimism.etherscan.io/address/0x79b784075600c5C420aC3CEd45f04EEA50306a96#code) #### L1 -- OPVerifier = [0xe58448bfc2fa097953e800e0af0b0a5257ecc4b1](https://goerli.etherscan.io/address/0xe58448bfc2fa097953e800e0af0b0a5257ecc4b1) -- L1Resolver = [0x7Bf57B0a683CC964B0fEe30633A72F5c05464a0f](https://goerli.etherscan.io/address/0x7Bf57B0a683CC964B0fEe30633A72F5c05464a0f) = Currently `op.evmgateway.eth` is set to the resolver +- OPVerifier = [0x0e8DA38565915B7e74e2d78F80ba1BF815F34116](https://sepolia.etherscan.io/address/0x0e8DA38565915B7e74e2d78F80ba1BF815F34116#code) +- L1Resolver = [0x57C1f50093C1017AE81EBAF336511ACcc48061e2](https://sepolia.etherscan.io/address/0x57C1f50093C1017AE81EBAF336511ACcc48061e2#code) = Currently `op.evmgateway.eth` is set to the resolver -### Base +### Base on Sepolia #### L2 -- DelegatableResolver = [0x60BDFeF9ff7bB47d95d1658Be925587F046AE2C7](https://goerli.basescan.org/address/0x7d56Bc48F0802319CB7C79B421Fa5661De905AF7) = this is used as a template so cannot interact directly -- DelegatableResolverFactory = [0x7d56Bc48F0802319CB7C79B421Fa5661De905AF7](https://goerli.basescan.org/address/0x7d56Bc48F0802319CB7C79B421Fa5661De905AF7) +- DelegatableResolver = [0xd8A6B88b0a0B419fCce6cfBD60F21f1b7761eeB2](https://sepolia.basescan.org/address/0xd8A6B88b0a0B419fCce6cfBD60F21f1b7761eeB2#code) = this is used as a template so cannot interact directly +- DelegatableResolverFactory = [0xCcFC8Be7f65E1D46Af71cf6C06668DDA25f51e3e](https://sepolia.basescan.org/address/0xCcFC8Be7f65E1D46Af71cf6C06668DDA25f51e3e#code) #### L1 -- OPVerifier = [0x7e2f9c4a1467e8a41e1e8283ba3ba72e3d92f6b8](https://goerli.etherscan.io/address/0x7e2f9c4a1467e8a41e1e8283ba3ba72e3d92f6b8) -- L1Resolver = [0x3Ac25843A1F696fe2166C5dE127FD4f2832F4d42](https://goerli.etherscan.io/address/0x3Ac25843A1F696fe2166C5dE127FD4f2832F4d42) = Currently `base.evmgateway.eth` is set to the resolver +- OPVerifier = [0xAdef74372444e716C0473dEe1F9Cb3108EFa3818](https://sepolia.etherscan.io/address/0xAdef74372444e716C0473dEe1F9Cb3108EFa3818#code +) +- L1Resolver = [0xF6EfB10e47d6D4C1023BBFa5e6396B00915FbD41](https://sepolia.etherscan.io/address/0xF6EfB10e47d6D4C1023BBFa5e6396B00915FbD41#code) = Currently `base.evmgateway.eth` is set to the resolver -### Arbitrum +### Arbitrum on Sepolia #### L2 -- DelegatableResolver = [0x5F5e99139a17c56eadC3B1d01535224d003B7E5b](https://goerli.arbiscan.io/address/0x5F5e99139a17c56eadC3B1d01535224d003B7E5b) this is used as a template so cannot interact directly -- DelegatableResolverFactory = [0x94fbCE7ca1a0152cfC99F90f4421d31cf356c896](https://goerli.arbiscan.io/address/0x94fbCE7ca1a0152cfC99F90f4421d31cf356c896) -- [0xf91e7d97e4dbb5303f047b135247073d7991cbdb] +- DelegatableResolver = [0xCcFC8Be7f65E1D46Af71cf6C06668DDA25f51e3e](https://api-sepolia.arbiscan.io/address/0xCcFC8Be7f65E1D46Af71cf6C06668DDA25f51e3e#code) this is used as a template so cannot interact directly +- DelegatableResolverFactory = [0xF2c102E96A183fC598d83fDccF4e30cfE83aedCd](https://api-sepolia.arbiscan.io/address/0xF2c102E96A183fC598d83fDccF4e30cfE83aedCd#code) #### L1 -- ArbVerifier = [0x9E46DeE08Ad370bEFa7858c0E9a6c87f2D7E57A1](https://goerli.etherscan.io/address/0x9E46DeE08Ad370bEFa7858c0E9a6c87f2D7E57A1#code) -- L1Resolver = [0xFb42a2d1A28A10607ee426764BdcdA7d121731AD](https://goerli.etherscan.io/address/0xFb42a2d1A28A10607ee426764BdcdA7d121731AD#code) +- ArbVerifier = [0x6820E47CED34D6F275c6d26C3876D48B2c1fdf27](https://sepolia.etherscan.io/address/0x6820E47CED34D6F275c6d26C3876D48B2c1fdf27#code) +- L1Resolver = [0xA47b9B72571e23604f067dfd4F22785c33E9cF9c](https://sepolia.etherscan.io/address/0xA47b9B72571e23604f067dfd4F22785c33E9cF9c#code) = Currently `arb.evmgateway.eth` is set to the resolver ## Usage @@ -167,7 +169,7 @@ DEPLOYER_PRIVATE_KEY=$DEPLOYER_PRIVATE_KEY L1_PROVIDER_URL=$L1_PROVIDER_URL L2_P ``` ``` -DEPLOYER_PRIVATE_KEY=$DEPLOYER_PRIVATE_KEY L1_PROVIDER_URL=$L1_PROVIDER_URL L2_PROVIDER_URL=$L2_PROVIDER_URL L1_ETHERSCAN_API_KEY=$L1_ETHERSCAN_API_KEY L2_ETHERSCAN_API_KEY=$L2_ETHERSCAN_API_KEY L2_PROVIDER_URL=$L2_PROVIDER_URL L2_RESOLVER_FACTORY_ADDRESS=$L2_RESOLVER_FACTORY_ADDRESS ENS_NAME=$ENS_NAME yarn setupl2 +DEPLOYER_PRIVATE_KEY=$DEPLOYER_PRIVATE_KEY L1_PROVIDER_URL=$L1_PROVIDER_URL L2_PROVIDER_URL=$L2_PROVIDER_URL L1_ETHERSCAN_API_KEY=$L1_ETHERSCAN_API_KEY L2_ETHERSCAN_API_KEY=$L2_ETHERSCAN_API_KEY L2_PROVIDER_URL=$L2_PROVIDER_URL L2_RESOLVER_FACTORY_ADDRESS=$L2_RESOLVER_FACTORY_ADDRESS ENS_NAME=$ENS_NAME yarn setupl2 --network optimismSepolia/baseSepolia/arbitrumSepolia ``` ``` @@ -192,8 +194,7 @@ await DelegatableResolver.approve(encodedname, OWNER_ADDRESS, true) Using the script ``` -OPERATOR_ADDRESS=0x5A384227B65FA093DEC03Ec34e111Db80A040615 -DEPLOYER_PRIVATE_KEY=$DEPLOYER_PRIVATE_KEY L1_PROVIDER_URL=$L1_PROVIDER_URL L2_PROVIDER_URL=$L2_PROVIDER_URL L1_ETHERSCAN_API_KEY=$L1_ETHERSCAN_API_KEY L2_ETHERSCAN_API_KEY=$L2_ETHERSCAN_API_KEY L2_PROVIDER_URL=$L2_PROVIDER_URL L2_RESOLVER_FACTORY_ADDRESS=$L2_RESOLVER_FACTORY_ADDRESS ENS_SUBNAME=$ENS_SUBNAME yarn approve +OPERATOR_ADDRESS=$OPERATOR_ADDRESS DEPLOYER_PRIVATE_KEY=$DEPLOYER_PRIVATE_KEY L1_PROVIDER_URL=$L1_PROVIDER_URL L2_PROVIDER_URL=$L2_PROVIDER_URL L1_ETHERSCAN_API_KEY=$L1_ETHERSCAN_API_KEY L2_ETHERSCAN_API_KEY=$L2_ETHERSCAN_API_KEY L2_PROVIDER_URL=$L2_PROVIDER_URL L2_RESOLVER_FACTORY_ADDRESS=$L2_RESOLVER_FACTORY_ADDRESS ENS_SUBNAME=$ENS_SUBNAME yarn approve --network optimismSepolia/baseSepolia/arbSepolia ``` Once done, set addrss of the subname from the operator, wait 10~20 min, then query the subname on L1 diff --git a/crosschain-resolver/contracts/IAddrSetter.sol b/crosschain-resolver/contracts/IAddrSetter.sol new file mode 100644 index 00000000..05e78ee9 --- /dev/null +++ b/crosschain-resolver/contracts/IAddrSetter.sol @@ -0,0 +1,7 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.17; + +interface IAddrSetter{ + function setAddr(bytes calldata name, address _addr) external view returns (bytes memory result); +} + diff --git a/crosschain-resolver/contracts/IMetadataResolver.sol b/crosschain-resolver/contracts/IMetadataResolver.sol index bcecbeb3..bf3a0fd0 100644 --- a/crosschain-resolver/contracts/IMetadataResolver.sol +++ b/crosschain-resolver/contracts/IMetadataResolver.sol @@ -6,27 +6,15 @@ interface IMetadataResolver { * @notice Get metadata about the CCIP Resolver ENSIP 16 https://docs.ens.domains/ens-improvement-proposals/ensip-16-offchain-metadata * @dev This function provides metadata about the CCIP Resolver, including its name, coin type, GraphQL URL, storage type, and encoded information. * @param name The domain name in format (dnsEncoded) - * @return coinType The cointype of the chain the target contract locates such as Optimism, Base, Arb, etc * @return graphqlUrl The GraphQL URL used by the resolver - * @return storageType 0 = EVM, 1 = Non blockchain, 2 = Starknet - * @return storageLocation The storage identifier. For EVM chains, this is the address of the resolver contract. - * @return context. An identifier used by l2 graph indexer for Domain schema id (`context-namehash`) allowing multiple resolver contracts to have own namespace. * */ function metadata(bytes calldata name) external view returns ( - uint256 coinType, - string memory graphqlUrl, - uint8 storageType, - bytes memory storageLocation, - bytes memory context + string memory graphqlUrl ); event MetadataChanged( bytes name, - uint256 coinType, - string graphqlUrl, - uint8 storageType, - bytes storageLocation, - bytes context + string graphqlUrl ); } \ No newline at end of file diff --git a/crosschain-resolver/contracts/L1Resolver.sol b/crosschain-resolver/contracts/L1Resolver.sol index 49c10aac..db6ff635 100644 --- a/crosschain-resolver/contracts/L1Resolver.sol +++ b/crosschain-resolver/contracts/L1Resolver.sol @@ -15,8 +15,9 @@ import "@ensdomains/ens-contracts/contracts/resolvers/profiles/IExtendedResolver import {ITargetResolver} from './ITargetResolver.sol'; import {IMetadataResolver} from './IMetadataResolver.sol'; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; +import { IAddrSetter } from './IAddrSetter.sol'; -contract L1Resolver is EVMFetchTarget, ITargetResolver, IMetadataResolver, IExtendedResolver, ERC165 { +contract L1Resolver is EVMFetchTarget, ITargetResolver, IMetadataResolver, IExtendedResolver, IAddrSetter, ERC165 { using EVMFetcher for EVMFetcher.EVMFetchRequest; using BytesUtils for bytes; IEVMVerifier public immutable verifier; @@ -29,7 +30,7 @@ contract L1Resolver is EVMFetchTarget, ITargetResolver, IMetadataResolver, IExte uint256 constant VERSIONABLE_HASHES_SLOT = 3; uint256 constant VERSIONABLE_TEXTS_SLOT = 10; string public graphqlUrl; - uint256 public l2ResolverCoinType; + uint256 public l2ChainId; event TargetSet(bytes name, address target); function isAuthorised(bytes32 node) internal view returns (bool) { @@ -45,19 +46,29 @@ contract L1Resolver is EVMFetchTarget, ITargetResolver, IMetadataResolver, IExte return owner == msg.sender; } + /** + * @dev EIP-5559 - Error to raise when mutations are being deferred to an L2. + * @param chainId Chain ID to perform the deferred mutation to. + * @param contractAddress Contract Address at which the deferred mutation should transact with. + */ + error StorageHandledByL2( + uint256 chainId, + address contractAddress + ); + /** * @param _verifier The chain verifier address * @param _ens The ENS registry address * @param _nameWrapper The ENS name wrapper address * @param _graphqlUrl The offchain/l2 graphql endpoint url - * @param _l2ResolverCoinType The chainId at which the resolver resolves data from. 0 if storageLocation is offChain + * @param _l2ChainId The chainId at which the resolver resolves data from */ constructor( IEVMVerifier _verifier, ENS _ens, INameWrapper _nameWrapper, string memory _graphqlUrl, - uint256 _l2ResolverCoinType + uint256 _l2ChainId ){ require(address(_nameWrapper) != address(0), "Name Wrapper address must be set"); require(address(_verifier) != address(0), "Verifier address must be set"); @@ -66,7 +77,7 @@ contract L1Resolver is EVMFetchTarget, ITargetResolver, IMetadataResolver, IExte ens = _ens; nameWrapper = _nameWrapper; graphqlUrl = _graphqlUrl; - l2ResolverCoinType = _l2ResolverCoinType; + l2ChainId = _l2ChainId; } /** @@ -79,19 +90,9 @@ contract L1Resolver is EVMFetchTarget, ITargetResolver, IMetadataResolver, IExte require(isAuthorised(node)); targets[node] = target; emit TargetSet(name, target); - ( - ,, - uint8 storageType, - bytes memory storageLocation, - bytes memory context - ) = metadata(name); emit MetadataChanged( name, - l2ResolverCoinType, - graphqlUrl, - storageType, - storageLocation, - context + graphqlUrl ); } @@ -163,6 +164,17 @@ contract L1Resolver is EVMFetchTarget, ITargetResolver, IMetadataResolver, IExte } } + /** + * @dev Resolve and throws an EIP 3559 compliant error + * @param name DNS encoded ENS name to query + * @param _addr The actual calldata + * @return result result of the call + */ + function setAddr(bytes calldata name, address _addr) external view returns (bytes memory result) { + (, address target) = _getTarget(name, 0); + _writeDeferral(target); + } + function _addr(bytes32 node, address target) private view returns (bytes memory) { EVMFetcher.newFetchRequest(verifier, target) .getStatic(RECORD_VERSIONS_SLOT) @@ -246,23 +258,13 @@ contract L1Resolver is EVMFetchTarget, ITargetResolver, IMetadataResolver, IExte * @notice Get metadata about the L1 Resolver * @dev This function provides metadata about the L1 Resolver, including its name, coin type, GraphQL URL, storage type, and encoded information. * @param name The domain name in format (dnsEncoded) - * @return coinType The cointype of the chain the target contract locates such as Optimism, Base, Arb, etc * @return graphqlUrl The GraphQL URL used by the resolver - * @return storageType Storage Type (0 for EVM) - * @return storageLocation The storage identifier. For EVM chains, this is the address of the resolver contract. - * @return context. An identifier used by l2 graph indexer for Domain schema id (`context-namehash`) allowing multiple resolver contracts to have own namespace. */ function metadata( bytes calldata name - ) public view returns (uint256, string memory, uint8, bytes memory, bytes memory) { - (, address target) = getTarget(name); - + ) public view returns (string memory) { return ( - l2ResolverCoinType, - graphqlUrl, - uint8(0), // storage Type 0 => EVM - abi.encodePacked(address(target)), // storage location => l2 resolver address - abi.encodePacked(address(target)) // context => l2 resolver address + graphqlUrl ); } @@ -273,6 +275,14 @@ contract L1Resolver is EVMFetchTarget, ITargetResolver, IMetadataResolver, IExte interfaceId == type(IExtendedResolver).interfaceId || interfaceId == type(ITargetResolver).interfaceId || interfaceId == type(IMetadataResolver).interfaceId || + interfaceId == type(IAddrSetter).interfaceId || super.supportsInterface(interfaceId); } + + function _writeDeferral(address target) internal view { + revert StorageHandledByL2( + l2ChainId, + target + ); + } } diff --git a/crosschain-resolver/contracts/deps.sol b/crosschain-resolver/contracts/deps.sol index a89d3807..706dcf3d 100644 --- a/crosschain-resolver/contracts/deps.sol +++ b/crosschain-resolver/contracts/deps.sol @@ -6,6 +6,8 @@ import "@ensdomains/l1-verifier/contracts/L1Verifier.sol"; import {ReverseRegistrar} from "@ensdomains/ens-contracts/contracts/reverseRegistrar/ReverseRegistrar.sol"; import {PublicResolver} from "@ensdomains/ens-contracts/contracts/resolvers/PublicResolver.sol"; import {DelegatableResolverFactory} from "@ensdomains/ens-contracts/contracts/resolvers/DelegatableResolverFactory.sol"; +import {DelegatableResolver} from "@ensdomains/ens-contracts/contracts/resolvers/DelegatableResolver.sol"; +import {L2ReverseResolver} from '@ensdomains/ens-contracts/contracts/reverseRegistrar/L2ReverseResolver.sol'; // Storage slot // ┌────────────────────────────┬──────────────────────────────┬──────────────┬ // │ contract │ state_variable │ storage_slot │ diff --git a/crosschain-resolver/deploy_l1/10_l1resolver.ts b/crosschain-resolver/deploy_l1/10_l1resolver.ts index 9ef9a503..584f0c15 100644 --- a/crosschain-resolver/deploy_l1/10_l1resolver.ts +++ b/crosschain-resolver/deploy_l1/10_l1resolver.ts @@ -12,21 +12,21 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const ENS_ADDRESS = process.env.ENS_ADDRESS const WRAPPER_ADDRESS = process.env.WRAPPER_ADDRESS const L2_GRAPHQL_URL = process.env.L2_GRAPHQL_URL - const L2_RESOLVER_NAME = process.env.L2_RESOLVER_NAME const L2_CHAIN_ID = process.env.L2_CHAIN_ID if(!VERIFIER_ADDRESS) throw ('Set $VERIFIER_ADDRESS') if(!ENS_ADDRESS) throw ('Set $ENS_ADDRESS') if(!WRAPPER_ADDRESS) throw ('Set $WRAPPER_ADDRESS') if(!L2_GRAPHQL_URL) throw ('Set $L2_GRAPHQL_URL') - if(!L2_RESOLVER_NAME) throw ('Set $L2_RESOLVER_NAME') if(!L2_CHAIN_ID) throw ('Set $L2_CHAIN_ID') - - const L2_COINTYPE = convertEVMChainIdToCoinType(parseInt(L2_CHAIN_ID)) - console.log({VERIFIER_ADDRESS,ENS_ADDRESS, WRAPPER_ADDRESS,L2_GRAPHQL_URL,L2_RESOLVER_NAME,L2_COINTYPE}) - await deploy('L1Resolver', { + const CHAIN_NAME = process.env.CHAIN_NAME + + if(!['Op', 'Base', 'Arb'].includes(CHAIN_NAME)) throw ('Set $CHAIN_NAME to Op, Base, or Arb') + console.log({VERIFIER_ADDRESS,ENS_ADDRESS, WRAPPER_ADDRESS,L2_GRAPHQL_URL,L2_CHAIN_ID}) + await deploy(`${CHAIN_NAME}L1Resolver`, { from: deployer, - args: [VERIFIER_ADDRESS,ENS_ADDRESS,WRAPPER_ADDRESS,L2_GRAPHQL_URL,L2_RESOLVER_NAME,L2_COINTYPE], + contract: 'L1Resolver', + args: [VERIFIER_ADDRESS,ENS_ADDRESS,WRAPPER_ADDRESS,L2_GRAPHQL_URL,parseInt(L2_CHAIN_ID)], log: true, }); }; diff --git a/crosschain-resolver/deploy_l2/02_l2resolver_factory.ts b/crosschain-resolver/deploy_l2/02_l2resolver_factory.ts deleted file mode 100644 index 3f51588e..00000000 --- a/crosschain-resolver/deploy_l2/02_l2resolver_factory.ts +++ /dev/null @@ -1,18 +0,0 @@ -import {HardhatRuntimeEnvironment} from 'hardhat/types'; -import {DeployFunction} from 'hardhat-deploy/types'; - -const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { - const {deployments, getNamedAccounts} = hre; - const {deploy} = deployments; - const {deployer} = await getNamedAccounts(); - const DelegatableResolver = await deployments.get('DelegatableResolver'); - const factory = await deploy('DelegatableResolverFactory', { - from: deployer, - args: [DelegatableResolver.address], - log: true - }); - console.log(`DelegatableResolverFactory is deployed at ${factory.address} with ${DelegatableResolver.address}`) -}; -export default func; -module.exports.dependencies = ['DelegatableResolver']; -func.tags = ['DelegatableResolverFactory']; diff --git a/crosschain-resolver/deployments/sepolia/.chainId b/crosschain-resolver/deployments/sepolia/.chainId new file mode 100644 index 00000000..bd8d1cd4 --- /dev/null +++ b/crosschain-resolver/deployments/sepolia/.chainId @@ -0,0 +1 @@ +11155111 \ No newline at end of file diff --git a/crosschain-resolver/deployments/sepolia/ArbL1Resolver.json b/crosschain-resolver/deployments/sepolia/ArbL1Resolver.json new file mode 100644 index 00000000..f069e8ba --- /dev/null +++ b/crosschain-resolver/deployments/sepolia/ArbL1Resolver.json @@ -0,0 +1,637 @@ +{ + "address": "0xA47b9B72571e23604f067dfd4F22785c33E9cF9c", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IEVMVerifier", + "name": "_verifier", + "type": "address" + }, + { + "internalType": "contract ENS", + "name": "_ens", + "type": "address" + }, + { + "internalType": "contract INameWrapper", + "name": "_nameWrapper", + "type": "address" + }, + { + "internalType": "string", + "name": "_graphqlUrl", + "type": "string" + }, + { + "internalType": "uint256", + "name": "_l2ResolverCoinType", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "CommandTooLong", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "InvalidReference", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "string[]", + "name": "urls", + "type": "string[]" + }, + { + "internalType": "bytes", + "name": "callData", + "type": "bytes" + }, + { + "internalType": "bytes4", + "name": "callbackFunction", + "type": "bytes4" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "name": "OffchainLookup", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "actual", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + } + ], + "name": "ResponseLengthMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "TooManyCommands", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes", + "name": "name", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "coinType", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "graphqlUrl", + "type": "string" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "storageType", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "storageLocation", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "context", + "type": "bytes" + } + ], + "name": "MetadataChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes", + "name": "name", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "TargetSet", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes[]", + "name": "values", + "type": "bytes[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "addrCallback", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes[]", + "name": "values", + "type": "bytes[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "addrCoinTypeCallback", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes[]", + "name": "values", + "type": "bytes[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "contenthashCallback", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "ens", + "outputs": [ + { + "internalType": "contract ENS", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "response", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "extradata", + "type": "bytes" + } + ], + "name": "getStorageSlotsCallback", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "name", + "type": "bytes" + } + ], + "name": "getTarget", + "outputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "graphqlUrl", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "l2ResolverCoinType", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "name", + "type": "bytes" + } + ], + "name": "metadata", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "string", + "name": "", + "type": "string" + }, + { + "internalType": "uint8", + "name": "", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "nameWrapper", + "outputs": [ + { + "internalType": "contract INameWrapper", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "name", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "resolve", + "outputs": [ + { + "internalType": "bytes", + "name": "result", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "name", + "type": "bytes" + }, + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "setTarget", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes[]", + "name": "values", + "type": "bytes[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "textCallback", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "verifier", + "outputs": [ + { + "internalType": "contract IEVMVerifier", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0xdf13c6e9540302b557d276ee4d7f278fd088299860fe97d32cf5963b0436d95e", + "receipt": { + "to": null, + "from": "0xDBBC2C0fe2a1D0fB4056B35a22e543bEb715E7FC", + "contractAddress": "0xA47b9B72571e23604f067dfd4F22785c33E9cF9c", + "transactionIndex": 39, + "gasUsed": "2202571", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x74fb84c6b7a18084fba52441e919bef2457de051f54ee53609f940fc698c06c7", + "transactionHash": "0xdf13c6e9540302b557d276ee4d7f278fd088299860fe97d32cf5963b0436d95e", + "logs": [], + "blockNumber": 5133289, + "cumulativeGasUsed": "25598066", + "status": 1, + "byzantium": true + }, + "args": [ + "0x6820E47CED34D6F275c6d26C3876D48B2c1fdf27", + "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e", + "0x0635513f179D50A207757E05759CbD106d7dFcE8", + "https://api.studio.thegraph.com/query/1397/ens-arb-sepolia/version/latest", + 2147905262 + ], + "numDeployments": 1, + "solcInputHash": "f62af331815cb4e74689ba5fa814dd3e", + "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IEVMVerifier\",\"name\":\"_verifier\",\"type\":\"address\"},{\"internalType\":\"contract ENS\",\"name\":\"_ens\",\"type\":\"address\"},{\"internalType\":\"contract INameWrapper\",\"name\":\"_nameWrapper\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_graphqlUrl\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_l2ResolverCoinType\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"CommandTooLong\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"max\",\"type\":\"uint256\"}],\"name\":\"InvalidReference\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"string[]\",\"name\":\"urls\",\"type\":\"string[]\"},{\"internalType\":\"bytes\",\"name\":\"callData\",\"type\":\"bytes\"},{\"internalType\":\"bytes4\",\"name\":\"callbackFunction\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"OffchainLookup\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"actual\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expected\",\"type\":\"uint256\"}],\"name\":\"ResponseLengthMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"max\",\"type\":\"uint256\"}],\"name\":\"TooManyCommands\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"name\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"coinType\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"graphqlUrl\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"storageType\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"storageLocation\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"context\",\"type\":\"bytes\"}],\"name\":\"MetadataChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"name\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"TargetSet\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"values\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"addrCallback\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"values\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"addrCoinTypeCallback\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"values\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"contenthashCallback\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ens\",\"outputs\":[{\"internalType\":\"contract ENS\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"response\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"extradata\",\"type\":\"bytes\"}],\"name\":\"getStorageSlotsCallback\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"name\",\"type\":\"bytes\"}],\"name\":\"getTarget\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"graphqlUrl\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"l2ResolverCoinType\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"name\",\"type\":\"bytes\"}],\"name\":\"metadata\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nameWrapper\",\"outputs\":[{\"internalType\":\"contract INameWrapper\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"name\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"result\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"name\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"setTarget\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"values\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"textCallback\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"verifier\",\"outputs\":[{\"internalType\":\"contract IEVMVerifier\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_ens\":\"The ENS registry address\",\"_graphqlUrl\":\"The offchain/l2 graphql endpoint url\",\"_l2ResolverCoinType\":\"The chainId at which the resolver resolves data from. 0 if storageLocation is offChain\",\"_nameWrapper\":\"The ENS name wrapper address\",\"_verifier\":\"The chain verifier address\"}},\"getStorageSlotsCallback(bytes,bytes)\":{\"details\":\"Internal callback function invoked by CCIP-Read in response to a `getStorageSlots` request.\"},\"getTarget(bytes)\":{\"details\":\"Returns the L2 target address that can answer queries for `name`.\",\"params\":{\"name\":\"DNS encoded ENS name to query\"},\"returns\":{\"node\":\"The node of the name\",\"target\":\"The L2 resolver address to verify against.\"}},\"metadata(bytes)\":{\"details\":\"This function provides metadata about the L1 Resolver, including its name, coin type, GraphQL URL, storage type, and encoded information.\",\"params\":{\"name\":\"The domain name in format (dnsEncoded)\"},\"returns\":{\"_0\":\"coinType The cointype of the chain the target contract locates such as Optimism, Base, Arb, etc\",\"_1\":\"graphqlUrl The GraphQL URL used by the resolver\",\"_2\":\"storageType Storage Type (0 for EVM)\",\"_3\":\"storageLocation The storage identifier. For EVM chains, this is the address of the resolver contract.\",\"_4\":\"context. An identifier used by l2 graph indexer for Domain schema id (`context-namehash`) allowing multiple resolver contracts to have own namespace.\"}},\"resolve(bytes,bytes)\":{\"details\":\"Resolve and verify a record stored in l2 target address. It supports subname by fetching target recursively to the nearlest parent.\",\"params\":{\"data\":\"The actual calldata\",\"name\":\"DNS encoded ENS name to query\"},\"returns\":{\"result\":\"result of the call\"}},\"setTarget(bytes,address)\":{\"params\":{\"name\":\"The encoded name to query.\",\"target\":\"The L2 resolver address to verify against.\"}},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"metadata(bytes)\":{\"notice\":\"Get metadata about the L1 Resolver\"},\"setTarget(bytes,address)\":{\"notice\":\"Set target address to verify aagainst\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/L1Resolver.sol\":\"L1Resolver\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1200},\"remappings\":[],\"viaIR\":true},\"sources\":{\"@ensdomains/ens-contracts/contracts/dnssec-oracle/BytesUtils.sol\":{\"content\":\"pragma solidity ^0.8.4;\\n\\nlibrary BytesUtils {\\n error OffsetOutOfBoundsError(uint256 offset, uint256 length);\\n\\n /*\\n * @dev Returns the keccak-256 hash of a byte range.\\n * @param self The byte string to hash.\\n * @param offset The position to start hashing at.\\n * @param len The number of bytes to hash.\\n * @return The hash of the byte range.\\n */\\n function keccak(\\n bytes memory self,\\n uint256 offset,\\n uint256 len\\n ) internal pure returns (bytes32 ret) {\\n require(offset + len <= self.length);\\n assembly {\\n ret := keccak256(add(add(self, 32), offset), len)\\n }\\n }\\n\\n /*\\n * @dev Returns a positive number if `other` comes lexicographically after\\n * `self`, a negative number if it comes before, or zero if the\\n * contents of the two bytes are equal.\\n * @param self The first bytes to compare.\\n * @param other The second bytes to compare.\\n * @return The result of the comparison.\\n */\\n function compare(\\n bytes memory self,\\n bytes memory other\\n ) internal pure returns (int256) {\\n return compare(self, 0, self.length, other, 0, other.length);\\n }\\n\\n /*\\n * @dev Returns a positive number if `other` comes lexicographically after\\n * `self`, a negative number if it comes before, or zero if the\\n * contents of the two bytes are equal. Comparison is done per-rune,\\n * on unicode codepoints.\\n * @param self The first bytes to compare.\\n * @param offset The offset of self.\\n * @param len The length of self.\\n * @param other The second bytes to compare.\\n * @param otheroffset The offset of the other string.\\n * @param otherlen The length of the other string.\\n * @return The result of the comparison.\\n */\\n function compare(\\n bytes memory self,\\n uint256 offset,\\n uint256 len,\\n bytes memory other,\\n uint256 otheroffset,\\n uint256 otherlen\\n ) internal pure returns (int256) {\\n if (offset + len > self.length) {\\n revert OffsetOutOfBoundsError(offset + len, self.length);\\n }\\n if (otheroffset + otherlen > other.length) {\\n revert OffsetOutOfBoundsError(otheroffset + otherlen, other.length);\\n }\\n\\n uint256 shortest = len;\\n if (otherlen < len) shortest = otherlen;\\n\\n uint256 selfptr;\\n uint256 otherptr;\\n\\n assembly {\\n selfptr := add(self, add(offset, 32))\\n otherptr := add(other, add(otheroffset, 32))\\n }\\n for (uint256 idx = 0; idx < shortest; idx += 32) {\\n uint256 a;\\n uint256 b;\\n assembly {\\n a := mload(selfptr)\\n b := mload(otherptr)\\n }\\n if (a != b) {\\n // Mask out irrelevant bytes and check again\\n uint256 mask;\\n if (shortest - idx >= 32) {\\n mask = type(uint256).max;\\n } else {\\n mask = ~(2 ** (8 * (idx + 32 - shortest)) - 1);\\n }\\n int256 diff = int256(a & mask) - int256(b & mask);\\n if (diff != 0) return diff;\\n }\\n selfptr += 32;\\n otherptr += 32;\\n }\\n\\n return int256(len) - int256(otherlen);\\n }\\n\\n /*\\n * @dev Returns true if the two byte ranges are equal.\\n * @param self The first byte range to compare.\\n * @param offset The offset into the first byte range.\\n * @param other The second byte range to compare.\\n * @param otherOffset The offset into the second byte range.\\n * @param len The number of bytes to compare\\n * @return True if the byte ranges are equal, false otherwise.\\n */\\n function equals(\\n bytes memory self,\\n uint256 offset,\\n bytes memory other,\\n uint256 otherOffset,\\n uint256 len\\n ) internal pure returns (bool) {\\n return keccak(self, offset, len) == keccak(other, otherOffset, len);\\n }\\n\\n /*\\n * @dev Returns true if the two byte ranges are equal with offsets.\\n * @param self The first byte range to compare.\\n * @param offset The offset into the first byte range.\\n * @param other The second byte range to compare.\\n * @param otherOffset The offset into the second byte range.\\n * @return True if the byte ranges are equal, false otherwise.\\n */\\n function equals(\\n bytes memory self,\\n uint256 offset,\\n bytes memory other,\\n uint256 otherOffset\\n ) internal pure returns (bool) {\\n return\\n keccak(self, offset, self.length - offset) ==\\n keccak(other, otherOffset, other.length - otherOffset);\\n }\\n\\n /*\\n * @dev Compares a range of 'self' to all of 'other' and returns True iff\\n * they are equal.\\n * @param self The first byte range to compare.\\n * @param offset The offset into the first byte range.\\n * @param other The second byte range to compare.\\n * @return True if the byte ranges are equal, false otherwise.\\n */\\n function equals(\\n bytes memory self,\\n uint256 offset,\\n bytes memory other\\n ) internal pure returns (bool) {\\n return\\n self.length == offset + other.length &&\\n equals(self, offset, other, 0, other.length);\\n }\\n\\n /*\\n * @dev Returns true if the two byte ranges are equal.\\n * @param self The first byte range to compare.\\n * @param other The second byte range to compare.\\n * @return True if the byte ranges are equal, false otherwise.\\n */\\n function equals(\\n bytes memory self,\\n bytes memory other\\n ) internal pure returns (bool) {\\n return\\n self.length == other.length &&\\n equals(self, 0, other, 0, self.length);\\n }\\n\\n /*\\n * @dev Returns the 8-bit number at the specified index of self.\\n * @param self The byte string.\\n * @param idx The index into the bytes\\n * @return The specified 8 bits of the string, interpreted as an integer.\\n */\\n function readUint8(\\n bytes memory self,\\n uint256 idx\\n ) internal pure returns (uint8 ret) {\\n return uint8(self[idx]);\\n }\\n\\n /*\\n * @dev Returns the 16-bit number at the specified index of self.\\n * @param self The byte string.\\n * @param idx The index into the bytes\\n * @return The specified 16 bits of the string, interpreted as an integer.\\n */\\n function readUint16(\\n bytes memory self,\\n uint256 idx\\n ) internal pure returns (uint16 ret) {\\n require(idx + 2 <= self.length);\\n assembly {\\n ret := and(mload(add(add(self, 2), idx)), 0xFFFF)\\n }\\n }\\n\\n /*\\n * @dev Returns the 32-bit number at the specified index of self.\\n * @param self The byte string.\\n * @param idx The index into the bytes\\n * @return The specified 32 bits of the string, interpreted as an integer.\\n */\\n function readUint32(\\n bytes memory self,\\n uint256 idx\\n ) internal pure returns (uint32 ret) {\\n require(idx + 4 <= self.length);\\n assembly {\\n ret := and(mload(add(add(self, 4), idx)), 0xFFFFFFFF)\\n }\\n }\\n\\n /*\\n * @dev Returns the 32 byte value at the specified index of self.\\n * @param self The byte string.\\n * @param idx The index into the bytes\\n * @return The specified 32 bytes of the string.\\n */\\n function readBytes32(\\n bytes memory self,\\n uint256 idx\\n ) internal pure returns (bytes32 ret) {\\n require(idx + 32 <= self.length);\\n assembly {\\n ret := mload(add(add(self, 32), idx))\\n }\\n }\\n\\n /*\\n * @dev Returns the 32 byte value at the specified index of self.\\n * @param self The byte string.\\n * @param idx The index into the bytes\\n * @return The specified 32 bytes of the string.\\n */\\n function readBytes20(\\n bytes memory self,\\n uint256 idx\\n ) internal pure returns (bytes20 ret) {\\n require(idx + 20 <= self.length);\\n assembly {\\n ret := and(\\n mload(add(add(self, 32), idx)),\\n 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000\\n )\\n }\\n }\\n\\n /*\\n * @dev Returns the n byte value at the specified index of self.\\n * @param self The byte string.\\n * @param idx The index into the bytes.\\n * @param len The number of bytes.\\n * @return The specified 32 bytes of the string.\\n */\\n function readBytesN(\\n bytes memory self,\\n uint256 idx,\\n uint256 len\\n ) internal pure returns (bytes32 ret) {\\n require(len <= 32);\\n require(idx + len <= self.length);\\n assembly {\\n let mask := not(sub(exp(256, sub(32, len)), 1))\\n ret := and(mload(add(add(self, 32), idx)), mask)\\n }\\n }\\n\\n function memcpy(uint256 dest, uint256 src, uint256 len) private pure {\\n // Copy word-length chunks while possible\\n for (; len >= 32; len -= 32) {\\n assembly {\\n mstore(dest, mload(src))\\n }\\n dest += 32;\\n src += 32;\\n }\\n\\n // Copy remaining bytes\\n unchecked {\\n uint256 mask = (256 ** (32 - len)) - 1;\\n assembly {\\n let srcpart := and(mload(src), not(mask))\\n let destpart := and(mload(dest), mask)\\n mstore(dest, or(destpart, srcpart))\\n }\\n }\\n }\\n\\n /*\\n * @dev Copies a substring into a new byte string.\\n * @param self The byte string to copy from.\\n * @param offset The offset to start copying at.\\n * @param len The number of bytes to copy.\\n */\\n function substring(\\n bytes memory self,\\n uint256 offset,\\n uint256 len\\n ) internal pure returns (bytes memory) {\\n require(offset + len <= self.length);\\n\\n bytes memory ret = new bytes(len);\\n uint256 dest;\\n uint256 src;\\n\\n assembly {\\n dest := add(ret, 32)\\n src := add(add(self, 32), offset)\\n }\\n memcpy(dest, src, len);\\n\\n return ret;\\n }\\n\\n // Maps characters from 0x30 to 0x7A to their base32 values.\\n // 0xFF represents invalid characters in that range.\\n bytes constant base32HexTable =\\n hex\\\"00010203040506070809FFFFFFFFFFFFFF0A0B0C0D0E0F101112131415161718191A1B1C1D1E1FFFFFFFFFFFFFFFFFFFFF0A0B0C0D0E0F101112131415161718191A1B1C1D1E1F\\\";\\n\\n /**\\n * @dev Decodes unpadded base32 data of up to one word in length.\\n * @param self The data to decode.\\n * @param off Offset into the string to start at.\\n * @param len Number of characters to decode.\\n * @return The decoded data, left aligned.\\n */\\n function base32HexDecodeWord(\\n bytes memory self,\\n uint256 off,\\n uint256 len\\n ) internal pure returns (bytes32) {\\n require(len <= 52);\\n\\n uint256 ret = 0;\\n uint8 decoded;\\n for (uint256 i = 0; i < len; i++) {\\n bytes1 char = self[off + i];\\n require(char >= 0x30 && char <= 0x7A);\\n decoded = uint8(base32HexTable[uint256(uint8(char)) - 0x30]);\\n require(decoded <= 0x20);\\n if (i == len - 1) {\\n break;\\n }\\n ret = (ret << 5) | decoded;\\n }\\n\\n uint256 bitlen = len * 5;\\n if (len % 8 == 0) {\\n // Multiple of 8 characters, no padding\\n ret = (ret << 5) | decoded;\\n } else if (len % 8 == 2) {\\n // Two extra characters - 1 byte\\n ret = (ret << 3) | (decoded >> 2);\\n bitlen -= 2;\\n } else if (len % 8 == 4) {\\n // Four extra characters - 2 bytes\\n ret = (ret << 1) | (decoded >> 4);\\n bitlen -= 4;\\n } else if (len % 8 == 5) {\\n // Five extra characters - 3 bytes\\n ret = (ret << 4) | (decoded >> 1);\\n bitlen -= 1;\\n } else if (len % 8 == 7) {\\n // Seven extra characters - 4 bytes\\n ret = (ret << 2) | (decoded >> 3);\\n bitlen -= 3;\\n } else {\\n revert();\\n }\\n\\n return bytes32(ret << (256 - bitlen));\\n }\\n\\n /**\\n * @dev Finds the first occurrence of the byte `needle` in `self`.\\n * @param self The string to search\\n * @param off The offset to start searching at\\n * @param len The number of bytes to search\\n * @param needle The byte to search for\\n * @return The offset of `needle` in `self`, or 2**256-1 if it was not found.\\n */\\n function find(\\n bytes memory self,\\n uint256 off,\\n uint256 len,\\n bytes1 needle\\n ) internal pure returns (uint256) {\\n for (uint256 idx = off; idx < off + len; idx++) {\\n if (self[idx] == needle) {\\n return idx;\\n }\\n }\\n return type(uint256).max;\\n }\\n}\\n\",\"keccak256\":\"0x4f10902639b85a17ae10745264feff322e793bfb1bc130a9a90efa7dda47c6cc\"},\"@ensdomains/ens-contracts/contracts/ethregistrar/IBaseRegistrar.sol\":{\"content\":\"import \\\"../registry/ENS.sol\\\";\\nimport \\\"./IBaseRegistrar.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\";\\n\\ninterface IBaseRegistrar is IERC721 {\\n event ControllerAdded(address indexed controller);\\n event ControllerRemoved(address indexed controller);\\n event NameMigrated(\\n uint256 indexed id,\\n address indexed owner,\\n uint256 expires\\n );\\n event NameRegistered(\\n uint256 indexed id,\\n address indexed owner,\\n uint256 expires\\n );\\n event NameRenewed(uint256 indexed id, uint256 expires);\\n\\n // Authorises a controller, who can register and renew domains.\\n function addController(address controller) external;\\n\\n // Revoke controller permission for an address.\\n function removeController(address controller) external;\\n\\n // Set the resolver for the TLD this registrar manages.\\n function setResolver(address resolver) external;\\n\\n // Returns the expiration timestamp of the specified label hash.\\n function nameExpires(uint256 id) external view returns (uint256);\\n\\n // Returns true if the specified name is available for registration.\\n function available(uint256 id) external view returns (bool);\\n\\n /**\\n * @dev Register a name.\\n */\\n function register(\\n uint256 id,\\n address owner,\\n uint256 duration\\n ) external returns (uint256);\\n\\n function renew(uint256 id, uint256 duration) external returns (uint256);\\n\\n /**\\n * @dev Reclaim ownership of a name in ENS, if you own it in the registrar.\\n */\\n function reclaim(uint256 id, address owner) external;\\n}\\n\",\"keccak256\":\"0x15f7b1dfa7cd34444daf79ec9b4d40437caa9257893ce0639d706fcc2ba69e52\"},\"@ensdomains/ens-contracts/contracts/registry/ENS.sol\":{\"content\":\"pragma solidity >=0.8.4;\\n\\ninterface ENS {\\n // Logged when the owner of a node assigns a new owner to a subnode.\\n event NewOwner(bytes32 indexed node, bytes32 indexed label, address owner);\\n\\n // Logged when the owner of a node transfers ownership to a new account.\\n event Transfer(bytes32 indexed node, address owner);\\n\\n // Logged when the resolver for a node changes.\\n event NewResolver(bytes32 indexed node, address resolver);\\n\\n // Logged when the TTL of a node changes\\n event NewTTL(bytes32 indexed node, uint64 ttl);\\n\\n // Logged when an operator is added or removed.\\n event ApprovalForAll(\\n address indexed owner,\\n address indexed operator,\\n bool approved\\n );\\n\\n function setRecord(\\n bytes32 node,\\n address owner,\\n address resolver,\\n uint64 ttl\\n ) external;\\n\\n function setSubnodeRecord(\\n bytes32 node,\\n bytes32 label,\\n address owner,\\n address resolver,\\n uint64 ttl\\n ) external;\\n\\n function setSubnodeOwner(\\n bytes32 node,\\n bytes32 label,\\n address owner\\n ) external returns (bytes32);\\n\\n function setResolver(bytes32 node, address resolver) external;\\n\\n function setOwner(bytes32 node, address owner) external;\\n\\n function setTTL(bytes32 node, uint64 ttl) external;\\n\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n function owner(bytes32 node) external view returns (address);\\n\\n function resolver(bytes32 node) external view returns (address);\\n\\n function ttl(bytes32 node) external view returns (uint64);\\n\\n function recordExists(bytes32 node) external view returns (bool);\\n\\n function isApprovedForAll(\\n address owner,\\n address operator\\n ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x7cb1158c7d268b63de1468e28e2711b28d686e2628ddb22da2149cd93ddeafda\"},\"@ensdomains/ens-contracts/contracts/resolvers/profiles/IAddrResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\n/**\\n * Interface for the legacy (ETH-only) addr function.\\n */\\ninterface IAddrResolver {\\n event AddrChanged(bytes32 indexed node, address a);\\n\\n /**\\n * Returns the address associated with an ENS node.\\n * @param node The ENS node to query.\\n * @return The associated address.\\n */\\n function addr(bytes32 node) external view returns (address payable);\\n}\\n\",\"keccak256\":\"0x2ad7f2fc60ebe0f93745fe70247f6a854f66af732483fda2a3c5e055614445e8\",\"license\":\"MIT\"},\"@ensdomains/ens-contracts/contracts/resolvers/profiles/IAddressResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\n/**\\n * Interface for the new (multicoin) addr function.\\n */\\ninterface IAddressResolver {\\n event AddressChanged(\\n bytes32 indexed node,\\n uint256 coinType,\\n bytes newAddress\\n );\\n\\n function addr(\\n bytes32 node,\\n uint256 coinType\\n ) external view returns (bytes memory);\\n}\\n\",\"keccak256\":\"0x411447c1e90c51e09702815a85ec725ffbbe37cf96e8cc4d2a8bd4ad8a59d73e\",\"license\":\"MIT\"},\"@ensdomains/ens-contracts/contracts/resolvers/profiles/IContentHashResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\ninterface IContentHashResolver {\\n event ContenthashChanged(bytes32 indexed node, bytes hash);\\n\\n /**\\n * Returns the contenthash associated with an ENS node.\\n * @param node The ENS node to query.\\n * @return The associated contenthash.\\n */\\n function contenthash(bytes32 node) external view returns (bytes memory);\\n}\\n\",\"keccak256\":\"0xd95cd77684ba5752c428d7dceb4ecc6506ac94f4fbb910489637eb68dcd8e366\",\"license\":\"MIT\"},\"@ensdomains/ens-contracts/contracts/resolvers/profiles/IExtendedResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.4;\\n\\ninterface IExtendedResolver {\\n function resolve(\\n bytes memory name,\\n bytes memory data\\n ) external view returns (bytes memory);\\n}\\n\",\"keccak256\":\"0x5d81521cfae7d9a4475d27533cd8ed0d3475d369eb0674fd90ffbdbdf292faa3\",\"license\":\"MIT\"},\"@ensdomains/ens-contracts/contracts/resolvers/profiles/ITextResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\ninterface ITextResolver {\\n event TextChanged(\\n bytes32 indexed node,\\n string indexed indexedKey,\\n string key,\\n string value\\n );\\n\\n /**\\n * Returns the text data associated with an ENS node and key.\\n * @param node The ENS node to query.\\n * @param key The text data key to query.\\n * @return The associated text data.\\n */\\n function text(\\n bytes32 node,\\n string calldata key\\n ) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x7c5debb3c42cd9f5de2274ea7aa053f238608314b62db441c40e31cea2543fd5\",\"license\":\"MIT\"},\"@ensdomains/ens-contracts/contracts/wrapper/IMetadataService.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ~0.8.17;\\n\\ninterface IMetadataService {\\n function uri(uint256) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xb3f1cf6df01ed7b15e5f2318f6823afbdb586ca38c2124c67955c645647ae9a2\",\"license\":\"MIT\"},\"@ensdomains/ens-contracts/contracts/wrapper/INameWrapper.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ~0.8.17;\\n\\nimport \\\"../registry/ENS.sol\\\";\\nimport \\\"../ethregistrar/IBaseRegistrar.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\\\";\\nimport \\\"./IMetadataService.sol\\\";\\nimport \\\"./INameWrapperUpgrade.sol\\\";\\n\\nuint32 constant CANNOT_UNWRAP = 1;\\nuint32 constant CANNOT_BURN_FUSES = 2;\\nuint32 constant CANNOT_TRANSFER = 4;\\nuint32 constant CANNOT_SET_RESOLVER = 8;\\nuint32 constant CANNOT_SET_TTL = 16;\\nuint32 constant CANNOT_CREATE_SUBDOMAIN = 32;\\nuint32 constant CANNOT_APPROVE = 64;\\n//uint16 reserved for parent controlled fuses from bit 17 to bit 32\\nuint32 constant PARENT_CANNOT_CONTROL = 1 << 16;\\nuint32 constant IS_DOT_ETH = 1 << 17;\\nuint32 constant CAN_EXTEND_EXPIRY = 1 << 18;\\nuint32 constant CAN_DO_EVERYTHING = 0;\\nuint32 constant PARENT_CONTROLLED_FUSES = 0xFFFF0000;\\n// all fuses apart from IS_DOT_ETH\\nuint32 constant USER_SETTABLE_FUSES = 0xFFFDFFFF;\\n\\ninterface INameWrapper is IERC1155 {\\n event NameWrapped(\\n bytes32 indexed node,\\n bytes name,\\n address owner,\\n uint32 fuses,\\n uint64 expiry\\n );\\n\\n event NameUnwrapped(bytes32 indexed node, address owner);\\n\\n event FusesSet(bytes32 indexed node, uint32 fuses);\\n event ExpiryExtended(bytes32 indexed node, uint64 expiry);\\n\\n function ens() external view returns (ENS);\\n\\n function registrar() external view returns (IBaseRegistrar);\\n\\n function metadataService() external view returns (IMetadataService);\\n\\n function names(bytes32) external view returns (bytes memory);\\n\\n function name() external view returns (string memory);\\n\\n function upgradeContract() external view returns (INameWrapperUpgrade);\\n\\n function supportsInterface(bytes4 interfaceID) external view returns (bool);\\n\\n function wrap(\\n bytes calldata name,\\n address wrappedOwner,\\n address resolver\\n ) external;\\n\\n function wrapETH2LD(\\n string calldata label,\\n address wrappedOwner,\\n uint16 ownerControlledFuses,\\n address resolver\\n ) external returns (uint64 expires);\\n\\n function registerAndWrapETH2LD(\\n string calldata label,\\n address wrappedOwner,\\n uint256 duration,\\n address resolver,\\n uint16 ownerControlledFuses\\n ) external returns (uint256 registrarExpiry);\\n\\n function renew(\\n uint256 labelHash,\\n uint256 duration\\n ) external returns (uint256 expires);\\n\\n function unwrap(bytes32 node, bytes32 label, address owner) external;\\n\\n function unwrapETH2LD(\\n bytes32 label,\\n address newRegistrant,\\n address newController\\n ) external;\\n\\n function upgrade(bytes calldata name, bytes calldata extraData) external;\\n\\n function setFuses(\\n bytes32 node,\\n uint16 ownerControlledFuses\\n ) external returns (uint32 newFuses);\\n\\n function setChildFuses(\\n bytes32 parentNode,\\n bytes32 labelhash,\\n uint32 fuses,\\n uint64 expiry\\n ) external;\\n\\n function setSubnodeRecord(\\n bytes32 node,\\n string calldata label,\\n address owner,\\n address resolver,\\n uint64 ttl,\\n uint32 fuses,\\n uint64 expiry\\n ) external returns (bytes32);\\n\\n function setRecord(\\n bytes32 node,\\n address owner,\\n address resolver,\\n uint64 ttl\\n ) external;\\n\\n function setSubnodeOwner(\\n bytes32 node,\\n string calldata label,\\n address newOwner,\\n uint32 fuses,\\n uint64 expiry\\n ) external returns (bytes32);\\n\\n function extendExpiry(\\n bytes32 node,\\n bytes32 labelhash,\\n uint64 expiry\\n ) external returns (uint64);\\n\\n function canModifyName(\\n bytes32 node,\\n address addr\\n ) external view returns (bool);\\n\\n function setResolver(bytes32 node, address resolver) external;\\n\\n function setTTL(bytes32 node, uint64 ttl) external;\\n\\n function ownerOf(uint256 id) external view returns (address owner);\\n\\n function approve(address to, uint256 tokenId) external;\\n\\n function getApproved(uint256 tokenId) external view returns (address);\\n\\n function getData(\\n uint256 id\\n ) external view returns (address, uint32, uint64);\\n\\n function setMetadataService(IMetadataService _metadataService) external;\\n\\n function uri(uint256 tokenId) external view returns (string memory);\\n\\n function setUpgradeContract(INameWrapperUpgrade _upgradeAddress) external;\\n\\n function allFusesBurned(\\n bytes32 node,\\n uint32 fuseMask\\n ) external view returns (bool);\\n\\n function isWrapped(bytes32) external view returns (bool);\\n\\n function isWrapped(bytes32, bytes32) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x70310eb67146d7290731c31841399640ac3b6a949eadc6598bc150123d185c57\",\"license\":\"MIT\"},\"@ensdomains/ens-contracts/contracts/wrapper/INameWrapperUpgrade.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ~0.8.17;\\n\\ninterface INameWrapperUpgrade {\\n function wrapFromUpgrade(\\n bytes calldata name,\\n address wrappedOwner,\\n uint32 fuses,\\n uint64 expiry,\\n address approved,\\n bytes calldata extraData\\n ) external;\\n}\\n\",\"keccak256\":\"0x42e0cec6cd9d1a62d51d45b678f69d3e4ad5555e659b197e41257b308346bb8a\",\"license\":\"MIT\"},\"@ensdomains/evm-verifier/contracts/EVMFetchTarget.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.17;\\n\\nimport { IEVMVerifier } from './IEVMVerifier.sol';\\nimport { Address } from '@openzeppelin/contracts/utils/Address.sol';\\n\\n/**\\n * @dev Callback implementation for users of `EVMFetcher`. If you use `EVMFetcher`, your contract must\\n * inherit from this contract in order to handle callbacks correctly.\\n */\\nabstract contract EVMFetchTarget {\\n using Address for address;\\n\\n error ResponseLengthMismatch(uint256 actual, uint256 expected);\\n\\n /**\\n * @dev Internal callback function invoked by CCIP-Read in response to a `getStorageSlots` request.\\n */\\n function getStorageSlotsCallback(bytes calldata response, bytes calldata extradata) external {\\n bytes memory proof = abi.decode(response, (bytes));\\n (IEVMVerifier verifier, address addr, bytes32[] memory commands, bytes[] memory constants, bytes4 callback, bytes memory callbackData) =\\n abi.decode(extradata, (IEVMVerifier, address, bytes32[], bytes[], bytes4, bytes));\\n bytes[] memory values = verifier.getStorageValues(addr, commands, constants, proof);\\n if(values.length != commands.length) {\\n revert ResponseLengthMismatch(values.length, commands.length);\\n }\\n bytes memory ret = address(this).functionCall(abi.encodeWithSelector(callback, values, callbackData));\\n assembly {\\n return(add(ret, 32), mload(ret))\\n }\\n }\\n}\\n\",\"keccak256\":\"0x4653f974a897ce78b7bc3779ba0bb7767df99add49de4f0e9089399f47bb5942\",\"license\":\"MIT\"},\"@ensdomains/evm-verifier/contracts/EVMFetcher.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.17;\\n\\nimport { IEVMVerifier } from './IEVMVerifier.sol';\\nimport { EVMFetchTarget } from './EVMFetchTarget.sol';\\nimport { Address } from '@openzeppelin/contracts/utils/Address.sol';\\n\\ninterface IEVMGateway {\\n function getStorageSlots(address addr, bytes32[] memory commands, bytes[] memory constants) external pure returns(bytes memory witness);\\n}\\n\\nuint8 constant FLAG_DYNAMIC = 0x01;\\nuint8 constant OP_CONSTANT = 0x00;\\nuint8 constant OP_BACKREF = 0x20;\\nuint8 constant OP_END = 0xff;\\n\\n/**\\n * @dev A library to facilitate requesting storage data proofs from contracts, possibly on a different chain.\\n * See l1-verifier/test/TestL1.sol for example usage.\\n */\\nlibrary EVMFetcher {\\n uint256 constant MAX_COMMANDS = 32;\\n uint256 constant MAX_CONSTANTS = 32; // Must not be greater than 32\\n\\n using Address for address;\\n\\n error TooManyCommands(uint256 max);\\n error CommandTooLong();\\n error InvalidReference(uint256 value, uint256 max);\\n error OffchainLookup(address sender, string[] urls, bytes callData, bytes4 callbackFunction, bytes extraData);\\n\\n struct EVMFetchRequest {\\n IEVMVerifier verifier;\\n address target;\\n bytes32[] commands;\\n uint256 operationIdx;\\n bytes[] constants;\\n }\\n\\n /**\\n * @dev Creates a request to fetch the value of multiple storage slots from a contract via CCIP-Read, possibly from\\n * another chain.\\n * Supports dynamic length values and slot numbers derived from other retrieved values.\\n * @param verifier An instance of a verifier contract that can provide and verify the storage slot information.\\n * @param target The address of the contract to fetch storage proofs for.\\n */\\n function newFetchRequest(IEVMVerifier verifier, address target) internal pure returns (EVMFetchRequest memory) {\\n bytes32[] memory commands = new bytes32[](MAX_COMMANDS);\\n bytes[] memory constants = new bytes[](MAX_CONSTANTS);\\n assembly {\\n mstore(commands, 0) // Set current array length to 0\\n mstore(constants, 0)\\n } \\n return EVMFetchRequest(verifier, target, commands, 0, constants);\\n }\\n\\n /**\\n * @dev Starts describing a new fetch request.\\n * Paths specify a series of hashing operations to derive the final slot ID.\\n * See https://docs.soliditylang.org/en/v0.8.17/internals/layout_in_storage.html for details on how Solidity\\n * lays out storage variables.\\n * @param request The request object being operated on.\\n * @param baseSlot The base slot ID that forms the root of the path.\\n */\\n function getStatic(EVMFetchRequest memory request, uint256 baseSlot) internal pure returns (EVMFetchRequest memory) {\\n bytes32[] memory commands = request.commands;\\n uint256 commandIdx = commands.length;\\n if(commandIdx > 0 && request.operationIdx < 32) {\\n // Terminate previous command\\n _addOperation(request, OP_END);\\n }\\n assembly {\\n mstore(commands, add(commandIdx, 1)) // Increment command array length\\n }\\n if(request.commands.length > MAX_COMMANDS) {\\n revert TooManyCommands(MAX_COMMANDS);\\n }\\n request.operationIdx = 0;\\n _addOperation(request, 0);\\n _addOperation(request, _addConstant(request, abi.encode(baseSlot)));\\n return request;\\n }\\n\\n /**\\n * @dev Starts describing a new fetch request.\\n * Paths specify a series of hashing operations to derive the final slot ID.\\n * See https://docs.soliditylang.org/en/v0.8.17/internals/layout_in_storage.html for details on how Solidity\\n * lays out storage variables.\\n * @param request The request object being operated on.\\n * @param baseSlot The base slot ID that forms the root of the path.\\n */\\n function getDynamic(EVMFetchRequest memory request, uint256 baseSlot) internal pure returns (EVMFetchRequest memory) {\\n bytes32[] memory commands = request.commands;\\n uint256 commandIdx = commands.length;\\n if(commandIdx > 0 && request.operationIdx < 32) {\\n // Terminate previous command\\n _addOperation(request, OP_END);\\n }\\n assembly {\\n mstore(commands, add(commandIdx, 1)) // Increment command array length\\n }\\n if(request.commands.length > MAX_COMMANDS) {\\n revert TooManyCommands(MAX_COMMANDS);\\n }\\n request.operationIdx = 0;\\n _addOperation(request, FLAG_DYNAMIC);\\n _addOperation(request, _addConstant(request, abi.encode(baseSlot)));\\n return request;\\n }\\n\\n /**\\n * @dev Adds a `uint256` element to the current path.\\n * @param request The request object being operated on.\\n * @param el The element to add.\\n */\\n function element(EVMFetchRequest memory request, uint256 el) internal pure returns (EVMFetchRequest memory) {\\n if(request.operationIdx >= 32) {\\n revert CommandTooLong();\\n }\\n _addOperation(request, _addConstant(request, abi.encode(el)));\\n return request;\\n }\\n\\n /**\\n * @dev Adds a `bytes32` element to the current path.\\n * @param request The request object being operated on.\\n * @param el The element to add.\\n */\\n function element(EVMFetchRequest memory request, bytes32 el) internal pure returns (EVMFetchRequest memory) {\\n if(request.operationIdx >= 32) {\\n revert CommandTooLong();\\n }\\n _addOperation(request, _addConstant(request, abi.encode(el)));\\n return request;\\n }\\n\\n /**\\n * @dev Adds an `address` element to the current path.\\n * @param request The request object being operated on.\\n * @param el The element to add.\\n */\\n function element(EVMFetchRequest memory request, address el) internal pure returns (EVMFetchRequest memory) {\\n if(request.operationIdx >= 32) {\\n revert CommandTooLong();\\n }\\n _addOperation(request, _addConstant(request, abi.encode(el)));\\n return request;\\n }\\n\\n /**\\n * @dev Adds a `bytes` element to the current path.\\n * @param request The request object being operated on.\\n * @param el The element to add.\\n */\\n function element(EVMFetchRequest memory request, bytes memory el) internal pure returns (EVMFetchRequest memory) {\\n if(request.operationIdx >= 32) {\\n revert CommandTooLong();\\n }\\n _addOperation(request, _addConstant(request, el));\\n return request;\\n }\\n\\n /**\\n * @dev Adds a `string` element to the current path.\\n * @param request The request object being operated on.\\n * @param el The element to add.\\n */\\n function element(EVMFetchRequest memory request, string memory el) internal pure returns (EVMFetchRequest memory) {\\n if(request.operationIdx >= 32) {\\n revert CommandTooLong();\\n }\\n _addOperation(request, _addConstant(request, bytes(el)));\\n return request;\\n }\\n\\n /**\\n * @dev Adds a reference to a previous fetch to the current path.\\n * @param request The request object being operated on.\\n * @param idx The index of the previous fetch request, starting at 0.\\n */\\n function ref(EVMFetchRequest memory request, uint8 idx) internal pure returns (EVMFetchRequest memory) {\\n if(request.operationIdx >= 32) {\\n revert CommandTooLong();\\n }\\n if(idx > request.commands.length || idx > 31) {\\n revert InvalidReference(idx, request.commands.length);\\n }\\n _addOperation(request, OP_BACKREF | idx);\\n return request;\\n }\\n\\n /**\\n * @dev Initiates the fetch request.\\n * Calling this function terminates execution; clients that implement CCIP-Read will make a callback to\\n * `callback` with the results of the operation.\\n * @param callbackId A callback function selector on this contract that will be invoked via CCIP-Read with the result of the lookup.\\n * The function must have a signature matching `(bytes[] memory values, bytes callbackData)` with a return type matching the call in which\\n * this function was invoked. Its return data will be returned as the return value of the entire CCIP-read operation.\\n * @param callbackData Extra data to supply to the callback.\\n */\\n function fetch(EVMFetchRequest memory request, bytes4 callbackId, bytes memory callbackData) internal view {\\n if(request.commands.length > 0 && request.operationIdx < 32) {\\n // Terminate last command\\n _addOperation(request, OP_END);\\n }\\n revert OffchainLookup(\\n address(this),\\n request.verifier.gatewayURLs(),\\n abi.encodeCall(IEVMGateway.getStorageSlots, (request.target, request.commands, request.constants)),\\n EVMFetchTarget.getStorageSlotsCallback.selector,\\n abi.encode(request.verifier, request.target, request.commands, request.constants, callbackId, callbackData)\\n );\\n }\\n\\n function _addConstant(EVMFetchRequest memory request, bytes memory value) private pure returns(uint8 idx) {\\n bytes[] memory constants = request.constants;\\n idx = uint8(constants.length);\\n assembly {\\n mstore(constants, add(idx, 1)) // Increment constant array length\\n }\\n constants[idx] = value;\\n }\\n\\n function _addOperation(EVMFetchRequest memory request, uint8 op) private pure {\\n uint256 commandIdx = request.commands.length - 1;\\n request.commands[commandIdx] = request.commands[commandIdx] | (bytes32(bytes1(op)) >> (8 * request.operationIdx++));\\n }\\n}\\n\",\"keccak256\":\"0x5a6a955ebf3e6da9ce8d39e2729c35e4e800426025954a9a9777c209447ff8b4\",\"license\":\"MIT\"},\"@ensdomains/evm-verifier/contracts/IEVMVerifier.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.17;\\n\\ninterface IEVMVerifier {\\n function gatewayURLs() external view returns(string[] memory);\\n function getStorageValues(address target, bytes32[] memory commands, bytes[] memory constants, bytes memory proof) external view returns(bytes[] memory values);\\n}\\n\",\"keccak256\":\"0x30a635309aeebbde83774010eea5e975b8e73d1932140457121eefdce7792d72\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/IERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155 is IERC165 {\\n /**\\n * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\\n */\\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\\n\\n /**\\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\\n * transfers.\\n */\\n event TransferBatch(\\n address indexed operator,\\n address indexed from,\\n address indexed to,\\n uint256[] ids,\\n uint256[] values\\n );\\n\\n /**\\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\\n * `approved`.\\n */\\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\\n\\n /**\\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\\n *\\n * If an {URI} event was emitted for `id`, the standard\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\\n * returned by {IERC1155MetadataURI-uri}.\\n */\\n event URI(string value, uint256 indexed id);\\n\\n /**\\n * @dev Returns the amount of tokens of token type `id` owned by `account`.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function balanceOf(address account, uint256 id) external view returns (uint256);\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\\n *\\n * Requirements:\\n *\\n * - `accounts` and `ids` must have the same length.\\n */\\n function balanceOfBatch(\\n address[] calldata accounts,\\n uint256[] calldata ids\\n ) external view returns (uint256[] memory);\\n\\n /**\\n * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\\n *\\n * Emits an {ApprovalForAll} event.\\n *\\n * Requirements:\\n *\\n * - `operator` cannot be the caller.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\\n *\\n * See {setApprovalForAll}.\\n */\\n function isApprovedForAll(address account, address operator) external view returns (bool);\\n\\n /**\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external;\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] calldata ids,\\n uint256[] calldata amounts,\\n bytes calldata data\\n ) external;\\n}\\n\",\"keccak256\":\"0xcab667ddad478ff0d39c2053ca77fac778af8483c18ab07d810277b4216fd582\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721 is IERC165 {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721\\n * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must\\n * understand this adds an external call which potentially creates a reentrancy vulnerability.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x5bce51e11f7d194b79ea59fe00c9e8de9fa2c5530124960f29a24d4c740a3266\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"contracts/IMetadataResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.17;\\n\\ninterface IMetadataResolver {\\n /*\\n * @notice Get metadata about the CCIP Resolver ENSIP 16 https://docs.ens.domains/ens-improvement-proposals/ensip-16-offchain-metadata\\n * @dev This function provides metadata about the CCIP Resolver, including its name, coin type, GraphQL URL, storage type, and encoded information.\\n * @param name The domain name in format (dnsEncoded)\\n * @return coinType The cointype of the chain the target contract locates such as Optimism, Base, Arb, etc\\n * @return graphqlUrl The GraphQL URL used by the resolver\\n * @return storageType 0 = EVM, 1 = Non blockchain, 2 = Starknet\\n * @return storageLocation The storage identifier. For EVM chains, this is the address of the resolver contract.\\n * @return context. An identifier used by l2 graph indexer for Domain schema id (`context-namehash`) allowing multiple resolver contracts to have own namespace.\\n *\\n */\\n function metadata(bytes calldata name) external view returns (\\n uint256 coinType,\\n string memory graphqlUrl,\\n uint8 storageType,\\n bytes memory storageLocation,\\n bytes memory context\\n );\\n\\n event MetadataChanged(\\n bytes name,\\n uint256 coinType,\\n string graphqlUrl,\\n uint8 storageType,\\n bytes storageLocation,\\n bytes context\\n );\\n}\",\"keccak256\":\"0xf3af5325514001ff150399986839a1402c4aef5f332f8639a5756bb9dbcd5b05\",\"license\":\"MIT\"},\"contracts/ITargetResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.17;\\n\\ninterface ITargetResolver{\\n function getTarget(\\n bytes memory name\\n ) external view returns (bytes32 node, address target);\\n}\\n\",\"keccak256\":\"0x309bfb692d77b29eb9bfeccc55f0fc7cebdade75adb299d7e1afe1f007be0a11\",\"license\":\"MIT\"},\"contracts/L1Resolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.17;\\n\\nimport {EVMFetcher} from '@ensdomains/evm-verifier/contracts/EVMFetcher.sol';\\nimport {EVMFetchTarget} from '@ensdomains/evm-verifier/contracts/EVMFetchTarget.sol';\\nimport {IEVMVerifier} from '@ensdomains/evm-verifier/contracts/IEVMVerifier.sol';\\nimport \\\"@ensdomains/ens-contracts/contracts/registry/ENS.sol\\\";\\nimport {INameWrapper} from \\\"@ensdomains/ens-contracts/contracts/wrapper/INameWrapper.sol\\\";\\nimport {BytesUtils} from \\\"@ensdomains/ens-contracts/contracts/dnssec-oracle/BytesUtils.sol\\\";\\nimport {IAddrResolver} from \\\"@ensdomains/ens-contracts/contracts/resolvers/profiles/IAddrResolver.sol\\\";\\nimport {IAddressResolver} from \\\"@ensdomains/ens-contracts/contracts/resolvers/profiles/IAddressResolver.sol\\\";\\nimport {ITextResolver} from \\\"@ensdomains/ens-contracts/contracts/resolvers/profiles/ITextResolver.sol\\\";\\nimport {IContentHashResolver} from \\\"@ensdomains/ens-contracts/contracts/resolvers/profiles/IContentHashResolver.sol\\\";\\nimport \\\"@ensdomains/ens-contracts/contracts/resolvers/profiles/IExtendedResolver.sol\\\";\\nimport {ITargetResolver} from './ITargetResolver.sol';\\nimport {IMetadataResolver} from './IMetadataResolver.sol';\\nimport \\\"@openzeppelin/contracts/utils/introspection/ERC165.sol\\\";\\n\\ncontract L1Resolver is EVMFetchTarget, ITargetResolver, IMetadataResolver, IExtendedResolver, ERC165 {\\n using EVMFetcher for EVMFetcher.EVMFetchRequest;\\n using BytesUtils for bytes;\\n IEVMVerifier public immutable verifier;\\n ENS public immutable ens;\\n INameWrapper public immutable nameWrapper;\\n mapping(bytes32 => address) targets;\\n uint256 constant COIN_TYPE_ETH = 60;\\n uint256 constant RECORD_VERSIONS_SLOT = 0;\\n uint256 constant VERSIONABLE_ADDRESSES_SLOT = 2;\\n uint256 constant VERSIONABLE_HASHES_SLOT = 3;\\n uint256 constant VERSIONABLE_TEXTS_SLOT = 10;\\n string public graphqlUrl;\\n uint256 public l2ResolverCoinType;\\n\\n event TargetSet(bytes name, address target);\\n function isAuthorised(bytes32 node) internal view returns (bool) {\\n // TODO: Add support for\\n // trustedETHController\\n // trustedReverseRegistrar\\n // isApprovedForAll\\n // isApprovedFor\\n address owner = ens.owner(node);\\n if (owner == address(nameWrapper)) {\\n owner = nameWrapper.ownerOf(uint256(node));\\n }\\n return owner == msg.sender;\\n }\\n\\n /**\\n * @param _verifier The chain verifier address\\n * @param _ens The ENS registry address\\n * @param _nameWrapper The ENS name wrapper address\\n * @param _graphqlUrl The offchain/l2 graphql endpoint url\\n * @param _l2ResolverCoinType The chainId at which the resolver resolves data from. 0 if storageLocation is offChain\\n */\\n constructor(\\n IEVMVerifier _verifier,\\n ENS _ens,\\n INameWrapper _nameWrapper,\\n string memory _graphqlUrl,\\n uint256 _l2ResolverCoinType\\n ){\\n require(address(_nameWrapper) != address(0), \\\"Name Wrapper address must be set\\\");\\n require(address(_verifier) != address(0), \\\"Verifier address must be set\\\");\\n require(address(_ens) != address(0), \\\"Registry address must be set\\\");\\n verifier = _verifier;\\n ens = _ens;\\n nameWrapper = _nameWrapper;\\n graphqlUrl = _graphqlUrl;\\n l2ResolverCoinType = _l2ResolverCoinType;\\n }\\n\\n /**\\n * Set target address to verify aagainst\\n * @param name The encoded name to query.\\n * @param target The L2 resolver address to verify against.\\n */\\n function setTarget(bytes calldata name, address target) public {\\n (bytes32 node,) = getTarget(name);\\n require(isAuthorised(node));\\n targets[node] = target;\\n emit TargetSet(name, target);\\n (\\n ,,\\n uint8 storageType,\\n bytes memory storageLocation,\\n bytes memory context\\n ) = metadata(name);\\n emit MetadataChanged(\\n name,\\n l2ResolverCoinType,\\n graphqlUrl,\\n storageType,\\n storageLocation,\\n context\\n );\\n }\\n\\n /**\\n * @dev Returns the L2 target address that can answer queries for `name`.\\n * @param name DNS encoded ENS name to query\\n * @return node The node of the name\\n * @return target The L2 resolver address to verify against.\\n */\\n function getTarget(\\n bytes memory name\\n ) public view returns (bytes32 node, address target) {\\n return _getTarget(name, 0);\\n }\\n\\n function _getTarget(\\n bytes memory name,\\n uint256 offset\\n ) private view returns (bytes32 node, address target) {\\n uint256 len = name.readUint8(offset);\\n node = bytes32(0);\\n if (len > 0) {\\n bytes32 label = name.keccak(offset + 1, len);\\n (node, target) = _getTarget(\\n name,\\n offset + len + 1\\n );\\n node = keccak256(abi.encodePacked(node, label));\\n if(targets[node] != address(0)){\\n return (\\n node,\\n targets[node]\\n );\\n }\\n } else {\\n return (\\n bytes32(0),\\n address(0)\\n );\\n }\\n return (node, target);\\n }\\n\\n /** \\n * @dev Resolve and verify a record stored in l2 target address. It supports subname by fetching target recursively to the nearlest parent.\\n * @param name DNS encoded ENS name to query\\n * @param data The actual calldata\\n * @return result result of the call\\n */\\n function resolve(bytes calldata name, bytes calldata data) external view returns (bytes memory result) {\\n (, address target) = _getTarget(name, 0);\\n bytes4 selector = bytes4(data);\\n\\n if (selector == IAddrResolver.addr.selector) {\\n (bytes32 node) = abi.decode(data[4:], (bytes32));\\n return _addr(node, target);\\n }\\n if (selector == IAddressResolver.addr.selector) {\\n (bytes32 node, uint256 cointype) = abi.decode(data[4:], (bytes32, uint256));\\n return _addr(node, cointype, target);\\n }\\n if (selector == ITextResolver.text.selector) {\\n (bytes32 node, string memory key) = abi.decode(data[4:], (bytes32, string));\\n return bytes(_text(node, key, target));\\n }\\n if (selector == IContentHashResolver.contenthash.selector) {\\n (bytes32 node) = abi.decode(data[4:], (bytes32));\\n return _contenthash(node, target);\\n }\\n }\\n\\n function _addr(bytes32 node, address target) private view returns (bytes memory) {\\n EVMFetcher.newFetchRequest(verifier, target)\\n .getStatic(RECORD_VERSIONS_SLOT)\\n .element(node)\\n .getDynamic(VERSIONABLE_ADDRESSES_SLOT)\\n .ref(0)\\n .element(node)\\n .element(COIN_TYPE_ETH)\\n .fetch(this.addrCallback.selector, ''); // recordVersions\\n }\\n\\n function addrCallback(\\n bytes[] memory values,\\n bytes memory\\n ) public pure returns (bytes memory) {\\n return abi.encode(address(bytes20(values[1])));\\n }\\n\\n function _addr(\\n bytes32 node,\\n uint256 coinType,\\n address target\\n ) private view returns (bytes memory) {\\n EVMFetcher.newFetchRequest(verifier, target)\\n .getStatic(RECORD_VERSIONS_SLOT)\\n .element(node)\\n .getDynamic(VERSIONABLE_ADDRESSES_SLOT)\\n .ref(0)\\n .element(node)\\n .element(coinType)\\n .fetch(this.addrCoinTypeCallback.selector, '');\\n }\\n\\n function addrCoinTypeCallback(\\n bytes[] memory values,\\n bytes memory\\n ) public pure returns (bytes memory) {\\n return abi.encode(values[1]);\\n }\\n\\n function _text(\\n bytes32 node,\\n string memory key,\\n address target\\n ) private view returns (bytes memory) {\\n EVMFetcher.newFetchRequest(verifier, target)\\n .getStatic(RECORD_VERSIONS_SLOT)\\n .element(node)\\n .getDynamic(VERSIONABLE_TEXTS_SLOT)\\n .ref(0)\\n .element(node)\\n .element(key)\\n .fetch(this.textCallback.selector, '');\\n }\\n\\n function textCallback(\\n bytes[] memory values,\\n bytes memory\\n ) public pure returns (bytes memory) {\\n return abi.encode(string(values[1]));\\n }\\n\\n function _contenthash(bytes32 node, address target) private view returns (bytes memory) {\\n EVMFetcher.newFetchRequest(verifier, target)\\n .getStatic(RECORD_VERSIONS_SLOT)\\n .element(node)\\n .getDynamic(VERSIONABLE_HASHES_SLOT)\\n .ref(0)\\n .element(node)\\n .fetch(this.contenthashCallback.selector, '');\\n }\\n\\n function contenthashCallback(\\n bytes[] memory values,\\n bytes memory\\n ) public pure returns (bytes memory) {\\n return abi.encode(values[1]);\\n }\\n\\n /**\\n * @notice Get metadata about the L1 Resolver\\n * @dev This function provides metadata about the L1 Resolver, including its name, coin type, GraphQL URL, storage type, and encoded information.\\n * @param name The domain name in format (dnsEncoded)\\n * @return coinType The cointype of the chain the target contract locates such as Optimism, Base, Arb, etc\\n * @return graphqlUrl The GraphQL URL used by the resolver\\n * @return storageType Storage Type (0 for EVM)\\n * @return storageLocation The storage identifier. For EVM chains, this is the address of the resolver contract.\\n * @return context. An identifier used by l2 graph indexer for Domain schema id (`context-namehash`) allowing multiple resolver contracts to have own namespace.\\n */\\n function metadata(\\n bytes calldata name\\n ) public view returns (uint256, string memory, uint8, bytes memory, bytes memory) {\\n (, address target) = getTarget(name);\\n\\n return (\\n l2ResolverCoinType,\\n graphqlUrl,\\n uint8(0), // storage Type 0 => EVM\\n abi.encodePacked(address(target)), // storage location => l2 resolver address\\n abi.encodePacked(address(target)) // context => l2 resolver address\\n );\\n }\\n\\n function supportsInterface(\\n bytes4 interfaceId\\n ) public override view returns (bool) {\\n return\\n interfaceId == type(IExtendedResolver).interfaceId ||\\n interfaceId == type(ITargetResolver).interfaceId ||\\n interfaceId == type(IMetadataResolver).interfaceId ||\\n super.supportsInterface(interfaceId);\\n }\\n}\\n\",\"keccak256\":\"0xf20f2a39c87e0bcdd6c59552a73f012b420115d7a7a589241b899dfe94520cf9\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60e0604052346200039d576200287f80380390816200001e81620003a2565b91823960a08183810103126200039d5780516001600160a01b039182821682036200039d57602081015183811681036200039d5760408201519084821682036200039d576060830151936001600160401b0385116200039d57601f93878101858783010112156200039d57808601516001600160401b038111620002a257601f1996620000b28288018916602001620003a2565b99828b5283016020838386010101116200039d5760005b82811062000386575050600090890160200152608001519583811615620003425780821615620002fd57821615620002b85760805260a05260c0528351906001600160401b038211620002a25760019283548481811c9116801562000297575b6020821014620002815782811162000234575b506020918311600114620001d0575081929394600092620001c4575b5050600019600383901b1c191690821b1790555b6002556040516124b69081620003c982396080518181816103a401528181611557015281816120f8015281816122490152612330015260a0518181816105cc0152610b6e015260c051818181610aac0152610ba30152f35b01519050388062000158565b8216908360005260206000209160005b8181106200021d575095838596971062000203575b505050811b0190556200016c565b015160001960f88460031b161c19169055388080620001f5565b8783015184559285019260209283019201620001e0565b8460005260206000208380860160051c8201926020871062000277575b0160051c019085905b8281106200026a5750506200013c565b600081550185906200025a565b9250819262000251565b634e487b7160e01b600052602260045260246000fd5b90607f169062000129565b634e487b7160e01b600052604160045260246000fd5b60405162461bcd60e51b815260206004820152601c60248201527f52656769737472792061646472657373206d75737420626520736574000000006044820152606490fd5b60405162461bcd60e51b815260206004820152601c60248201527f56657269666965722061646472657373206d75737420626520736574000000006044820152606490fd5b606460405162461bcd60e51b815260206004820152602060248201527f4e616d6520577261707065722061646472657373206d757374206265207365746044820152fd5b602082850182018101518c830182015201620000c9565b600080fd5b6040519190601f01601f191682016001600160401b03811183821017620002a25760405256fe6080604052600436101561001257600080fd5b60003560e01c806301ffc9a7146100fd57806315f64386146100f85780632b7ac3f3146100f357806338bf92e6146100c15780633f15457f146100ee5780634062b43f146100e95780635bdaa916146100e45780637e6215ba146100df5780638a596ebe146100da5780639061b923146100d5578063a8e5fbc0146100d0578063d358df77146100cb578063de9abe5e146100c1578063f470901a146100c65763fcd2e381146100c157600080fd5b610544565b610da4565b610ae1565b610a8c565b610942565b6108bc565b61089e565b610771565b6106cd565b6105ac565b610384565b610330565b61011c565b35906001600160e01b03198216820361011757565b600080fd5b34610117576020366003190112610117576004356001600160e01b0319811680910361011757807f9061b92300000000000000000000000000000000000000000000000000000000602092149081156101dd575b81156101b3575b8115610189575b506040519015158152f35b7f01ffc9a7000000000000000000000000000000000000000000000000000000009150143861017e565b7f8a596ebe0000000000000000000000000000000000000000000000000000000081149150610177565b7f15f643860000000000000000000000000000000000000000000000000000000081149150610170565b634e487b7160e01b600052604160045260246000fd5b6040810190811067ffffffffffffffff82111761023957604052565b610207565b6020810190811067ffffffffffffffff82111761023957604052565b610420810190811067ffffffffffffffff82111761023957604052565b90601f8019910116810190811067ffffffffffffffff82111761023957604052565b67ffffffffffffffff811161023957601f01601f191660200190565b9291926102c182610299565b916102cf6040519384610277565b829481845281830111610117578281602093846000960137010152565b9080601f8301121561011757816020610307933591016102b5565b90565b9060208282031261011757813567ffffffffffffffff81116101175761030792016102ec565b346101175760203660031901126101175760043567ffffffffffffffff8111610117576001600160a01b03610375600061037060409436906004016102ec565b611398565b83519182529091166020820152f35b346101175760003660031901126101175760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b67ffffffffffffffff81116102395760051b60200190565b9080601f83011215610117578135906103f8826103c8565b926104066040519485610277565b828452602092838086019160051b8301019280841161011757848301915b8483106104345750505050505090565b823567ffffffffffffffff8111610117578691610456848480948901016102ec565b815201920191610424565b9060406003198301126101175767ffffffffffffffff600435818111610117578361048e916004016103e0565b9260243591821161011757610307916004016102ec565b60005b8381106104b85750506000910152565b81810151838201526020016104a8565b906020916104e1815180928185528580860191016104a5565b601f01601f1916010190565b90602091828152606051808483015260005b818110610520575060409293506000838284010152601f8019910116010190565b60808101518382016040015284016104ff565b9060206103079281815201906104c8565b346101175761055236610461565b508051600110156105a75761058161058f60406105a393015160405192839160208084015260408301906104c8565b03601f198101835282610277565b6040519182916020835260208301906104c8565b0390f35b61147a565b346101175760003660031901126101175760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b90600182811c92168015610620575b602083101461060a57565b634e487b7160e01b600052602260045260246000fd5b91607f16916105ff565b9060009160019081549161063d836105f0565b808352928181169081156106b0575060011461065857505050565b80929394506000527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6916000925b84841061069857505060209250010190565b80546020858501810191909152909301928101610686565b915050602093945060ff929192191683830152151560051b010190565b34610117576000366003190112610117576105a360405161058f816106f18161062a565b0382610277565b9181601f840112156101175782359167ffffffffffffffff8311610117576020838186019501011161011757565b60406003198201126101175767ffffffffffffffff916004358381116101175782610753916004016106f8565b939093926024359182116101175761076d916004016106f8565b9091565b34610117576107966107e8600061079f61078a36610726565b9691839193019061030a565b94810190610e2c565b95936040989395929198518098819582947f3baa6d50000000000000000000000000000000000000000000000000000000008452896001600160a01b0380961660048601611075565b0392165afa92831561089957600093610876575b5082519051908181036108375761082f8461082987610581876040519485936020850152602484016110c6565b306110eb565b602081519101f35b6040517f2918942500000000000000000000000000000000000000000000000000000000815260048101919091526024810191909152604490fd5b0390fd5b61089291933d8091833e61088a8183610277565b810190610f3b565b91386107fc565b6110ba565b34610117576000366003190112610117576020600254604051908152f35b346101175760203660031901126101175760043567ffffffffffffffff8111610117576109346108fc6108f66105a39336906004016106f8565b906123e7565b92959394919060ff610920604051988998895260a060208a015260a08901906104c8565b9216604087015285820360608701526104c8565b9083820360808501526104c8565b3461011757610370600061096461095836610726565b949290959136916102b5565b9290506001600160e01b031961097a8383611490565b167f3b3b57de000000000000000000000000000000000000000000000000000000008114610a78577ff1cb7e06000000000000000000000000000000000000000000000000000000008114610a5b577f59d1d43c000000000000000000000000000000000000000000000000000000008114610a3e577fbc1c58d10000000000000000000000000000000000000000000000000000000014610a2357604051806105a3816104ed565b81610a3992610a31926114bc565b8101906114d9565b612321565b5081610a5592610a4d926114bc565b8101906114fe565b9061223a565b5081610a7292610a6a926114bc565b8101906114e8565b906120db565b5081610a8792610a31926114bc565b61153e565b346101175760003660031901126101175760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b6001600160a01b0381160361011757565b346101175760403660031901126101175760043567ffffffffffffffff811161011757610b129036906004016106f8565b60243591610b1f83610ad0565b610b2f60006103703685856102b5565b506040517f02571be3000000000000000000000000000000000000000000000000000000008152600481018290526001600160a01b03602080836024817f000000000000000000000000000000000000000000000000000000000000000086165afa92831561089957600093610d83575b507f00000000000000000000000000000000000000000000000000000000000000008216908383168214610ca6575b505094610c7081610c3d7f88781081cc340609705af0f96bf3ba64ea267873444e91725bd072f2af0f44d895610c2d610c7e967f9fcbe230acca8f6bcfd2dda7aa896aa97299a423bdac7c8b565819624436a0729b339116146111f6565b6000526000602052604060002090565b906001600160a01b03167fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055565b60405191829186868461121e565b0390a1610ca1610c8e83836123e7565b9350915060025460405196879687611246565b0390a1005b6040517f6352211e000000000000000000000000000000000000000000000000000000008152600481018690529790935091908390889060249082905afa801561089957610c3d7f88781081cc340609705af0f96bf3ba64ea267873444e91725bd072f2af0f44d895610c2d610c709486947f9fcbe230acca8f6bcfd2dda7aa896aa97299a423bdac7c8b565819624436a0729c610c7e99600092610d56575b50509750959a5050955050610bcf565b610d759250803d10610d7c575b610d6d8183610277565b81019061134d565b3880610d46565b503d610d63565b819350610d9d9083923d8611610d7c57610d6d8183610277565b9290610ba0565b3461011757610db236610461565b508051600110156105a757610581610e0b60406105a393015160208151910151906bffffffffffffffffffffffff19918281169160148110610e17575b50506040805160609290921c6020830152909384925090820190565b60405191829182610533565b8391925060140360031b1b1616803880610def565b91909160c081840312610117578035610e4481610ad0565b92602080830135610e5481610ad0565b9367ffffffffffffffff9160408501358381116101175785019084601f8301121561011757813591610e85836103c8565b92610e936040519485610277565b808452828085019160051b83010191878311610117578301905b828210610ef557505050509360608101358381116101175784610ed19183016103e0565b93610ede60808301610102565b9360a08301359081116101175761030792016102ec565b81358152908301908301610ead565b90929192610f1181610299565b91610f1f6040519384610277565b829482845282820111610117576020610f399301906104a5565b565b90602090818382031261011757825167ffffffffffffffff9384821161011757019080601f83011215610117578151610f73816103c8565b94604090610f8382519788610277565b828752858088019360051b8601019484861161011757868101935b868510610fb057505050505050505090565b845183811161011757820186603f82011215610117578891610fda88838886809601519101610f04565b815201940193610f9e565b90815180825260208080930193019160005b828110611005575050505090565b835185529381019392810192600101610ff7565b908082519081815260208091019281808460051b8301019501936000915b8483106110475750505050505090565b9091929394958480611065600193601f198682030187528a516104c8565b9801930193019194939290611037565b9261109e61030795936001600160a01b036110ac94168652608060208701526080860190610fe5565b908482036040860152611019565b9160608184039101526104c8565b6040513d6000823e3d90fd5b90916110dd61030793604084526040840190611019565b9160208184039101526104c8565b9061030791600080604051936111008561021d565b601e85527f416464726573733a206c6f772d6c6576656c2063616c6c206661696c65640000602086015260208151910182855af13d15611162573d9161114583610299565b926111536040519485610277565b83523d6000602085013e611166565b6060915b919290156111c7575081511561117a575090565b3b156111835790565b606460405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152fd5b8251909150156111da5750805190602001fd5b6108729060405191829162461bcd60e51b835260048301610533565b1561011757565b908060209392818452848401376000828201840152601f01601f1916010190565b9161123f6020926001600160a01b03929695966040865260408601916111fd565b9416910152565b94919061125f919796949760c0875260c08701916111fd565b91602090818601528483036040860152600092600190815491611281836105f0565b8083529281811690811561132b57506001146112c9575b50505050906112bb9160ff610307969716606086015284820360808601526104c8565b9160a08184039101526104c8565b6000818152939995509091907fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf65b828510611318575094989190920101925081905060ff6112bb610307611298565b80548486018c0152938a019381016112f7565b60ff191683860152505090151560051b010191508060ff6112bb610307611298565b90816020910312610117575161030781610ad0565b634e487b7160e01b600052601160045260246000fd5b906001820180921161138657565b611362565b9190820180921161138657565b91909180518310156105a7576020838201015160f81c801561145457906113dd6113d8836113d26113e3956113cc89611378565b86611460565b9661138b565b611378565b90611398565b604080516020810193845290810194909452926114038160608101610581565b5190206001600160a01b03611432611425836000526000602052604060002090565b546001600160a01b031690565b1661143b579190565b9150610307611425836000526000602052604060002090565b50509050600090600090565b908281018082116113865782511061011757016020012090565b634e487b7160e01b600052603260045260246000fd5b6001600160e01b031990358181169392600481106114ad57505050565b60040360031b82901b16169150565b909291928360041161011757831161011757600401916003190190565b90816020910312610117573590565b9190826040910312610117576020823592013590565b91906040838203126101175782359260208101359067ffffffffffffffff821161011757019080601f8301121561011757816020610307933591016102b5565b61158f9061158061158a6115858361158061157b6060987f0000000000000000000000000000000000000000000000000000000000000000611781565b61181f565b61193f565b6118c8565b611973565b90611598611743565b508101906020908183511015611719576004906040906115d46115ce8351603c878201528681526115c88161021d565b83611ef7565b8261205f565b8151936115e08561023e565b6000855282820195818751511515918261170e575b5050611700575b600061161e61161284516001600160a01b031690565b6001600160a01b031690565b845195868092632d43cbef60e21b82525afa938415610899576000946116e5575b5081810180516001600160a01b031695875160808501908151988751998a9287840163ea9cd3bf60e01b9052602484019261167993611a01565b0394601f19958681018a5261168e908a610277565b516001600160a01b031692516001600160a01b031698519051908651998a958601946116b995611a35565b0390810185526116c99085610277565b51630556f18360e41b8152928392610872923060048601611bdf565b6116f991943d8091833e61088a8183610277565b923861163f565b61170982611f24565b6115fc565b5110905081386115f5565b60046040517fb00fd638000000000000000000000000000000000000000000000000000000008152fd5b6040519060a0820182811067ffffffffffffffff82111761023957604052606060808360008152600060208201528260408201526000838201520152565b9061178a611743565b506040516117978161025a565b60209283825261040092833686850137604051936117b48561025a565b8560005b82811061180f5750505060008352600084526040519460a0860186811067ffffffffffffffff821117610239576040526001600160a01b039283168652911690840152604083015260006060830152608082015290565b60608282890101520186906117b8565b611827611743565b50602060408201805160018151801515806118bb575b6118ad575b01905251511161187b576000606082015261185c81611f9d565b6103076115ce6040516115c88161058160208201906000602083019252565b6040517f128e700800000000000000000000000000000000000000000000000000000000815260206004820152602490fd5b6118b686611f24565b611842565b508460608701511061183d565b6118d0611743565b5060206040820180516001815180151580611932575b611924575b01905251511161187b576000606082015261190581611fe9565b6103076115ce6040516115c88161058160208201906002602083019252565b61192d86611f24565b6118eb565b50846060870151106118e6565b90611948611743565b50602060608301511015611719576115ce61030791604051906020820152602081526115c88161021d565b61197b611743565b506060810160208151101561171957604082019081515160001991828201918211611386576119ab828551611ee3565b51908051938414611386576001840190526001600160fd1b0383168303611386577f20000000000000000000000000000000000000000000000000000000000000006119fd9360031b1c179251611ee3565b5290565b91611a27906001600160a01b036103079593168452606060208501526060840190610fe5565b916040818403910152611019565b93906103079593611a6891611a76946001600160a01b03809216885216602087015260c0604087015260c0860190610fe5565b908482036060860152611019565b917ff470901a00000000000000000000000000000000000000000000000000000000608082015260a08184039101526104c8565b93906103079593611a6891611add946001600160a01b03809216885216602087015260c0604087015260c0860190610fe5565b917fde9abe5e00000000000000000000000000000000000000000000000000000000608082015260a08184039101526104c8565b93906103079593611a6891611b44946001600160a01b03809216885216602087015260c0604087015260c0860190610fe5565b917ffcd2e38100000000000000000000000000000000000000000000000000000000608082015260a08184039101526104c8565b93906103079593611a6891611bab946001600160a01b03809216885216602087015260c0604087015260c0860190610fe5565b917f38bf92e600000000000000000000000000000000000000000000000000000000608082015260a08184039101526104c8565b9290949391946001600160a01b0360a085019116845260209060a082860152865180915260c08501918060c08360051b8801019801926000905b838210611c6f57505050505084611c3b918461030796970360408601526104c8565b7f5bdaa9160000000000000000000000000000000000000000000000000000000060608401529160808184039101526104c8565b90919293988380611c8c60019360bf198c82030186528d516104c8565b9b019201920190939291611c19565b60046040820191825151151580611dc8575b611dba575b6000611cc861161283516001600160a01b031690565b60405193848092632d43cbef60e21b82525afa91821561089957600092611d9f575b5060208101928351611d02906001600160a01b031690565b9381519560808401968751966040519788926020840163ea9cd3bf60e01b90526024840192611d3093611a01565b0393601f19948581018852611d459088610277565b516001600160a01b031691516001600160a01b031692519651604051978894611d719460208701611aaa565b039081018452611d819084610277565b604051630556f18360e41b8152928392610872923060048601611bdf565b611db391923d8091833e61088a8183610277565b9038611cea565b611dc381611f24565b611cb2565b506020606082015110611cad565b60046040820191825151151580611ed5575b611ec7575b6000611e0361161283516001600160a01b031690565b60405193848092632d43cbef60e21b82525afa91821561089957600092611eac575b5060208101928351611e3d906001600160a01b031690565b9381519560808401968751966040519788926020840163ea9cd3bf60e01b90526024840192611e6b93611a01565b0393601f19948581018852611e809088610277565b516001600160a01b031691516001600160a01b031692519651604051978894611d719460208701611b11565b611ec091923d8091833e61088a8183610277565b9038611e25565b611ed081611f24565b611ded565b506020606082015110611de8565b80518210156105a75760209160051b010190565b6080611f219193929301519260ff845116938491600183018252611f1b8383611ee3565b52611ee3565b50565b604081019081515160001991828201918211611386576060611f47838651611ee3565b5191018051938414611386576001840190526001600160fd1b0383168303611386577fff00000000000000000000000000000000000000000000000000000000000000611f9a9360031b1c179251611ee3565b52565b60408101805151600019808201918211611386576060611fbe838551611ee3565b5194018051918214611386576001820190526001600160fd1b0381160361138657611f9a9151611ee3565b60408101908151516000199182820191821161138657606061200c838651611ee3565b5191018051938414611386576001840190526001600160fd1b0383168303611386577f0100000000000000000000000000000000000000000000000000000000000000611f9a9360031b1c179251611ee3565b60408101805151909291600019808301928311611386576060612083848751611ee3565b5192018051918214611386576001820190526001600160fd1b0381168103611386577fff00000000000000000000000000000000000000000000000000000000000000611f9a9460f81b169060031b1c179251611ee3565b9061158061211c9261158061158a6115858361158061157b60609a7f0000000000000000000000000000000000000000000000000000000000000000611781565b906004604080519361212d8561023e565b60008552818101938451511515908161222c575b5061221e575b600061215d61161283516001600160a01b031690565b835194858092632d43cbef60e21b82525afa92831561089957600093612203575b5060208101938451612196906001600160a01b031690565b94815196608084019788519786519889926020840163ea9cd3bf60e01b905260248401926121c393611a01565b0393601f199485810189526121d89089610277565b516001600160a01b031691516001600160a01b03169251975185519889946116b99460208701611b78565b61221791933d8091833e61088a8183610277565b913861217e565b61222781611f24565b612147565b602091508201511038612141565b61226d8161158061157b6060967f0000000000000000000000000000000000000000000000000000000000000000611781565b612275611743565b5060206040820180516001815180151580612315575b612307575b01905251511161187b57602091611580826000876122d19501526122b381611fe9565b61158a6115ce6040516115c8816105818a820190600a602083019252565b926122da611743565b508301511015611719576115ce6122f19183611ef7565b604051906122fe8261023e565b60008252611c9b565b61231086611f24565b612290565b5084898701511061228b565b6123548161158061157b6060957f0000000000000000000000000000000000000000000000000000000000000000611781565b9161235d611743565b50602060408401805160018151801515806123db575b6123cd575b01905251511161187b57826000611580926123b795015261239881611fe9565b61158a6115ce6040516115c88161058160208201906003602083019252565b604051906123c48261023e565b60008252611dd6565b6123d688611f24565b612378565b50848689015110612373565b60006103706123fc9261245b959436916102b5565b6002546040516bffffffffffffffffffffffff19606084901b1660208201526014815292509061246790601f1990612435603486610277565b604051968791602083016014916bffffffffffffffffffffffff199060601b1681520190565b03908101865285610277565b92604051612478816106f18161062a565b92600092919056fea264697066735822122057efd8edd61e828b8c697ad27a1b3e1aa9e8aa92e5b54cb205f22f0372e80d4464736f6c63430008130033", + "deployedBytecode": "0x6080604052600436101561001257600080fd5b60003560e01c806301ffc9a7146100fd57806315f64386146100f85780632b7ac3f3146100f357806338bf92e6146100c15780633f15457f146100ee5780634062b43f146100e95780635bdaa916146100e45780637e6215ba146100df5780638a596ebe146100da5780639061b923146100d5578063a8e5fbc0146100d0578063d358df77146100cb578063de9abe5e146100c1578063f470901a146100c65763fcd2e381146100c157600080fd5b610544565b610da4565b610ae1565b610a8c565b610942565b6108bc565b61089e565b610771565b6106cd565b6105ac565b610384565b610330565b61011c565b35906001600160e01b03198216820361011757565b600080fd5b34610117576020366003190112610117576004356001600160e01b0319811680910361011757807f9061b92300000000000000000000000000000000000000000000000000000000602092149081156101dd575b81156101b3575b8115610189575b506040519015158152f35b7f01ffc9a7000000000000000000000000000000000000000000000000000000009150143861017e565b7f8a596ebe0000000000000000000000000000000000000000000000000000000081149150610177565b7f15f643860000000000000000000000000000000000000000000000000000000081149150610170565b634e487b7160e01b600052604160045260246000fd5b6040810190811067ffffffffffffffff82111761023957604052565b610207565b6020810190811067ffffffffffffffff82111761023957604052565b610420810190811067ffffffffffffffff82111761023957604052565b90601f8019910116810190811067ffffffffffffffff82111761023957604052565b67ffffffffffffffff811161023957601f01601f191660200190565b9291926102c182610299565b916102cf6040519384610277565b829481845281830111610117578281602093846000960137010152565b9080601f8301121561011757816020610307933591016102b5565b90565b9060208282031261011757813567ffffffffffffffff81116101175761030792016102ec565b346101175760203660031901126101175760043567ffffffffffffffff8111610117576001600160a01b03610375600061037060409436906004016102ec565b611398565b83519182529091166020820152f35b346101175760003660031901126101175760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b67ffffffffffffffff81116102395760051b60200190565b9080601f83011215610117578135906103f8826103c8565b926104066040519485610277565b828452602092838086019160051b8301019280841161011757848301915b8483106104345750505050505090565b823567ffffffffffffffff8111610117578691610456848480948901016102ec565b815201920191610424565b9060406003198301126101175767ffffffffffffffff600435818111610117578361048e916004016103e0565b9260243591821161011757610307916004016102ec565b60005b8381106104b85750506000910152565b81810151838201526020016104a8565b906020916104e1815180928185528580860191016104a5565b601f01601f1916010190565b90602091828152606051808483015260005b818110610520575060409293506000838284010152601f8019910116010190565b60808101518382016040015284016104ff565b9060206103079281815201906104c8565b346101175761055236610461565b508051600110156105a75761058161058f60406105a393015160405192839160208084015260408301906104c8565b03601f198101835282610277565b6040519182916020835260208301906104c8565b0390f35b61147a565b346101175760003660031901126101175760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b90600182811c92168015610620575b602083101461060a57565b634e487b7160e01b600052602260045260246000fd5b91607f16916105ff565b9060009160019081549161063d836105f0565b808352928181169081156106b0575060011461065857505050565b80929394506000527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6916000925b84841061069857505060209250010190565b80546020858501810191909152909301928101610686565b915050602093945060ff929192191683830152151560051b010190565b34610117576000366003190112610117576105a360405161058f816106f18161062a565b0382610277565b9181601f840112156101175782359167ffffffffffffffff8311610117576020838186019501011161011757565b60406003198201126101175767ffffffffffffffff916004358381116101175782610753916004016106f8565b939093926024359182116101175761076d916004016106f8565b9091565b34610117576107966107e8600061079f61078a36610726565b9691839193019061030a565b94810190610e2c565b95936040989395929198518098819582947f3baa6d50000000000000000000000000000000000000000000000000000000008452896001600160a01b0380961660048601611075565b0392165afa92831561089957600093610876575b5082519051908181036108375761082f8461082987610581876040519485936020850152602484016110c6565b306110eb565b602081519101f35b6040517f2918942500000000000000000000000000000000000000000000000000000000815260048101919091526024810191909152604490fd5b0390fd5b61089291933d8091833e61088a8183610277565b810190610f3b565b91386107fc565b6110ba565b34610117576000366003190112610117576020600254604051908152f35b346101175760203660031901126101175760043567ffffffffffffffff8111610117576109346108fc6108f66105a39336906004016106f8565b906123e7565b92959394919060ff610920604051988998895260a060208a015260a08901906104c8565b9216604087015285820360608701526104c8565b9083820360808501526104c8565b3461011757610370600061096461095836610726565b949290959136916102b5565b9290506001600160e01b031961097a8383611490565b167f3b3b57de000000000000000000000000000000000000000000000000000000008114610a78577ff1cb7e06000000000000000000000000000000000000000000000000000000008114610a5b577f59d1d43c000000000000000000000000000000000000000000000000000000008114610a3e577fbc1c58d10000000000000000000000000000000000000000000000000000000014610a2357604051806105a3816104ed565b81610a3992610a31926114bc565b8101906114d9565b612321565b5081610a5592610a4d926114bc565b8101906114fe565b9061223a565b5081610a7292610a6a926114bc565b8101906114e8565b906120db565b5081610a8792610a31926114bc565b61153e565b346101175760003660031901126101175760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b6001600160a01b0381160361011757565b346101175760403660031901126101175760043567ffffffffffffffff811161011757610b129036906004016106f8565b60243591610b1f83610ad0565b610b2f60006103703685856102b5565b506040517f02571be3000000000000000000000000000000000000000000000000000000008152600481018290526001600160a01b03602080836024817f000000000000000000000000000000000000000000000000000000000000000086165afa92831561089957600093610d83575b507f00000000000000000000000000000000000000000000000000000000000000008216908383168214610ca6575b505094610c7081610c3d7f88781081cc340609705af0f96bf3ba64ea267873444e91725bd072f2af0f44d895610c2d610c7e967f9fcbe230acca8f6bcfd2dda7aa896aa97299a423bdac7c8b565819624436a0729b339116146111f6565b6000526000602052604060002090565b906001600160a01b03167fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055565b60405191829186868461121e565b0390a1610ca1610c8e83836123e7565b9350915060025460405196879687611246565b0390a1005b6040517f6352211e000000000000000000000000000000000000000000000000000000008152600481018690529790935091908390889060249082905afa801561089957610c3d7f88781081cc340609705af0f96bf3ba64ea267873444e91725bd072f2af0f44d895610c2d610c709486947f9fcbe230acca8f6bcfd2dda7aa896aa97299a423bdac7c8b565819624436a0729c610c7e99600092610d56575b50509750959a5050955050610bcf565b610d759250803d10610d7c575b610d6d8183610277565b81019061134d565b3880610d46565b503d610d63565b819350610d9d9083923d8611610d7c57610d6d8183610277565b9290610ba0565b3461011757610db236610461565b508051600110156105a757610581610e0b60406105a393015160208151910151906bffffffffffffffffffffffff19918281169160148110610e17575b50506040805160609290921c6020830152909384925090820190565b60405191829182610533565b8391925060140360031b1b1616803880610def565b91909160c081840312610117578035610e4481610ad0565b92602080830135610e5481610ad0565b9367ffffffffffffffff9160408501358381116101175785019084601f8301121561011757813591610e85836103c8565b92610e936040519485610277565b808452828085019160051b83010191878311610117578301905b828210610ef557505050509360608101358381116101175784610ed19183016103e0565b93610ede60808301610102565b9360a08301359081116101175761030792016102ec565b81358152908301908301610ead565b90929192610f1181610299565b91610f1f6040519384610277565b829482845282820111610117576020610f399301906104a5565b565b90602090818382031261011757825167ffffffffffffffff9384821161011757019080601f83011215610117578151610f73816103c8565b94604090610f8382519788610277565b828752858088019360051b8601019484861161011757868101935b868510610fb057505050505050505090565b845183811161011757820186603f82011215610117578891610fda88838886809601519101610f04565b815201940193610f9e565b90815180825260208080930193019160005b828110611005575050505090565b835185529381019392810192600101610ff7565b908082519081815260208091019281808460051b8301019501936000915b8483106110475750505050505090565b9091929394958480611065600193601f198682030187528a516104c8565b9801930193019194939290611037565b9261109e61030795936001600160a01b036110ac94168652608060208701526080860190610fe5565b908482036040860152611019565b9160608184039101526104c8565b6040513d6000823e3d90fd5b90916110dd61030793604084526040840190611019565b9160208184039101526104c8565b9061030791600080604051936111008561021d565b601e85527f416464726573733a206c6f772d6c6576656c2063616c6c206661696c65640000602086015260208151910182855af13d15611162573d9161114583610299565b926111536040519485610277565b83523d6000602085013e611166565b6060915b919290156111c7575081511561117a575090565b3b156111835790565b606460405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152fd5b8251909150156111da5750805190602001fd5b6108729060405191829162461bcd60e51b835260048301610533565b1561011757565b908060209392818452848401376000828201840152601f01601f1916010190565b9161123f6020926001600160a01b03929695966040865260408601916111fd565b9416910152565b94919061125f919796949760c0875260c08701916111fd565b91602090818601528483036040860152600092600190815491611281836105f0565b8083529281811690811561132b57506001146112c9575b50505050906112bb9160ff610307969716606086015284820360808601526104c8565b9160a08184039101526104c8565b6000818152939995509091907fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf65b828510611318575094989190920101925081905060ff6112bb610307611298565b80548486018c0152938a019381016112f7565b60ff191683860152505090151560051b010191508060ff6112bb610307611298565b90816020910312610117575161030781610ad0565b634e487b7160e01b600052601160045260246000fd5b906001820180921161138657565b611362565b9190820180921161138657565b91909180518310156105a7576020838201015160f81c801561145457906113dd6113d8836113d26113e3956113cc89611378565b86611460565b9661138b565b611378565b90611398565b604080516020810193845290810194909452926114038160608101610581565b5190206001600160a01b03611432611425836000526000602052604060002090565b546001600160a01b031690565b1661143b579190565b9150610307611425836000526000602052604060002090565b50509050600090600090565b908281018082116113865782511061011757016020012090565b634e487b7160e01b600052603260045260246000fd5b6001600160e01b031990358181169392600481106114ad57505050565b60040360031b82901b16169150565b909291928360041161011757831161011757600401916003190190565b90816020910312610117573590565b9190826040910312610117576020823592013590565b91906040838203126101175782359260208101359067ffffffffffffffff821161011757019080601f8301121561011757816020610307933591016102b5565b61158f9061158061158a6115858361158061157b6060987f0000000000000000000000000000000000000000000000000000000000000000611781565b61181f565b61193f565b6118c8565b611973565b90611598611743565b508101906020908183511015611719576004906040906115d46115ce8351603c878201528681526115c88161021d565b83611ef7565b8261205f565b8151936115e08561023e565b6000855282820195818751511515918261170e575b5050611700575b600061161e61161284516001600160a01b031690565b6001600160a01b031690565b845195868092632d43cbef60e21b82525afa938415610899576000946116e5575b5081810180516001600160a01b031695875160808501908151988751998a9287840163ea9cd3bf60e01b9052602484019261167993611a01565b0394601f19958681018a5261168e908a610277565b516001600160a01b031692516001600160a01b031698519051908651998a958601946116b995611a35565b0390810185526116c99085610277565b51630556f18360e41b8152928392610872923060048601611bdf565b6116f991943d8091833e61088a8183610277565b923861163f565b61170982611f24565b6115fc565b5110905081386115f5565b60046040517fb00fd638000000000000000000000000000000000000000000000000000000008152fd5b6040519060a0820182811067ffffffffffffffff82111761023957604052606060808360008152600060208201528260408201526000838201520152565b9061178a611743565b506040516117978161025a565b60209283825261040092833686850137604051936117b48561025a565b8560005b82811061180f5750505060008352600084526040519460a0860186811067ffffffffffffffff821117610239576040526001600160a01b039283168652911690840152604083015260006060830152608082015290565b60608282890101520186906117b8565b611827611743565b50602060408201805160018151801515806118bb575b6118ad575b01905251511161187b576000606082015261185c81611f9d565b6103076115ce6040516115c88161058160208201906000602083019252565b6040517f128e700800000000000000000000000000000000000000000000000000000000815260206004820152602490fd5b6118b686611f24565b611842565b508460608701511061183d565b6118d0611743565b5060206040820180516001815180151580611932575b611924575b01905251511161187b576000606082015261190581611fe9565b6103076115ce6040516115c88161058160208201906002602083019252565b61192d86611f24565b6118eb565b50846060870151106118e6565b90611948611743565b50602060608301511015611719576115ce61030791604051906020820152602081526115c88161021d565b61197b611743565b506060810160208151101561171957604082019081515160001991828201918211611386576119ab828551611ee3565b51908051938414611386576001840190526001600160fd1b0383168303611386577f20000000000000000000000000000000000000000000000000000000000000006119fd9360031b1c179251611ee3565b5290565b91611a27906001600160a01b036103079593168452606060208501526060840190610fe5565b916040818403910152611019565b93906103079593611a6891611a76946001600160a01b03809216885216602087015260c0604087015260c0860190610fe5565b908482036060860152611019565b917ff470901a00000000000000000000000000000000000000000000000000000000608082015260a08184039101526104c8565b93906103079593611a6891611add946001600160a01b03809216885216602087015260c0604087015260c0860190610fe5565b917fde9abe5e00000000000000000000000000000000000000000000000000000000608082015260a08184039101526104c8565b93906103079593611a6891611b44946001600160a01b03809216885216602087015260c0604087015260c0860190610fe5565b917ffcd2e38100000000000000000000000000000000000000000000000000000000608082015260a08184039101526104c8565b93906103079593611a6891611bab946001600160a01b03809216885216602087015260c0604087015260c0860190610fe5565b917f38bf92e600000000000000000000000000000000000000000000000000000000608082015260a08184039101526104c8565b9290949391946001600160a01b0360a085019116845260209060a082860152865180915260c08501918060c08360051b8801019801926000905b838210611c6f57505050505084611c3b918461030796970360408601526104c8565b7f5bdaa9160000000000000000000000000000000000000000000000000000000060608401529160808184039101526104c8565b90919293988380611c8c60019360bf198c82030186528d516104c8565b9b019201920190939291611c19565b60046040820191825151151580611dc8575b611dba575b6000611cc861161283516001600160a01b031690565b60405193848092632d43cbef60e21b82525afa91821561089957600092611d9f575b5060208101928351611d02906001600160a01b031690565b9381519560808401968751966040519788926020840163ea9cd3bf60e01b90526024840192611d3093611a01565b0393601f19948581018852611d459088610277565b516001600160a01b031691516001600160a01b031692519651604051978894611d719460208701611aaa565b039081018452611d819084610277565b604051630556f18360e41b8152928392610872923060048601611bdf565b611db391923d8091833e61088a8183610277565b9038611cea565b611dc381611f24565b611cb2565b506020606082015110611cad565b60046040820191825151151580611ed5575b611ec7575b6000611e0361161283516001600160a01b031690565b60405193848092632d43cbef60e21b82525afa91821561089957600092611eac575b5060208101928351611e3d906001600160a01b031690565b9381519560808401968751966040519788926020840163ea9cd3bf60e01b90526024840192611e6b93611a01565b0393601f19948581018852611e809088610277565b516001600160a01b031691516001600160a01b031692519651604051978894611d719460208701611b11565b611ec091923d8091833e61088a8183610277565b9038611e25565b611ed081611f24565b611ded565b506020606082015110611de8565b80518210156105a75760209160051b010190565b6080611f219193929301519260ff845116938491600183018252611f1b8383611ee3565b52611ee3565b50565b604081019081515160001991828201918211611386576060611f47838651611ee3565b5191018051938414611386576001840190526001600160fd1b0383168303611386577fff00000000000000000000000000000000000000000000000000000000000000611f9a9360031b1c179251611ee3565b52565b60408101805151600019808201918211611386576060611fbe838551611ee3565b5194018051918214611386576001820190526001600160fd1b0381160361138657611f9a9151611ee3565b60408101908151516000199182820191821161138657606061200c838651611ee3565b5191018051938414611386576001840190526001600160fd1b0383168303611386577f0100000000000000000000000000000000000000000000000000000000000000611f9a9360031b1c179251611ee3565b60408101805151909291600019808301928311611386576060612083848751611ee3565b5192018051918214611386576001820190526001600160fd1b0381168103611386577fff00000000000000000000000000000000000000000000000000000000000000611f9a9460f81b169060031b1c179251611ee3565b9061158061211c9261158061158a6115858361158061157b60609a7f0000000000000000000000000000000000000000000000000000000000000000611781565b906004604080519361212d8561023e565b60008552818101938451511515908161222c575b5061221e575b600061215d61161283516001600160a01b031690565b835194858092632d43cbef60e21b82525afa92831561089957600093612203575b5060208101938451612196906001600160a01b031690565b94815196608084019788519786519889926020840163ea9cd3bf60e01b905260248401926121c393611a01565b0393601f199485810189526121d89089610277565b516001600160a01b031691516001600160a01b03169251975185519889946116b99460208701611b78565b61221791933d8091833e61088a8183610277565b913861217e565b61222781611f24565b612147565b602091508201511038612141565b61226d8161158061157b6060967f0000000000000000000000000000000000000000000000000000000000000000611781565b612275611743565b5060206040820180516001815180151580612315575b612307575b01905251511161187b57602091611580826000876122d19501526122b381611fe9565b61158a6115ce6040516115c8816105818a820190600a602083019252565b926122da611743565b508301511015611719576115ce6122f19183611ef7565b604051906122fe8261023e565b60008252611c9b565b61231086611f24565b612290565b5084898701511061228b565b6123548161158061157b6060957f0000000000000000000000000000000000000000000000000000000000000000611781565b9161235d611743565b50602060408401805160018151801515806123db575b6123cd575b01905251511161187b57826000611580926123b795015261239881611fe9565b61158a6115ce6040516115c88161058160208201906003602083019252565b604051906123c48261023e565b60008252611dd6565b6123d688611f24565b612378565b50848689015110612373565b60006103706123fc9261245b959436916102b5565b6002546040516bffffffffffffffffffffffff19606084901b1660208201526014815292509061246790601f1990612435603486610277565b604051968791602083016014916bffffffffffffffffffffffff199060601b1681520190565b03908101865285610277565b92604051612478816106f18161062a565b92600092919056fea264697066735822122057efd8edd61e828b8c697ad27a1b3e1aa9e8aa92e5b54cb205f22f0372e80d4464736f6c63430008130033", + "devdoc": { + "kind": "dev", + "methods": { + "constructor": { + "params": { + "_ens": "The ENS registry address", + "_graphqlUrl": "The offchain/l2 graphql endpoint url", + "_l2ResolverCoinType": "The chainId at which the resolver resolves data from. 0 if storageLocation is offChain", + "_nameWrapper": "The ENS name wrapper address", + "_verifier": "The chain verifier address" + } + }, + "getStorageSlotsCallback(bytes,bytes)": { + "details": "Internal callback function invoked by CCIP-Read in response to a `getStorageSlots` request." + }, + "getTarget(bytes)": { + "details": "Returns the L2 target address that can answer queries for `name`.", + "params": { + "name": "DNS encoded ENS name to query" + }, + "returns": { + "node": "The node of the name", + "target": "The L2 resolver address to verify against." + } + }, + "metadata(bytes)": { + "details": "This function provides metadata about the L1 Resolver, including its name, coin type, GraphQL URL, storage type, and encoded information.", + "params": { + "name": "The domain name in format (dnsEncoded)" + }, + "returns": { + "_0": "coinType The cointype of the chain the target contract locates such as Optimism, Base, Arb, etc", + "_1": "graphqlUrl The GraphQL URL used by the resolver", + "_2": "storageType Storage Type (0 for EVM)", + "_3": "storageLocation The storage identifier. For EVM chains, this is the address of the resolver contract.", + "_4": "context. An identifier used by l2 graph indexer for Domain schema id (`context-namehash`) allowing multiple resolver contracts to have own namespace." + } + }, + "resolve(bytes,bytes)": { + "details": "Resolve and verify a record stored in l2 target address. It supports subname by fetching target recursively to the nearlest parent.", + "params": { + "data": "The actual calldata", + "name": "DNS encoded ENS name to query" + }, + "returns": { + "result": "result of the call" + } + }, + "setTarget(bytes,address)": { + "params": { + "name": "The encoded name to query.", + "target": "The L2 resolver address to verify against." + } + }, + "supportsInterface(bytes4)": { + "details": "See {IERC165-supportsInterface}." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "metadata(bytes)": { + "notice": "Get metadata about the L1 Resolver" + }, + "setTarget(bytes,address)": { + "notice": "Set target address to verify aagainst" + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 18375, + "contract": "contracts/L1Resolver.sol:L1Resolver", + "label": "targets", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 18392, + "contract": "contracts/L1Resolver.sol:L1Resolver", + "label": "graphqlUrl", + "offset": 0, + "slot": "1", + "type": "t_string_storage" + }, + { + "astId": 18394, + "contract": "contracts/L1Resolver.sol:L1Resolver", + "label": "l2ResolverCoinType", + "offset": 0, + "slot": "2", + "type": "t_uint256" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_address)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/crosschain-resolver/deployments/sepolia/BaseL1Resolver.json b/crosschain-resolver/deployments/sepolia/BaseL1Resolver.json new file mode 100644 index 00000000..0c159fde --- /dev/null +++ b/crosschain-resolver/deployments/sepolia/BaseL1Resolver.json @@ -0,0 +1,637 @@ +{ + "address": "0xF6EfB10e47d6D4C1023BBFa5e6396B00915FbD41", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IEVMVerifier", + "name": "_verifier", + "type": "address" + }, + { + "internalType": "contract ENS", + "name": "_ens", + "type": "address" + }, + { + "internalType": "contract INameWrapper", + "name": "_nameWrapper", + "type": "address" + }, + { + "internalType": "string", + "name": "_graphqlUrl", + "type": "string" + }, + { + "internalType": "uint256", + "name": "_l2ResolverCoinType", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "CommandTooLong", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "InvalidReference", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "string[]", + "name": "urls", + "type": "string[]" + }, + { + "internalType": "bytes", + "name": "callData", + "type": "bytes" + }, + { + "internalType": "bytes4", + "name": "callbackFunction", + "type": "bytes4" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "name": "OffchainLookup", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "actual", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + } + ], + "name": "ResponseLengthMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "TooManyCommands", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes", + "name": "name", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "coinType", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "graphqlUrl", + "type": "string" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "storageType", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "storageLocation", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "context", + "type": "bytes" + } + ], + "name": "MetadataChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes", + "name": "name", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "TargetSet", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes[]", + "name": "values", + "type": "bytes[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "addrCallback", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes[]", + "name": "values", + "type": "bytes[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "addrCoinTypeCallback", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes[]", + "name": "values", + "type": "bytes[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "contenthashCallback", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "ens", + "outputs": [ + { + "internalType": "contract ENS", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "response", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "extradata", + "type": "bytes" + } + ], + "name": "getStorageSlotsCallback", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "name", + "type": "bytes" + } + ], + "name": "getTarget", + "outputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "graphqlUrl", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "l2ResolverCoinType", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "name", + "type": "bytes" + } + ], + "name": "metadata", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "string", + "name": "", + "type": "string" + }, + { + "internalType": "uint8", + "name": "", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "nameWrapper", + "outputs": [ + { + "internalType": "contract INameWrapper", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "name", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "resolve", + "outputs": [ + { + "internalType": "bytes", + "name": "result", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "name", + "type": "bytes" + }, + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "setTarget", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes[]", + "name": "values", + "type": "bytes[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "textCallback", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "verifier", + "outputs": [ + { + "internalType": "contract IEVMVerifier", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x250abeb447efb1a4849a325377ec80d2412e7299f774bfafd4d18a702746fe75", + "receipt": { + "to": null, + "from": "0xDBBC2C0fe2a1D0fB4056B35a22e543bEb715E7FC", + "contractAddress": "0xF6EfB10e47d6D4C1023BBFa5e6396B00915FbD41", + "transactionIndex": 59, + "gasUsed": "2202583", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x08503b4a9e0b3f441ac4dadd7d91d39456fc1b764d4766fb025f471307ae2a76", + "transactionHash": "0x250abeb447efb1a4849a325377ec80d2412e7299f774bfafd4d18a702746fe75", + "logs": [], + "blockNumber": 5133267, + "cumulativeGasUsed": "11459557", + "status": 1, + "byzantium": true + }, + "args": [ + "0xAdef74372444e716C0473dEe1F9Cb3108EFa3818", + "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e", + "0x0635513f179D50A207757E05759CbD106d7dFcE8", + "https://api.studio.thegraph.com/query/1397/ens-base-sepolia/version/latest", + 2147568180 + ], + "numDeployments": 1, + "solcInputHash": "f62af331815cb4e74689ba5fa814dd3e", + "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IEVMVerifier\",\"name\":\"_verifier\",\"type\":\"address\"},{\"internalType\":\"contract ENS\",\"name\":\"_ens\",\"type\":\"address\"},{\"internalType\":\"contract INameWrapper\",\"name\":\"_nameWrapper\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_graphqlUrl\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_l2ResolverCoinType\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"CommandTooLong\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"max\",\"type\":\"uint256\"}],\"name\":\"InvalidReference\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"string[]\",\"name\":\"urls\",\"type\":\"string[]\"},{\"internalType\":\"bytes\",\"name\":\"callData\",\"type\":\"bytes\"},{\"internalType\":\"bytes4\",\"name\":\"callbackFunction\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"OffchainLookup\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"actual\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expected\",\"type\":\"uint256\"}],\"name\":\"ResponseLengthMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"max\",\"type\":\"uint256\"}],\"name\":\"TooManyCommands\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"name\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"coinType\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"graphqlUrl\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"storageType\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"storageLocation\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"context\",\"type\":\"bytes\"}],\"name\":\"MetadataChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"name\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"TargetSet\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"values\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"addrCallback\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"values\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"addrCoinTypeCallback\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"values\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"contenthashCallback\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ens\",\"outputs\":[{\"internalType\":\"contract ENS\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"response\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"extradata\",\"type\":\"bytes\"}],\"name\":\"getStorageSlotsCallback\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"name\",\"type\":\"bytes\"}],\"name\":\"getTarget\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"graphqlUrl\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"l2ResolverCoinType\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"name\",\"type\":\"bytes\"}],\"name\":\"metadata\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nameWrapper\",\"outputs\":[{\"internalType\":\"contract INameWrapper\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"name\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"result\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"name\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"setTarget\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"values\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"textCallback\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"verifier\",\"outputs\":[{\"internalType\":\"contract IEVMVerifier\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_ens\":\"The ENS registry address\",\"_graphqlUrl\":\"The offchain/l2 graphql endpoint url\",\"_l2ResolverCoinType\":\"The chainId at which the resolver resolves data from. 0 if storageLocation is offChain\",\"_nameWrapper\":\"The ENS name wrapper address\",\"_verifier\":\"The chain verifier address\"}},\"getStorageSlotsCallback(bytes,bytes)\":{\"details\":\"Internal callback function invoked by CCIP-Read in response to a `getStorageSlots` request.\"},\"getTarget(bytes)\":{\"details\":\"Returns the L2 target address that can answer queries for `name`.\",\"params\":{\"name\":\"DNS encoded ENS name to query\"},\"returns\":{\"node\":\"The node of the name\",\"target\":\"The L2 resolver address to verify against.\"}},\"metadata(bytes)\":{\"details\":\"This function provides metadata about the L1 Resolver, including its name, coin type, GraphQL URL, storage type, and encoded information.\",\"params\":{\"name\":\"The domain name in format (dnsEncoded)\"},\"returns\":{\"_0\":\"coinType The cointype of the chain the target contract locates such as Optimism, Base, Arb, etc\",\"_1\":\"graphqlUrl The GraphQL URL used by the resolver\",\"_2\":\"storageType Storage Type (0 for EVM)\",\"_3\":\"storageLocation The storage identifier. For EVM chains, this is the address of the resolver contract.\",\"_4\":\"context. An identifier used by l2 graph indexer for Domain schema id (`context-namehash`) allowing multiple resolver contracts to have own namespace.\"}},\"resolve(bytes,bytes)\":{\"details\":\"Resolve and verify a record stored in l2 target address. It supports subname by fetching target recursively to the nearlest parent.\",\"params\":{\"data\":\"The actual calldata\",\"name\":\"DNS encoded ENS name to query\"},\"returns\":{\"result\":\"result of the call\"}},\"setTarget(bytes,address)\":{\"params\":{\"name\":\"The encoded name to query.\",\"target\":\"The L2 resolver address to verify against.\"}},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"metadata(bytes)\":{\"notice\":\"Get metadata about the L1 Resolver\"},\"setTarget(bytes,address)\":{\"notice\":\"Set target address to verify aagainst\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/L1Resolver.sol\":\"L1Resolver\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1200},\"remappings\":[],\"viaIR\":true},\"sources\":{\"@ensdomains/ens-contracts/contracts/dnssec-oracle/BytesUtils.sol\":{\"content\":\"pragma solidity ^0.8.4;\\n\\nlibrary BytesUtils {\\n error OffsetOutOfBoundsError(uint256 offset, uint256 length);\\n\\n /*\\n * @dev Returns the keccak-256 hash of a byte range.\\n * @param self The byte string to hash.\\n * @param offset The position to start hashing at.\\n * @param len The number of bytes to hash.\\n * @return The hash of the byte range.\\n */\\n function keccak(\\n bytes memory self,\\n uint256 offset,\\n uint256 len\\n ) internal pure returns (bytes32 ret) {\\n require(offset + len <= self.length);\\n assembly {\\n ret := keccak256(add(add(self, 32), offset), len)\\n }\\n }\\n\\n /*\\n * @dev Returns a positive number if `other` comes lexicographically after\\n * `self`, a negative number if it comes before, or zero if the\\n * contents of the two bytes are equal.\\n * @param self The first bytes to compare.\\n * @param other The second bytes to compare.\\n * @return The result of the comparison.\\n */\\n function compare(\\n bytes memory self,\\n bytes memory other\\n ) internal pure returns (int256) {\\n return compare(self, 0, self.length, other, 0, other.length);\\n }\\n\\n /*\\n * @dev Returns a positive number if `other` comes lexicographically after\\n * `self`, a negative number if it comes before, or zero if the\\n * contents of the two bytes are equal. Comparison is done per-rune,\\n * on unicode codepoints.\\n * @param self The first bytes to compare.\\n * @param offset The offset of self.\\n * @param len The length of self.\\n * @param other The second bytes to compare.\\n * @param otheroffset The offset of the other string.\\n * @param otherlen The length of the other string.\\n * @return The result of the comparison.\\n */\\n function compare(\\n bytes memory self,\\n uint256 offset,\\n uint256 len,\\n bytes memory other,\\n uint256 otheroffset,\\n uint256 otherlen\\n ) internal pure returns (int256) {\\n if (offset + len > self.length) {\\n revert OffsetOutOfBoundsError(offset + len, self.length);\\n }\\n if (otheroffset + otherlen > other.length) {\\n revert OffsetOutOfBoundsError(otheroffset + otherlen, other.length);\\n }\\n\\n uint256 shortest = len;\\n if (otherlen < len) shortest = otherlen;\\n\\n uint256 selfptr;\\n uint256 otherptr;\\n\\n assembly {\\n selfptr := add(self, add(offset, 32))\\n otherptr := add(other, add(otheroffset, 32))\\n }\\n for (uint256 idx = 0; idx < shortest; idx += 32) {\\n uint256 a;\\n uint256 b;\\n assembly {\\n a := mload(selfptr)\\n b := mload(otherptr)\\n }\\n if (a != b) {\\n // Mask out irrelevant bytes and check again\\n uint256 mask;\\n if (shortest - idx >= 32) {\\n mask = type(uint256).max;\\n } else {\\n mask = ~(2 ** (8 * (idx + 32 - shortest)) - 1);\\n }\\n int256 diff = int256(a & mask) - int256(b & mask);\\n if (diff != 0) return diff;\\n }\\n selfptr += 32;\\n otherptr += 32;\\n }\\n\\n return int256(len) - int256(otherlen);\\n }\\n\\n /*\\n * @dev Returns true if the two byte ranges are equal.\\n * @param self The first byte range to compare.\\n * @param offset The offset into the first byte range.\\n * @param other The second byte range to compare.\\n * @param otherOffset The offset into the second byte range.\\n * @param len The number of bytes to compare\\n * @return True if the byte ranges are equal, false otherwise.\\n */\\n function equals(\\n bytes memory self,\\n uint256 offset,\\n bytes memory other,\\n uint256 otherOffset,\\n uint256 len\\n ) internal pure returns (bool) {\\n return keccak(self, offset, len) == keccak(other, otherOffset, len);\\n }\\n\\n /*\\n * @dev Returns true if the two byte ranges are equal with offsets.\\n * @param self The first byte range to compare.\\n * @param offset The offset into the first byte range.\\n * @param other The second byte range to compare.\\n * @param otherOffset The offset into the second byte range.\\n * @return True if the byte ranges are equal, false otherwise.\\n */\\n function equals(\\n bytes memory self,\\n uint256 offset,\\n bytes memory other,\\n uint256 otherOffset\\n ) internal pure returns (bool) {\\n return\\n keccak(self, offset, self.length - offset) ==\\n keccak(other, otherOffset, other.length - otherOffset);\\n }\\n\\n /*\\n * @dev Compares a range of 'self' to all of 'other' and returns True iff\\n * they are equal.\\n * @param self The first byte range to compare.\\n * @param offset The offset into the first byte range.\\n * @param other The second byte range to compare.\\n * @return True if the byte ranges are equal, false otherwise.\\n */\\n function equals(\\n bytes memory self,\\n uint256 offset,\\n bytes memory other\\n ) internal pure returns (bool) {\\n return\\n self.length == offset + other.length &&\\n equals(self, offset, other, 0, other.length);\\n }\\n\\n /*\\n * @dev Returns true if the two byte ranges are equal.\\n * @param self The first byte range to compare.\\n * @param other The second byte range to compare.\\n * @return True if the byte ranges are equal, false otherwise.\\n */\\n function equals(\\n bytes memory self,\\n bytes memory other\\n ) internal pure returns (bool) {\\n return\\n self.length == other.length &&\\n equals(self, 0, other, 0, self.length);\\n }\\n\\n /*\\n * @dev Returns the 8-bit number at the specified index of self.\\n * @param self The byte string.\\n * @param idx The index into the bytes\\n * @return The specified 8 bits of the string, interpreted as an integer.\\n */\\n function readUint8(\\n bytes memory self,\\n uint256 idx\\n ) internal pure returns (uint8 ret) {\\n return uint8(self[idx]);\\n }\\n\\n /*\\n * @dev Returns the 16-bit number at the specified index of self.\\n * @param self The byte string.\\n * @param idx The index into the bytes\\n * @return The specified 16 bits of the string, interpreted as an integer.\\n */\\n function readUint16(\\n bytes memory self,\\n uint256 idx\\n ) internal pure returns (uint16 ret) {\\n require(idx + 2 <= self.length);\\n assembly {\\n ret := and(mload(add(add(self, 2), idx)), 0xFFFF)\\n }\\n }\\n\\n /*\\n * @dev Returns the 32-bit number at the specified index of self.\\n * @param self The byte string.\\n * @param idx The index into the bytes\\n * @return The specified 32 bits of the string, interpreted as an integer.\\n */\\n function readUint32(\\n bytes memory self,\\n uint256 idx\\n ) internal pure returns (uint32 ret) {\\n require(idx + 4 <= self.length);\\n assembly {\\n ret := and(mload(add(add(self, 4), idx)), 0xFFFFFFFF)\\n }\\n }\\n\\n /*\\n * @dev Returns the 32 byte value at the specified index of self.\\n * @param self The byte string.\\n * @param idx The index into the bytes\\n * @return The specified 32 bytes of the string.\\n */\\n function readBytes32(\\n bytes memory self,\\n uint256 idx\\n ) internal pure returns (bytes32 ret) {\\n require(idx + 32 <= self.length);\\n assembly {\\n ret := mload(add(add(self, 32), idx))\\n }\\n }\\n\\n /*\\n * @dev Returns the 32 byte value at the specified index of self.\\n * @param self The byte string.\\n * @param idx The index into the bytes\\n * @return The specified 32 bytes of the string.\\n */\\n function readBytes20(\\n bytes memory self,\\n uint256 idx\\n ) internal pure returns (bytes20 ret) {\\n require(idx + 20 <= self.length);\\n assembly {\\n ret := and(\\n mload(add(add(self, 32), idx)),\\n 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000\\n )\\n }\\n }\\n\\n /*\\n * @dev Returns the n byte value at the specified index of self.\\n * @param self The byte string.\\n * @param idx The index into the bytes.\\n * @param len The number of bytes.\\n * @return The specified 32 bytes of the string.\\n */\\n function readBytesN(\\n bytes memory self,\\n uint256 idx,\\n uint256 len\\n ) internal pure returns (bytes32 ret) {\\n require(len <= 32);\\n require(idx + len <= self.length);\\n assembly {\\n let mask := not(sub(exp(256, sub(32, len)), 1))\\n ret := and(mload(add(add(self, 32), idx)), mask)\\n }\\n }\\n\\n function memcpy(uint256 dest, uint256 src, uint256 len) private pure {\\n // Copy word-length chunks while possible\\n for (; len >= 32; len -= 32) {\\n assembly {\\n mstore(dest, mload(src))\\n }\\n dest += 32;\\n src += 32;\\n }\\n\\n // Copy remaining bytes\\n unchecked {\\n uint256 mask = (256 ** (32 - len)) - 1;\\n assembly {\\n let srcpart := and(mload(src), not(mask))\\n let destpart := and(mload(dest), mask)\\n mstore(dest, or(destpart, srcpart))\\n }\\n }\\n }\\n\\n /*\\n * @dev Copies a substring into a new byte string.\\n * @param self The byte string to copy from.\\n * @param offset The offset to start copying at.\\n * @param len The number of bytes to copy.\\n */\\n function substring(\\n bytes memory self,\\n uint256 offset,\\n uint256 len\\n ) internal pure returns (bytes memory) {\\n require(offset + len <= self.length);\\n\\n bytes memory ret = new bytes(len);\\n uint256 dest;\\n uint256 src;\\n\\n assembly {\\n dest := add(ret, 32)\\n src := add(add(self, 32), offset)\\n }\\n memcpy(dest, src, len);\\n\\n return ret;\\n }\\n\\n // Maps characters from 0x30 to 0x7A to their base32 values.\\n // 0xFF represents invalid characters in that range.\\n bytes constant base32HexTable =\\n hex\\\"00010203040506070809FFFFFFFFFFFFFF0A0B0C0D0E0F101112131415161718191A1B1C1D1E1FFFFFFFFFFFFFFFFFFFFF0A0B0C0D0E0F101112131415161718191A1B1C1D1E1F\\\";\\n\\n /**\\n * @dev Decodes unpadded base32 data of up to one word in length.\\n * @param self The data to decode.\\n * @param off Offset into the string to start at.\\n * @param len Number of characters to decode.\\n * @return The decoded data, left aligned.\\n */\\n function base32HexDecodeWord(\\n bytes memory self,\\n uint256 off,\\n uint256 len\\n ) internal pure returns (bytes32) {\\n require(len <= 52);\\n\\n uint256 ret = 0;\\n uint8 decoded;\\n for (uint256 i = 0; i < len; i++) {\\n bytes1 char = self[off + i];\\n require(char >= 0x30 && char <= 0x7A);\\n decoded = uint8(base32HexTable[uint256(uint8(char)) - 0x30]);\\n require(decoded <= 0x20);\\n if (i == len - 1) {\\n break;\\n }\\n ret = (ret << 5) | decoded;\\n }\\n\\n uint256 bitlen = len * 5;\\n if (len % 8 == 0) {\\n // Multiple of 8 characters, no padding\\n ret = (ret << 5) | decoded;\\n } else if (len % 8 == 2) {\\n // Two extra characters - 1 byte\\n ret = (ret << 3) | (decoded >> 2);\\n bitlen -= 2;\\n } else if (len % 8 == 4) {\\n // Four extra characters - 2 bytes\\n ret = (ret << 1) | (decoded >> 4);\\n bitlen -= 4;\\n } else if (len % 8 == 5) {\\n // Five extra characters - 3 bytes\\n ret = (ret << 4) | (decoded >> 1);\\n bitlen -= 1;\\n } else if (len % 8 == 7) {\\n // Seven extra characters - 4 bytes\\n ret = (ret << 2) | (decoded >> 3);\\n bitlen -= 3;\\n } else {\\n revert();\\n }\\n\\n return bytes32(ret << (256 - bitlen));\\n }\\n\\n /**\\n * @dev Finds the first occurrence of the byte `needle` in `self`.\\n * @param self The string to search\\n * @param off The offset to start searching at\\n * @param len The number of bytes to search\\n * @param needle The byte to search for\\n * @return The offset of `needle` in `self`, or 2**256-1 if it was not found.\\n */\\n function find(\\n bytes memory self,\\n uint256 off,\\n uint256 len,\\n bytes1 needle\\n ) internal pure returns (uint256) {\\n for (uint256 idx = off; idx < off + len; idx++) {\\n if (self[idx] == needle) {\\n return idx;\\n }\\n }\\n return type(uint256).max;\\n }\\n}\\n\",\"keccak256\":\"0x4f10902639b85a17ae10745264feff322e793bfb1bc130a9a90efa7dda47c6cc\"},\"@ensdomains/ens-contracts/contracts/ethregistrar/IBaseRegistrar.sol\":{\"content\":\"import \\\"../registry/ENS.sol\\\";\\nimport \\\"./IBaseRegistrar.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\";\\n\\ninterface IBaseRegistrar is IERC721 {\\n event ControllerAdded(address indexed controller);\\n event ControllerRemoved(address indexed controller);\\n event NameMigrated(\\n uint256 indexed id,\\n address indexed owner,\\n uint256 expires\\n );\\n event NameRegistered(\\n uint256 indexed id,\\n address indexed owner,\\n uint256 expires\\n );\\n event NameRenewed(uint256 indexed id, uint256 expires);\\n\\n // Authorises a controller, who can register and renew domains.\\n function addController(address controller) external;\\n\\n // Revoke controller permission for an address.\\n function removeController(address controller) external;\\n\\n // Set the resolver for the TLD this registrar manages.\\n function setResolver(address resolver) external;\\n\\n // Returns the expiration timestamp of the specified label hash.\\n function nameExpires(uint256 id) external view returns (uint256);\\n\\n // Returns true if the specified name is available for registration.\\n function available(uint256 id) external view returns (bool);\\n\\n /**\\n * @dev Register a name.\\n */\\n function register(\\n uint256 id,\\n address owner,\\n uint256 duration\\n ) external returns (uint256);\\n\\n function renew(uint256 id, uint256 duration) external returns (uint256);\\n\\n /**\\n * @dev Reclaim ownership of a name in ENS, if you own it in the registrar.\\n */\\n function reclaim(uint256 id, address owner) external;\\n}\\n\",\"keccak256\":\"0x15f7b1dfa7cd34444daf79ec9b4d40437caa9257893ce0639d706fcc2ba69e52\"},\"@ensdomains/ens-contracts/contracts/registry/ENS.sol\":{\"content\":\"pragma solidity >=0.8.4;\\n\\ninterface ENS {\\n // Logged when the owner of a node assigns a new owner to a subnode.\\n event NewOwner(bytes32 indexed node, bytes32 indexed label, address owner);\\n\\n // Logged when the owner of a node transfers ownership to a new account.\\n event Transfer(bytes32 indexed node, address owner);\\n\\n // Logged when the resolver for a node changes.\\n event NewResolver(bytes32 indexed node, address resolver);\\n\\n // Logged when the TTL of a node changes\\n event NewTTL(bytes32 indexed node, uint64 ttl);\\n\\n // Logged when an operator is added or removed.\\n event ApprovalForAll(\\n address indexed owner,\\n address indexed operator,\\n bool approved\\n );\\n\\n function setRecord(\\n bytes32 node,\\n address owner,\\n address resolver,\\n uint64 ttl\\n ) external;\\n\\n function setSubnodeRecord(\\n bytes32 node,\\n bytes32 label,\\n address owner,\\n address resolver,\\n uint64 ttl\\n ) external;\\n\\n function setSubnodeOwner(\\n bytes32 node,\\n bytes32 label,\\n address owner\\n ) external returns (bytes32);\\n\\n function setResolver(bytes32 node, address resolver) external;\\n\\n function setOwner(bytes32 node, address owner) external;\\n\\n function setTTL(bytes32 node, uint64 ttl) external;\\n\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n function owner(bytes32 node) external view returns (address);\\n\\n function resolver(bytes32 node) external view returns (address);\\n\\n function ttl(bytes32 node) external view returns (uint64);\\n\\n function recordExists(bytes32 node) external view returns (bool);\\n\\n function isApprovedForAll(\\n address owner,\\n address operator\\n ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x7cb1158c7d268b63de1468e28e2711b28d686e2628ddb22da2149cd93ddeafda\"},\"@ensdomains/ens-contracts/contracts/resolvers/profiles/IAddrResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\n/**\\n * Interface for the legacy (ETH-only) addr function.\\n */\\ninterface IAddrResolver {\\n event AddrChanged(bytes32 indexed node, address a);\\n\\n /**\\n * Returns the address associated with an ENS node.\\n * @param node The ENS node to query.\\n * @return The associated address.\\n */\\n function addr(bytes32 node) external view returns (address payable);\\n}\\n\",\"keccak256\":\"0x2ad7f2fc60ebe0f93745fe70247f6a854f66af732483fda2a3c5e055614445e8\",\"license\":\"MIT\"},\"@ensdomains/ens-contracts/contracts/resolvers/profiles/IAddressResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\n/**\\n * Interface for the new (multicoin) addr function.\\n */\\ninterface IAddressResolver {\\n event AddressChanged(\\n bytes32 indexed node,\\n uint256 coinType,\\n bytes newAddress\\n );\\n\\n function addr(\\n bytes32 node,\\n uint256 coinType\\n ) external view returns (bytes memory);\\n}\\n\",\"keccak256\":\"0x411447c1e90c51e09702815a85ec725ffbbe37cf96e8cc4d2a8bd4ad8a59d73e\",\"license\":\"MIT\"},\"@ensdomains/ens-contracts/contracts/resolvers/profiles/IContentHashResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\ninterface IContentHashResolver {\\n event ContenthashChanged(bytes32 indexed node, bytes hash);\\n\\n /**\\n * Returns the contenthash associated with an ENS node.\\n * @param node The ENS node to query.\\n * @return The associated contenthash.\\n */\\n function contenthash(bytes32 node) external view returns (bytes memory);\\n}\\n\",\"keccak256\":\"0xd95cd77684ba5752c428d7dceb4ecc6506ac94f4fbb910489637eb68dcd8e366\",\"license\":\"MIT\"},\"@ensdomains/ens-contracts/contracts/resolvers/profiles/IExtendedResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.4;\\n\\ninterface IExtendedResolver {\\n function resolve(\\n bytes memory name,\\n bytes memory data\\n ) external view returns (bytes memory);\\n}\\n\",\"keccak256\":\"0x5d81521cfae7d9a4475d27533cd8ed0d3475d369eb0674fd90ffbdbdf292faa3\",\"license\":\"MIT\"},\"@ensdomains/ens-contracts/contracts/resolvers/profiles/ITextResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\ninterface ITextResolver {\\n event TextChanged(\\n bytes32 indexed node,\\n string indexed indexedKey,\\n string key,\\n string value\\n );\\n\\n /**\\n * Returns the text data associated with an ENS node and key.\\n * @param node The ENS node to query.\\n * @param key The text data key to query.\\n * @return The associated text data.\\n */\\n function text(\\n bytes32 node,\\n string calldata key\\n ) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x7c5debb3c42cd9f5de2274ea7aa053f238608314b62db441c40e31cea2543fd5\",\"license\":\"MIT\"},\"@ensdomains/ens-contracts/contracts/wrapper/IMetadataService.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ~0.8.17;\\n\\ninterface IMetadataService {\\n function uri(uint256) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xb3f1cf6df01ed7b15e5f2318f6823afbdb586ca38c2124c67955c645647ae9a2\",\"license\":\"MIT\"},\"@ensdomains/ens-contracts/contracts/wrapper/INameWrapper.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ~0.8.17;\\n\\nimport \\\"../registry/ENS.sol\\\";\\nimport \\\"../ethregistrar/IBaseRegistrar.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\\\";\\nimport \\\"./IMetadataService.sol\\\";\\nimport \\\"./INameWrapperUpgrade.sol\\\";\\n\\nuint32 constant CANNOT_UNWRAP = 1;\\nuint32 constant CANNOT_BURN_FUSES = 2;\\nuint32 constant CANNOT_TRANSFER = 4;\\nuint32 constant CANNOT_SET_RESOLVER = 8;\\nuint32 constant CANNOT_SET_TTL = 16;\\nuint32 constant CANNOT_CREATE_SUBDOMAIN = 32;\\nuint32 constant CANNOT_APPROVE = 64;\\n//uint16 reserved for parent controlled fuses from bit 17 to bit 32\\nuint32 constant PARENT_CANNOT_CONTROL = 1 << 16;\\nuint32 constant IS_DOT_ETH = 1 << 17;\\nuint32 constant CAN_EXTEND_EXPIRY = 1 << 18;\\nuint32 constant CAN_DO_EVERYTHING = 0;\\nuint32 constant PARENT_CONTROLLED_FUSES = 0xFFFF0000;\\n// all fuses apart from IS_DOT_ETH\\nuint32 constant USER_SETTABLE_FUSES = 0xFFFDFFFF;\\n\\ninterface INameWrapper is IERC1155 {\\n event NameWrapped(\\n bytes32 indexed node,\\n bytes name,\\n address owner,\\n uint32 fuses,\\n uint64 expiry\\n );\\n\\n event NameUnwrapped(bytes32 indexed node, address owner);\\n\\n event FusesSet(bytes32 indexed node, uint32 fuses);\\n event ExpiryExtended(bytes32 indexed node, uint64 expiry);\\n\\n function ens() external view returns (ENS);\\n\\n function registrar() external view returns (IBaseRegistrar);\\n\\n function metadataService() external view returns (IMetadataService);\\n\\n function names(bytes32) external view returns (bytes memory);\\n\\n function name() external view returns (string memory);\\n\\n function upgradeContract() external view returns (INameWrapperUpgrade);\\n\\n function supportsInterface(bytes4 interfaceID) external view returns (bool);\\n\\n function wrap(\\n bytes calldata name,\\n address wrappedOwner,\\n address resolver\\n ) external;\\n\\n function wrapETH2LD(\\n string calldata label,\\n address wrappedOwner,\\n uint16 ownerControlledFuses,\\n address resolver\\n ) external returns (uint64 expires);\\n\\n function registerAndWrapETH2LD(\\n string calldata label,\\n address wrappedOwner,\\n uint256 duration,\\n address resolver,\\n uint16 ownerControlledFuses\\n ) external returns (uint256 registrarExpiry);\\n\\n function renew(\\n uint256 labelHash,\\n uint256 duration\\n ) external returns (uint256 expires);\\n\\n function unwrap(bytes32 node, bytes32 label, address owner) external;\\n\\n function unwrapETH2LD(\\n bytes32 label,\\n address newRegistrant,\\n address newController\\n ) external;\\n\\n function upgrade(bytes calldata name, bytes calldata extraData) external;\\n\\n function setFuses(\\n bytes32 node,\\n uint16 ownerControlledFuses\\n ) external returns (uint32 newFuses);\\n\\n function setChildFuses(\\n bytes32 parentNode,\\n bytes32 labelhash,\\n uint32 fuses,\\n uint64 expiry\\n ) external;\\n\\n function setSubnodeRecord(\\n bytes32 node,\\n string calldata label,\\n address owner,\\n address resolver,\\n uint64 ttl,\\n uint32 fuses,\\n uint64 expiry\\n ) external returns (bytes32);\\n\\n function setRecord(\\n bytes32 node,\\n address owner,\\n address resolver,\\n uint64 ttl\\n ) external;\\n\\n function setSubnodeOwner(\\n bytes32 node,\\n string calldata label,\\n address newOwner,\\n uint32 fuses,\\n uint64 expiry\\n ) external returns (bytes32);\\n\\n function extendExpiry(\\n bytes32 node,\\n bytes32 labelhash,\\n uint64 expiry\\n ) external returns (uint64);\\n\\n function canModifyName(\\n bytes32 node,\\n address addr\\n ) external view returns (bool);\\n\\n function setResolver(bytes32 node, address resolver) external;\\n\\n function setTTL(bytes32 node, uint64 ttl) external;\\n\\n function ownerOf(uint256 id) external view returns (address owner);\\n\\n function approve(address to, uint256 tokenId) external;\\n\\n function getApproved(uint256 tokenId) external view returns (address);\\n\\n function getData(\\n uint256 id\\n ) external view returns (address, uint32, uint64);\\n\\n function setMetadataService(IMetadataService _metadataService) external;\\n\\n function uri(uint256 tokenId) external view returns (string memory);\\n\\n function setUpgradeContract(INameWrapperUpgrade _upgradeAddress) external;\\n\\n function allFusesBurned(\\n bytes32 node,\\n uint32 fuseMask\\n ) external view returns (bool);\\n\\n function isWrapped(bytes32) external view returns (bool);\\n\\n function isWrapped(bytes32, bytes32) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x70310eb67146d7290731c31841399640ac3b6a949eadc6598bc150123d185c57\",\"license\":\"MIT\"},\"@ensdomains/ens-contracts/contracts/wrapper/INameWrapperUpgrade.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ~0.8.17;\\n\\ninterface INameWrapperUpgrade {\\n function wrapFromUpgrade(\\n bytes calldata name,\\n address wrappedOwner,\\n uint32 fuses,\\n uint64 expiry,\\n address approved,\\n bytes calldata extraData\\n ) external;\\n}\\n\",\"keccak256\":\"0x42e0cec6cd9d1a62d51d45b678f69d3e4ad5555e659b197e41257b308346bb8a\",\"license\":\"MIT\"},\"@ensdomains/evm-verifier/contracts/EVMFetchTarget.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.17;\\n\\nimport { IEVMVerifier } from './IEVMVerifier.sol';\\nimport { Address } from '@openzeppelin/contracts/utils/Address.sol';\\n\\n/**\\n * @dev Callback implementation for users of `EVMFetcher`. If you use `EVMFetcher`, your contract must\\n * inherit from this contract in order to handle callbacks correctly.\\n */\\nabstract contract EVMFetchTarget {\\n using Address for address;\\n\\n error ResponseLengthMismatch(uint256 actual, uint256 expected);\\n\\n /**\\n * @dev Internal callback function invoked by CCIP-Read in response to a `getStorageSlots` request.\\n */\\n function getStorageSlotsCallback(bytes calldata response, bytes calldata extradata) external {\\n bytes memory proof = abi.decode(response, (bytes));\\n (IEVMVerifier verifier, address addr, bytes32[] memory commands, bytes[] memory constants, bytes4 callback, bytes memory callbackData) =\\n abi.decode(extradata, (IEVMVerifier, address, bytes32[], bytes[], bytes4, bytes));\\n bytes[] memory values = verifier.getStorageValues(addr, commands, constants, proof);\\n if(values.length != commands.length) {\\n revert ResponseLengthMismatch(values.length, commands.length);\\n }\\n bytes memory ret = address(this).functionCall(abi.encodeWithSelector(callback, values, callbackData));\\n assembly {\\n return(add(ret, 32), mload(ret))\\n }\\n }\\n}\\n\",\"keccak256\":\"0x4653f974a897ce78b7bc3779ba0bb7767df99add49de4f0e9089399f47bb5942\",\"license\":\"MIT\"},\"@ensdomains/evm-verifier/contracts/EVMFetcher.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.17;\\n\\nimport { IEVMVerifier } from './IEVMVerifier.sol';\\nimport { EVMFetchTarget } from './EVMFetchTarget.sol';\\nimport { Address } from '@openzeppelin/contracts/utils/Address.sol';\\n\\ninterface IEVMGateway {\\n function getStorageSlots(address addr, bytes32[] memory commands, bytes[] memory constants) external pure returns(bytes memory witness);\\n}\\n\\nuint8 constant FLAG_DYNAMIC = 0x01;\\nuint8 constant OP_CONSTANT = 0x00;\\nuint8 constant OP_BACKREF = 0x20;\\nuint8 constant OP_END = 0xff;\\n\\n/**\\n * @dev A library to facilitate requesting storage data proofs from contracts, possibly on a different chain.\\n * See l1-verifier/test/TestL1.sol for example usage.\\n */\\nlibrary EVMFetcher {\\n uint256 constant MAX_COMMANDS = 32;\\n uint256 constant MAX_CONSTANTS = 32; // Must not be greater than 32\\n\\n using Address for address;\\n\\n error TooManyCommands(uint256 max);\\n error CommandTooLong();\\n error InvalidReference(uint256 value, uint256 max);\\n error OffchainLookup(address sender, string[] urls, bytes callData, bytes4 callbackFunction, bytes extraData);\\n\\n struct EVMFetchRequest {\\n IEVMVerifier verifier;\\n address target;\\n bytes32[] commands;\\n uint256 operationIdx;\\n bytes[] constants;\\n }\\n\\n /**\\n * @dev Creates a request to fetch the value of multiple storage slots from a contract via CCIP-Read, possibly from\\n * another chain.\\n * Supports dynamic length values and slot numbers derived from other retrieved values.\\n * @param verifier An instance of a verifier contract that can provide and verify the storage slot information.\\n * @param target The address of the contract to fetch storage proofs for.\\n */\\n function newFetchRequest(IEVMVerifier verifier, address target) internal pure returns (EVMFetchRequest memory) {\\n bytes32[] memory commands = new bytes32[](MAX_COMMANDS);\\n bytes[] memory constants = new bytes[](MAX_CONSTANTS);\\n assembly {\\n mstore(commands, 0) // Set current array length to 0\\n mstore(constants, 0)\\n } \\n return EVMFetchRequest(verifier, target, commands, 0, constants);\\n }\\n\\n /**\\n * @dev Starts describing a new fetch request.\\n * Paths specify a series of hashing operations to derive the final slot ID.\\n * See https://docs.soliditylang.org/en/v0.8.17/internals/layout_in_storage.html for details on how Solidity\\n * lays out storage variables.\\n * @param request The request object being operated on.\\n * @param baseSlot The base slot ID that forms the root of the path.\\n */\\n function getStatic(EVMFetchRequest memory request, uint256 baseSlot) internal pure returns (EVMFetchRequest memory) {\\n bytes32[] memory commands = request.commands;\\n uint256 commandIdx = commands.length;\\n if(commandIdx > 0 && request.operationIdx < 32) {\\n // Terminate previous command\\n _addOperation(request, OP_END);\\n }\\n assembly {\\n mstore(commands, add(commandIdx, 1)) // Increment command array length\\n }\\n if(request.commands.length > MAX_COMMANDS) {\\n revert TooManyCommands(MAX_COMMANDS);\\n }\\n request.operationIdx = 0;\\n _addOperation(request, 0);\\n _addOperation(request, _addConstant(request, abi.encode(baseSlot)));\\n return request;\\n }\\n\\n /**\\n * @dev Starts describing a new fetch request.\\n * Paths specify a series of hashing operations to derive the final slot ID.\\n * See https://docs.soliditylang.org/en/v0.8.17/internals/layout_in_storage.html for details on how Solidity\\n * lays out storage variables.\\n * @param request The request object being operated on.\\n * @param baseSlot The base slot ID that forms the root of the path.\\n */\\n function getDynamic(EVMFetchRequest memory request, uint256 baseSlot) internal pure returns (EVMFetchRequest memory) {\\n bytes32[] memory commands = request.commands;\\n uint256 commandIdx = commands.length;\\n if(commandIdx > 0 && request.operationIdx < 32) {\\n // Terminate previous command\\n _addOperation(request, OP_END);\\n }\\n assembly {\\n mstore(commands, add(commandIdx, 1)) // Increment command array length\\n }\\n if(request.commands.length > MAX_COMMANDS) {\\n revert TooManyCommands(MAX_COMMANDS);\\n }\\n request.operationIdx = 0;\\n _addOperation(request, FLAG_DYNAMIC);\\n _addOperation(request, _addConstant(request, abi.encode(baseSlot)));\\n return request;\\n }\\n\\n /**\\n * @dev Adds a `uint256` element to the current path.\\n * @param request The request object being operated on.\\n * @param el The element to add.\\n */\\n function element(EVMFetchRequest memory request, uint256 el) internal pure returns (EVMFetchRequest memory) {\\n if(request.operationIdx >= 32) {\\n revert CommandTooLong();\\n }\\n _addOperation(request, _addConstant(request, abi.encode(el)));\\n return request;\\n }\\n\\n /**\\n * @dev Adds a `bytes32` element to the current path.\\n * @param request The request object being operated on.\\n * @param el The element to add.\\n */\\n function element(EVMFetchRequest memory request, bytes32 el) internal pure returns (EVMFetchRequest memory) {\\n if(request.operationIdx >= 32) {\\n revert CommandTooLong();\\n }\\n _addOperation(request, _addConstant(request, abi.encode(el)));\\n return request;\\n }\\n\\n /**\\n * @dev Adds an `address` element to the current path.\\n * @param request The request object being operated on.\\n * @param el The element to add.\\n */\\n function element(EVMFetchRequest memory request, address el) internal pure returns (EVMFetchRequest memory) {\\n if(request.operationIdx >= 32) {\\n revert CommandTooLong();\\n }\\n _addOperation(request, _addConstant(request, abi.encode(el)));\\n return request;\\n }\\n\\n /**\\n * @dev Adds a `bytes` element to the current path.\\n * @param request The request object being operated on.\\n * @param el The element to add.\\n */\\n function element(EVMFetchRequest memory request, bytes memory el) internal pure returns (EVMFetchRequest memory) {\\n if(request.operationIdx >= 32) {\\n revert CommandTooLong();\\n }\\n _addOperation(request, _addConstant(request, el));\\n return request;\\n }\\n\\n /**\\n * @dev Adds a `string` element to the current path.\\n * @param request The request object being operated on.\\n * @param el The element to add.\\n */\\n function element(EVMFetchRequest memory request, string memory el) internal pure returns (EVMFetchRequest memory) {\\n if(request.operationIdx >= 32) {\\n revert CommandTooLong();\\n }\\n _addOperation(request, _addConstant(request, bytes(el)));\\n return request;\\n }\\n\\n /**\\n * @dev Adds a reference to a previous fetch to the current path.\\n * @param request The request object being operated on.\\n * @param idx The index of the previous fetch request, starting at 0.\\n */\\n function ref(EVMFetchRequest memory request, uint8 idx) internal pure returns (EVMFetchRequest memory) {\\n if(request.operationIdx >= 32) {\\n revert CommandTooLong();\\n }\\n if(idx > request.commands.length || idx > 31) {\\n revert InvalidReference(idx, request.commands.length);\\n }\\n _addOperation(request, OP_BACKREF | idx);\\n return request;\\n }\\n\\n /**\\n * @dev Initiates the fetch request.\\n * Calling this function terminates execution; clients that implement CCIP-Read will make a callback to\\n * `callback` with the results of the operation.\\n * @param callbackId A callback function selector on this contract that will be invoked via CCIP-Read with the result of the lookup.\\n * The function must have a signature matching `(bytes[] memory values, bytes callbackData)` with a return type matching the call in which\\n * this function was invoked. Its return data will be returned as the return value of the entire CCIP-read operation.\\n * @param callbackData Extra data to supply to the callback.\\n */\\n function fetch(EVMFetchRequest memory request, bytes4 callbackId, bytes memory callbackData) internal view {\\n if(request.commands.length > 0 && request.operationIdx < 32) {\\n // Terminate last command\\n _addOperation(request, OP_END);\\n }\\n revert OffchainLookup(\\n address(this),\\n request.verifier.gatewayURLs(),\\n abi.encodeCall(IEVMGateway.getStorageSlots, (request.target, request.commands, request.constants)),\\n EVMFetchTarget.getStorageSlotsCallback.selector,\\n abi.encode(request.verifier, request.target, request.commands, request.constants, callbackId, callbackData)\\n );\\n }\\n\\n function _addConstant(EVMFetchRequest memory request, bytes memory value) private pure returns(uint8 idx) {\\n bytes[] memory constants = request.constants;\\n idx = uint8(constants.length);\\n assembly {\\n mstore(constants, add(idx, 1)) // Increment constant array length\\n }\\n constants[idx] = value;\\n }\\n\\n function _addOperation(EVMFetchRequest memory request, uint8 op) private pure {\\n uint256 commandIdx = request.commands.length - 1;\\n request.commands[commandIdx] = request.commands[commandIdx] | (bytes32(bytes1(op)) >> (8 * request.operationIdx++));\\n }\\n}\\n\",\"keccak256\":\"0x5a6a955ebf3e6da9ce8d39e2729c35e4e800426025954a9a9777c209447ff8b4\",\"license\":\"MIT\"},\"@ensdomains/evm-verifier/contracts/IEVMVerifier.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.17;\\n\\ninterface IEVMVerifier {\\n function gatewayURLs() external view returns(string[] memory);\\n function getStorageValues(address target, bytes32[] memory commands, bytes[] memory constants, bytes memory proof) external view returns(bytes[] memory values);\\n}\\n\",\"keccak256\":\"0x30a635309aeebbde83774010eea5e975b8e73d1932140457121eefdce7792d72\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/IERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155 is IERC165 {\\n /**\\n * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\\n */\\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\\n\\n /**\\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\\n * transfers.\\n */\\n event TransferBatch(\\n address indexed operator,\\n address indexed from,\\n address indexed to,\\n uint256[] ids,\\n uint256[] values\\n );\\n\\n /**\\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\\n * `approved`.\\n */\\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\\n\\n /**\\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\\n *\\n * If an {URI} event was emitted for `id`, the standard\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\\n * returned by {IERC1155MetadataURI-uri}.\\n */\\n event URI(string value, uint256 indexed id);\\n\\n /**\\n * @dev Returns the amount of tokens of token type `id` owned by `account`.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function balanceOf(address account, uint256 id) external view returns (uint256);\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\\n *\\n * Requirements:\\n *\\n * - `accounts` and `ids` must have the same length.\\n */\\n function balanceOfBatch(\\n address[] calldata accounts,\\n uint256[] calldata ids\\n ) external view returns (uint256[] memory);\\n\\n /**\\n * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\\n *\\n * Emits an {ApprovalForAll} event.\\n *\\n * Requirements:\\n *\\n * - `operator` cannot be the caller.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\\n *\\n * See {setApprovalForAll}.\\n */\\n function isApprovedForAll(address account, address operator) external view returns (bool);\\n\\n /**\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external;\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] calldata ids,\\n uint256[] calldata amounts,\\n bytes calldata data\\n ) external;\\n}\\n\",\"keccak256\":\"0xcab667ddad478ff0d39c2053ca77fac778af8483c18ab07d810277b4216fd582\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721 is IERC165 {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721\\n * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must\\n * understand this adds an external call which potentially creates a reentrancy vulnerability.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x5bce51e11f7d194b79ea59fe00c9e8de9fa2c5530124960f29a24d4c740a3266\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"contracts/IMetadataResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.17;\\n\\ninterface IMetadataResolver {\\n /*\\n * @notice Get metadata about the CCIP Resolver ENSIP 16 https://docs.ens.domains/ens-improvement-proposals/ensip-16-offchain-metadata\\n * @dev This function provides metadata about the CCIP Resolver, including its name, coin type, GraphQL URL, storage type, and encoded information.\\n * @param name The domain name in format (dnsEncoded)\\n * @return coinType The cointype of the chain the target contract locates such as Optimism, Base, Arb, etc\\n * @return graphqlUrl The GraphQL URL used by the resolver\\n * @return storageType 0 = EVM, 1 = Non blockchain, 2 = Starknet\\n * @return storageLocation The storage identifier. For EVM chains, this is the address of the resolver contract.\\n * @return context. An identifier used by l2 graph indexer for Domain schema id (`context-namehash`) allowing multiple resolver contracts to have own namespace.\\n *\\n */\\n function metadata(bytes calldata name) external view returns (\\n uint256 coinType,\\n string memory graphqlUrl,\\n uint8 storageType,\\n bytes memory storageLocation,\\n bytes memory context\\n );\\n\\n event MetadataChanged(\\n bytes name,\\n uint256 coinType,\\n string graphqlUrl,\\n uint8 storageType,\\n bytes storageLocation,\\n bytes context\\n );\\n}\",\"keccak256\":\"0xf3af5325514001ff150399986839a1402c4aef5f332f8639a5756bb9dbcd5b05\",\"license\":\"MIT\"},\"contracts/ITargetResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.17;\\n\\ninterface ITargetResolver{\\n function getTarget(\\n bytes memory name\\n ) external view returns (bytes32 node, address target);\\n}\\n\",\"keccak256\":\"0x309bfb692d77b29eb9bfeccc55f0fc7cebdade75adb299d7e1afe1f007be0a11\",\"license\":\"MIT\"},\"contracts/L1Resolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.17;\\n\\nimport {EVMFetcher} from '@ensdomains/evm-verifier/contracts/EVMFetcher.sol';\\nimport {EVMFetchTarget} from '@ensdomains/evm-verifier/contracts/EVMFetchTarget.sol';\\nimport {IEVMVerifier} from '@ensdomains/evm-verifier/contracts/IEVMVerifier.sol';\\nimport \\\"@ensdomains/ens-contracts/contracts/registry/ENS.sol\\\";\\nimport {INameWrapper} from \\\"@ensdomains/ens-contracts/contracts/wrapper/INameWrapper.sol\\\";\\nimport {BytesUtils} from \\\"@ensdomains/ens-contracts/contracts/dnssec-oracle/BytesUtils.sol\\\";\\nimport {IAddrResolver} from \\\"@ensdomains/ens-contracts/contracts/resolvers/profiles/IAddrResolver.sol\\\";\\nimport {IAddressResolver} from \\\"@ensdomains/ens-contracts/contracts/resolvers/profiles/IAddressResolver.sol\\\";\\nimport {ITextResolver} from \\\"@ensdomains/ens-contracts/contracts/resolvers/profiles/ITextResolver.sol\\\";\\nimport {IContentHashResolver} from \\\"@ensdomains/ens-contracts/contracts/resolvers/profiles/IContentHashResolver.sol\\\";\\nimport \\\"@ensdomains/ens-contracts/contracts/resolvers/profiles/IExtendedResolver.sol\\\";\\nimport {ITargetResolver} from './ITargetResolver.sol';\\nimport {IMetadataResolver} from './IMetadataResolver.sol';\\nimport \\\"@openzeppelin/contracts/utils/introspection/ERC165.sol\\\";\\n\\ncontract L1Resolver is EVMFetchTarget, ITargetResolver, IMetadataResolver, IExtendedResolver, ERC165 {\\n using EVMFetcher for EVMFetcher.EVMFetchRequest;\\n using BytesUtils for bytes;\\n IEVMVerifier public immutable verifier;\\n ENS public immutable ens;\\n INameWrapper public immutable nameWrapper;\\n mapping(bytes32 => address) targets;\\n uint256 constant COIN_TYPE_ETH = 60;\\n uint256 constant RECORD_VERSIONS_SLOT = 0;\\n uint256 constant VERSIONABLE_ADDRESSES_SLOT = 2;\\n uint256 constant VERSIONABLE_HASHES_SLOT = 3;\\n uint256 constant VERSIONABLE_TEXTS_SLOT = 10;\\n string public graphqlUrl;\\n uint256 public l2ResolverCoinType;\\n\\n event TargetSet(bytes name, address target);\\n function isAuthorised(bytes32 node) internal view returns (bool) {\\n // TODO: Add support for\\n // trustedETHController\\n // trustedReverseRegistrar\\n // isApprovedForAll\\n // isApprovedFor\\n address owner = ens.owner(node);\\n if (owner == address(nameWrapper)) {\\n owner = nameWrapper.ownerOf(uint256(node));\\n }\\n return owner == msg.sender;\\n }\\n\\n /**\\n * @param _verifier The chain verifier address\\n * @param _ens The ENS registry address\\n * @param _nameWrapper The ENS name wrapper address\\n * @param _graphqlUrl The offchain/l2 graphql endpoint url\\n * @param _l2ResolverCoinType The chainId at which the resolver resolves data from. 0 if storageLocation is offChain\\n */\\n constructor(\\n IEVMVerifier _verifier,\\n ENS _ens,\\n INameWrapper _nameWrapper,\\n string memory _graphqlUrl,\\n uint256 _l2ResolverCoinType\\n ){\\n require(address(_nameWrapper) != address(0), \\\"Name Wrapper address must be set\\\");\\n require(address(_verifier) != address(0), \\\"Verifier address must be set\\\");\\n require(address(_ens) != address(0), \\\"Registry address must be set\\\");\\n verifier = _verifier;\\n ens = _ens;\\n nameWrapper = _nameWrapper;\\n graphqlUrl = _graphqlUrl;\\n l2ResolverCoinType = _l2ResolverCoinType;\\n }\\n\\n /**\\n * Set target address to verify aagainst\\n * @param name The encoded name to query.\\n * @param target The L2 resolver address to verify against.\\n */\\n function setTarget(bytes calldata name, address target) public {\\n (bytes32 node,) = getTarget(name);\\n require(isAuthorised(node));\\n targets[node] = target;\\n emit TargetSet(name, target);\\n (\\n ,,\\n uint8 storageType,\\n bytes memory storageLocation,\\n bytes memory context\\n ) = metadata(name);\\n emit MetadataChanged(\\n name,\\n l2ResolverCoinType,\\n graphqlUrl,\\n storageType,\\n storageLocation,\\n context\\n );\\n }\\n\\n /**\\n * @dev Returns the L2 target address that can answer queries for `name`.\\n * @param name DNS encoded ENS name to query\\n * @return node The node of the name\\n * @return target The L2 resolver address to verify against.\\n */\\n function getTarget(\\n bytes memory name\\n ) public view returns (bytes32 node, address target) {\\n return _getTarget(name, 0);\\n }\\n\\n function _getTarget(\\n bytes memory name,\\n uint256 offset\\n ) private view returns (bytes32 node, address target) {\\n uint256 len = name.readUint8(offset);\\n node = bytes32(0);\\n if (len > 0) {\\n bytes32 label = name.keccak(offset + 1, len);\\n (node, target) = _getTarget(\\n name,\\n offset + len + 1\\n );\\n node = keccak256(abi.encodePacked(node, label));\\n if(targets[node] != address(0)){\\n return (\\n node,\\n targets[node]\\n );\\n }\\n } else {\\n return (\\n bytes32(0),\\n address(0)\\n );\\n }\\n return (node, target);\\n }\\n\\n /** \\n * @dev Resolve and verify a record stored in l2 target address. It supports subname by fetching target recursively to the nearlest parent.\\n * @param name DNS encoded ENS name to query\\n * @param data The actual calldata\\n * @return result result of the call\\n */\\n function resolve(bytes calldata name, bytes calldata data) external view returns (bytes memory result) {\\n (, address target) = _getTarget(name, 0);\\n bytes4 selector = bytes4(data);\\n\\n if (selector == IAddrResolver.addr.selector) {\\n (bytes32 node) = abi.decode(data[4:], (bytes32));\\n return _addr(node, target);\\n }\\n if (selector == IAddressResolver.addr.selector) {\\n (bytes32 node, uint256 cointype) = abi.decode(data[4:], (bytes32, uint256));\\n return _addr(node, cointype, target);\\n }\\n if (selector == ITextResolver.text.selector) {\\n (bytes32 node, string memory key) = abi.decode(data[4:], (bytes32, string));\\n return bytes(_text(node, key, target));\\n }\\n if (selector == IContentHashResolver.contenthash.selector) {\\n (bytes32 node) = abi.decode(data[4:], (bytes32));\\n return _contenthash(node, target);\\n }\\n }\\n\\n function _addr(bytes32 node, address target) private view returns (bytes memory) {\\n EVMFetcher.newFetchRequest(verifier, target)\\n .getStatic(RECORD_VERSIONS_SLOT)\\n .element(node)\\n .getDynamic(VERSIONABLE_ADDRESSES_SLOT)\\n .ref(0)\\n .element(node)\\n .element(COIN_TYPE_ETH)\\n .fetch(this.addrCallback.selector, ''); // recordVersions\\n }\\n\\n function addrCallback(\\n bytes[] memory values,\\n bytes memory\\n ) public pure returns (bytes memory) {\\n return abi.encode(address(bytes20(values[1])));\\n }\\n\\n function _addr(\\n bytes32 node,\\n uint256 coinType,\\n address target\\n ) private view returns (bytes memory) {\\n EVMFetcher.newFetchRequest(verifier, target)\\n .getStatic(RECORD_VERSIONS_SLOT)\\n .element(node)\\n .getDynamic(VERSIONABLE_ADDRESSES_SLOT)\\n .ref(0)\\n .element(node)\\n .element(coinType)\\n .fetch(this.addrCoinTypeCallback.selector, '');\\n }\\n\\n function addrCoinTypeCallback(\\n bytes[] memory values,\\n bytes memory\\n ) public pure returns (bytes memory) {\\n return abi.encode(values[1]);\\n }\\n\\n function _text(\\n bytes32 node,\\n string memory key,\\n address target\\n ) private view returns (bytes memory) {\\n EVMFetcher.newFetchRequest(verifier, target)\\n .getStatic(RECORD_VERSIONS_SLOT)\\n .element(node)\\n .getDynamic(VERSIONABLE_TEXTS_SLOT)\\n .ref(0)\\n .element(node)\\n .element(key)\\n .fetch(this.textCallback.selector, '');\\n }\\n\\n function textCallback(\\n bytes[] memory values,\\n bytes memory\\n ) public pure returns (bytes memory) {\\n return abi.encode(string(values[1]));\\n }\\n\\n function _contenthash(bytes32 node, address target) private view returns (bytes memory) {\\n EVMFetcher.newFetchRequest(verifier, target)\\n .getStatic(RECORD_VERSIONS_SLOT)\\n .element(node)\\n .getDynamic(VERSIONABLE_HASHES_SLOT)\\n .ref(0)\\n .element(node)\\n .fetch(this.contenthashCallback.selector, '');\\n }\\n\\n function contenthashCallback(\\n bytes[] memory values,\\n bytes memory\\n ) public pure returns (bytes memory) {\\n return abi.encode(values[1]);\\n }\\n\\n /**\\n * @notice Get metadata about the L1 Resolver\\n * @dev This function provides metadata about the L1 Resolver, including its name, coin type, GraphQL URL, storage type, and encoded information.\\n * @param name The domain name in format (dnsEncoded)\\n * @return coinType The cointype of the chain the target contract locates such as Optimism, Base, Arb, etc\\n * @return graphqlUrl The GraphQL URL used by the resolver\\n * @return storageType Storage Type (0 for EVM)\\n * @return storageLocation The storage identifier. For EVM chains, this is the address of the resolver contract.\\n * @return context. An identifier used by l2 graph indexer for Domain schema id (`context-namehash`) allowing multiple resolver contracts to have own namespace.\\n */\\n function metadata(\\n bytes calldata name\\n ) public view returns (uint256, string memory, uint8, bytes memory, bytes memory) {\\n (, address target) = getTarget(name);\\n\\n return (\\n l2ResolverCoinType,\\n graphqlUrl,\\n uint8(0), // storage Type 0 => EVM\\n abi.encodePacked(address(target)), // storage location => l2 resolver address\\n abi.encodePacked(address(target)) // context => l2 resolver address\\n );\\n }\\n\\n function supportsInterface(\\n bytes4 interfaceId\\n ) public override view returns (bool) {\\n return\\n interfaceId == type(IExtendedResolver).interfaceId ||\\n interfaceId == type(ITargetResolver).interfaceId ||\\n interfaceId == type(IMetadataResolver).interfaceId ||\\n super.supportsInterface(interfaceId);\\n }\\n}\\n\",\"keccak256\":\"0xf20f2a39c87e0bcdd6c59552a73f012b420115d7a7a589241b899dfe94520cf9\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60e0604052346200039d576200287f80380390816200001e81620003a2565b91823960a08183810103126200039d5780516001600160a01b039182821682036200039d57602081015183811681036200039d5760408201519084821682036200039d576060830151936001600160401b0385116200039d57601f93878101858783010112156200039d57808601516001600160401b038111620002a257601f1996620000b28288018916602001620003a2565b99828b5283016020838386010101116200039d5760005b82811062000386575050600090890160200152608001519583811615620003425780821615620002fd57821615620002b85760805260a05260c0528351906001600160401b038211620002a25760019283548481811c9116801562000297575b6020821014620002815782811162000234575b506020918311600114620001d0575081929394600092620001c4575b5050600019600383901b1c191690821b1790555b6002556040516124b69081620003c982396080518181816103a401528181611557015281816120f8015281816122490152612330015260a0518181816105cc0152610b6e015260c051818181610aac0152610ba30152f35b01519050388062000158565b8216908360005260206000209160005b8181106200021d575095838596971062000203575b505050811b0190556200016c565b015160001960f88460031b161c19169055388080620001f5565b8783015184559285019260209283019201620001e0565b8460005260206000208380860160051c8201926020871062000277575b0160051c019085905b8281106200026a5750506200013c565b600081550185906200025a565b9250819262000251565b634e487b7160e01b600052602260045260246000fd5b90607f169062000129565b634e487b7160e01b600052604160045260246000fd5b60405162461bcd60e51b815260206004820152601c60248201527f52656769737472792061646472657373206d75737420626520736574000000006044820152606490fd5b60405162461bcd60e51b815260206004820152601c60248201527f56657269666965722061646472657373206d75737420626520736574000000006044820152606490fd5b606460405162461bcd60e51b815260206004820152602060248201527f4e616d6520577261707065722061646472657373206d757374206265207365746044820152fd5b602082850182018101518c830182015201620000c9565b600080fd5b6040519190601f01601f191682016001600160401b03811183821017620002a25760405256fe6080604052600436101561001257600080fd5b60003560e01c806301ffc9a7146100fd57806315f64386146100f85780632b7ac3f3146100f357806338bf92e6146100c15780633f15457f146100ee5780634062b43f146100e95780635bdaa916146100e45780637e6215ba146100df5780638a596ebe146100da5780639061b923146100d5578063a8e5fbc0146100d0578063d358df77146100cb578063de9abe5e146100c1578063f470901a146100c65763fcd2e381146100c157600080fd5b610544565b610da4565b610ae1565b610a8c565b610942565b6108bc565b61089e565b610771565b6106cd565b6105ac565b610384565b610330565b61011c565b35906001600160e01b03198216820361011757565b600080fd5b34610117576020366003190112610117576004356001600160e01b0319811680910361011757807f9061b92300000000000000000000000000000000000000000000000000000000602092149081156101dd575b81156101b3575b8115610189575b506040519015158152f35b7f01ffc9a7000000000000000000000000000000000000000000000000000000009150143861017e565b7f8a596ebe0000000000000000000000000000000000000000000000000000000081149150610177565b7f15f643860000000000000000000000000000000000000000000000000000000081149150610170565b634e487b7160e01b600052604160045260246000fd5b6040810190811067ffffffffffffffff82111761023957604052565b610207565b6020810190811067ffffffffffffffff82111761023957604052565b610420810190811067ffffffffffffffff82111761023957604052565b90601f8019910116810190811067ffffffffffffffff82111761023957604052565b67ffffffffffffffff811161023957601f01601f191660200190565b9291926102c182610299565b916102cf6040519384610277565b829481845281830111610117578281602093846000960137010152565b9080601f8301121561011757816020610307933591016102b5565b90565b9060208282031261011757813567ffffffffffffffff81116101175761030792016102ec565b346101175760203660031901126101175760043567ffffffffffffffff8111610117576001600160a01b03610375600061037060409436906004016102ec565b611398565b83519182529091166020820152f35b346101175760003660031901126101175760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b67ffffffffffffffff81116102395760051b60200190565b9080601f83011215610117578135906103f8826103c8565b926104066040519485610277565b828452602092838086019160051b8301019280841161011757848301915b8483106104345750505050505090565b823567ffffffffffffffff8111610117578691610456848480948901016102ec565b815201920191610424565b9060406003198301126101175767ffffffffffffffff600435818111610117578361048e916004016103e0565b9260243591821161011757610307916004016102ec565b60005b8381106104b85750506000910152565b81810151838201526020016104a8565b906020916104e1815180928185528580860191016104a5565b601f01601f1916010190565b90602091828152606051808483015260005b818110610520575060409293506000838284010152601f8019910116010190565b60808101518382016040015284016104ff565b9060206103079281815201906104c8565b346101175761055236610461565b508051600110156105a75761058161058f60406105a393015160405192839160208084015260408301906104c8565b03601f198101835282610277565b6040519182916020835260208301906104c8565b0390f35b61147a565b346101175760003660031901126101175760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b90600182811c92168015610620575b602083101461060a57565b634e487b7160e01b600052602260045260246000fd5b91607f16916105ff565b9060009160019081549161063d836105f0565b808352928181169081156106b0575060011461065857505050565b80929394506000527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6916000925b84841061069857505060209250010190565b80546020858501810191909152909301928101610686565b915050602093945060ff929192191683830152151560051b010190565b34610117576000366003190112610117576105a360405161058f816106f18161062a565b0382610277565b9181601f840112156101175782359167ffffffffffffffff8311610117576020838186019501011161011757565b60406003198201126101175767ffffffffffffffff916004358381116101175782610753916004016106f8565b939093926024359182116101175761076d916004016106f8565b9091565b34610117576107966107e8600061079f61078a36610726565b9691839193019061030a565b94810190610e2c565b95936040989395929198518098819582947f3baa6d50000000000000000000000000000000000000000000000000000000008452896001600160a01b0380961660048601611075565b0392165afa92831561089957600093610876575b5082519051908181036108375761082f8461082987610581876040519485936020850152602484016110c6565b306110eb565b602081519101f35b6040517f2918942500000000000000000000000000000000000000000000000000000000815260048101919091526024810191909152604490fd5b0390fd5b61089291933d8091833e61088a8183610277565b810190610f3b565b91386107fc565b6110ba565b34610117576000366003190112610117576020600254604051908152f35b346101175760203660031901126101175760043567ffffffffffffffff8111610117576109346108fc6108f66105a39336906004016106f8565b906123e7565b92959394919060ff610920604051988998895260a060208a015260a08901906104c8565b9216604087015285820360608701526104c8565b9083820360808501526104c8565b3461011757610370600061096461095836610726565b949290959136916102b5565b9290506001600160e01b031961097a8383611490565b167f3b3b57de000000000000000000000000000000000000000000000000000000008114610a78577ff1cb7e06000000000000000000000000000000000000000000000000000000008114610a5b577f59d1d43c000000000000000000000000000000000000000000000000000000008114610a3e577fbc1c58d10000000000000000000000000000000000000000000000000000000014610a2357604051806105a3816104ed565b81610a3992610a31926114bc565b8101906114d9565b612321565b5081610a5592610a4d926114bc565b8101906114fe565b9061223a565b5081610a7292610a6a926114bc565b8101906114e8565b906120db565b5081610a8792610a31926114bc565b61153e565b346101175760003660031901126101175760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b6001600160a01b0381160361011757565b346101175760403660031901126101175760043567ffffffffffffffff811161011757610b129036906004016106f8565b60243591610b1f83610ad0565b610b2f60006103703685856102b5565b506040517f02571be3000000000000000000000000000000000000000000000000000000008152600481018290526001600160a01b03602080836024817f000000000000000000000000000000000000000000000000000000000000000086165afa92831561089957600093610d83575b507f00000000000000000000000000000000000000000000000000000000000000008216908383168214610ca6575b505094610c7081610c3d7f88781081cc340609705af0f96bf3ba64ea267873444e91725bd072f2af0f44d895610c2d610c7e967f9fcbe230acca8f6bcfd2dda7aa896aa97299a423bdac7c8b565819624436a0729b339116146111f6565b6000526000602052604060002090565b906001600160a01b03167fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055565b60405191829186868461121e565b0390a1610ca1610c8e83836123e7565b9350915060025460405196879687611246565b0390a1005b6040517f6352211e000000000000000000000000000000000000000000000000000000008152600481018690529790935091908390889060249082905afa801561089957610c3d7f88781081cc340609705af0f96bf3ba64ea267873444e91725bd072f2af0f44d895610c2d610c709486947f9fcbe230acca8f6bcfd2dda7aa896aa97299a423bdac7c8b565819624436a0729c610c7e99600092610d56575b50509750959a5050955050610bcf565b610d759250803d10610d7c575b610d6d8183610277565b81019061134d565b3880610d46565b503d610d63565b819350610d9d9083923d8611610d7c57610d6d8183610277565b9290610ba0565b3461011757610db236610461565b508051600110156105a757610581610e0b60406105a393015160208151910151906bffffffffffffffffffffffff19918281169160148110610e17575b50506040805160609290921c6020830152909384925090820190565b60405191829182610533565b8391925060140360031b1b1616803880610def565b91909160c081840312610117578035610e4481610ad0565b92602080830135610e5481610ad0565b9367ffffffffffffffff9160408501358381116101175785019084601f8301121561011757813591610e85836103c8565b92610e936040519485610277565b808452828085019160051b83010191878311610117578301905b828210610ef557505050509360608101358381116101175784610ed19183016103e0565b93610ede60808301610102565b9360a08301359081116101175761030792016102ec565b81358152908301908301610ead565b90929192610f1181610299565b91610f1f6040519384610277565b829482845282820111610117576020610f399301906104a5565b565b90602090818382031261011757825167ffffffffffffffff9384821161011757019080601f83011215610117578151610f73816103c8565b94604090610f8382519788610277565b828752858088019360051b8601019484861161011757868101935b868510610fb057505050505050505090565b845183811161011757820186603f82011215610117578891610fda88838886809601519101610f04565b815201940193610f9e565b90815180825260208080930193019160005b828110611005575050505090565b835185529381019392810192600101610ff7565b908082519081815260208091019281808460051b8301019501936000915b8483106110475750505050505090565b9091929394958480611065600193601f198682030187528a516104c8565b9801930193019194939290611037565b9261109e61030795936001600160a01b036110ac94168652608060208701526080860190610fe5565b908482036040860152611019565b9160608184039101526104c8565b6040513d6000823e3d90fd5b90916110dd61030793604084526040840190611019565b9160208184039101526104c8565b9061030791600080604051936111008561021d565b601e85527f416464726573733a206c6f772d6c6576656c2063616c6c206661696c65640000602086015260208151910182855af13d15611162573d9161114583610299565b926111536040519485610277565b83523d6000602085013e611166565b6060915b919290156111c7575081511561117a575090565b3b156111835790565b606460405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152fd5b8251909150156111da5750805190602001fd5b6108729060405191829162461bcd60e51b835260048301610533565b1561011757565b908060209392818452848401376000828201840152601f01601f1916010190565b9161123f6020926001600160a01b03929695966040865260408601916111fd565b9416910152565b94919061125f919796949760c0875260c08701916111fd565b91602090818601528483036040860152600092600190815491611281836105f0565b8083529281811690811561132b57506001146112c9575b50505050906112bb9160ff610307969716606086015284820360808601526104c8565b9160a08184039101526104c8565b6000818152939995509091907fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf65b828510611318575094989190920101925081905060ff6112bb610307611298565b80548486018c0152938a019381016112f7565b60ff191683860152505090151560051b010191508060ff6112bb610307611298565b90816020910312610117575161030781610ad0565b634e487b7160e01b600052601160045260246000fd5b906001820180921161138657565b611362565b9190820180921161138657565b91909180518310156105a7576020838201015160f81c801561145457906113dd6113d8836113d26113e3956113cc89611378565b86611460565b9661138b565b611378565b90611398565b604080516020810193845290810194909452926114038160608101610581565b5190206001600160a01b03611432611425836000526000602052604060002090565b546001600160a01b031690565b1661143b579190565b9150610307611425836000526000602052604060002090565b50509050600090600090565b908281018082116113865782511061011757016020012090565b634e487b7160e01b600052603260045260246000fd5b6001600160e01b031990358181169392600481106114ad57505050565b60040360031b82901b16169150565b909291928360041161011757831161011757600401916003190190565b90816020910312610117573590565b9190826040910312610117576020823592013590565b91906040838203126101175782359260208101359067ffffffffffffffff821161011757019080601f8301121561011757816020610307933591016102b5565b61158f9061158061158a6115858361158061157b6060987f0000000000000000000000000000000000000000000000000000000000000000611781565b61181f565b61193f565b6118c8565b611973565b90611598611743565b508101906020908183511015611719576004906040906115d46115ce8351603c878201528681526115c88161021d565b83611ef7565b8261205f565b8151936115e08561023e565b6000855282820195818751511515918261170e575b5050611700575b600061161e61161284516001600160a01b031690565b6001600160a01b031690565b845195868092632d43cbef60e21b82525afa938415610899576000946116e5575b5081810180516001600160a01b031695875160808501908151988751998a9287840163ea9cd3bf60e01b9052602484019261167993611a01565b0394601f19958681018a5261168e908a610277565b516001600160a01b031692516001600160a01b031698519051908651998a958601946116b995611a35565b0390810185526116c99085610277565b51630556f18360e41b8152928392610872923060048601611bdf565b6116f991943d8091833e61088a8183610277565b923861163f565b61170982611f24565b6115fc565b5110905081386115f5565b60046040517fb00fd638000000000000000000000000000000000000000000000000000000008152fd5b6040519060a0820182811067ffffffffffffffff82111761023957604052606060808360008152600060208201528260408201526000838201520152565b9061178a611743565b506040516117978161025a565b60209283825261040092833686850137604051936117b48561025a565b8560005b82811061180f5750505060008352600084526040519460a0860186811067ffffffffffffffff821117610239576040526001600160a01b039283168652911690840152604083015260006060830152608082015290565b60608282890101520186906117b8565b611827611743565b50602060408201805160018151801515806118bb575b6118ad575b01905251511161187b576000606082015261185c81611f9d565b6103076115ce6040516115c88161058160208201906000602083019252565b6040517f128e700800000000000000000000000000000000000000000000000000000000815260206004820152602490fd5b6118b686611f24565b611842565b508460608701511061183d565b6118d0611743565b5060206040820180516001815180151580611932575b611924575b01905251511161187b576000606082015261190581611fe9565b6103076115ce6040516115c88161058160208201906002602083019252565b61192d86611f24565b6118eb565b50846060870151106118e6565b90611948611743565b50602060608301511015611719576115ce61030791604051906020820152602081526115c88161021d565b61197b611743565b506060810160208151101561171957604082019081515160001991828201918211611386576119ab828551611ee3565b51908051938414611386576001840190526001600160fd1b0383168303611386577f20000000000000000000000000000000000000000000000000000000000000006119fd9360031b1c179251611ee3565b5290565b91611a27906001600160a01b036103079593168452606060208501526060840190610fe5565b916040818403910152611019565b93906103079593611a6891611a76946001600160a01b03809216885216602087015260c0604087015260c0860190610fe5565b908482036060860152611019565b917ff470901a00000000000000000000000000000000000000000000000000000000608082015260a08184039101526104c8565b93906103079593611a6891611add946001600160a01b03809216885216602087015260c0604087015260c0860190610fe5565b917fde9abe5e00000000000000000000000000000000000000000000000000000000608082015260a08184039101526104c8565b93906103079593611a6891611b44946001600160a01b03809216885216602087015260c0604087015260c0860190610fe5565b917ffcd2e38100000000000000000000000000000000000000000000000000000000608082015260a08184039101526104c8565b93906103079593611a6891611bab946001600160a01b03809216885216602087015260c0604087015260c0860190610fe5565b917f38bf92e600000000000000000000000000000000000000000000000000000000608082015260a08184039101526104c8565b9290949391946001600160a01b0360a085019116845260209060a082860152865180915260c08501918060c08360051b8801019801926000905b838210611c6f57505050505084611c3b918461030796970360408601526104c8565b7f5bdaa9160000000000000000000000000000000000000000000000000000000060608401529160808184039101526104c8565b90919293988380611c8c60019360bf198c82030186528d516104c8565b9b019201920190939291611c19565b60046040820191825151151580611dc8575b611dba575b6000611cc861161283516001600160a01b031690565b60405193848092632d43cbef60e21b82525afa91821561089957600092611d9f575b5060208101928351611d02906001600160a01b031690565b9381519560808401968751966040519788926020840163ea9cd3bf60e01b90526024840192611d3093611a01565b0393601f19948581018852611d459088610277565b516001600160a01b031691516001600160a01b031692519651604051978894611d719460208701611aaa565b039081018452611d819084610277565b604051630556f18360e41b8152928392610872923060048601611bdf565b611db391923d8091833e61088a8183610277565b9038611cea565b611dc381611f24565b611cb2565b506020606082015110611cad565b60046040820191825151151580611ed5575b611ec7575b6000611e0361161283516001600160a01b031690565b60405193848092632d43cbef60e21b82525afa91821561089957600092611eac575b5060208101928351611e3d906001600160a01b031690565b9381519560808401968751966040519788926020840163ea9cd3bf60e01b90526024840192611e6b93611a01565b0393601f19948581018852611e809088610277565b516001600160a01b031691516001600160a01b031692519651604051978894611d719460208701611b11565b611ec091923d8091833e61088a8183610277565b9038611e25565b611ed081611f24565b611ded565b506020606082015110611de8565b80518210156105a75760209160051b010190565b6080611f219193929301519260ff845116938491600183018252611f1b8383611ee3565b52611ee3565b50565b604081019081515160001991828201918211611386576060611f47838651611ee3565b5191018051938414611386576001840190526001600160fd1b0383168303611386577fff00000000000000000000000000000000000000000000000000000000000000611f9a9360031b1c179251611ee3565b52565b60408101805151600019808201918211611386576060611fbe838551611ee3565b5194018051918214611386576001820190526001600160fd1b0381160361138657611f9a9151611ee3565b60408101908151516000199182820191821161138657606061200c838651611ee3565b5191018051938414611386576001840190526001600160fd1b0383168303611386577f0100000000000000000000000000000000000000000000000000000000000000611f9a9360031b1c179251611ee3565b60408101805151909291600019808301928311611386576060612083848751611ee3565b5192018051918214611386576001820190526001600160fd1b0381168103611386577fff00000000000000000000000000000000000000000000000000000000000000611f9a9460f81b169060031b1c179251611ee3565b9061158061211c9261158061158a6115858361158061157b60609a7f0000000000000000000000000000000000000000000000000000000000000000611781565b906004604080519361212d8561023e565b60008552818101938451511515908161222c575b5061221e575b600061215d61161283516001600160a01b031690565b835194858092632d43cbef60e21b82525afa92831561089957600093612203575b5060208101938451612196906001600160a01b031690565b94815196608084019788519786519889926020840163ea9cd3bf60e01b905260248401926121c393611a01565b0393601f199485810189526121d89089610277565b516001600160a01b031691516001600160a01b03169251975185519889946116b99460208701611b78565b61221791933d8091833e61088a8183610277565b913861217e565b61222781611f24565b612147565b602091508201511038612141565b61226d8161158061157b6060967f0000000000000000000000000000000000000000000000000000000000000000611781565b612275611743565b5060206040820180516001815180151580612315575b612307575b01905251511161187b57602091611580826000876122d19501526122b381611fe9565b61158a6115ce6040516115c8816105818a820190600a602083019252565b926122da611743565b508301511015611719576115ce6122f19183611ef7565b604051906122fe8261023e565b60008252611c9b565b61231086611f24565b612290565b5084898701511061228b565b6123548161158061157b6060957f0000000000000000000000000000000000000000000000000000000000000000611781565b9161235d611743565b50602060408401805160018151801515806123db575b6123cd575b01905251511161187b57826000611580926123b795015261239881611fe9565b61158a6115ce6040516115c88161058160208201906003602083019252565b604051906123c48261023e565b60008252611dd6565b6123d688611f24565b612378565b50848689015110612373565b60006103706123fc9261245b959436916102b5565b6002546040516bffffffffffffffffffffffff19606084901b1660208201526014815292509061246790601f1990612435603486610277565b604051968791602083016014916bffffffffffffffffffffffff199060601b1681520190565b03908101865285610277565b92604051612478816106f18161062a565b92600092919056fea264697066735822122057efd8edd61e828b8c697ad27a1b3e1aa9e8aa92e5b54cb205f22f0372e80d4464736f6c63430008130033", + "deployedBytecode": "0x6080604052600436101561001257600080fd5b60003560e01c806301ffc9a7146100fd57806315f64386146100f85780632b7ac3f3146100f357806338bf92e6146100c15780633f15457f146100ee5780634062b43f146100e95780635bdaa916146100e45780637e6215ba146100df5780638a596ebe146100da5780639061b923146100d5578063a8e5fbc0146100d0578063d358df77146100cb578063de9abe5e146100c1578063f470901a146100c65763fcd2e381146100c157600080fd5b610544565b610da4565b610ae1565b610a8c565b610942565b6108bc565b61089e565b610771565b6106cd565b6105ac565b610384565b610330565b61011c565b35906001600160e01b03198216820361011757565b600080fd5b34610117576020366003190112610117576004356001600160e01b0319811680910361011757807f9061b92300000000000000000000000000000000000000000000000000000000602092149081156101dd575b81156101b3575b8115610189575b506040519015158152f35b7f01ffc9a7000000000000000000000000000000000000000000000000000000009150143861017e565b7f8a596ebe0000000000000000000000000000000000000000000000000000000081149150610177565b7f15f643860000000000000000000000000000000000000000000000000000000081149150610170565b634e487b7160e01b600052604160045260246000fd5b6040810190811067ffffffffffffffff82111761023957604052565b610207565b6020810190811067ffffffffffffffff82111761023957604052565b610420810190811067ffffffffffffffff82111761023957604052565b90601f8019910116810190811067ffffffffffffffff82111761023957604052565b67ffffffffffffffff811161023957601f01601f191660200190565b9291926102c182610299565b916102cf6040519384610277565b829481845281830111610117578281602093846000960137010152565b9080601f8301121561011757816020610307933591016102b5565b90565b9060208282031261011757813567ffffffffffffffff81116101175761030792016102ec565b346101175760203660031901126101175760043567ffffffffffffffff8111610117576001600160a01b03610375600061037060409436906004016102ec565b611398565b83519182529091166020820152f35b346101175760003660031901126101175760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b67ffffffffffffffff81116102395760051b60200190565b9080601f83011215610117578135906103f8826103c8565b926104066040519485610277565b828452602092838086019160051b8301019280841161011757848301915b8483106104345750505050505090565b823567ffffffffffffffff8111610117578691610456848480948901016102ec565b815201920191610424565b9060406003198301126101175767ffffffffffffffff600435818111610117578361048e916004016103e0565b9260243591821161011757610307916004016102ec565b60005b8381106104b85750506000910152565b81810151838201526020016104a8565b906020916104e1815180928185528580860191016104a5565b601f01601f1916010190565b90602091828152606051808483015260005b818110610520575060409293506000838284010152601f8019910116010190565b60808101518382016040015284016104ff565b9060206103079281815201906104c8565b346101175761055236610461565b508051600110156105a75761058161058f60406105a393015160405192839160208084015260408301906104c8565b03601f198101835282610277565b6040519182916020835260208301906104c8565b0390f35b61147a565b346101175760003660031901126101175760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b90600182811c92168015610620575b602083101461060a57565b634e487b7160e01b600052602260045260246000fd5b91607f16916105ff565b9060009160019081549161063d836105f0565b808352928181169081156106b0575060011461065857505050565b80929394506000527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6916000925b84841061069857505060209250010190565b80546020858501810191909152909301928101610686565b915050602093945060ff929192191683830152151560051b010190565b34610117576000366003190112610117576105a360405161058f816106f18161062a565b0382610277565b9181601f840112156101175782359167ffffffffffffffff8311610117576020838186019501011161011757565b60406003198201126101175767ffffffffffffffff916004358381116101175782610753916004016106f8565b939093926024359182116101175761076d916004016106f8565b9091565b34610117576107966107e8600061079f61078a36610726565b9691839193019061030a565b94810190610e2c565b95936040989395929198518098819582947f3baa6d50000000000000000000000000000000000000000000000000000000008452896001600160a01b0380961660048601611075565b0392165afa92831561089957600093610876575b5082519051908181036108375761082f8461082987610581876040519485936020850152602484016110c6565b306110eb565b602081519101f35b6040517f2918942500000000000000000000000000000000000000000000000000000000815260048101919091526024810191909152604490fd5b0390fd5b61089291933d8091833e61088a8183610277565b810190610f3b565b91386107fc565b6110ba565b34610117576000366003190112610117576020600254604051908152f35b346101175760203660031901126101175760043567ffffffffffffffff8111610117576109346108fc6108f66105a39336906004016106f8565b906123e7565b92959394919060ff610920604051988998895260a060208a015260a08901906104c8565b9216604087015285820360608701526104c8565b9083820360808501526104c8565b3461011757610370600061096461095836610726565b949290959136916102b5565b9290506001600160e01b031961097a8383611490565b167f3b3b57de000000000000000000000000000000000000000000000000000000008114610a78577ff1cb7e06000000000000000000000000000000000000000000000000000000008114610a5b577f59d1d43c000000000000000000000000000000000000000000000000000000008114610a3e577fbc1c58d10000000000000000000000000000000000000000000000000000000014610a2357604051806105a3816104ed565b81610a3992610a31926114bc565b8101906114d9565b612321565b5081610a5592610a4d926114bc565b8101906114fe565b9061223a565b5081610a7292610a6a926114bc565b8101906114e8565b906120db565b5081610a8792610a31926114bc565b61153e565b346101175760003660031901126101175760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b6001600160a01b0381160361011757565b346101175760403660031901126101175760043567ffffffffffffffff811161011757610b129036906004016106f8565b60243591610b1f83610ad0565b610b2f60006103703685856102b5565b506040517f02571be3000000000000000000000000000000000000000000000000000000008152600481018290526001600160a01b03602080836024817f000000000000000000000000000000000000000000000000000000000000000086165afa92831561089957600093610d83575b507f00000000000000000000000000000000000000000000000000000000000000008216908383168214610ca6575b505094610c7081610c3d7f88781081cc340609705af0f96bf3ba64ea267873444e91725bd072f2af0f44d895610c2d610c7e967f9fcbe230acca8f6bcfd2dda7aa896aa97299a423bdac7c8b565819624436a0729b339116146111f6565b6000526000602052604060002090565b906001600160a01b03167fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055565b60405191829186868461121e565b0390a1610ca1610c8e83836123e7565b9350915060025460405196879687611246565b0390a1005b6040517f6352211e000000000000000000000000000000000000000000000000000000008152600481018690529790935091908390889060249082905afa801561089957610c3d7f88781081cc340609705af0f96bf3ba64ea267873444e91725bd072f2af0f44d895610c2d610c709486947f9fcbe230acca8f6bcfd2dda7aa896aa97299a423bdac7c8b565819624436a0729c610c7e99600092610d56575b50509750959a5050955050610bcf565b610d759250803d10610d7c575b610d6d8183610277565b81019061134d565b3880610d46565b503d610d63565b819350610d9d9083923d8611610d7c57610d6d8183610277565b9290610ba0565b3461011757610db236610461565b508051600110156105a757610581610e0b60406105a393015160208151910151906bffffffffffffffffffffffff19918281169160148110610e17575b50506040805160609290921c6020830152909384925090820190565b60405191829182610533565b8391925060140360031b1b1616803880610def565b91909160c081840312610117578035610e4481610ad0565b92602080830135610e5481610ad0565b9367ffffffffffffffff9160408501358381116101175785019084601f8301121561011757813591610e85836103c8565b92610e936040519485610277565b808452828085019160051b83010191878311610117578301905b828210610ef557505050509360608101358381116101175784610ed19183016103e0565b93610ede60808301610102565b9360a08301359081116101175761030792016102ec565b81358152908301908301610ead565b90929192610f1181610299565b91610f1f6040519384610277565b829482845282820111610117576020610f399301906104a5565b565b90602090818382031261011757825167ffffffffffffffff9384821161011757019080601f83011215610117578151610f73816103c8565b94604090610f8382519788610277565b828752858088019360051b8601019484861161011757868101935b868510610fb057505050505050505090565b845183811161011757820186603f82011215610117578891610fda88838886809601519101610f04565b815201940193610f9e565b90815180825260208080930193019160005b828110611005575050505090565b835185529381019392810192600101610ff7565b908082519081815260208091019281808460051b8301019501936000915b8483106110475750505050505090565b9091929394958480611065600193601f198682030187528a516104c8565b9801930193019194939290611037565b9261109e61030795936001600160a01b036110ac94168652608060208701526080860190610fe5565b908482036040860152611019565b9160608184039101526104c8565b6040513d6000823e3d90fd5b90916110dd61030793604084526040840190611019565b9160208184039101526104c8565b9061030791600080604051936111008561021d565b601e85527f416464726573733a206c6f772d6c6576656c2063616c6c206661696c65640000602086015260208151910182855af13d15611162573d9161114583610299565b926111536040519485610277565b83523d6000602085013e611166565b6060915b919290156111c7575081511561117a575090565b3b156111835790565b606460405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152fd5b8251909150156111da5750805190602001fd5b6108729060405191829162461bcd60e51b835260048301610533565b1561011757565b908060209392818452848401376000828201840152601f01601f1916010190565b9161123f6020926001600160a01b03929695966040865260408601916111fd565b9416910152565b94919061125f919796949760c0875260c08701916111fd565b91602090818601528483036040860152600092600190815491611281836105f0565b8083529281811690811561132b57506001146112c9575b50505050906112bb9160ff610307969716606086015284820360808601526104c8565b9160a08184039101526104c8565b6000818152939995509091907fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf65b828510611318575094989190920101925081905060ff6112bb610307611298565b80548486018c0152938a019381016112f7565b60ff191683860152505090151560051b010191508060ff6112bb610307611298565b90816020910312610117575161030781610ad0565b634e487b7160e01b600052601160045260246000fd5b906001820180921161138657565b611362565b9190820180921161138657565b91909180518310156105a7576020838201015160f81c801561145457906113dd6113d8836113d26113e3956113cc89611378565b86611460565b9661138b565b611378565b90611398565b604080516020810193845290810194909452926114038160608101610581565b5190206001600160a01b03611432611425836000526000602052604060002090565b546001600160a01b031690565b1661143b579190565b9150610307611425836000526000602052604060002090565b50509050600090600090565b908281018082116113865782511061011757016020012090565b634e487b7160e01b600052603260045260246000fd5b6001600160e01b031990358181169392600481106114ad57505050565b60040360031b82901b16169150565b909291928360041161011757831161011757600401916003190190565b90816020910312610117573590565b9190826040910312610117576020823592013590565b91906040838203126101175782359260208101359067ffffffffffffffff821161011757019080601f8301121561011757816020610307933591016102b5565b61158f9061158061158a6115858361158061157b6060987f0000000000000000000000000000000000000000000000000000000000000000611781565b61181f565b61193f565b6118c8565b611973565b90611598611743565b508101906020908183511015611719576004906040906115d46115ce8351603c878201528681526115c88161021d565b83611ef7565b8261205f565b8151936115e08561023e565b6000855282820195818751511515918261170e575b5050611700575b600061161e61161284516001600160a01b031690565b6001600160a01b031690565b845195868092632d43cbef60e21b82525afa938415610899576000946116e5575b5081810180516001600160a01b031695875160808501908151988751998a9287840163ea9cd3bf60e01b9052602484019261167993611a01565b0394601f19958681018a5261168e908a610277565b516001600160a01b031692516001600160a01b031698519051908651998a958601946116b995611a35565b0390810185526116c99085610277565b51630556f18360e41b8152928392610872923060048601611bdf565b6116f991943d8091833e61088a8183610277565b923861163f565b61170982611f24565b6115fc565b5110905081386115f5565b60046040517fb00fd638000000000000000000000000000000000000000000000000000000008152fd5b6040519060a0820182811067ffffffffffffffff82111761023957604052606060808360008152600060208201528260408201526000838201520152565b9061178a611743565b506040516117978161025a565b60209283825261040092833686850137604051936117b48561025a565b8560005b82811061180f5750505060008352600084526040519460a0860186811067ffffffffffffffff821117610239576040526001600160a01b039283168652911690840152604083015260006060830152608082015290565b60608282890101520186906117b8565b611827611743565b50602060408201805160018151801515806118bb575b6118ad575b01905251511161187b576000606082015261185c81611f9d565b6103076115ce6040516115c88161058160208201906000602083019252565b6040517f128e700800000000000000000000000000000000000000000000000000000000815260206004820152602490fd5b6118b686611f24565b611842565b508460608701511061183d565b6118d0611743565b5060206040820180516001815180151580611932575b611924575b01905251511161187b576000606082015261190581611fe9565b6103076115ce6040516115c88161058160208201906002602083019252565b61192d86611f24565b6118eb565b50846060870151106118e6565b90611948611743565b50602060608301511015611719576115ce61030791604051906020820152602081526115c88161021d565b61197b611743565b506060810160208151101561171957604082019081515160001991828201918211611386576119ab828551611ee3565b51908051938414611386576001840190526001600160fd1b0383168303611386577f20000000000000000000000000000000000000000000000000000000000000006119fd9360031b1c179251611ee3565b5290565b91611a27906001600160a01b036103079593168452606060208501526060840190610fe5565b916040818403910152611019565b93906103079593611a6891611a76946001600160a01b03809216885216602087015260c0604087015260c0860190610fe5565b908482036060860152611019565b917ff470901a00000000000000000000000000000000000000000000000000000000608082015260a08184039101526104c8565b93906103079593611a6891611add946001600160a01b03809216885216602087015260c0604087015260c0860190610fe5565b917fde9abe5e00000000000000000000000000000000000000000000000000000000608082015260a08184039101526104c8565b93906103079593611a6891611b44946001600160a01b03809216885216602087015260c0604087015260c0860190610fe5565b917ffcd2e38100000000000000000000000000000000000000000000000000000000608082015260a08184039101526104c8565b93906103079593611a6891611bab946001600160a01b03809216885216602087015260c0604087015260c0860190610fe5565b917f38bf92e600000000000000000000000000000000000000000000000000000000608082015260a08184039101526104c8565b9290949391946001600160a01b0360a085019116845260209060a082860152865180915260c08501918060c08360051b8801019801926000905b838210611c6f57505050505084611c3b918461030796970360408601526104c8565b7f5bdaa9160000000000000000000000000000000000000000000000000000000060608401529160808184039101526104c8565b90919293988380611c8c60019360bf198c82030186528d516104c8565b9b019201920190939291611c19565b60046040820191825151151580611dc8575b611dba575b6000611cc861161283516001600160a01b031690565b60405193848092632d43cbef60e21b82525afa91821561089957600092611d9f575b5060208101928351611d02906001600160a01b031690565b9381519560808401968751966040519788926020840163ea9cd3bf60e01b90526024840192611d3093611a01565b0393601f19948581018852611d459088610277565b516001600160a01b031691516001600160a01b031692519651604051978894611d719460208701611aaa565b039081018452611d819084610277565b604051630556f18360e41b8152928392610872923060048601611bdf565b611db391923d8091833e61088a8183610277565b9038611cea565b611dc381611f24565b611cb2565b506020606082015110611cad565b60046040820191825151151580611ed5575b611ec7575b6000611e0361161283516001600160a01b031690565b60405193848092632d43cbef60e21b82525afa91821561089957600092611eac575b5060208101928351611e3d906001600160a01b031690565b9381519560808401968751966040519788926020840163ea9cd3bf60e01b90526024840192611e6b93611a01565b0393601f19948581018852611e809088610277565b516001600160a01b031691516001600160a01b031692519651604051978894611d719460208701611b11565b611ec091923d8091833e61088a8183610277565b9038611e25565b611ed081611f24565b611ded565b506020606082015110611de8565b80518210156105a75760209160051b010190565b6080611f219193929301519260ff845116938491600183018252611f1b8383611ee3565b52611ee3565b50565b604081019081515160001991828201918211611386576060611f47838651611ee3565b5191018051938414611386576001840190526001600160fd1b0383168303611386577fff00000000000000000000000000000000000000000000000000000000000000611f9a9360031b1c179251611ee3565b52565b60408101805151600019808201918211611386576060611fbe838551611ee3565b5194018051918214611386576001820190526001600160fd1b0381160361138657611f9a9151611ee3565b60408101908151516000199182820191821161138657606061200c838651611ee3565b5191018051938414611386576001840190526001600160fd1b0383168303611386577f0100000000000000000000000000000000000000000000000000000000000000611f9a9360031b1c179251611ee3565b60408101805151909291600019808301928311611386576060612083848751611ee3565b5192018051918214611386576001820190526001600160fd1b0381168103611386577fff00000000000000000000000000000000000000000000000000000000000000611f9a9460f81b169060031b1c179251611ee3565b9061158061211c9261158061158a6115858361158061157b60609a7f0000000000000000000000000000000000000000000000000000000000000000611781565b906004604080519361212d8561023e565b60008552818101938451511515908161222c575b5061221e575b600061215d61161283516001600160a01b031690565b835194858092632d43cbef60e21b82525afa92831561089957600093612203575b5060208101938451612196906001600160a01b031690565b94815196608084019788519786519889926020840163ea9cd3bf60e01b905260248401926121c393611a01565b0393601f199485810189526121d89089610277565b516001600160a01b031691516001600160a01b03169251975185519889946116b99460208701611b78565b61221791933d8091833e61088a8183610277565b913861217e565b61222781611f24565b612147565b602091508201511038612141565b61226d8161158061157b6060967f0000000000000000000000000000000000000000000000000000000000000000611781565b612275611743565b5060206040820180516001815180151580612315575b612307575b01905251511161187b57602091611580826000876122d19501526122b381611fe9565b61158a6115ce6040516115c8816105818a820190600a602083019252565b926122da611743565b508301511015611719576115ce6122f19183611ef7565b604051906122fe8261023e565b60008252611c9b565b61231086611f24565b612290565b5084898701511061228b565b6123548161158061157b6060957f0000000000000000000000000000000000000000000000000000000000000000611781565b9161235d611743565b50602060408401805160018151801515806123db575b6123cd575b01905251511161187b57826000611580926123b795015261239881611fe9565b61158a6115ce6040516115c88161058160208201906003602083019252565b604051906123c48261023e565b60008252611dd6565b6123d688611f24565b612378565b50848689015110612373565b60006103706123fc9261245b959436916102b5565b6002546040516bffffffffffffffffffffffff19606084901b1660208201526014815292509061246790601f1990612435603486610277565b604051968791602083016014916bffffffffffffffffffffffff199060601b1681520190565b03908101865285610277565b92604051612478816106f18161062a565b92600092919056fea264697066735822122057efd8edd61e828b8c697ad27a1b3e1aa9e8aa92e5b54cb205f22f0372e80d4464736f6c63430008130033", + "devdoc": { + "kind": "dev", + "methods": { + "constructor": { + "params": { + "_ens": "The ENS registry address", + "_graphqlUrl": "The offchain/l2 graphql endpoint url", + "_l2ResolverCoinType": "The chainId at which the resolver resolves data from. 0 if storageLocation is offChain", + "_nameWrapper": "The ENS name wrapper address", + "_verifier": "The chain verifier address" + } + }, + "getStorageSlotsCallback(bytes,bytes)": { + "details": "Internal callback function invoked by CCIP-Read in response to a `getStorageSlots` request." + }, + "getTarget(bytes)": { + "details": "Returns the L2 target address that can answer queries for `name`.", + "params": { + "name": "DNS encoded ENS name to query" + }, + "returns": { + "node": "The node of the name", + "target": "The L2 resolver address to verify against." + } + }, + "metadata(bytes)": { + "details": "This function provides metadata about the L1 Resolver, including its name, coin type, GraphQL URL, storage type, and encoded information.", + "params": { + "name": "The domain name in format (dnsEncoded)" + }, + "returns": { + "_0": "coinType The cointype of the chain the target contract locates such as Optimism, Base, Arb, etc", + "_1": "graphqlUrl The GraphQL URL used by the resolver", + "_2": "storageType Storage Type (0 for EVM)", + "_3": "storageLocation The storage identifier. For EVM chains, this is the address of the resolver contract.", + "_4": "context. An identifier used by l2 graph indexer for Domain schema id (`context-namehash`) allowing multiple resolver contracts to have own namespace." + } + }, + "resolve(bytes,bytes)": { + "details": "Resolve and verify a record stored in l2 target address. It supports subname by fetching target recursively to the nearlest parent.", + "params": { + "data": "The actual calldata", + "name": "DNS encoded ENS name to query" + }, + "returns": { + "result": "result of the call" + } + }, + "setTarget(bytes,address)": { + "params": { + "name": "The encoded name to query.", + "target": "The L2 resolver address to verify against." + } + }, + "supportsInterface(bytes4)": { + "details": "See {IERC165-supportsInterface}." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "metadata(bytes)": { + "notice": "Get metadata about the L1 Resolver" + }, + "setTarget(bytes,address)": { + "notice": "Set target address to verify aagainst" + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 18375, + "contract": "contracts/L1Resolver.sol:L1Resolver", + "label": "targets", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 18392, + "contract": "contracts/L1Resolver.sol:L1Resolver", + "label": "graphqlUrl", + "offset": 0, + "slot": "1", + "type": "t_string_storage" + }, + { + "astId": 18394, + "contract": "contracts/L1Resolver.sol:L1Resolver", + "label": "l2ResolverCoinType", + "offset": 0, + "slot": "2", + "type": "t_uint256" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_address)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/crosschain-resolver/deployments/sepolia/OpL1Resolver.json b/crosschain-resolver/deployments/sepolia/OpL1Resolver.json new file mode 100644 index 00000000..9b87559f --- /dev/null +++ b/crosschain-resolver/deployments/sepolia/OpL1Resolver.json @@ -0,0 +1,637 @@ +{ + "address": "0x57C1f50093C1017AE81EBAF336511ACcc48061e2", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IEVMVerifier", + "name": "_verifier", + "type": "address" + }, + { + "internalType": "contract ENS", + "name": "_ens", + "type": "address" + }, + { + "internalType": "contract INameWrapper", + "name": "_nameWrapper", + "type": "address" + }, + { + "internalType": "string", + "name": "_graphqlUrl", + "type": "string" + }, + { + "internalType": "uint256", + "name": "_l2ResolverCoinType", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "CommandTooLong", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "InvalidReference", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "string[]", + "name": "urls", + "type": "string[]" + }, + { + "internalType": "bytes", + "name": "callData", + "type": "bytes" + }, + { + "internalType": "bytes4", + "name": "callbackFunction", + "type": "bytes4" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "name": "OffchainLookup", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "actual", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + } + ], + "name": "ResponseLengthMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "TooManyCommands", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes", + "name": "name", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "coinType", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "graphqlUrl", + "type": "string" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "storageType", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "storageLocation", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "context", + "type": "bytes" + } + ], + "name": "MetadataChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes", + "name": "name", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "TargetSet", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes[]", + "name": "values", + "type": "bytes[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "addrCallback", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes[]", + "name": "values", + "type": "bytes[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "addrCoinTypeCallback", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes[]", + "name": "values", + "type": "bytes[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "contenthashCallback", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "ens", + "outputs": [ + { + "internalType": "contract ENS", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "response", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "extradata", + "type": "bytes" + } + ], + "name": "getStorageSlotsCallback", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "name", + "type": "bytes" + } + ], + "name": "getTarget", + "outputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "graphqlUrl", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "l2ResolverCoinType", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "name", + "type": "bytes" + } + ], + "name": "metadata", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "string", + "name": "", + "type": "string" + }, + { + "internalType": "uint8", + "name": "", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "nameWrapper", + "outputs": [ + { + "internalType": "contract INameWrapper", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "name", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "resolve", + "outputs": [ + { + "internalType": "bytes", + "name": "result", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "name", + "type": "bytes" + }, + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "setTarget", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes[]", + "name": "values", + "type": "bytes[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "textCallback", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "verifier", + "outputs": [ + { + "internalType": "contract IEVMVerifier", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x4348ddc04705f5dce8f3375ea0d9be07d4ed84863e605a3ea802bb9c1c530f2d", + "receipt": { + "to": null, + "from": "0xDBBC2C0fe2a1D0fB4056B35a22e543bEb715E7FC", + "contractAddress": "0x57C1f50093C1017AE81EBAF336511ACcc48061e2", + "transactionIndex": 35, + "gasUsed": "2202559", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xe9fd67e70d5b646626e78f04b7fb5bba0bbf5d15e324d1feb8dced8ef62762aa", + "transactionHash": "0x4348ddc04705f5dce8f3375ea0d9be07d4ed84863e605a3ea802bb9c1c530f2d", + "logs": [], + "blockNumber": 5133237, + "cumulativeGasUsed": "9515332", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0e8DA38565915B7e74e2d78F80ba1BF815F34116", + "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e", + "0x0635513f179D50A207757E05759CbD106d7dFcE8", + "https://api.studio.thegraph.com/query/1397/ens-op-sepolia/version/latest", + 2158639068 + ], + "numDeployments": 1, + "solcInputHash": "f62af331815cb4e74689ba5fa814dd3e", + "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IEVMVerifier\",\"name\":\"_verifier\",\"type\":\"address\"},{\"internalType\":\"contract ENS\",\"name\":\"_ens\",\"type\":\"address\"},{\"internalType\":\"contract INameWrapper\",\"name\":\"_nameWrapper\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_graphqlUrl\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_l2ResolverCoinType\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"CommandTooLong\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"max\",\"type\":\"uint256\"}],\"name\":\"InvalidReference\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"string[]\",\"name\":\"urls\",\"type\":\"string[]\"},{\"internalType\":\"bytes\",\"name\":\"callData\",\"type\":\"bytes\"},{\"internalType\":\"bytes4\",\"name\":\"callbackFunction\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"OffchainLookup\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"actual\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expected\",\"type\":\"uint256\"}],\"name\":\"ResponseLengthMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"max\",\"type\":\"uint256\"}],\"name\":\"TooManyCommands\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"name\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"coinType\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"graphqlUrl\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"storageType\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"storageLocation\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"context\",\"type\":\"bytes\"}],\"name\":\"MetadataChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"name\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"TargetSet\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"values\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"addrCallback\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"values\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"addrCoinTypeCallback\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"values\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"contenthashCallback\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ens\",\"outputs\":[{\"internalType\":\"contract ENS\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"response\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"extradata\",\"type\":\"bytes\"}],\"name\":\"getStorageSlotsCallback\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"name\",\"type\":\"bytes\"}],\"name\":\"getTarget\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"graphqlUrl\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"l2ResolverCoinType\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"name\",\"type\":\"bytes\"}],\"name\":\"metadata\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nameWrapper\",\"outputs\":[{\"internalType\":\"contract INameWrapper\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"name\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"result\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"name\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"setTarget\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"values\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"textCallback\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"verifier\",\"outputs\":[{\"internalType\":\"contract IEVMVerifier\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_ens\":\"The ENS registry address\",\"_graphqlUrl\":\"The offchain/l2 graphql endpoint url\",\"_l2ResolverCoinType\":\"The chainId at which the resolver resolves data from. 0 if storageLocation is offChain\",\"_nameWrapper\":\"The ENS name wrapper address\",\"_verifier\":\"The chain verifier address\"}},\"getStorageSlotsCallback(bytes,bytes)\":{\"details\":\"Internal callback function invoked by CCIP-Read in response to a `getStorageSlots` request.\"},\"getTarget(bytes)\":{\"details\":\"Returns the L2 target address that can answer queries for `name`.\",\"params\":{\"name\":\"DNS encoded ENS name to query\"},\"returns\":{\"node\":\"The node of the name\",\"target\":\"The L2 resolver address to verify against.\"}},\"metadata(bytes)\":{\"details\":\"This function provides metadata about the L1 Resolver, including its name, coin type, GraphQL URL, storage type, and encoded information.\",\"params\":{\"name\":\"The domain name in format (dnsEncoded)\"},\"returns\":{\"_0\":\"coinType The cointype of the chain the target contract locates such as Optimism, Base, Arb, etc\",\"_1\":\"graphqlUrl The GraphQL URL used by the resolver\",\"_2\":\"storageType Storage Type (0 for EVM)\",\"_3\":\"storageLocation The storage identifier. For EVM chains, this is the address of the resolver contract.\",\"_4\":\"context. An identifier used by l2 graph indexer for Domain schema id (`context-namehash`) allowing multiple resolver contracts to have own namespace.\"}},\"resolve(bytes,bytes)\":{\"details\":\"Resolve and verify a record stored in l2 target address. It supports subname by fetching target recursively to the nearlest parent.\",\"params\":{\"data\":\"The actual calldata\",\"name\":\"DNS encoded ENS name to query\"},\"returns\":{\"result\":\"result of the call\"}},\"setTarget(bytes,address)\":{\"params\":{\"name\":\"The encoded name to query.\",\"target\":\"The L2 resolver address to verify against.\"}},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"metadata(bytes)\":{\"notice\":\"Get metadata about the L1 Resolver\"},\"setTarget(bytes,address)\":{\"notice\":\"Set target address to verify aagainst\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/L1Resolver.sol\":\"L1Resolver\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1200},\"remappings\":[],\"viaIR\":true},\"sources\":{\"@ensdomains/ens-contracts/contracts/dnssec-oracle/BytesUtils.sol\":{\"content\":\"pragma solidity ^0.8.4;\\n\\nlibrary BytesUtils {\\n error OffsetOutOfBoundsError(uint256 offset, uint256 length);\\n\\n /*\\n * @dev Returns the keccak-256 hash of a byte range.\\n * @param self The byte string to hash.\\n * @param offset The position to start hashing at.\\n * @param len The number of bytes to hash.\\n * @return The hash of the byte range.\\n */\\n function keccak(\\n bytes memory self,\\n uint256 offset,\\n uint256 len\\n ) internal pure returns (bytes32 ret) {\\n require(offset + len <= self.length);\\n assembly {\\n ret := keccak256(add(add(self, 32), offset), len)\\n }\\n }\\n\\n /*\\n * @dev Returns a positive number if `other` comes lexicographically after\\n * `self`, a negative number if it comes before, or zero if the\\n * contents of the two bytes are equal.\\n * @param self The first bytes to compare.\\n * @param other The second bytes to compare.\\n * @return The result of the comparison.\\n */\\n function compare(\\n bytes memory self,\\n bytes memory other\\n ) internal pure returns (int256) {\\n return compare(self, 0, self.length, other, 0, other.length);\\n }\\n\\n /*\\n * @dev Returns a positive number if `other` comes lexicographically after\\n * `self`, a negative number if it comes before, or zero if the\\n * contents of the two bytes are equal. Comparison is done per-rune,\\n * on unicode codepoints.\\n * @param self The first bytes to compare.\\n * @param offset The offset of self.\\n * @param len The length of self.\\n * @param other The second bytes to compare.\\n * @param otheroffset The offset of the other string.\\n * @param otherlen The length of the other string.\\n * @return The result of the comparison.\\n */\\n function compare(\\n bytes memory self,\\n uint256 offset,\\n uint256 len,\\n bytes memory other,\\n uint256 otheroffset,\\n uint256 otherlen\\n ) internal pure returns (int256) {\\n if (offset + len > self.length) {\\n revert OffsetOutOfBoundsError(offset + len, self.length);\\n }\\n if (otheroffset + otherlen > other.length) {\\n revert OffsetOutOfBoundsError(otheroffset + otherlen, other.length);\\n }\\n\\n uint256 shortest = len;\\n if (otherlen < len) shortest = otherlen;\\n\\n uint256 selfptr;\\n uint256 otherptr;\\n\\n assembly {\\n selfptr := add(self, add(offset, 32))\\n otherptr := add(other, add(otheroffset, 32))\\n }\\n for (uint256 idx = 0; idx < shortest; idx += 32) {\\n uint256 a;\\n uint256 b;\\n assembly {\\n a := mload(selfptr)\\n b := mload(otherptr)\\n }\\n if (a != b) {\\n // Mask out irrelevant bytes and check again\\n uint256 mask;\\n if (shortest - idx >= 32) {\\n mask = type(uint256).max;\\n } else {\\n mask = ~(2 ** (8 * (idx + 32 - shortest)) - 1);\\n }\\n int256 diff = int256(a & mask) - int256(b & mask);\\n if (diff != 0) return diff;\\n }\\n selfptr += 32;\\n otherptr += 32;\\n }\\n\\n return int256(len) - int256(otherlen);\\n }\\n\\n /*\\n * @dev Returns true if the two byte ranges are equal.\\n * @param self The first byte range to compare.\\n * @param offset The offset into the first byte range.\\n * @param other The second byte range to compare.\\n * @param otherOffset The offset into the second byte range.\\n * @param len The number of bytes to compare\\n * @return True if the byte ranges are equal, false otherwise.\\n */\\n function equals(\\n bytes memory self,\\n uint256 offset,\\n bytes memory other,\\n uint256 otherOffset,\\n uint256 len\\n ) internal pure returns (bool) {\\n return keccak(self, offset, len) == keccak(other, otherOffset, len);\\n }\\n\\n /*\\n * @dev Returns true if the two byte ranges are equal with offsets.\\n * @param self The first byte range to compare.\\n * @param offset The offset into the first byte range.\\n * @param other The second byte range to compare.\\n * @param otherOffset The offset into the second byte range.\\n * @return True if the byte ranges are equal, false otherwise.\\n */\\n function equals(\\n bytes memory self,\\n uint256 offset,\\n bytes memory other,\\n uint256 otherOffset\\n ) internal pure returns (bool) {\\n return\\n keccak(self, offset, self.length - offset) ==\\n keccak(other, otherOffset, other.length - otherOffset);\\n }\\n\\n /*\\n * @dev Compares a range of 'self' to all of 'other' and returns True iff\\n * they are equal.\\n * @param self The first byte range to compare.\\n * @param offset The offset into the first byte range.\\n * @param other The second byte range to compare.\\n * @return True if the byte ranges are equal, false otherwise.\\n */\\n function equals(\\n bytes memory self,\\n uint256 offset,\\n bytes memory other\\n ) internal pure returns (bool) {\\n return\\n self.length == offset + other.length &&\\n equals(self, offset, other, 0, other.length);\\n }\\n\\n /*\\n * @dev Returns true if the two byte ranges are equal.\\n * @param self The first byte range to compare.\\n * @param other The second byte range to compare.\\n * @return True if the byte ranges are equal, false otherwise.\\n */\\n function equals(\\n bytes memory self,\\n bytes memory other\\n ) internal pure returns (bool) {\\n return\\n self.length == other.length &&\\n equals(self, 0, other, 0, self.length);\\n }\\n\\n /*\\n * @dev Returns the 8-bit number at the specified index of self.\\n * @param self The byte string.\\n * @param idx The index into the bytes\\n * @return The specified 8 bits of the string, interpreted as an integer.\\n */\\n function readUint8(\\n bytes memory self,\\n uint256 idx\\n ) internal pure returns (uint8 ret) {\\n return uint8(self[idx]);\\n }\\n\\n /*\\n * @dev Returns the 16-bit number at the specified index of self.\\n * @param self The byte string.\\n * @param idx The index into the bytes\\n * @return The specified 16 bits of the string, interpreted as an integer.\\n */\\n function readUint16(\\n bytes memory self,\\n uint256 idx\\n ) internal pure returns (uint16 ret) {\\n require(idx + 2 <= self.length);\\n assembly {\\n ret := and(mload(add(add(self, 2), idx)), 0xFFFF)\\n }\\n }\\n\\n /*\\n * @dev Returns the 32-bit number at the specified index of self.\\n * @param self The byte string.\\n * @param idx The index into the bytes\\n * @return The specified 32 bits of the string, interpreted as an integer.\\n */\\n function readUint32(\\n bytes memory self,\\n uint256 idx\\n ) internal pure returns (uint32 ret) {\\n require(idx + 4 <= self.length);\\n assembly {\\n ret := and(mload(add(add(self, 4), idx)), 0xFFFFFFFF)\\n }\\n }\\n\\n /*\\n * @dev Returns the 32 byte value at the specified index of self.\\n * @param self The byte string.\\n * @param idx The index into the bytes\\n * @return The specified 32 bytes of the string.\\n */\\n function readBytes32(\\n bytes memory self,\\n uint256 idx\\n ) internal pure returns (bytes32 ret) {\\n require(idx + 32 <= self.length);\\n assembly {\\n ret := mload(add(add(self, 32), idx))\\n }\\n }\\n\\n /*\\n * @dev Returns the 32 byte value at the specified index of self.\\n * @param self The byte string.\\n * @param idx The index into the bytes\\n * @return The specified 32 bytes of the string.\\n */\\n function readBytes20(\\n bytes memory self,\\n uint256 idx\\n ) internal pure returns (bytes20 ret) {\\n require(idx + 20 <= self.length);\\n assembly {\\n ret := and(\\n mload(add(add(self, 32), idx)),\\n 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000\\n )\\n }\\n }\\n\\n /*\\n * @dev Returns the n byte value at the specified index of self.\\n * @param self The byte string.\\n * @param idx The index into the bytes.\\n * @param len The number of bytes.\\n * @return The specified 32 bytes of the string.\\n */\\n function readBytesN(\\n bytes memory self,\\n uint256 idx,\\n uint256 len\\n ) internal pure returns (bytes32 ret) {\\n require(len <= 32);\\n require(idx + len <= self.length);\\n assembly {\\n let mask := not(sub(exp(256, sub(32, len)), 1))\\n ret := and(mload(add(add(self, 32), idx)), mask)\\n }\\n }\\n\\n function memcpy(uint256 dest, uint256 src, uint256 len) private pure {\\n // Copy word-length chunks while possible\\n for (; len >= 32; len -= 32) {\\n assembly {\\n mstore(dest, mload(src))\\n }\\n dest += 32;\\n src += 32;\\n }\\n\\n // Copy remaining bytes\\n unchecked {\\n uint256 mask = (256 ** (32 - len)) - 1;\\n assembly {\\n let srcpart := and(mload(src), not(mask))\\n let destpart := and(mload(dest), mask)\\n mstore(dest, or(destpart, srcpart))\\n }\\n }\\n }\\n\\n /*\\n * @dev Copies a substring into a new byte string.\\n * @param self The byte string to copy from.\\n * @param offset The offset to start copying at.\\n * @param len The number of bytes to copy.\\n */\\n function substring(\\n bytes memory self,\\n uint256 offset,\\n uint256 len\\n ) internal pure returns (bytes memory) {\\n require(offset + len <= self.length);\\n\\n bytes memory ret = new bytes(len);\\n uint256 dest;\\n uint256 src;\\n\\n assembly {\\n dest := add(ret, 32)\\n src := add(add(self, 32), offset)\\n }\\n memcpy(dest, src, len);\\n\\n return ret;\\n }\\n\\n // Maps characters from 0x30 to 0x7A to their base32 values.\\n // 0xFF represents invalid characters in that range.\\n bytes constant base32HexTable =\\n hex\\\"00010203040506070809FFFFFFFFFFFFFF0A0B0C0D0E0F101112131415161718191A1B1C1D1E1FFFFFFFFFFFFFFFFFFFFF0A0B0C0D0E0F101112131415161718191A1B1C1D1E1F\\\";\\n\\n /**\\n * @dev Decodes unpadded base32 data of up to one word in length.\\n * @param self The data to decode.\\n * @param off Offset into the string to start at.\\n * @param len Number of characters to decode.\\n * @return The decoded data, left aligned.\\n */\\n function base32HexDecodeWord(\\n bytes memory self,\\n uint256 off,\\n uint256 len\\n ) internal pure returns (bytes32) {\\n require(len <= 52);\\n\\n uint256 ret = 0;\\n uint8 decoded;\\n for (uint256 i = 0; i < len; i++) {\\n bytes1 char = self[off + i];\\n require(char >= 0x30 && char <= 0x7A);\\n decoded = uint8(base32HexTable[uint256(uint8(char)) - 0x30]);\\n require(decoded <= 0x20);\\n if (i == len - 1) {\\n break;\\n }\\n ret = (ret << 5) | decoded;\\n }\\n\\n uint256 bitlen = len * 5;\\n if (len % 8 == 0) {\\n // Multiple of 8 characters, no padding\\n ret = (ret << 5) | decoded;\\n } else if (len % 8 == 2) {\\n // Two extra characters - 1 byte\\n ret = (ret << 3) | (decoded >> 2);\\n bitlen -= 2;\\n } else if (len % 8 == 4) {\\n // Four extra characters - 2 bytes\\n ret = (ret << 1) | (decoded >> 4);\\n bitlen -= 4;\\n } else if (len % 8 == 5) {\\n // Five extra characters - 3 bytes\\n ret = (ret << 4) | (decoded >> 1);\\n bitlen -= 1;\\n } else if (len % 8 == 7) {\\n // Seven extra characters - 4 bytes\\n ret = (ret << 2) | (decoded >> 3);\\n bitlen -= 3;\\n } else {\\n revert();\\n }\\n\\n return bytes32(ret << (256 - bitlen));\\n }\\n\\n /**\\n * @dev Finds the first occurrence of the byte `needle` in `self`.\\n * @param self The string to search\\n * @param off The offset to start searching at\\n * @param len The number of bytes to search\\n * @param needle The byte to search for\\n * @return The offset of `needle` in `self`, or 2**256-1 if it was not found.\\n */\\n function find(\\n bytes memory self,\\n uint256 off,\\n uint256 len,\\n bytes1 needle\\n ) internal pure returns (uint256) {\\n for (uint256 idx = off; idx < off + len; idx++) {\\n if (self[idx] == needle) {\\n return idx;\\n }\\n }\\n return type(uint256).max;\\n }\\n}\\n\",\"keccak256\":\"0x4f10902639b85a17ae10745264feff322e793bfb1bc130a9a90efa7dda47c6cc\"},\"@ensdomains/ens-contracts/contracts/ethregistrar/IBaseRegistrar.sol\":{\"content\":\"import \\\"../registry/ENS.sol\\\";\\nimport \\\"./IBaseRegistrar.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\";\\n\\ninterface IBaseRegistrar is IERC721 {\\n event ControllerAdded(address indexed controller);\\n event ControllerRemoved(address indexed controller);\\n event NameMigrated(\\n uint256 indexed id,\\n address indexed owner,\\n uint256 expires\\n );\\n event NameRegistered(\\n uint256 indexed id,\\n address indexed owner,\\n uint256 expires\\n );\\n event NameRenewed(uint256 indexed id, uint256 expires);\\n\\n // Authorises a controller, who can register and renew domains.\\n function addController(address controller) external;\\n\\n // Revoke controller permission for an address.\\n function removeController(address controller) external;\\n\\n // Set the resolver for the TLD this registrar manages.\\n function setResolver(address resolver) external;\\n\\n // Returns the expiration timestamp of the specified label hash.\\n function nameExpires(uint256 id) external view returns (uint256);\\n\\n // Returns true if the specified name is available for registration.\\n function available(uint256 id) external view returns (bool);\\n\\n /**\\n * @dev Register a name.\\n */\\n function register(\\n uint256 id,\\n address owner,\\n uint256 duration\\n ) external returns (uint256);\\n\\n function renew(uint256 id, uint256 duration) external returns (uint256);\\n\\n /**\\n * @dev Reclaim ownership of a name in ENS, if you own it in the registrar.\\n */\\n function reclaim(uint256 id, address owner) external;\\n}\\n\",\"keccak256\":\"0x15f7b1dfa7cd34444daf79ec9b4d40437caa9257893ce0639d706fcc2ba69e52\"},\"@ensdomains/ens-contracts/contracts/registry/ENS.sol\":{\"content\":\"pragma solidity >=0.8.4;\\n\\ninterface ENS {\\n // Logged when the owner of a node assigns a new owner to a subnode.\\n event NewOwner(bytes32 indexed node, bytes32 indexed label, address owner);\\n\\n // Logged when the owner of a node transfers ownership to a new account.\\n event Transfer(bytes32 indexed node, address owner);\\n\\n // Logged when the resolver for a node changes.\\n event NewResolver(bytes32 indexed node, address resolver);\\n\\n // Logged when the TTL of a node changes\\n event NewTTL(bytes32 indexed node, uint64 ttl);\\n\\n // Logged when an operator is added or removed.\\n event ApprovalForAll(\\n address indexed owner,\\n address indexed operator,\\n bool approved\\n );\\n\\n function setRecord(\\n bytes32 node,\\n address owner,\\n address resolver,\\n uint64 ttl\\n ) external;\\n\\n function setSubnodeRecord(\\n bytes32 node,\\n bytes32 label,\\n address owner,\\n address resolver,\\n uint64 ttl\\n ) external;\\n\\n function setSubnodeOwner(\\n bytes32 node,\\n bytes32 label,\\n address owner\\n ) external returns (bytes32);\\n\\n function setResolver(bytes32 node, address resolver) external;\\n\\n function setOwner(bytes32 node, address owner) external;\\n\\n function setTTL(bytes32 node, uint64 ttl) external;\\n\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n function owner(bytes32 node) external view returns (address);\\n\\n function resolver(bytes32 node) external view returns (address);\\n\\n function ttl(bytes32 node) external view returns (uint64);\\n\\n function recordExists(bytes32 node) external view returns (bool);\\n\\n function isApprovedForAll(\\n address owner,\\n address operator\\n ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x7cb1158c7d268b63de1468e28e2711b28d686e2628ddb22da2149cd93ddeafda\"},\"@ensdomains/ens-contracts/contracts/resolvers/profiles/IAddrResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\n/**\\n * Interface for the legacy (ETH-only) addr function.\\n */\\ninterface IAddrResolver {\\n event AddrChanged(bytes32 indexed node, address a);\\n\\n /**\\n * Returns the address associated with an ENS node.\\n * @param node The ENS node to query.\\n * @return The associated address.\\n */\\n function addr(bytes32 node) external view returns (address payable);\\n}\\n\",\"keccak256\":\"0x2ad7f2fc60ebe0f93745fe70247f6a854f66af732483fda2a3c5e055614445e8\",\"license\":\"MIT\"},\"@ensdomains/ens-contracts/contracts/resolvers/profiles/IAddressResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\n/**\\n * Interface for the new (multicoin) addr function.\\n */\\ninterface IAddressResolver {\\n event AddressChanged(\\n bytes32 indexed node,\\n uint256 coinType,\\n bytes newAddress\\n );\\n\\n function addr(\\n bytes32 node,\\n uint256 coinType\\n ) external view returns (bytes memory);\\n}\\n\",\"keccak256\":\"0x411447c1e90c51e09702815a85ec725ffbbe37cf96e8cc4d2a8bd4ad8a59d73e\",\"license\":\"MIT\"},\"@ensdomains/ens-contracts/contracts/resolvers/profiles/IContentHashResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\ninterface IContentHashResolver {\\n event ContenthashChanged(bytes32 indexed node, bytes hash);\\n\\n /**\\n * Returns the contenthash associated with an ENS node.\\n * @param node The ENS node to query.\\n * @return The associated contenthash.\\n */\\n function contenthash(bytes32 node) external view returns (bytes memory);\\n}\\n\",\"keccak256\":\"0xd95cd77684ba5752c428d7dceb4ecc6506ac94f4fbb910489637eb68dcd8e366\",\"license\":\"MIT\"},\"@ensdomains/ens-contracts/contracts/resolvers/profiles/IExtendedResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.4;\\n\\ninterface IExtendedResolver {\\n function resolve(\\n bytes memory name,\\n bytes memory data\\n ) external view returns (bytes memory);\\n}\\n\",\"keccak256\":\"0x5d81521cfae7d9a4475d27533cd8ed0d3475d369eb0674fd90ffbdbdf292faa3\",\"license\":\"MIT\"},\"@ensdomains/ens-contracts/contracts/resolvers/profiles/ITextResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\ninterface ITextResolver {\\n event TextChanged(\\n bytes32 indexed node,\\n string indexed indexedKey,\\n string key,\\n string value\\n );\\n\\n /**\\n * Returns the text data associated with an ENS node and key.\\n * @param node The ENS node to query.\\n * @param key The text data key to query.\\n * @return The associated text data.\\n */\\n function text(\\n bytes32 node,\\n string calldata key\\n ) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x7c5debb3c42cd9f5de2274ea7aa053f238608314b62db441c40e31cea2543fd5\",\"license\":\"MIT\"},\"@ensdomains/ens-contracts/contracts/wrapper/IMetadataService.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ~0.8.17;\\n\\ninterface IMetadataService {\\n function uri(uint256) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xb3f1cf6df01ed7b15e5f2318f6823afbdb586ca38c2124c67955c645647ae9a2\",\"license\":\"MIT\"},\"@ensdomains/ens-contracts/contracts/wrapper/INameWrapper.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ~0.8.17;\\n\\nimport \\\"../registry/ENS.sol\\\";\\nimport \\\"../ethregistrar/IBaseRegistrar.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\\\";\\nimport \\\"./IMetadataService.sol\\\";\\nimport \\\"./INameWrapperUpgrade.sol\\\";\\n\\nuint32 constant CANNOT_UNWRAP = 1;\\nuint32 constant CANNOT_BURN_FUSES = 2;\\nuint32 constant CANNOT_TRANSFER = 4;\\nuint32 constant CANNOT_SET_RESOLVER = 8;\\nuint32 constant CANNOT_SET_TTL = 16;\\nuint32 constant CANNOT_CREATE_SUBDOMAIN = 32;\\nuint32 constant CANNOT_APPROVE = 64;\\n//uint16 reserved for parent controlled fuses from bit 17 to bit 32\\nuint32 constant PARENT_CANNOT_CONTROL = 1 << 16;\\nuint32 constant IS_DOT_ETH = 1 << 17;\\nuint32 constant CAN_EXTEND_EXPIRY = 1 << 18;\\nuint32 constant CAN_DO_EVERYTHING = 0;\\nuint32 constant PARENT_CONTROLLED_FUSES = 0xFFFF0000;\\n// all fuses apart from IS_DOT_ETH\\nuint32 constant USER_SETTABLE_FUSES = 0xFFFDFFFF;\\n\\ninterface INameWrapper is IERC1155 {\\n event NameWrapped(\\n bytes32 indexed node,\\n bytes name,\\n address owner,\\n uint32 fuses,\\n uint64 expiry\\n );\\n\\n event NameUnwrapped(bytes32 indexed node, address owner);\\n\\n event FusesSet(bytes32 indexed node, uint32 fuses);\\n event ExpiryExtended(bytes32 indexed node, uint64 expiry);\\n\\n function ens() external view returns (ENS);\\n\\n function registrar() external view returns (IBaseRegistrar);\\n\\n function metadataService() external view returns (IMetadataService);\\n\\n function names(bytes32) external view returns (bytes memory);\\n\\n function name() external view returns (string memory);\\n\\n function upgradeContract() external view returns (INameWrapperUpgrade);\\n\\n function supportsInterface(bytes4 interfaceID) external view returns (bool);\\n\\n function wrap(\\n bytes calldata name,\\n address wrappedOwner,\\n address resolver\\n ) external;\\n\\n function wrapETH2LD(\\n string calldata label,\\n address wrappedOwner,\\n uint16 ownerControlledFuses,\\n address resolver\\n ) external returns (uint64 expires);\\n\\n function registerAndWrapETH2LD(\\n string calldata label,\\n address wrappedOwner,\\n uint256 duration,\\n address resolver,\\n uint16 ownerControlledFuses\\n ) external returns (uint256 registrarExpiry);\\n\\n function renew(\\n uint256 labelHash,\\n uint256 duration\\n ) external returns (uint256 expires);\\n\\n function unwrap(bytes32 node, bytes32 label, address owner) external;\\n\\n function unwrapETH2LD(\\n bytes32 label,\\n address newRegistrant,\\n address newController\\n ) external;\\n\\n function upgrade(bytes calldata name, bytes calldata extraData) external;\\n\\n function setFuses(\\n bytes32 node,\\n uint16 ownerControlledFuses\\n ) external returns (uint32 newFuses);\\n\\n function setChildFuses(\\n bytes32 parentNode,\\n bytes32 labelhash,\\n uint32 fuses,\\n uint64 expiry\\n ) external;\\n\\n function setSubnodeRecord(\\n bytes32 node,\\n string calldata label,\\n address owner,\\n address resolver,\\n uint64 ttl,\\n uint32 fuses,\\n uint64 expiry\\n ) external returns (bytes32);\\n\\n function setRecord(\\n bytes32 node,\\n address owner,\\n address resolver,\\n uint64 ttl\\n ) external;\\n\\n function setSubnodeOwner(\\n bytes32 node,\\n string calldata label,\\n address newOwner,\\n uint32 fuses,\\n uint64 expiry\\n ) external returns (bytes32);\\n\\n function extendExpiry(\\n bytes32 node,\\n bytes32 labelhash,\\n uint64 expiry\\n ) external returns (uint64);\\n\\n function canModifyName(\\n bytes32 node,\\n address addr\\n ) external view returns (bool);\\n\\n function setResolver(bytes32 node, address resolver) external;\\n\\n function setTTL(bytes32 node, uint64 ttl) external;\\n\\n function ownerOf(uint256 id) external view returns (address owner);\\n\\n function approve(address to, uint256 tokenId) external;\\n\\n function getApproved(uint256 tokenId) external view returns (address);\\n\\n function getData(\\n uint256 id\\n ) external view returns (address, uint32, uint64);\\n\\n function setMetadataService(IMetadataService _metadataService) external;\\n\\n function uri(uint256 tokenId) external view returns (string memory);\\n\\n function setUpgradeContract(INameWrapperUpgrade _upgradeAddress) external;\\n\\n function allFusesBurned(\\n bytes32 node,\\n uint32 fuseMask\\n ) external view returns (bool);\\n\\n function isWrapped(bytes32) external view returns (bool);\\n\\n function isWrapped(bytes32, bytes32) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x70310eb67146d7290731c31841399640ac3b6a949eadc6598bc150123d185c57\",\"license\":\"MIT\"},\"@ensdomains/ens-contracts/contracts/wrapper/INameWrapperUpgrade.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ~0.8.17;\\n\\ninterface INameWrapperUpgrade {\\n function wrapFromUpgrade(\\n bytes calldata name,\\n address wrappedOwner,\\n uint32 fuses,\\n uint64 expiry,\\n address approved,\\n bytes calldata extraData\\n ) external;\\n}\\n\",\"keccak256\":\"0x42e0cec6cd9d1a62d51d45b678f69d3e4ad5555e659b197e41257b308346bb8a\",\"license\":\"MIT\"},\"@ensdomains/evm-verifier/contracts/EVMFetchTarget.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.17;\\n\\nimport { IEVMVerifier } from './IEVMVerifier.sol';\\nimport { Address } from '@openzeppelin/contracts/utils/Address.sol';\\n\\n/**\\n * @dev Callback implementation for users of `EVMFetcher`. If you use `EVMFetcher`, your contract must\\n * inherit from this contract in order to handle callbacks correctly.\\n */\\nabstract contract EVMFetchTarget {\\n using Address for address;\\n\\n error ResponseLengthMismatch(uint256 actual, uint256 expected);\\n\\n /**\\n * @dev Internal callback function invoked by CCIP-Read in response to a `getStorageSlots` request.\\n */\\n function getStorageSlotsCallback(bytes calldata response, bytes calldata extradata) external {\\n bytes memory proof = abi.decode(response, (bytes));\\n (IEVMVerifier verifier, address addr, bytes32[] memory commands, bytes[] memory constants, bytes4 callback, bytes memory callbackData) =\\n abi.decode(extradata, (IEVMVerifier, address, bytes32[], bytes[], bytes4, bytes));\\n bytes[] memory values = verifier.getStorageValues(addr, commands, constants, proof);\\n if(values.length != commands.length) {\\n revert ResponseLengthMismatch(values.length, commands.length);\\n }\\n bytes memory ret = address(this).functionCall(abi.encodeWithSelector(callback, values, callbackData));\\n assembly {\\n return(add(ret, 32), mload(ret))\\n }\\n }\\n}\\n\",\"keccak256\":\"0x4653f974a897ce78b7bc3779ba0bb7767df99add49de4f0e9089399f47bb5942\",\"license\":\"MIT\"},\"@ensdomains/evm-verifier/contracts/EVMFetcher.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.17;\\n\\nimport { IEVMVerifier } from './IEVMVerifier.sol';\\nimport { EVMFetchTarget } from './EVMFetchTarget.sol';\\nimport { Address } from '@openzeppelin/contracts/utils/Address.sol';\\n\\ninterface IEVMGateway {\\n function getStorageSlots(address addr, bytes32[] memory commands, bytes[] memory constants) external pure returns(bytes memory witness);\\n}\\n\\nuint8 constant FLAG_DYNAMIC = 0x01;\\nuint8 constant OP_CONSTANT = 0x00;\\nuint8 constant OP_BACKREF = 0x20;\\nuint8 constant OP_END = 0xff;\\n\\n/**\\n * @dev A library to facilitate requesting storage data proofs from contracts, possibly on a different chain.\\n * See l1-verifier/test/TestL1.sol for example usage.\\n */\\nlibrary EVMFetcher {\\n uint256 constant MAX_COMMANDS = 32;\\n uint256 constant MAX_CONSTANTS = 32; // Must not be greater than 32\\n\\n using Address for address;\\n\\n error TooManyCommands(uint256 max);\\n error CommandTooLong();\\n error InvalidReference(uint256 value, uint256 max);\\n error OffchainLookup(address sender, string[] urls, bytes callData, bytes4 callbackFunction, bytes extraData);\\n\\n struct EVMFetchRequest {\\n IEVMVerifier verifier;\\n address target;\\n bytes32[] commands;\\n uint256 operationIdx;\\n bytes[] constants;\\n }\\n\\n /**\\n * @dev Creates a request to fetch the value of multiple storage slots from a contract via CCIP-Read, possibly from\\n * another chain.\\n * Supports dynamic length values and slot numbers derived from other retrieved values.\\n * @param verifier An instance of a verifier contract that can provide and verify the storage slot information.\\n * @param target The address of the contract to fetch storage proofs for.\\n */\\n function newFetchRequest(IEVMVerifier verifier, address target) internal pure returns (EVMFetchRequest memory) {\\n bytes32[] memory commands = new bytes32[](MAX_COMMANDS);\\n bytes[] memory constants = new bytes[](MAX_CONSTANTS);\\n assembly {\\n mstore(commands, 0) // Set current array length to 0\\n mstore(constants, 0)\\n } \\n return EVMFetchRequest(verifier, target, commands, 0, constants);\\n }\\n\\n /**\\n * @dev Starts describing a new fetch request.\\n * Paths specify a series of hashing operations to derive the final slot ID.\\n * See https://docs.soliditylang.org/en/v0.8.17/internals/layout_in_storage.html for details on how Solidity\\n * lays out storage variables.\\n * @param request The request object being operated on.\\n * @param baseSlot The base slot ID that forms the root of the path.\\n */\\n function getStatic(EVMFetchRequest memory request, uint256 baseSlot) internal pure returns (EVMFetchRequest memory) {\\n bytes32[] memory commands = request.commands;\\n uint256 commandIdx = commands.length;\\n if(commandIdx > 0 && request.operationIdx < 32) {\\n // Terminate previous command\\n _addOperation(request, OP_END);\\n }\\n assembly {\\n mstore(commands, add(commandIdx, 1)) // Increment command array length\\n }\\n if(request.commands.length > MAX_COMMANDS) {\\n revert TooManyCommands(MAX_COMMANDS);\\n }\\n request.operationIdx = 0;\\n _addOperation(request, 0);\\n _addOperation(request, _addConstant(request, abi.encode(baseSlot)));\\n return request;\\n }\\n\\n /**\\n * @dev Starts describing a new fetch request.\\n * Paths specify a series of hashing operations to derive the final slot ID.\\n * See https://docs.soliditylang.org/en/v0.8.17/internals/layout_in_storage.html for details on how Solidity\\n * lays out storage variables.\\n * @param request The request object being operated on.\\n * @param baseSlot The base slot ID that forms the root of the path.\\n */\\n function getDynamic(EVMFetchRequest memory request, uint256 baseSlot) internal pure returns (EVMFetchRequest memory) {\\n bytes32[] memory commands = request.commands;\\n uint256 commandIdx = commands.length;\\n if(commandIdx > 0 && request.operationIdx < 32) {\\n // Terminate previous command\\n _addOperation(request, OP_END);\\n }\\n assembly {\\n mstore(commands, add(commandIdx, 1)) // Increment command array length\\n }\\n if(request.commands.length > MAX_COMMANDS) {\\n revert TooManyCommands(MAX_COMMANDS);\\n }\\n request.operationIdx = 0;\\n _addOperation(request, FLAG_DYNAMIC);\\n _addOperation(request, _addConstant(request, abi.encode(baseSlot)));\\n return request;\\n }\\n\\n /**\\n * @dev Adds a `uint256` element to the current path.\\n * @param request The request object being operated on.\\n * @param el The element to add.\\n */\\n function element(EVMFetchRequest memory request, uint256 el) internal pure returns (EVMFetchRequest memory) {\\n if(request.operationIdx >= 32) {\\n revert CommandTooLong();\\n }\\n _addOperation(request, _addConstant(request, abi.encode(el)));\\n return request;\\n }\\n\\n /**\\n * @dev Adds a `bytes32` element to the current path.\\n * @param request The request object being operated on.\\n * @param el The element to add.\\n */\\n function element(EVMFetchRequest memory request, bytes32 el) internal pure returns (EVMFetchRequest memory) {\\n if(request.operationIdx >= 32) {\\n revert CommandTooLong();\\n }\\n _addOperation(request, _addConstant(request, abi.encode(el)));\\n return request;\\n }\\n\\n /**\\n * @dev Adds an `address` element to the current path.\\n * @param request The request object being operated on.\\n * @param el The element to add.\\n */\\n function element(EVMFetchRequest memory request, address el) internal pure returns (EVMFetchRequest memory) {\\n if(request.operationIdx >= 32) {\\n revert CommandTooLong();\\n }\\n _addOperation(request, _addConstant(request, abi.encode(el)));\\n return request;\\n }\\n\\n /**\\n * @dev Adds a `bytes` element to the current path.\\n * @param request The request object being operated on.\\n * @param el The element to add.\\n */\\n function element(EVMFetchRequest memory request, bytes memory el) internal pure returns (EVMFetchRequest memory) {\\n if(request.operationIdx >= 32) {\\n revert CommandTooLong();\\n }\\n _addOperation(request, _addConstant(request, el));\\n return request;\\n }\\n\\n /**\\n * @dev Adds a `string` element to the current path.\\n * @param request The request object being operated on.\\n * @param el The element to add.\\n */\\n function element(EVMFetchRequest memory request, string memory el) internal pure returns (EVMFetchRequest memory) {\\n if(request.operationIdx >= 32) {\\n revert CommandTooLong();\\n }\\n _addOperation(request, _addConstant(request, bytes(el)));\\n return request;\\n }\\n\\n /**\\n * @dev Adds a reference to a previous fetch to the current path.\\n * @param request The request object being operated on.\\n * @param idx The index of the previous fetch request, starting at 0.\\n */\\n function ref(EVMFetchRequest memory request, uint8 idx) internal pure returns (EVMFetchRequest memory) {\\n if(request.operationIdx >= 32) {\\n revert CommandTooLong();\\n }\\n if(idx > request.commands.length || idx > 31) {\\n revert InvalidReference(idx, request.commands.length);\\n }\\n _addOperation(request, OP_BACKREF | idx);\\n return request;\\n }\\n\\n /**\\n * @dev Initiates the fetch request.\\n * Calling this function terminates execution; clients that implement CCIP-Read will make a callback to\\n * `callback` with the results of the operation.\\n * @param callbackId A callback function selector on this contract that will be invoked via CCIP-Read with the result of the lookup.\\n * The function must have a signature matching `(bytes[] memory values, bytes callbackData)` with a return type matching the call in which\\n * this function was invoked. Its return data will be returned as the return value of the entire CCIP-read operation.\\n * @param callbackData Extra data to supply to the callback.\\n */\\n function fetch(EVMFetchRequest memory request, bytes4 callbackId, bytes memory callbackData) internal view {\\n if(request.commands.length > 0 && request.operationIdx < 32) {\\n // Terminate last command\\n _addOperation(request, OP_END);\\n }\\n revert OffchainLookup(\\n address(this),\\n request.verifier.gatewayURLs(),\\n abi.encodeCall(IEVMGateway.getStorageSlots, (request.target, request.commands, request.constants)),\\n EVMFetchTarget.getStorageSlotsCallback.selector,\\n abi.encode(request.verifier, request.target, request.commands, request.constants, callbackId, callbackData)\\n );\\n }\\n\\n function _addConstant(EVMFetchRequest memory request, bytes memory value) private pure returns(uint8 idx) {\\n bytes[] memory constants = request.constants;\\n idx = uint8(constants.length);\\n assembly {\\n mstore(constants, add(idx, 1)) // Increment constant array length\\n }\\n constants[idx] = value;\\n }\\n\\n function _addOperation(EVMFetchRequest memory request, uint8 op) private pure {\\n uint256 commandIdx = request.commands.length - 1;\\n request.commands[commandIdx] = request.commands[commandIdx] | (bytes32(bytes1(op)) >> (8 * request.operationIdx++));\\n }\\n}\\n\",\"keccak256\":\"0x5a6a955ebf3e6da9ce8d39e2729c35e4e800426025954a9a9777c209447ff8b4\",\"license\":\"MIT\"},\"@ensdomains/evm-verifier/contracts/IEVMVerifier.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.17;\\n\\ninterface IEVMVerifier {\\n function gatewayURLs() external view returns(string[] memory);\\n function getStorageValues(address target, bytes32[] memory commands, bytes[] memory constants, bytes memory proof) external view returns(bytes[] memory values);\\n}\\n\",\"keccak256\":\"0x30a635309aeebbde83774010eea5e975b8e73d1932140457121eefdce7792d72\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/IERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155 is IERC165 {\\n /**\\n * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\\n */\\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\\n\\n /**\\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\\n * transfers.\\n */\\n event TransferBatch(\\n address indexed operator,\\n address indexed from,\\n address indexed to,\\n uint256[] ids,\\n uint256[] values\\n );\\n\\n /**\\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\\n * `approved`.\\n */\\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\\n\\n /**\\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\\n *\\n * If an {URI} event was emitted for `id`, the standard\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\\n * returned by {IERC1155MetadataURI-uri}.\\n */\\n event URI(string value, uint256 indexed id);\\n\\n /**\\n * @dev Returns the amount of tokens of token type `id` owned by `account`.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function balanceOf(address account, uint256 id) external view returns (uint256);\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\\n *\\n * Requirements:\\n *\\n * - `accounts` and `ids` must have the same length.\\n */\\n function balanceOfBatch(\\n address[] calldata accounts,\\n uint256[] calldata ids\\n ) external view returns (uint256[] memory);\\n\\n /**\\n * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\\n *\\n * Emits an {ApprovalForAll} event.\\n *\\n * Requirements:\\n *\\n * - `operator` cannot be the caller.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\\n *\\n * See {setApprovalForAll}.\\n */\\n function isApprovedForAll(address account, address operator) external view returns (bool);\\n\\n /**\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external;\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] calldata ids,\\n uint256[] calldata amounts,\\n bytes calldata data\\n ) external;\\n}\\n\",\"keccak256\":\"0xcab667ddad478ff0d39c2053ca77fac778af8483c18ab07d810277b4216fd582\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721 is IERC165 {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721\\n * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must\\n * understand this adds an external call which potentially creates a reentrancy vulnerability.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x5bce51e11f7d194b79ea59fe00c9e8de9fa2c5530124960f29a24d4c740a3266\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"contracts/IMetadataResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.17;\\n\\ninterface IMetadataResolver {\\n /*\\n * @notice Get metadata about the CCIP Resolver ENSIP 16 https://docs.ens.domains/ens-improvement-proposals/ensip-16-offchain-metadata\\n * @dev This function provides metadata about the CCIP Resolver, including its name, coin type, GraphQL URL, storage type, and encoded information.\\n * @param name The domain name in format (dnsEncoded)\\n * @return coinType The cointype of the chain the target contract locates such as Optimism, Base, Arb, etc\\n * @return graphqlUrl The GraphQL URL used by the resolver\\n * @return storageType 0 = EVM, 1 = Non blockchain, 2 = Starknet\\n * @return storageLocation The storage identifier. For EVM chains, this is the address of the resolver contract.\\n * @return context. An identifier used by l2 graph indexer for Domain schema id (`context-namehash`) allowing multiple resolver contracts to have own namespace.\\n *\\n */\\n function metadata(bytes calldata name) external view returns (\\n uint256 coinType,\\n string memory graphqlUrl,\\n uint8 storageType,\\n bytes memory storageLocation,\\n bytes memory context\\n );\\n\\n event MetadataChanged(\\n bytes name,\\n uint256 coinType,\\n string graphqlUrl,\\n uint8 storageType,\\n bytes storageLocation,\\n bytes context\\n );\\n}\",\"keccak256\":\"0xf3af5325514001ff150399986839a1402c4aef5f332f8639a5756bb9dbcd5b05\",\"license\":\"MIT\"},\"contracts/ITargetResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.17;\\n\\ninterface ITargetResolver{\\n function getTarget(\\n bytes memory name\\n ) external view returns (bytes32 node, address target);\\n}\\n\",\"keccak256\":\"0x309bfb692d77b29eb9bfeccc55f0fc7cebdade75adb299d7e1afe1f007be0a11\",\"license\":\"MIT\"},\"contracts/L1Resolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.17;\\n\\nimport {EVMFetcher} from '@ensdomains/evm-verifier/contracts/EVMFetcher.sol';\\nimport {EVMFetchTarget} from '@ensdomains/evm-verifier/contracts/EVMFetchTarget.sol';\\nimport {IEVMVerifier} from '@ensdomains/evm-verifier/contracts/IEVMVerifier.sol';\\nimport \\\"@ensdomains/ens-contracts/contracts/registry/ENS.sol\\\";\\nimport {INameWrapper} from \\\"@ensdomains/ens-contracts/contracts/wrapper/INameWrapper.sol\\\";\\nimport {BytesUtils} from \\\"@ensdomains/ens-contracts/contracts/dnssec-oracle/BytesUtils.sol\\\";\\nimport {IAddrResolver} from \\\"@ensdomains/ens-contracts/contracts/resolvers/profiles/IAddrResolver.sol\\\";\\nimport {IAddressResolver} from \\\"@ensdomains/ens-contracts/contracts/resolvers/profiles/IAddressResolver.sol\\\";\\nimport {ITextResolver} from \\\"@ensdomains/ens-contracts/contracts/resolvers/profiles/ITextResolver.sol\\\";\\nimport {IContentHashResolver} from \\\"@ensdomains/ens-contracts/contracts/resolvers/profiles/IContentHashResolver.sol\\\";\\nimport \\\"@ensdomains/ens-contracts/contracts/resolvers/profiles/IExtendedResolver.sol\\\";\\nimport {ITargetResolver} from './ITargetResolver.sol';\\nimport {IMetadataResolver} from './IMetadataResolver.sol';\\nimport \\\"@openzeppelin/contracts/utils/introspection/ERC165.sol\\\";\\n\\ncontract L1Resolver is EVMFetchTarget, ITargetResolver, IMetadataResolver, IExtendedResolver, ERC165 {\\n using EVMFetcher for EVMFetcher.EVMFetchRequest;\\n using BytesUtils for bytes;\\n IEVMVerifier public immutable verifier;\\n ENS public immutable ens;\\n INameWrapper public immutable nameWrapper;\\n mapping(bytes32 => address) targets;\\n uint256 constant COIN_TYPE_ETH = 60;\\n uint256 constant RECORD_VERSIONS_SLOT = 0;\\n uint256 constant VERSIONABLE_ADDRESSES_SLOT = 2;\\n uint256 constant VERSIONABLE_HASHES_SLOT = 3;\\n uint256 constant VERSIONABLE_TEXTS_SLOT = 10;\\n string public graphqlUrl;\\n uint256 public l2ResolverCoinType;\\n\\n event TargetSet(bytes name, address target);\\n function isAuthorised(bytes32 node) internal view returns (bool) {\\n // TODO: Add support for\\n // trustedETHController\\n // trustedReverseRegistrar\\n // isApprovedForAll\\n // isApprovedFor\\n address owner = ens.owner(node);\\n if (owner == address(nameWrapper)) {\\n owner = nameWrapper.ownerOf(uint256(node));\\n }\\n return owner == msg.sender;\\n }\\n\\n /**\\n * @param _verifier The chain verifier address\\n * @param _ens The ENS registry address\\n * @param _nameWrapper The ENS name wrapper address\\n * @param _graphqlUrl The offchain/l2 graphql endpoint url\\n * @param _l2ResolverCoinType The chainId at which the resolver resolves data from. 0 if storageLocation is offChain\\n */\\n constructor(\\n IEVMVerifier _verifier,\\n ENS _ens,\\n INameWrapper _nameWrapper,\\n string memory _graphqlUrl,\\n uint256 _l2ResolverCoinType\\n ){\\n require(address(_nameWrapper) != address(0), \\\"Name Wrapper address must be set\\\");\\n require(address(_verifier) != address(0), \\\"Verifier address must be set\\\");\\n require(address(_ens) != address(0), \\\"Registry address must be set\\\");\\n verifier = _verifier;\\n ens = _ens;\\n nameWrapper = _nameWrapper;\\n graphqlUrl = _graphqlUrl;\\n l2ResolverCoinType = _l2ResolverCoinType;\\n }\\n\\n /**\\n * Set target address to verify aagainst\\n * @param name The encoded name to query.\\n * @param target The L2 resolver address to verify against.\\n */\\n function setTarget(bytes calldata name, address target) public {\\n (bytes32 node,) = getTarget(name);\\n require(isAuthorised(node));\\n targets[node] = target;\\n emit TargetSet(name, target);\\n (\\n ,,\\n uint8 storageType,\\n bytes memory storageLocation,\\n bytes memory context\\n ) = metadata(name);\\n emit MetadataChanged(\\n name,\\n l2ResolverCoinType,\\n graphqlUrl,\\n storageType,\\n storageLocation,\\n context\\n );\\n }\\n\\n /**\\n * @dev Returns the L2 target address that can answer queries for `name`.\\n * @param name DNS encoded ENS name to query\\n * @return node The node of the name\\n * @return target The L2 resolver address to verify against.\\n */\\n function getTarget(\\n bytes memory name\\n ) public view returns (bytes32 node, address target) {\\n return _getTarget(name, 0);\\n }\\n\\n function _getTarget(\\n bytes memory name,\\n uint256 offset\\n ) private view returns (bytes32 node, address target) {\\n uint256 len = name.readUint8(offset);\\n node = bytes32(0);\\n if (len > 0) {\\n bytes32 label = name.keccak(offset + 1, len);\\n (node, target) = _getTarget(\\n name,\\n offset + len + 1\\n );\\n node = keccak256(abi.encodePacked(node, label));\\n if(targets[node] != address(0)){\\n return (\\n node,\\n targets[node]\\n );\\n }\\n } else {\\n return (\\n bytes32(0),\\n address(0)\\n );\\n }\\n return (node, target);\\n }\\n\\n /** \\n * @dev Resolve and verify a record stored in l2 target address. It supports subname by fetching target recursively to the nearlest parent.\\n * @param name DNS encoded ENS name to query\\n * @param data The actual calldata\\n * @return result result of the call\\n */\\n function resolve(bytes calldata name, bytes calldata data) external view returns (bytes memory result) {\\n (, address target) = _getTarget(name, 0);\\n bytes4 selector = bytes4(data);\\n\\n if (selector == IAddrResolver.addr.selector) {\\n (bytes32 node) = abi.decode(data[4:], (bytes32));\\n return _addr(node, target);\\n }\\n if (selector == IAddressResolver.addr.selector) {\\n (bytes32 node, uint256 cointype) = abi.decode(data[4:], (bytes32, uint256));\\n return _addr(node, cointype, target);\\n }\\n if (selector == ITextResolver.text.selector) {\\n (bytes32 node, string memory key) = abi.decode(data[4:], (bytes32, string));\\n return bytes(_text(node, key, target));\\n }\\n if (selector == IContentHashResolver.contenthash.selector) {\\n (bytes32 node) = abi.decode(data[4:], (bytes32));\\n return _contenthash(node, target);\\n }\\n }\\n\\n function _addr(bytes32 node, address target) private view returns (bytes memory) {\\n EVMFetcher.newFetchRequest(verifier, target)\\n .getStatic(RECORD_VERSIONS_SLOT)\\n .element(node)\\n .getDynamic(VERSIONABLE_ADDRESSES_SLOT)\\n .ref(0)\\n .element(node)\\n .element(COIN_TYPE_ETH)\\n .fetch(this.addrCallback.selector, ''); // recordVersions\\n }\\n\\n function addrCallback(\\n bytes[] memory values,\\n bytes memory\\n ) public pure returns (bytes memory) {\\n return abi.encode(address(bytes20(values[1])));\\n }\\n\\n function _addr(\\n bytes32 node,\\n uint256 coinType,\\n address target\\n ) private view returns (bytes memory) {\\n EVMFetcher.newFetchRequest(verifier, target)\\n .getStatic(RECORD_VERSIONS_SLOT)\\n .element(node)\\n .getDynamic(VERSIONABLE_ADDRESSES_SLOT)\\n .ref(0)\\n .element(node)\\n .element(coinType)\\n .fetch(this.addrCoinTypeCallback.selector, '');\\n }\\n\\n function addrCoinTypeCallback(\\n bytes[] memory values,\\n bytes memory\\n ) public pure returns (bytes memory) {\\n return abi.encode(values[1]);\\n }\\n\\n function _text(\\n bytes32 node,\\n string memory key,\\n address target\\n ) private view returns (bytes memory) {\\n EVMFetcher.newFetchRequest(verifier, target)\\n .getStatic(RECORD_VERSIONS_SLOT)\\n .element(node)\\n .getDynamic(VERSIONABLE_TEXTS_SLOT)\\n .ref(0)\\n .element(node)\\n .element(key)\\n .fetch(this.textCallback.selector, '');\\n }\\n\\n function textCallback(\\n bytes[] memory values,\\n bytes memory\\n ) public pure returns (bytes memory) {\\n return abi.encode(string(values[1]));\\n }\\n\\n function _contenthash(bytes32 node, address target) private view returns (bytes memory) {\\n EVMFetcher.newFetchRequest(verifier, target)\\n .getStatic(RECORD_VERSIONS_SLOT)\\n .element(node)\\n .getDynamic(VERSIONABLE_HASHES_SLOT)\\n .ref(0)\\n .element(node)\\n .fetch(this.contenthashCallback.selector, '');\\n }\\n\\n function contenthashCallback(\\n bytes[] memory values,\\n bytes memory\\n ) public pure returns (bytes memory) {\\n return abi.encode(values[1]);\\n }\\n\\n /**\\n * @notice Get metadata about the L1 Resolver\\n * @dev This function provides metadata about the L1 Resolver, including its name, coin type, GraphQL URL, storage type, and encoded information.\\n * @param name The domain name in format (dnsEncoded)\\n * @return coinType The cointype of the chain the target contract locates such as Optimism, Base, Arb, etc\\n * @return graphqlUrl The GraphQL URL used by the resolver\\n * @return storageType Storage Type (0 for EVM)\\n * @return storageLocation The storage identifier. For EVM chains, this is the address of the resolver contract.\\n * @return context. An identifier used by l2 graph indexer for Domain schema id (`context-namehash`) allowing multiple resolver contracts to have own namespace.\\n */\\n function metadata(\\n bytes calldata name\\n ) public view returns (uint256, string memory, uint8, bytes memory, bytes memory) {\\n (, address target) = getTarget(name);\\n\\n return (\\n l2ResolverCoinType,\\n graphqlUrl,\\n uint8(0), // storage Type 0 => EVM\\n abi.encodePacked(address(target)), // storage location => l2 resolver address\\n abi.encodePacked(address(target)) // context => l2 resolver address\\n );\\n }\\n\\n function supportsInterface(\\n bytes4 interfaceId\\n ) public override view returns (bool) {\\n return\\n interfaceId == type(IExtendedResolver).interfaceId ||\\n interfaceId == type(ITargetResolver).interfaceId ||\\n interfaceId == type(IMetadataResolver).interfaceId ||\\n super.supportsInterface(interfaceId);\\n }\\n}\\n\",\"keccak256\":\"0xf20f2a39c87e0bcdd6c59552a73f012b420115d7a7a589241b899dfe94520cf9\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60e0604052346200039d576200287f80380390816200001e81620003a2565b91823960a08183810103126200039d5780516001600160a01b039182821682036200039d57602081015183811681036200039d5760408201519084821682036200039d576060830151936001600160401b0385116200039d57601f93878101858783010112156200039d57808601516001600160401b038111620002a257601f1996620000b28288018916602001620003a2565b99828b5283016020838386010101116200039d5760005b82811062000386575050600090890160200152608001519583811615620003425780821615620002fd57821615620002b85760805260a05260c0528351906001600160401b038211620002a25760019283548481811c9116801562000297575b6020821014620002815782811162000234575b506020918311600114620001d0575081929394600092620001c4575b5050600019600383901b1c191690821b1790555b6002556040516124b69081620003c982396080518181816103a401528181611557015281816120f8015281816122490152612330015260a0518181816105cc0152610b6e015260c051818181610aac0152610ba30152f35b01519050388062000158565b8216908360005260206000209160005b8181106200021d575095838596971062000203575b505050811b0190556200016c565b015160001960f88460031b161c19169055388080620001f5565b8783015184559285019260209283019201620001e0565b8460005260206000208380860160051c8201926020871062000277575b0160051c019085905b8281106200026a5750506200013c565b600081550185906200025a565b9250819262000251565b634e487b7160e01b600052602260045260246000fd5b90607f169062000129565b634e487b7160e01b600052604160045260246000fd5b60405162461bcd60e51b815260206004820152601c60248201527f52656769737472792061646472657373206d75737420626520736574000000006044820152606490fd5b60405162461bcd60e51b815260206004820152601c60248201527f56657269666965722061646472657373206d75737420626520736574000000006044820152606490fd5b606460405162461bcd60e51b815260206004820152602060248201527f4e616d6520577261707065722061646472657373206d757374206265207365746044820152fd5b602082850182018101518c830182015201620000c9565b600080fd5b6040519190601f01601f191682016001600160401b03811183821017620002a25760405256fe6080604052600436101561001257600080fd5b60003560e01c806301ffc9a7146100fd57806315f64386146100f85780632b7ac3f3146100f357806338bf92e6146100c15780633f15457f146100ee5780634062b43f146100e95780635bdaa916146100e45780637e6215ba146100df5780638a596ebe146100da5780639061b923146100d5578063a8e5fbc0146100d0578063d358df77146100cb578063de9abe5e146100c1578063f470901a146100c65763fcd2e381146100c157600080fd5b610544565b610da4565b610ae1565b610a8c565b610942565b6108bc565b61089e565b610771565b6106cd565b6105ac565b610384565b610330565b61011c565b35906001600160e01b03198216820361011757565b600080fd5b34610117576020366003190112610117576004356001600160e01b0319811680910361011757807f9061b92300000000000000000000000000000000000000000000000000000000602092149081156101dd575b81156101b3575b8115610189575b506040519015158152f35b7f01ffc9a7000000000000000000000000000000000000000000000000000000009150143861017e565b7f8a596ebe0000000000000000000000000000000000000000000000000000000081149150610177565b7f15f643860000000000000000000000000000000000000000000000000000000081149150610170565b634e487b7160e01b600052604160045260246000fd5b6040810190811067ffffffffffffffff82111761023957604052565b610207565b6020810190811067ffffffffffffffff82111761023957604052565b610420810190811067ffffffffffffffff82111761023957604052565b90601f8019910116810190811067ffffffffffffffff82111761023957604052565b67ffffffffffffffff811161023957601f01601f191660200190565b9291926102c182610299565b916102cf6040519384610277565b829481845281830111610117578281602093846000960137010152565b9080601f8301121561011757816020610307933591016102b5565b90565b9060208282031261011757813567ffffffffffffffff81116101175761030792016102ec565b346101175760203660031901126101175760043567ffffffffffffffff8111610117576001600160a01b03610375600061037060409436906004016102ec565b611398565b83519182529091166020820152f35b346101175760003660031901126101175760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b67ffffffffffffffff81116102395760051b60200190565b9080601f83011215610117578135906103f8826103c8565b926104066040519485610277565b828452602092838086019160051b8301019280841161011757848301915b8483106104345750505050505090565b823567ffffffffffffffff8111610117578691610456848480948901016102ec565b815201920191610424565b9060406003198301126101175767ffffffffffffffff600435818111610117578361048e916004016103e0565b9260243591821161011757610307916004016102ec565b60005b8381106104b85750506000910152565b81810151838201526020016104a8565b906020916104e1815180928185528580860191016104a5565b601f01601f1916010190565b90602091828152606051808483015260005b818110610520575060409293506000838284010152601f8019910116010190565b60808101518382016040015284016104ff565b9060206103079281815201906104c8565b346101175761055236610461565b508051600110156105a75761058161058f60406105a393015160405192839160208084015260408301906104c8565b03601f198101835282610277565b6040519182916020835260208301906104c8565b0390f35b61147a565b346101175760003660031901126101175760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b90600182811c92168015610620575b602083101461060a57565b634e487b7160e01b600052602260045260246000fd5b91607f16916105ff565b9060009160019081549161063d836105f0565b808352928181169081156106b0575060011461065857505050565b80929394506000527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6916000925b84841061069857505060209250010190565b80546020858501810191909152909301928101610686565b915050602093945060ff929192191683830152151560051b010190565b34610117576000366003190112610117576105a360405161058f816106f18161062a565b0382610277565b9181601f840112156101175782359167ffffffffffffffff8311610117576020838186019501011161011757565b60406003198201126101175767ffffffffffffffff916004358381116101175782610753916004016106f8565b939093926024359182116101175761076d916004016106f8565b9091565b34610117576107966107e8600061079f61078a36610726565b9691839193019061030a565b94810190610e2c565b95936040989395929198518098819582947f3baa6d50000000000000000000000000000000000000000000000000000000008452896001600160a01b0380961660048601611075565b0392165afa92831561089957600093610876575b5082519051908181036108375761082f8461082987610581876040519485936020850152602484016110c6565b306110eb565b602081519101f35b6040517f2918942500000000000000000000000000000000000000000000000000000000815260048101919091526024810191909152604490fd5b0390fd5b61089291933d8091833e61088a8183610277565b810190610f3b565b91386107fc565b6110ba565b34610117576000366003190112610117576020600254604051908152f35b346101175760203660031901126101175760043567ffffffffffffffff8111610117576109346108fc6108f66105a39336906004016106f8565b906123e7565b92959394919060ff610920604051988998895260a060208a015260a08901906104c8565b9216604087015285820360608701526104c8565b9083820360808501526104c8565b3461011757610370600061096461095836610726565b949290959136916102b5565b9290506001600160e01b031961097a8383611490565b167f3b3b57de000000000000000000000000000000000000000000000000000000008114610a78577ff1cb7e06000000000000000000000000000000000000000000000000000000008114610a5b577f59d1d43c000000000000000000000000000000000000000000000000000000008114610a3e577fbc1c58d10000000000000000000000000000000000000000000000000000000014610a2357604051806105a3816104ed565b81610a3992610a31926114bc565b8101906114d9565b612321565b5081610a5592610a4d926114bc565b8101906114fe565b9061223a565b5081610a7292610a6a926114bc565b8101906114e8565b906120db565b5081610a8792610a31926114bc565b61153e565b346101175760003660031901126101175760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b6001600160a01b0381160361011757565b346101175760403660031901126101175760043567ffffffffffffffff811161011757610b129036906004016106f8565b60243591610b1f83610ad0565b610b2f60006103703685856102b5565b506040517f02571be3000000000000000000000000000000000000000000000000000000008152600481018290526001600160a01b03602080836024817f000000000000000000000000000000000000000000000000000000000000000086165afa92831561089957600093610d83575b507f00000000000000000000000000000000000000000000000000000000000000008216908383168214610ca6575b505094610c7081610c3d7f88781081cc340609705af0f96bf3ba64ea267873444e91725bd072f2af0f44d895610c2d610c7e967f9fcbe230acca8f6bcfd2dda7aa896aa97299a423bdac7c8b565819624436a0729b339116146111f6565b6000526000602052604060002090565b906001600160a01b03167fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055565b60405191829186868461121e565b0390a1610ca1610c8e83836123e7565b9350915060025460405196879687611246565b0390a1005b6040517f6352211e000000000000000000000000000000000000000000000000000000008152600481018690529790935091908390889060249082905afa801561089957610c3d7f88781081cc340609705af0f96bf3ba64ea267873444e91725bd072f2af0f44d895610c2d610c709486947f9fcbe230acca8f6bcfd2dda7aa896aa97299a423bdac7c8b565819624436a0729c610c7e99600092610d56575b50509750959a5050955050610bcf565b610d759250803d10610d7c575b610d6d8183610277565b81019061134d565b3880610d46565b503d610d63565b819350610d9d9083923d8611610d7c57610d6d8183610277565b9290610ba0565b3461011757610db236610461565b508051600110156105a757610581610e0b60406105a393015160208151910151906bffffffffffffffffffffffff19918281169160148110610e17575b50506040805160609290921c6020830152909384925090820190565b60405191829182610533565b8391925060140360031b1b1616803880610def565b91909160c081840312610117578035610e4481610ad0565b92602080830135610e5481610ad0565b9367ffffffffffffffff9160408501358381116101175785019084601f8301121561011757813591610e85836103c8565b92610e936040519485610277565b808452828085019160051b83010191878311610117578301905b828210610ef557505050509360608101358381116101175784610ed19183016103e0565b93610ede60808301610102565b9360a08301359081116101175761030792016102ec565b81358152908301908301610ead565b90929192610f1181610299565b91610f1f6040519384610277565b829482845282820111610117576020610f399301906104a5565b565b90602090818382031261011757825167ffffffffffffffff9384821161011757019080601f83011215610117578151610f73816103c8565b94604090610f8382519788610277565b828752858088019360051b8601019484861161011757868101935b868510610fb057505050505050505090565b845183811161011757820186603f82011215610117578891610fda88838886809601519101610f04565b815201940193610f9e565b90815180825260208080930193019160005b828110611005575050505090565b835185529381019392810192600101610ff7565b908082519081815260208091019281808460051b8301019501936000915b8483106110475750505050505090565b9091929394958480611065600193601f198682030187528a516104c8565b9801930193019194939290611037565b9261109e61030795936001600160a01b036110ac94168652608060208701526080860190610fe5565b908482036040860152611019565b9160608184039101526104c8565b6040513d6000823e3d90fd5b90916110dd61030793604084526040840190611019565b9160208184039101526104c8565b9061030791600080604051936111008561021d565b601e85527f416464726573733a206c6f772d6c6576656c2063616c6c206661696c65640000602086015260208151910182855af13d15611162573d9161114583610299565b926111536040519485610277565b83523d6000602085013e611166565b6060915b919290156111c7575081511561117a575090565b3b156111835790565b606460405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152fd5b8251909150156111da5750805190602001fd5b6108729060405191829162461bcd60e51b835260048301610533565b1561011757565b908060209392818452848401376000828201840152601f01601f1916010190565b9161123f6020926001600160a01b03929695966040865260408601916111fd565b9416910152565b94919061125f919796949760c0875260c08701916111fd565b91602090818601528483036040860152600092600190815491611281836105f0565b8083529281811690811561132b57506001146112c9575b50505050906112bb9160ff610307969716606086015284820360808601526104c8565b9160a08184039101526104c8565b6000818152939995509091907fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf65b828510611318575094989190920101925081905060ff6112bb610307611298565b80548486018c0152938a019381016112f7565b60ff191683860152505090151560051b010191508060ff6112bb610307611298565b90816020910312610117575161030781610ad0565b634e487b7160e01b600052601160045260246000fd5b906001820180921161138657565b611362565b9190820180921161138657565b91909180518310156105a7576020838201015160f81c801561145457906113dd6113d8836113d26113e3956113cc89611378565b86611460565b9661138b565b611378565b90611398565b604080516020810193845290810194909452926114038160608101610581565b5190206001600160a01b03611432611425836000526000602052604060002090565b546001600160a01b031690565b1661143b579190565b9150610307611425836000526000602052604060002090565b50509050600090600090565b908281018082116113865782511061011757016020012090565b634e487b7160e01b600052603260045260246000fd5b6001600160e01b031990358181169392600481106114ad57505050565b60040360031b82901b16169150565b909291928360041161011757831161011757600401916003190190565b90816020910312610117573590565b9190826040910312610117576020823592013590565b91906040838203126101175782359260208101359067ffffffffffffffff821161011757019080601f8301121561011757816020610307933591016102b5565b61158f9061158061158a6115858361158061157b6060987f0000000000000000000000000000000000000000000000000000000000000000611781565b61181f565b61193f565b6118c8565b611973565b90611598611743565b508101906020908183511015611719576004906040906115d46115ce8351603c878201528681526115c88161021d565b83611ef7565b8261205f565b8151936115e08561023e565b6000855282820195818751511515918261170e575b5050611700575b600061161e61161284516001600160a01b031690565b6001600160a01b031690565b845195868092632d43cbef60e21b82525afa938415610899576000946116e5575b5081810180516001600160a01b031695875160808501908151988751998a9287840163ea9cd3bf60e01b9052602484019261167993611a01565b0394601f19958681018a5261168e908a610277565b516001600160a01b031692516001600160a01b031698519051908651998a958601946116b995611a35565b0390810185526116c99085610277565b51630556f18360e41b8152928392610872923060048601611bdf565b6116f991943d8091833e61088a8183610277565b923861163f565b61170982611f24565b6115fc565b5110905081386115f5565b60046040517fb00fd638000000000000000000000000000000000000000000000000000000008152fd5b6040519060a0820182811067ffffffffffffffff82111761023957604052606060808360008152600060208201528260408201526000838201520152565b9061178a611743565b506040516117978161025a565b60209283825261040092833686850137604051936117b48561025a565b8560005b82811061180f5750505060008352600084526040519460a0860186811067ffffffffffffffff821117610239576040526001600160a01b039283168652911690840152604083015260006060830152608082015290565b60608282890101520186906117b8565b611827611743565b50602060408201805160018151801515806118bb575b6118ad575b01905251511161187b576000606082015261185c81611f9d565b6103076115ce6040516115c88161058160208201906000602083019252565b6040517f128e700800000000000000000000000000000000000000000000000000000000815260206004820152602490fd5b6118b686611f24565b611842565b508460608701511061183d565b6118d0611743565b5060206040820180516001815180151580611932575b611924575b01905251511161187b576000606082015261190581611fe9565b6103076115ce6040516115c88161058160208201906002602083019252565b61192d86611f24565b6118eb565b50846060870151106118e6565b90611948611743565b50602060608301511015611719576115ce61030791604051906020820152602081526115c88161021d565b61197b611743565b506060810160208151101561171957604082019081515160001991828201918211611386576119ab828551611ee3565b51908051938414611386576001840190526001600160fd1b0383168303611386577f20000000000000000000000000000000000000000000000000000000000000006119fd9360031b1c179251611ee3565b5290565b91611a27906001600160a01b036103079593168452606060208501526060840190610fe5565b916040818403910152611019565b93906103079593611a6891611a76946001600160a01b03809216885216602087015260c0604087015260c0860190610fe5565b908482036060860152611019565b917ff470901a00000000000000000000000000000000000000000000000000000000608082015260a08184039101526104c8565b93906103079593611a6891611add946001600160a01b03809216885216602087015260c0604087015260c0860190610fe5565b917fde9abe5e00000000000000000000000000000000000000000000000000000000608082015260a08184039101526104c8565b93906103079593611a6891611b44946001600160a01b03809216885216602087015260c0604087015260c0860190610fe5565b917ffcd2e38100000000000000000000000000000000000000000000000000000000608082015260a08184039101526104c8565b93906103079593611a6891611bab946001600160a01b03809216885216602087015260c0604087015260c0860190610fe5565b917f38bf92e600000000000000000000000000000000000000000000000000000000608082015260a08184039101526104c8565b9290949391946001600160a01b0360a085019116845260209060a082860152865180915260c08501918060c08360051b8801019801926000905b838210611c6f57505050505084611c3b918461030796970360408601526104c8565b7f5bdaa9160000000000000000000000000000000000000000000000000000000060608401529160808184039101526104c8565b90919293988380611c8c60019360bf198c82030186528d516104c8565b9b019201920190939291611c19565b60046040820191825151151580611dc8575b611dba575b6000611cc861161283516001600160a01b031690565b60405193848092632d43cbef60e21b82525afa91821561089957600092611d9f575b5060208101928351611d02906001600160a01b031690565b9381519560808401968751966040519788926020840163ea9cd3bf60e01b90526024840192611d3093611a01565b0393601f19948581018852611d459088610277565b516001600160a01b031691516001600160a01b031692519651604051978894611d719460208701611aaa565b039081018452611d819084610277565b604051630556f18360e41b8152928392610872923060048601611bdf565b611db391923d8091833e61088a8183610277565b9038611cea565b611dc381611f24565b611cb2565b506020606082015110611cad565b60046040820191825151151580611ed5575b611ec7575b6000611e0361161283516001600160a01b031690565b60405193848092632d43cbef60e21b82525afa91821561089957600092611eac575b5060208101928351611e3d906001600160a01b031690565b9381519560808401968751966040519788926020840163ea9cd3bf60e01b90526024840192611e6b93611a01565b0393601f19948581018852611e809088610277565b516001600160a01b031691516001600160a01b031692519651604051978894611d719460208701611b11565b611ec091923d8091833e61088a8183610277565b9038611e25565b611ed081611f24565b611ded565b506020606082015110611de8565b80518210156105a75760209160051b010190565b6080611f219193929301519260ff845116938491600183018252611f1b8383611ee3565b52611ee3565b50565b604081019081515160001991828201918211611386576060611f47838651611ee3565b5191018051938414611386576001840190526001600160fd1b0383168303611386577fff00000000000000000000000000000000000000000000000000000000000000611f9a9360031b1c179251611ee3565b52565b60408101805151600019808201918211611386576060611fbe838551611ee3565b5194018051918214611386576001820190526001600160fd1b0381160361138657611f9a9151611ee3565b60408101908151516000199182820191821161138657606061200c838651611ee3565b5191018051938414611386576001840190526001600160fd1b0383168303611386577f0100000000000000000000000000000000000000000000000000000000000000611f9a9360031b1c179251611ee3565b60408101805151909291600019808301928311611386576060612083848751611ee3565b5192018051918214611386576001820190526001600160fd1b0381168103611386577fff00000000000000000000000000000000000000000000000000000000000000611f9a9460f81b169060031b1c179251611ee3565b9061158061211c9261158061158a6115858361158061157b60609a7f0000000000000000000000000000000000000000000000000000000000000000611781565b906004604080519361212d8561023e565b60008552818101938451511515908161222c575b5061221e575b600061215d61161283516001600160a01b031690565b835194858092632d43cbef60e21b82525afa92831561089957600093612203575b5060208101938451612196906001600160a01b031690565b94815196608084019788519786519889926020840163ea9cd3bf60e01b905260248401926121c393611a01565b0393601f199485810189526121d89089610277565b516001600160a01b031691516001600160a01b03169251975185519889946116b99460208701611b78565b61221791933d8091833e61088a8183610277565b913861217e565b61222781611f24565b612147565b602091508201511038612141565b61226d8161158061157b6060967f0000000000000000000000000000000000000000000000000000000000000000611781565b612275611743565b5060206040820180516001815180151580612315575b612307575b01905251511161187b57602091611580826000876122d19501526122b381611fe9565b61158a6115ce6040516115c8816105818a820190600a602083019252565b926122da611743565b508301511015611719576115ce6122f19183611ef7565b604051906122fe8261023e565b60008252611c9b565b61231086611f24565b612290565b5084898701511061228b565b6123548161158061157b6060957f0000000000000000000000000000000000000000000000000000000000000000611781565b9161235d611743565b50602060408401805160018151801515806123db575b6123cd575b01905251511161187b57826000611580926123b795015261239881611fe9565b61158a6115ce6040516115c88161058160208201906003602083019252565b604051906123c48261023e565b60008252611dd6565b6123d688611f24565b612378565b50848689015110612373565b60006103706123fc9261245b959436916102b5565b6002546040516bffffffffffffffffffffffff19606084901b1660208201526014815292509061246790601f1990612435603486610277565b604051968791602083016014916bffffffffffffffffffffffff199060601b1681520190565b03908101865285610277565b92604051612478816106f18161062a565b92600092919056fea264697066735822122057efd8edd61e828b8c697ad27a1b3e1aa9e8aa92e5b54cb205f22f0372e80d4464736f6c63430008130033", + "deployedBytecode": "0x6080604052600436101561001257600080fd5b60003560e01c806301ffc9a7146100fd57806315f64386146100f85780632b7ac3f3146100f357806338bf92e6146100c15780633f15457f146100ee5780634062b43f146100e95780635bdaa916146100e45780637e6215ba146100df5780638a596ebe146100da5780639061b923146100d5578063a8e5fbc0146100d0578063d358df77146100cb578063de9abe5e146100c1578063f470901a146100c65763fcd2e381146100c157600080fd5b610544565b610da4565b610ae1565b610a8c565b610942565b6108bc565b61089e565b610771565b6106cd565b6105ac565b610384565b610330565b61011c565b35906001600160e01b03198216820361011757565b600080fd5b34610117576020366003190112610117576004356001600160e01b0319811680910361011757807f9061b92300000000000000000000000000000000000000000000000000000000602092149081156101dd575b81156101b3575b8115610189575b506040519015158152f35b7f01ffc9a7000000000000000000000000000000000000000000000000000000009150143861017e565b7f8a596ebe0000000000000000000000000000000000000000000000000000000081149150610177565b7f15f643860000000000000000000000000000000000000000000000000000000081149150610170565b634e487b7160e01b600052604160045260246000fd5b6040810190811067ffffffffffffffff82111761023957604052565b610207565b6020810190811067ffffffffffffffff82111761023957604052565b610420810190811067ffffffffffffffff82111761023957604052565b90601f8019910116810190811067ffffffffffffffff82111761023957604052565b67ffffffffffffffff811161023957601f01601f191660200190565b9291926102c182610299565b916102cf6040519384610277565b829481845281830111610117578281602093846000960137010152565b9080601f8301121561011757816020610307933591016102b5565b90565b9060208282031261011757813567ffffffffffffffff81116101175761030792016102ec565b346101175760203660031901126101175760043567ffffffffffffffff8111610117576001600160a01b03610375600061037060409436906004016102ec565b611398565b83519182529091166020820152f35b346101175760003660031901126101175760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b67ffffffffffffffff81116102395760051b60200190565b9080601f83011215610117578135906103f8826103c8565b926104066040519485610277565b828452602092838086019160051b8301019280841161011757848301915b8483106104345750505050505090565b823567ffffffffffffffff8111610117578691610456848480948901016102ec565b815201920191610424565b9060406003198301126101175767ffffffffffffffff600435818111610117578361048e916004016103e0565b9260243591821161011757610307916004016102ec565b60005b8381106104b85750506000910152565b81810151838201526020016104a8565b906020916104e1815180928185528580860191016104a5565b601f01601f1916010190565b90602091828152606051808483015260005b818110610520575060409293506000838284010152601f8019910116010190565b60808101518382016040015284016104ff565b9060206103079281815201906104c8565b346101175761055236610461565b508051600110156105a75761058161058f60406105a393015160405192839160208084015260408301906104c8565b03601f198101835282610277565b6040519182916020835260208301906104c8565b0390f35b61147a565b346101175760003660031901126101175760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b90600182811c92168015610620575b602083101461060a57565b634e487b7160e01b600052602260045260246000fd5b91607f16916105ff565b9060009160019081549161063d836105f0565b808352928181169081156106b0575060011461065857505050565b80929394506000527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6916000925b84841061069857505060209250010190565b80546020858501810191909152909301928101610686565b915050602093945060ff929192191683830152151560051b010190565b34610117576000366003190112610117576105a360405161058f816106f18161062a565b0382610277565b9181601f840112156101175782359167ffffffffffffffff8311610117576020838186019501011161011757565b60406003198201126101175767ffffffffffffffff916004358381116101175782610753916004016106f8565b939093926024359182116101175761076d916004016106f8565b9091565b34610117576107966107e8600061079f61078a36610726565b9691839193019061030a565b94810190610e2c565b95936040989395929198518098819582947f3baa6d50000000000000000000000000000000000000000000000000000000008452896001600160a01b0380961660048601611075565b0392165afa92831561089957600093610876575b5082519051908181036108375761082f8461082987610581876040519485936020850152602484016110c6565b306110eb565b602081519101f35b6040517f2918942500000000000000000000000000000000000000000000000000000000815260048101919091526024810191909152604490fd5b0390fd5b61089291933d8091833e61088a8183610277565b810190610f3b565b91386107fc565b6110ba565b34610117576000366003190112610117576020600254604051908152f35b346101175760203660031901126101175760043567ffffffffffffffff8111610117576109346108fc6108f66105a39336906004016106f8565b906123e7565b92959394919060ff610920604051988998895260a060208a015260a08901906104c8565b9216604087015285820360608701526104c8565b9083820360808501526104c8565b3461011757610370600061096461095836610726565b949290959136916102b5565b9290506001600160e01b031961097a8383611490565b167f3b3b57de000000000000000000000000000000000000000000000000000000008114610a78577ff1cb7e06000000000000000000000000000000000000000000000000000000008114610a5b577f59d1d43c000000000000000000000000000000000000000000000000000000008114610a3e577fbc1c58d10000000000000000000000000000000000000000000000000000000014610a2357604051806105a3816104ed565b81610a3992610a31926114bc565b8101906114d9565b612321565b5081610a5592610a4d926114bc565b8101906114fe565b9061223a565b5081610a7292610a6a926114bc565b8101906114e8565b906120db565b5081610a8792610a31926114bc565b61153e565b346101175760003660031901126101175760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b6001600160a01b0381160361011757565b346101175760403660031901126101175760043567ffffffffffffffff811161011757610b129036906004016106f8565b60243591610b1f83610ad0565b610b2f60006103703685856102b5565b506040517f02571be3000000000000000000000000000000000000000000000000000000008152600481018290526001600160a01b03602080836024817f000000000000000000000000000000000000000000000000000000000000000086165afa92831561089957600093610d83575b507f00000000000000000000000000000000000000000000000000000000000000008216908383168214610ca6575b505094610c7081610c3d7f88781081cc340609705af0f96bf3ba64ea267873444e91725bd072f2af0f44d895610c2d610c7e967f9fcbe230acca8f6bcfd2dda7aa896aa97299a423bdac7c8b565819624436a0729b339116146111f6565b6000526000602052604060002090565b906001600160a01b03167fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055565b60405191829186868461121e565b0390a1610ca1610c8e83836123e7565b9350915060025460405196879687611246565b0390a1005b6040517f6352211e000000000000000000000000000000000000000000000000000000008152600481018690529790935091908390889060249082905afa801561089957610c3d7f88781081cc340609705af0f96bf3ba64ea267873444e91725bd072f2af0f44d895610c2d610c709486947f9fcbe230acca8f6bcfd2dda7aa896aa97299a423bdac7c8b565819624436a0729c610c7e99600092610d56575b50509750959a5050955050610bcf565b610d759250803d10610d7c575b610d6d8183610277565b81019061134d565b3880610d46565b503d610d63565b819350610d9d9083923d8611610d7c57610d6d8183610277565b9290610ba0565b3461011757610db236610461565b508051600110156105a757610581610e0b60406105a393015160208151910151906bffffffffffffffffffffffff19918281169160148110610e17575b50506040805160609290921c6020830152909384925090820190565b60405191829182610533565b8391925060140360031b1b1616803880610def565b91909160c081840312610117578035610e4481610ad0565b92602080830135610e5481610ad0565b9367ffffffffffffffff9160408501358381116101175785019084601f8301121561011757813591610e85836103c8565b92610e936040519485610277565b808452828085019160051b83010191878311610117578301905b828210610ef557505050509360608101358381116101175784610ed19183016103e0565b93610ede60808301610102565b9360a08301359081116101175761030792016102ec565b81358152908301908301610ead565b90929192610f1181610299565b91610f1f6040519384610277565b829482845282820111610117576020610f399301906104a5565b565b90602090818382031261011757825167ffffffffffffffff9384821161011757019080601f83011215610117578151610f73816103c8565b94604090610f8382519788610277565b828752858088019360051b8601019484861161011757868101935b868510610fb057505050505050505090565b845183811161011757820186603f82011215610117578891610fda88838886809601519101610f04565b815201940193610f9e565b90815180825260208080930193019160005b828110611005575050505090565b835185529381019392810192600101610ff7565b908082519081815260208091019281808460051b8301019501936000915b8483106110475750505050505090565b9091929394958480611065600193601f198682030187528a516104c8565b9801930193019194939290611037565b9261109e61030795936001600160a01b036110ac94168652608060208701526080860190610fe5565b908482036040860152611019565b9160608184039101526104c8565b6040513d6000823e3d90fd5b90916110dd61030793604084526040840190611019565b9160208184039101526104c8565b9061030791600080604051936111008561021d565b601e85527f416464726573733a206c6f772d6c6576656c2063616c6c206661696c65640000602086015260208151910182855af13d15611162573d9161114583610299565b926111536040519485610277565b83523d6000602085013e611166565b6060915b919290156111c7575081511561117a575090565b3b156111835790565b606460405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152fd5b8251909150156111da5750805190602001fd5b6108729060405191829162461bcd60e51b835260048301610533565b1561011757565b908060209392818452848401376000828201840152601f01601f1916010190565b9161123f6020926001600160a01b03929695966040865260408601916111fd565b9416910152565b94919061125f919796949760c0875260c08701916111fd565b91602090818601528483036040860152600092600190815491611281836105f0565b8083529281811690811561132b57506001146112c9575b50505050906112bb9160ff610307969716606086015284820360808601526104c8565b9160a08184039101526104c8565b6000818152939995509091907fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf65b828510611318575094989190920101925081905060ff6112bb610307611298565b80548486018c0152938a019381016112f7565b60ff191683860152505090151560051b010191508060ff6112bb610307611298565b90816020910312610117575161030781610ad0565b634e487b7160e01b600052601160045260246000fd5b906001820180921161138657565b611362565b9190820180921161138657565b91909180518310156105a7576020838201015160f81c801561145457906113dd6113d8836113d26113e3956113cc89611378565b86611460565b9661138b565b611378565b90611398565b604080516020810193845290810194909452926114038160608101610581565b5190206001600160a01b03611432611425836000526000602052604060002090565b546001600160a01b031690565b1661143b579190565b9150610307611425836000526000602052604060002090565b50509050600090600090565b908281018082116113865782511061011757016020012090565b634e487b7160e01b600052603260045260246000fd5b6001600160e01b031990358181169392600481106114ad57505050565b60040360031b82901b16169150565b909291928360041161011757831161011757600401916003190190565b90816020910312610117573590565b9190826040910312610117576020823592013590565b91906040838203126101175782359260208101359067ffffffffffffffff821161011757019080601f8301121561011757816020610307933591016102b5565b61158f9061158061158a6115858361158061157b6060987f0000000000000000000000000000000000000000000000000000000000000000611781565b61181f565b61193f565b6118c8565b611973565b90611598611743565b508101906020908183511015611719576004906040906115d46115ce8351603c878201528681526115c88161021d565b83611ef7565b8261205f565b8151936115e08561023e565b6000855282820195818751511515918261170e575b5050611700575b600061161e61161284516001600160a01b031690565b6001600160a01b031690565b845195868092632d43cbef60e21b82525afa938415610899576000946116e5575b5081810180516001600160a01b031695875160808501908151988751998a9287840163ea9cd3bf60e01b9052602484019261167993611a01565b0394601f19958681018a5261168e908a610277565b516001600160a01b031692516001600160a01b031698519051908651998a958601946116b995611a35565b0390810185526116c99085610277565b51630556f18360e41b8152928392610872923060048601611bdf565b6116f991943d8091833e61088a8183610277565b923861163f565b61170982611f24565b6115fc565b5110905081386115f5565b60046040517fb00fd638000000000000000000000000000000000000000000000000000000008152fd5b6040519060a0820182811067ffffffffffffffff82111761023957604052606060808360008152600060208201528260408201526000838201520152565b9061178a611743565b506040516117978161025a565b60209283825261040092833686850137604051936117b48561025a565b8560005b82811061180f5750505060008352600084526040519460a0860186811067ffffffffffffffff821117610239576040526001600160a01b039283168652911690840152604083015260006060830152608082015290565b60608282890101520186906117b8565b611827611743565b50602060408201805160018151801515806118bb575b6118ad575b01905251511161187b576000606082015261185c81611f9d565b6103076115ce6040516115c88161058160208201906000602083019252565b6040517f128e700800000000000000000000000000000000000000000000000000000000815260206004820152602490fd5b6118b686611f24565b611842565b508460608701511061183d565b6118d0611743565b5060206040820180516001815180151580611932575b611924575b01905251511161187b576000606082015261190581611fe9565b6103076115ce6040516115c88161058160208201906002602083019252565b61192d86611f24565b6118eb565b50846060870151106118e6565b90611948611743565b50602060608301511015611719576115ce61030791604051906020820152602081526115c88161021d565b61197b611743565b506060810160208151101561171957604082019081515160001991828201918211611386576119ab828551611ee3565b51908051938414611386576001840190526001600160fd1b0383168303611386577f20000000000000000000000000000000000000000000000000000000000000006119fd9360031b1c179251611ee3565b5290565b91611a27906001600160a01b036103079593168452606060208501526060840190610fe5565b916040818403910152611019565b93906103079593611a6891611a76946001600160a01b03809216885216602087015260c0604087015260c0860190610fe5565b908482036060860152611019565b917ff470901a00000000000000000000000000000000000000000000000000000000608082015260a08184039101526104c8565b93906103079593611a6891611add946001600160a01b03809216885216602087015260c0604087015260c0860190610fe5565b917fde9abe5e00000000000000000000000000000000000000000000000000000000608082015260a08184039101526104c8565b93906103079593611a6891611b44946001600160a01b03809216885216602087015260c0604087015260c0860190610fe5565b917ffcd2e38100000000000000000000000000000000000000000000000000000000608082015260a08184039101526104c8565b93906103079593611a6891611bab946001600160a01b03809216885216602087015260c0604087015260c0860190610fe5565b917f38bf92e600000000000000000000000000000000000000000000000000000000608082015260a08184039101526104c8565b9290949391946001600160a01b0360a085019116845260209060a082860152865180915260c08501918060c08360051b8801019801926000905b838210611c6f57505050505084611c3b918461030796970360408601526104c8565b7f5bdaa9160000000000000000000000000000000000000000000000000000000060608401529160808184039101526104c8565b90919293988380611c8c60019360bf198c82030186528d516104c8565b9b019201920190939291611c19565b60046040820191825151151580611dc8575b611dba575b6000611cc861161283516001600160a01b031690565b60405193848092632d43cbef60e21b82525afa91821561089957600092611d9f575b5060208101928351611d02906001600160a01b031690565b9381519560808401968751966040519788926020840163ea9cd3bf60e01b90526024840192611d3093611a01565b0393601f19948581018852611d459088610277565b516001600160a01b031691516001600160a01b031692519651604051978894611d719460208701611aaa565b039081018452611d819084610277565b604051630556f18360e41b8152928392610872923060048601611bdf565b611db391923d8091833e61088a8183610277565b9038611cea565b611dc381611f24565b611cb2565b506020606082015110611cad565b60046040820191825151151580611ed5575b611ec7575b6000611e0361161283516001600160a01b031690565b60405193848092632d43cbef60e21b82525afa91821561089957600092611eac575b5060208101928351611e3d906001600160a01b031690565b9381519560808401968751966040519788926020840163ea9cd3bf60e01b90526024840192611e6b93611a01565b0393601f19948581018852611e809088610277565b516001600160a01b031691516001600160a01b031692519651604051978894611d719460208701611b11565b611ec091923d8091833e61088a8183610277565b9038611e25565b611ed081611f24565b611ded565b506020606082015110611de8565b80518210156105a75760209160051b010190565b6080611f219193929301519260ff845116938491600183018252611f1b8383611ee3565b52611ee3565b50565b604081019081515160001991828201918211611386576060611f47838651611ee3565b5191018051938414611386576001840190526001600160fd1b0383168303611386577fff00000000000000000000000000000000000000000000000000000000000000611f9a9360031b1c179251611ee3565b52565b60408101805151600019808201918211611386576060611fbe838551611ee3565b5194018051918214611386576001820190526001600160fd1b0381160361138657611f9a9151611ee3565b60408101908151516000199182820191821161138657606061200c838651611ee3565b5191018051938414611386576001840190526001600160fd1b0383168303611386577f0100000000000000000000000000000000000000000000000000000000000000611f9a9360031b1c179251611ee3565b60408101805151909291600019808301928311611386576060612083848751611ee3565b5192018051918214611386576001820190526001600160fd1b0381168103611386577fff00000000000000000000000000000000000000000000000000000000000000611f9a9460f81b169060031b1c179251611ee3565b9061158061211c9261158061158a6115858361158061157b60609a7f0000000000000000000000000000000000000000000000000000000000000000611781565b906004604080519361212d8561023e565b60008552818101938451511515908161222c575b5061221e575b600061215d61161283516001600160a01b031690565b835194858092632d43cbef60e21b82525afa92831561089957600093612203575b5060208101938451612196906001600160a01b031690565b94815196608084019788519786519889926020840163ea9cd3bf60e01b905260248401926121c393611a01565b0393601f199485810189526121d89089610277565b516001600160a01b031691516001600160a01b03169251975185519889946116b99460208701611b78565b61221791933d8091833e61088a8183610277565b913861217e565b61222781611f24565b612147565b602091508201511038612141565b61226d8161158061157b6060967f0000000000000000000000000000000000000000000000000000000000000000611781565b612275611743565b5060206040820180516001815180151580612315575b612307575b01905251511161187b57602091611580826000876122d19501526122b381611fe9565b61158a6115ce6040516115c8816105818a820190600a602083019252565b926122da611743565b508301511015611719576115ce6122f19183611ef7565b604051906122fe8261023e565b60008252611c9b565b61231086611f24565b612290565b5084898701511061228b565b6123548161158061157b6060957f0000000000000000000000000000000000000000000000000000000000000000611781565b9161235d611743565b50602060408401805160018151801515806123db575b6123cd575b01905251511161187b57826000611580926123b795015261239881611fe9565b61158a6115ce6040516115c88161058160208201906003602083019252565b604051906123c48261023e565b60008252611dd6565b6123d688611f24565b612378565b50848689015110612373565b60006103706123fc9261245b959436916102b5565b6002546040516bffffffffffffffffffffffff19606084901b1660208201526014815292509061246790601f1990612435603486610277565b604051968791602083016014916bffffffffffffffffffffffff199060601b1681520190565b03908101865285610277565b92604051612478816106f18161062a565b92600092919056fea264697066735822122057efd8edd61e828b8c697ad27a1b3e1aa9e8aa92e5b54cb205f22f0372e80d4464736f6c63430008130033", + "devdoc": { + "kind": "dev", + "methods": { + "constructor": { + "params": { + "_ens": "The ENS registry address", + "_graphqlUrl": "The offchain/l2 graphql endpoint url", + "_l2ResolverCoinType": "The chainId at which the resolver resolves data from. 0 if storageLocation is offChain", + "_nameWrapper": "The ENS name wrapper address", + "_verifier": "The chain verifier address" + } + }, + "getStorageSlotsCallback(bytes,bytes)": { + "details": "Internal callback function invoked by CCIP-Read in response to a `getStorageSlots` request." + }, + "getTarget(bytes)": { + "details": "Returns the L2 target address that can answer queries for `name`.", + "params": { + "name": "DNS encoded ENS name to query" + }, + "returns": { + "node": "The node of the name", + "target": "The L2 resolver address to verify against." + } + }, + "metadata(bytes)": { + "details": "This function provides metadata about the L1 Resolver, including its name, coin type, GraphQL URL, storage type, and encoded information.", + "params": { + "name": "The domain name in format (dnsEncoded)" + }, + "returns": { + "_0": "coinType The cointype of the chain the target contract locates such as Optimism, Base, Arb, etc", + "_1": "graphqlUrl The GraphQL URL used by the resolver", + "_2": "storageType Storage Type (0 for EVM)", + "_3": "storageLocation The storage identifier. For EVM chains, this is the address of the resolver contract.", + "_4": "context. An identifier used by l2 graph indexer for Domain schema id (`context-namehash`) allowing multiple resolver contracts to have own namespace." + } + }, + "resolve(bytes,bytes)": { + "details": "Resolve and verify a record stored in l2 target address. It supports subname by fetching target recursively to the nearlest parent.", + "params": { + "data": "The actual calldata", + "name": "DNS encoded ENS name to query" + }, + "returns": { + "result": "result of the call" + } + }, + "setTarget(bytes,address)": { + "params": { + "name": "The encoded name to query.", + "target": "The L2 resolver address to verify against." + } + }, + "supportsInterface(bytes4)": { + "details": "See {IERC165-supportsInterface}." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "metadata(bytes)": { + "notice": "Get metadata about the L1 Resolver" + }, + "setTarget(bytes,address)": { + "notice": "Set target address to verify aagainst" + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 18375, + "contract": "contracts/L1Resolver.sol:L1Resolver", + "label": "targets", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 18392, + "contract": "contracts/L1Resolver.sol:L1Resolver", + "label": "graphqlUrl", + "offset": 0, + "slot": "1", + "type": "t_string_storage" + }, + { + "astId": 18394, + "contract": "contracts/L1Resolver.sol:L1Resolver", + "label": "l2ResolverCoinType", + "offset": 0, + "slot": "2", + "type": "t_uint256" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_address)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/crosschain-resolver/deployments/sepolia/solcInputs/667f81f7298fe1b6e4eb2d4b4f7418ce.json b/crosschain-resolver/deployments/sepolia/solcInputs/667f81f7298fe1b6e4eb2d4b4f7418ce.json new file mode 100644 index 00000000..5f210da3 --- /dev/null +++ b/crosschain-resolver/deployments/sepolia/solcInputs/667f81f7298fe1b6e4eb2d4b4f7418ce.json @@ -0,0 +1,175 @@ +{ + "language": "Solidity", + "sources": { + "@ensdomains/buffer/contracts/Buffer.sol": { + "content": "// SPDX-License-Identifier: BSD-2-Clause\npragma solidity ^0.8.4;\n\n/**\n* @dev A library for working with mutable byte buffers in Solidity.\n*\n* Byte buffers are mutable and expandable, and provide a variety of primitives\n* for appending to them. At any time you can fetch a bytes object containing the\n* current contents of the buffer. The bytes object should not be stored between\n* operations, as it may change due to resizing of the buffer.\n*/\nlibrary Buffer {\n /**\n * @dev Represents a mutable buffer. Buffers have a current value (buf) and\n * a capacity. The capacity may be longer than the current value, in\n * which case it can be extended without the need to allocate more memory.\n */\n struct buffer {\n bytes buf;\n uint capacity;\n }\n\n /**\n * @dev Initializes a buffer with an initial capacity.\n * @param buf The buffer to initialize.\n * @param capacity The number of bytes of space to allocate the buffer.\n * @return The buffer, for chaining.\n */\n function init(buffer memory buf, uint capacity) internal pure returns(buffer memory) {\n if (capacity % 32 != 0) {\n capacity += 32 - (capacity % 32);\n }\n // Allocate space for the buffer data\n buf.capacity = capacity;\n assembly {\n let ptr := mload(0x40)\n mstore(buf, ptr)\n mstore(ptr, 0)\n let fpm := add(32, add(ptr, capacity))\n if lt(fpm, ptr) {\n revert(0, 0)\n }\n mstore(0x40, fpm)\n }\n return buf;\n }\n\n /**\n * @dev Initializes a new buffer from an existing bytes object.\n * Changes to the buffer may mutate the original value.\n * @param b The bytes object to initialize the buffer with.\n * @return A new buffer.\n */\n function fromBytes(bytes memory b) internal pure returns(buffer memory) {\n buffer memory buf;\n buf.buf = b;\n buf.capacity = b.length;\n return buf;\n }\n\n function resize(buffer memory buf, uint capacity) private pure {\n bytes memory oldbuf = buf.buf;\n init(buf, capacity);\n append(buf, oldbuf);\n }\n\n /**\n * @dev Sets buffer length to 0.\n * @param buf The buffer to truncate.\n * @return The original buffer, for chaining..\n */\n function truncate(buffer memory buf) internal pure returns (buffer memory) {\n assembly {\n let bufptr := mload(buf)\n mstore(bufptr, 0)\n }\n return buf;\n }\n\n /**\n * @dev Appends len bytes of a byte string to a buffer. Resizes if doing so would exceed\n * the capacity of the buffer.\n * @param buf The buffer to append to.\n * @param data The data to append.\n * @param len The number of bytes to copy.\n * @return The original buffer, for chaining.\n */\n function append(buffer memory buf, bytes memory data, uint len) internal pure returns(buffer memory) {\n require(len <= data.length);\n\n uint off = buf.buf.length;\n uint newCapacity = off + len;\n if (newCapacity > buf.capacity) {\n resize(buf, newCapacity * 2);\n }\n\n uint dest;\n uint src;\n assembly {\n // Memory address of the buffer data\n let bufptr := mload(buf)\n // Length of existing buffer data\n let buflen := mload(bufptr)\n // Start address = buffer address + offset + sizeof(buffer length)\n dest := add(add(bufptr, 32), off)\n // Update buffer length if we're extending it\n if gt(newCapacity, buflen) {\n mstore(bufptr, newCapacity)\n }\n src := add(data, 32)\n }\n\n // Copy word-length chunks while possible\n for (; len >= 32; len -= 32) {\n assembly {\n mstore(dest, mload(src))\n }\n dest += 32;\n src += 32;\n }\n\n // Copy remaining bytes\n unchecked {\n uint mask = (256 ** (32 - len)) - 1;\n assembly {\n let srcpart := and(mload(src), not(mask))\n let destpart := and(mload(dest), mask)\n mstore(dest, or(destpart, srcpart))\n }\n }\n\n return buf;\n }\n\n /**\n * @dev Appends a byte string to a buffer. Resizes if doing so would exceed\n * the capacity of the buffer.\n * @param buf The buffer to append to.\n * @param data The data to append.\n * @return The original buffer, for chaining.\n */\n function append(buffer memory buf, bytes memory data) internal pure returns (buffer memory) {\n return append(buf, data, data.length);\n }\n\n /**\n * @dev Appends a byte to the buffer. Resizes if doing so would exceed the\n * capacity of the buffer.\n * @param buf The buffer to append to.\n * @param data The data to append.\n * @return The original buffer, for chaining.\n */\n function appendUint8(buffer memory buf, uint8 data) internal pure returns(buffer memory) {\n uint off = buf.buf.length;\n uint offPlusOne = off + 1;\n if (off >= buf.capacity) {\n resize(buf, offPlusOne * 2);\n }\n\n assembly {\n // Memory address of the buffer data\n let bufptr := mload(buf)\n // Address = buffer address + sizeof(buffer length) + off\n let dest := add(add(bufptr, off), 32)\n mstore8(dest, data)\n // Update buffer length if we extended it\n if gt(offPlusOne, mload(bufptr)) {\n mstore(bufptr, offPlusOne)\n }\n }\n\n return buf;\n }\n\n /**\n * @dev Appends len bytes of bytes32 to a buffer. Resizes if doing so would\n * exceed the capacity of the buffer.\n * @param buf The buffer to append to.\n * @param data The data to append.\n * @param len The number of bytes to write (left-aligned).\n * @return The original buffer, for chaining.\n */\n function append(buffer memory buf, bytes32 data, uint len) private pure returns(buffer memory) {\n uint off = buf.buf.length;\n uint newCapacity = len + off;\n if (newCapacity > buf.capacity) {\n resize(buf, newCapacity * 2);\n }\n\n unchecked {\n uint mask = (256 ** len) - 1;\n // Right-align data\n data = data >> (8 * (32 - len));\n assembly {\n // Memory address of the buffer data\n let bufptr := mload(buf)\n // Address = buffer address + sizeof(buffer length) + newCapacity\n let dest := add(bufptr, newCapacity)\n mstore(dest, or(and(mload(dest), not(mask)), data))\n // Update buffer length if we extended it\n if gt(newCapacity, mload(bufptr)) {\n mstore(bufptr, newCapacity)\n }\n }\n }\n return buf;\n }\n\n /**\n * @dev Appends a bytes20 to the buffer. Resizes if doing so would exceed\n * the capacity of the buffer.\n * @param buf The buffer to append to.\n * @param data The data to append.\n * @return The original buffer, for chhaining.\n */\n function appendBytes20(buffer memory buf, bytes20 data) internal pure returns (buffer memory) {\n return append(buf, bytes32(data), 20);\n }\n\n /**\n * @dev Appends a bytes32 to the buffer. Resizes if doing so would exceed\n * the capacity of the buffer.\n * @param buf The buffer to append to.\n * @param data The data to append.\n * @return The original buffer, for chaining.\n */\n function appendBytes32(buffer memory buf, bytes32 data) internal pure returns (buffer memory) {\n return append(buf, data, 32);\n }\n\n /**\n * @dev Appends a byte to the end of the buffer. Resizes if doing so would\n * exceed the capacity of the buffer.\n * @param buf The buffer to append to.\n * @param data The data to append.\n * @param len The number of bytes to write (right-aligned).\n * @return The original buffer.\n */\n function appendInt(buffer memory buf, uint data, uint len) internal pure returns(buffer memory) {\n uint off = buf.buf.length;\n uint newCapacity = len + off;\n if (newCapacity > buf.capacity) {\n resize(buf, newCapacity * 2);\n }\n\n uint mask = (256 ** len) - 1;\n assembly {\n // Memory address of the buffer data\n let bufptr := mload(buf)\n // Address = buffer address + sizeof(buffer length) + newCapacity\n let dest := add(bufptr, newCapacity)\n mstore(dest, or(and(mload(dest), not(mask)), data))\n // Update buffer length if we extended it\n if gt(newCapacity, mload(bufptr)) {\n mstore(bufptr, newCapacity)\n }\n }\n return buf;\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/dnssec-oracle/BytesUtils.sol": { + "content": "pragma solidity ^0.8.4;\n\nlibrary BytesUtils {\n error OffsetOutOfBoundsError(uint256 offset, uint256 length);\n\n /*\n * @dev Returns the keccak-256 hash of a byte range.\n * @param self The byte string to hash.\n * @param offset The position to start hashing at.\n * @param len The number of bytes to hash.\n * @return The hash of the byte range.\n */\n function keccak(\n bytes memory self,\n uint256 offset,\n uint256 len\n ) internal pure returns (bytes32 ret) {\n require(offset + len <= self.length);\n assembly {\n ret := keccak256(add(add(self, 32), offset), len)\n }\n }\n\n /*\n * @dev Returns a positive number if `other` comes lexicographically after\n * `self`, a negative number if it comes before, or zero if the\n * contents of the two bytes are equal.\n * @param self The first bytes to compare.\n * @param other The second bytes to compare.\n * @return The result of the comparison.\n */\n function compare(\n bytes memory self,\n bytes memory other\n ) internal pure returns (int256) {\n return compare(self, 0, self.length, other, 0, other.length);\n }\n\n /*\n * @dev Returns a positive number if `other` comes lexicographically after\n * `self`, a negative number if it comes before, or zero if the\n * contents of the two bytes are equal. Comparison is done per-rune,\n * on unicode codepoints.\n * @param self The first bytes to compare.\n * @param offset The offset of self.\n * @param len The length of self.\n * @param other The second bytes to compare.\n * @param otheroffset The offset of the other string.\n * @param otherlen The length of the other string.\n * @return The result of the comparison.\n */\n function compare(\n bytes memory self,\n uint256 offset,\n uint256 len,\n bytes memory other,\n uint256 otheroffset,\n uint256 otherlen\n ) internal pure returns (int256) {\n if (offset + len > self.length) {\n revert OffsetOutOfBoundsError(offset + len, self.length);\n }\n if (otheroffset + otherlen > other.length) {\n revert OffsetOutOfBoundsError(otheroffset + otherlen, other.length);\n }\n\n uint256 shortest = len;\n if (otherlen < len) shortest = otherlen;\n\n uint256 selfptr;\n uint256 otherptr;\n\n assembly {\n selfptr := add(self, add(offset, 32))\n otherptr := add(other, add(otheroffset, 32))\n }\n for (uint256 idx = 0; idx < shortest; idx += 32) {\n uint256 a;\n uint256 b;\n assembly {\n a := mload(selfptr)\n b := mload(otherptr)\n }\n if (a != b) {\n // Mask out irrelevant bytes and check again\n uint256 mask;\n if (shortest - idx >= 32) {\n mask = type(uint256).max;\n } else {\n mask = ~(2 ** (8 * (idx + 32 - shortest)) - 1);\n }\n int256 diff = int256(a & mask) - int256(b & mask);\n if (diff != 0) return diff;\n }\n selfptr += 32;\n otherptr += 32;\n }\n\n return int256(len) - int256(otherlen);\n }\n\n /*\n * @dev Returns true if the two byte ranges are equal.\n * @param self The first byte range to compare.\n * @param offset The offset into the first byte range.\n * @param other The second byte range to compare.\n * @param otherOffset The offset into the second byte range.\n * @param len The number of bytes to compare\n * @return True if the byte ranges are equal, false otherwise.\n */\n function equals(\n bytes memory self,\n uint256 offset,\n bytes memory other,\n uint256 otherOffset,\n uint256 len\n ) internal pure returns (bool) {\n return keccak(self, offset, len) == keccak(other, otherOffset, len);\n }\n\n /*\n * @dev Returns true if the two byte ranges are equal with offsets.\n * @param self The first byte range to compare.\n * @param offset The offset into the first byte range.\n * @param other The second byte range to compare.\n * @param otherOffset The offset into the second byte range.\n * @return True if the byte ranges are equal, false otherwise.\n */\n function equals(\n bytes memory self,\n uint256 offset,\n bytes memory other,\n uint256 otherOffset\n ) internal pure returns (bool) {\n return\n keccak(self, offset, self.length - offset) ==\n keccak(other, otherOffset, other.length - otherOffset);\n }\n\n /*\n * @dev Compares a range of 'self' to all of 'other' and returns True iff\n * they are equal.\n * @param self The first byte range to compare.\n * @param offset The offset into the first byte range.\n * @param other The second byte range to compare.\n * @return True if the byte ranges are equal, false otherwise.\n */\n function equals(\n bytes memory self,\n uint256 offset,\n bytes memory other\n ) internal pure returns (bool) {\n return\n self.length == offset + other.length &&\n equals(self, offset, other, 0, other.length);\n }\n\n /*\n * @dev Returns true if the two byte ranges are equal.\n * @param self The first byte range to compare.\n * @param other The second byte range to compare.\n * @return True if the byte ranges are equal, false otherwise.\n */\n function equals(\n bytes memory self,\n bytes memory other\n ) internal pure returns (bool) {\n return\n self.length == other.length &&\n equals(self, 0, other, 0, self.length);\n }\n\n /*\n * @dev Returns the 8-bit number at the specified index of self.\n * @param self The byte string.\n * @param idx The index into the bytes\n * @return The specified 8 bits of the string, interpreted as an integer.\n */\n function readUint8(\n bytes memory self,\n uint256 idx\n ) internal pure returns (uint8 ret) {\n return uint8(self[idx]);\n }\n\n /*\n * @dev Returns the 16-bit number at the specified index of self.\n * @param self The byte string.\n * @param idx The index into the bytes\n * @return The specified 16 bits of the string, interpreted as an integer.\n */\n function readUint16(\n bytes memory self,\n uint256 idx\n ) internal pure returns (uint16 ret) {\n require(idx + 2 <= self.length);\n assembly {\n ret := and(mload(add(add(self, 2), idx)), 0xFFFF)\n }\n }\n\n /*\n * @dev Returns the 32-bit number at the specified index of self.\n * @param self The byte string.\n * @param idx The index into the bytes\n * @return The specified 32 bits of the string, interpreted as an integer.\n */\n function readUint32(\n bytes memory self,\n uint256 idx\n ) internal pure returns (uint32 ret) {\n require(idx + 4 <= self.length);\n assembly {\n ret := and(mload(add(add(self, 4), idx)), 0xFFFFFFFF)\n }\n }\n\n /*\n * @dev Returns the 32 byte value at the specified index of self.\n * @param self The byte string.\n * @param idx The index into the bytes\n * @return The specified 32 bytes of the string.\n */\n function readBytes32(\n bytes memory self,\n uint256 idx\n ) internal pure returns (bytes32 ret) {\n require(idx + 32 <= self.length);\n assembly {\n ret := mload(add(add(self, 32), idx))\n }\n }\n\n /*\n * @dev Returns the 32 byte value at the specified index of self.\n * @param self The byte string.\n * @param idx The index into the bytes\n * @return The specified 32 bytes of the string.\n */\n function readBytes20(\n bytes memory self,\n uint256 idx\n ) internal pure returns (bytes20 ret) {\n require(idx + 20 <= self.length);\n assembly {\n ret := and(\n mload(add(add(self, 32), idx)),\n 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000\n )\n }\n }\n\n /*\n * @dev Returns the n byte value at the specified index of self.\n * @param self The byte string.\n * @param idx The index into the bytes.\n * @param len The number of bytes.\n * @return The specified 32 bytes of the string.\n */\n function readBytesN(\n bytes memory self,\n uint256 idx,\n uint256 len\n ) internal pure returns (bytes32 ret) {\n require(len <= 32);\n require(idx + len <= self.length);\n assembly {\n let mask := not(sub(exp(256, sub(32, len)), 1))\n ret := and(mload(add(add(self, 32), idx)), mask)\n }\n }\n\n function memcpy(uint256 dest, uint256 src, uint256 len) private pure {\n // Copy word-length chunks while possible\n for (; len >= 32; len -= 32) {\n assembly {\n mstore(dest, mload(src))\n }\n dest += 32;\n src += 32;\n }\n\n // Copy remaining bytes\n unchecked {\n uint256 mask = (256 ** (32 - len)) - 1;\n assembly {\n let srcpart := and(mload(src), not(mask))\n let destpart := and(mload(dest), mask)\n mstore(dest, or(destpart, srcpart))\n }\n }\n }\n\n /*\n * @dev Copies a substring into a new byte string.\n * @param self The byte string to copy from.\n * @param offset The offset to start copying at.\n * @param len The number of bytes to copy.\n */\n function substring(\n bytes memory self,\n uint256 offset,\n uint256 len\n ) internal pure returns (bytes memory) {\n require(offset + len <= self.length);\n\n bytes memory ret = new bytes(len);\n uint256 dest;\n uint256 src;\n\n assembly {\n dest := add(ret, 32)\n src := add(add(self, 32), offset)\n }\n memcpy(dest, src, len);\n\n return ret;\n }\n\n // Maps characters from 0x30 to 0x7A to their base32 values.\n // 0xFF represents invalid characters in that range.\n bytes constant base32HexTable =\n hex\"00010203040506070809FFFFFFFFFFFFFF0A0B0C0D0E0F101112131415161718191A1B1C1D1E1FFFFFFFFFFFFFFFFFFFFF0A0B0C0D0E0F101112131415161718191A1B1C1D1E1F\";\n\n /**\n * @dev Decodes unpadded base32 data of up to one word in length.\n * @param self The data to decode.\n * @param off Offset into the string to start at.\n * @param len Number of characters to decode.\n * @return The decoded data, left aligned.\n */\n function base32HexDecodeWord(\n bytes memory self,\n uint256 off,\n uint256 len\n ) internal pure returns (bytes32) {\n require(len <= 52);\n\n uint256 ret = 0;\n uint8 decoded;\n for (uint256 i = 0; i < len; i++) {\n bytes1 char = self[off + i];\n require(char >= 0x30 && char <= 0x7A);\n decoded = uint8(base32HexTable[uint256(uint8(char)) - 0x30]);\n require(decoded <= 0x20);\n if (i == len - 1) {\n break;\n }\n ret = (ret << 5) | decoded;\n }\n\n uint256 bitlen = len * 5;\n if (len % 8 == 0) {\n // Multiple of 8 characters, no padding\n ret = (ret << 5) | decoded;\n } else if (len % 8 == 2) {\n // Two extra characters - 1 byte\n ret = (ret << 3) | (decoded >> 2);\n bitlen -= 2;\n } else if (len % 8 == 4) {\n // Four extra characters - 2 bytes\n ret = (ret << 1) | (decoded >> 4);\n bitlen -= 4;\n } else if (len % 8 == 5) {\n // Five extra characters - 3 bytes\n ret = (ret << 4) | (decoded >> 1);\n bitlen -= 1;\n } else if (len % 8 == 7) {\n // Seven extra characters - 4 bytes\n ret = (ret << 2) | (decoded >> 3);\n bitlen -= 3;\n } else {\n revert();\n }\n\n return bytes32(ret << (256 - bitlen));\n }\n\n /**\n * @dev Finds the first occurrence of the byte `needle` in `self`.\n * @param self The string to search\n * @param off The offset to start searching at\n * @param len The number of bytes to search\n * @param needle The byte to search for\n * @return The offset of `needle` in `self`, or 2**256-1 if it was not found.\n */\n function find(\n bytes memory self,\n uint256 off,\n uint256 len,\n bytes1 needle\n ) internal pure returns (uint256) {\n for (uint256 idx = off; idx < off + len; idx++) {\n if (self[idx] == needle) {\n return idx;\n }\n }\n return type(uint256).max;\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/dnssec-oracle/RRUtils.sol": { + "content": "pragma solidity ^0.8.4;\n\nimport \"./BytesUtils.sol\";\nimport \"@ensdomains/buffer/contracts/Buffer.sol\";\n\n/**\n * @dev RRUtils is a library that provides utilities for parsing DNS resource records.\n */\nlibrary RRUtils {\n using BytesUtils for *;\n using Buffer for *;\n\n /**\n * @dev Returns the number of bytes in the DNS name at 'offset' in 'self'.\n * @param self The byte array to read a name from.\n * @param offset The offset to start reading at.\n * @return The length of the DNS name at 'offset', in bytes.\n */\n function nameLength(\n bytes memory self,\n uint256 offset\n ) internal pure returns (uint256) {\n uint256 idx = offset;\n while (true) {\n assert(idx < self.length);\n uint256 labelLen = self.readUint8(idx);\n idx += labelLen + 1;\n if (labelLen == 0) {\n break;\n }\n }\n return idx - offset;\n }\n\n /**\n * @dev Returns a DNS format name at the specified offset of self.\n * @param self The byte array to read a name from.\n * @param offset The offset to start reading at.\n * @return ret The name.\n */\n function readName(\n bytes memory self,\n uint256 offset\n ) internal pure returns (bytes memory ret) {\n uint256 len = nameLength(self, offset);\n return self.substring(offset, len);\n }\n\n /**\n * @dev Returns the number of labels in the DNS name at 'offset' in 'self'.\n * @param self The byte array to read a name from.\n * @param offset The offset to start reading at.\n * @return The number of labels in the DNS name at 'offset', in bytes.\n */\n function labelCount(\n bytes memory self,\n uint256 offset\n ) internal pure returns (uint256) {\n uint256 count = 0;\n while (true) {\n assert(offset < self.length);\n uint256 labelLen = self.readUint8(offset);\n offset += labelLen + 1;\n if (labelLen == 0) {\n break;\n }\n count += 1;\n }\n return count;\n }\n\n uint256 constant RRSIG_TYPE = 0;\n uint256 constant RRSIG_ALGORITHM = 2;\n uint256 constant RRSIG_LABELS = 3;\n uint256 constant RRSIG_TTL = 4;\n uint256 constant RRSIG_EXPIRATION = 8;\n uint256 constant RRSIG_INCEPTION = 12;\n uint256 constant RRSIG_KEY_TAG = 16;\n uint256 constant RRSIG_SIGNER_NAME = 18;\n\n struct SignedSet {\n uint16 typeCovered;\n uint8 algorithm;\n uint8 labels;\n uint32 ttl;\n uint32 expiration;\n uint32 inception;\n uint16 keytag;\n bytes signerName;\n bytes data;\n bytes name;\n }\n\n function readSignedSet(\n bytes memory data\n ) internal pure returns (SignedSet memory self) {\n self.typeCovered = data.readUint16(RRSIG_TYPE);\n self.algorithm = data.readUint8(RRSIG_ALGORITHM);\n self.labels = data.readUint8(RRSIG_LABELS);\n self.ttl = data.readUint32(RRSIG_TTL);\n self.expiration = data.readUint32(RRSIG_EXPIRATION);\n self.inception = data.readUint32(RRSIG_INCEPTION);\n self.keytag = data.readUint16(RRSIG_KEY_TAG);\n self.signerName = readName(data, RRSIG_SIGNER_NAME);\n self.data = data.substring(\n RRSIG_SIGNER_NAME + self.signerName.length,\n data.length - RRSIG_SIGNER_NAME - self.signerName.length\n );\n }\n\n function rrs(\n SignedSet memory rrset\n ) internal pure returns (RRIterator memory) {\n return iterateRRs(rrset.data, 0);\n }\n\n /**\n * @dev An iterator over resource records.\n */\n struct RRIterator {\n bytes data;\n uint256 offset;\n uint16 dnstype;\n uint16 class;\n uint32 ttl;\n uint256 rdataOffset;\n uint256 nextOffset;\n }\n\n /**\n * @dev Begins iterating over resource records.\n * @param self The byte string to read from.\n * @param offset The offset to start reading at.\n * @return ret An iterator object.\n */\n function iterateRRs(\n bytes memory self,\n uint256 offset\n ) internal pure returns (RRIterator memory ret) {\n ret.data = self;\n ret.nextOffset = offset;\n next(ret);\n }\n\n /**\n * @dev Returns true iff there are more RRs to iterate.\n * @param iter The iterator to check.\n * @return True iff the iterator has finished.\n */\n function done(RRIterator memory iter) internal pure returns (bool) {\n return iter.offset >= iter.data.length;\n }\n\n /**\n * @dev Moves the iterator to the next resource record.\n * @param iter The iterator to advance.\n */\n function next(RRIterator memory iter) internal pure {\n iter.offset = iter.nextOffset;\n if (iter.offset >= iter.data.length) {\n return;\n }\n\n // Skip the name\n uint256 off = iter.offset + nameLength(iter.data, iter.offset);\n\n // Read type, class, and ttl\n iter.dnstype = iter.data.readUint16(off);\n off += 2;\n iter.class = iter.data.readUint16(off);\n off += 2;\n iter.ttl = iter.data.readUint32(off);\n off += 4;\n\n // Read the rdata\n uint256 rdataLength = iter.data.readUint16(off);\n off += 2;\n iter.rdataOffset = off;\n iter.nextOffset = off + rdataLength;\n }\n\n /**\n * @dev Returns the name of the current record.\n * @param iter The iterator.\n * @return A new bytes object containing the owner name from the RR.\n */\n function name(RRIterator memory iter) internal pure returns (bytes memory) {\n return\n iter.data.substring(\n iter.offset,\n nameLength(iter.data, iter.offset)\n );\n }\n\n /**\n * @dev Returns the rdata portion of the current record.\n * @param iter The iterator.\n * @return A new bytes object containing the RR's RDATA.\n */\n function rdata(\n RRIterator memory iter\n ) internal pure returns (bytes memory) {\n return\n iter.data.substring(\n iter.rdataOffset,\n iter.nextOffset - iter.rdataOffset\n );\n }\n\n uint256 constant DNSKEY_FLAGS = 0;\n uint256 constant DNSKEY_PROTOCOL = 2;\n uint256 constant DNSKEY_ALGORITHM = 3;\n uint256 constant DNSKEY_PUBKEY = 4;\n\n struct DNSKEY {\n uint16 flags;\n uint8 protocol;\n uint8 algorithm;\n bytes publicKey;\n }\n\n function readDNSKEY(\n bytes memory data,\n uint256 offset,\n uint256 length\n ) internal pure returns (DNSKEY memory self) {\n self.flags = data.readUint16(offset + DNSKEY_FLAGS);\n self.protocol = data.readUint8(offset + DNSKEY_PROTOCOL);\n self.algorithm = data.readUint8(offset + DNSKEY_ALGORITHM);\n self.publicKey = data.substring(\n offset + DNSKEY_PUBKEY,\n length - DNSKEY_PUBKEY\n );\n }\n\n uint256 constant DS_KEY_TAG = 0;\n uint256 constant DS_ALGORITHM = 2;\n uint256 constant DS_DIGEST_TYPE = 3;\n uint256 constant DS_DIGEST = 4;\n\n struct DS {\n uint16 keytag;\n uint8 algorithm;\n uint8 digestType;\n bytes digest;\n }\n\n function readDS(\n bytes memory data,\n uint256 offset,\n uint256 length\n ) internal pure returns (DS memory self) {\n self.keytag = data.readUint16(offset + DS_KEY_TAG);\n self.algorithm = data.readUint8(offset + DS_ALGORITHM);\n self.digestType = data.readUint8(offset + DS_DIGEST_TYPE);\n self.digest = data.substring(offset + DS_DIGEST, length - DS_DIGEST);\n }\n\n function isSubdomainOf(\n bytes memory self,\n bytes memory other\n ) internal pure returns (bool) {\n uint256 off = 0;\n uint256 counts = labelCount(self, 0);\n uint256 othercounts = labelCount(other, 0);\n\n while (counts > othercounts) {\n off = progress(self, off);\n counts--;\n }\n\n return self.equals(off, other, 0);\n }\n\n function compareNames(\n bytes memory self,\n bytes memory other\n ) internal pure returns (int256) {\n if (self.equals(other)) {\n return 0;\n }\n\n uint256 off;\n uint256 otheroff;\n uint256 prevoff;\n uint256 otherprevoff;\n uint256 counts = labelCount(self, 0);\n uint256 othercounts = labelCount(other, 0);\n\n // Keep removing labels from the front of the name until both names are equal length\n while (counts > othercounts) {\n prevoff = off;\n off = progress(self, off);\n counts--;\n }\n\n while (othercounts > counts) {\n otherprevoff = otheroff;\n otheroff = progress(other, otheroff);\n othercounts--;\n }\n\n // Compare the last nonequal labels to each other\n while (counts > 0 && !self.equals(off, other, otheroff)) {\n prevoff = off;\n off = progress(self, off);\n otherprevoff = otheroff;\n otheroff = progress(other, otheroff);\n counts -= 1;\n }\n\n if (off == 0) {\n return -1;\n }\n if (otheroff == 0) {\n return 1;\n }\n\n return\n self.compare(\n prevoff + 1,\n self.readUint8(prevoff),\n other,\n otherprevoff + 1,\n other.readUint8(otherprevoff)\n );\n }\n\n /**\n * @dev Compares two serial numbers using RFC1982 serial number math.\n */\n function serialNumberGte(\n uint32 i1,\n uint32 i2\n ) internal pure returns (bool) {\n unchecked {\n return int32(i1) - int32(i2) >= 0;\n }\n }\n\n function progress(\n bytes memory body,\n uint256 off\n ) internal pure returns (uint256) {\n return off + 1 + body.readUint8(off);\n }\n\n /**\n * @dev Computes the keytag for a chunk of data.\n * @param data The data to compute a keytag for.\n * @return The computed key tag.\n */\n function computeKeytag(bytes memory data) internal pure returns (uint16) {\n /* This function probably deserves some explanation.\n * The DNSSEC keytag function is a checksum that relies on summing up individual bytes\n * from the input string, with some mild bitshifting. Here's a Naive solidity implementation:\n *\n * function computeKeytag(bytes memory data) internal pure returns (uint16) {\n * uint ac;\n * for (uint i = 0; i < data.length; i++) {\n * ac += i & 1 == 0 ? uint16(data.readUint8(i)) << 8 : data.readUint8(i);\n * }\n * return uint16(ac + (ac >> 16));\n * }\n *\n * The EVM, with its 256 bit words, is exceedingly inefficient at doing byte-by-byte operations;\n * the code above, on reasonable length inputs, consumes over 100k gas. But we can make the EVM's\n * large words work in our favour.\n *\n * The code below works by treating the input as a series of 256 bit words. It first masks out\n * even and odd bytes from each input word, adding them to two separate accumulators `ac1` and `ac2`.\n * The bytes are separated by empty bytes, so as long as no individual sum exceeds 2^16-1, we're\n * effectively summing 16 different numbers with each EVM ADD opcode.\n *\n * Once it's added up all the inputs, it has to add all the 16 bit values in `ac1` and `ac2` together.\n * It does this using the same trick - mask out every other value, shift to align them, add them together.\n * After the first addition on both accumulators, there's enough room to add the two accumulators together,\n * and the remaining sums can be done just on ac1.\n */\n unchecked {\n require(data.length <= 8192, \"Long keys not permitted\");\n uint256 ac1;\n uint256 ac2;\n for (uint256 i = 0; i < data.length + 31; i += 32) {\n uint256 word;\n assembly {\n word := mload(add(add(data, 32), i))\n }\n if (i + 32 > data.length) {\n uint256 unused = 256 - (data.length - i) * 8;\n word = (word >> unused) << unused;\n }\n ac1 +=\n (word &\n 0xFF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00) >>\n 8;\n ac2 += (word &\n 0x00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF);\n }\n ac1 =\n (ac1 &\n 0x0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF) +\n ((ac1 &\n 0xFFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000) >>\n 16);\n ac2 =\n (ac2 &\n 0x0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF) +\n ((ac2 &\n 0xFFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000) >>\n 16);\n ac1 = (ac1 << 8) + ac2;\n ac1 =\n (ac1 &\n 0x00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF) +\n ((ac1 &\n 0xFFFFFFFF00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF00000000) >>\n 32);\n ac1 =\n (ac1 &\n 0x0000000000000000FFFFFFFFFFFFFFFF0000000000000000FFFFFFFFFFFFFFFF) +\n ((ac1 &\n 0xFFFFFFFFFFFFFFFF0000000000000000FFFFFFFFFFFFFFFF0000000000000000) >>\n 64);\n ac1 =\n (ac1 &\n 0x00000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) +\n (ac1 >> 128);\n ac1 += (ac1 >> 16) & 0xFFFF;\n return uint16(ac1);\n }\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/ethregistrar/IBaseRegistrar.sol": { + "content": "import \"../registry/ENS.sol\";\nimport \"./IBaseRegistrar.sol\";\nimport \"@openzeppelin/contracts/token/ERC721/IERC721.sol\";\n\ninterface IBaseRegistrar is IERC721 {\n event ControllerAdded(address indexed controller);\n event ControllerRemoved(address indexed controller);\n event NameMigrated(\n uint256 indexed id,\n address indexed owner,\n uint256 expires\n );\n event NameRegistered(\n uint256 indexed id,\n address indexed owner,\n uint256 expires\n );\n event NameRenewed(uint256 indexed id, uint256 expires);\n\n // Authorises a controller, who can register and renew domains.\n function addController(address controller) external;\n\n // Revoke controller permission for an address.\n function removeController(address controller) external;\n\n // Set the resolver for the TLD this registrar manages.\n function setResolver(address resolver) external;\n\n // Returns the expiration timestamp of the specified label hash.\n function nameExpires(uint256 id) external view returns (uint256);\n\n // Returns true if the specified name is available for registration.\n function available(uint256 id) external view returns (bool);\n\n /**\n * @dev Register a name.\n */\n function register(\n uint256 id,\n address owner,\n uint256 duration\n ) external returns (uint256);\n\n function renew(uint256 id, uint256 duration) external returns (uint256);\n\n /**\n * @dev Reclaim ownership of a name in ENS, if you own it in the registrar.\n */\n function reclaim(uint256 id, address owner) external;\n}\n" + }, + "@ensdomains/ens-contracts/contracts/registry/ENS.sol": { + "content": "pragma solidity >=0.8.4;\n\ninterface ENS {\n // Logged when the owner of a node assigns a new owner to a subnode.\n event NewOwner(bytes32 indexed node, bytes32 indexed label, address owner);\n\n // Logged when the owner of a node transfers ownership to a new account.\n event Transfer(bytes32 indexed node, address owner);\n\n // Logged when the resolver for a node changes.\n event NewResolver(bytes32 indexed node, address resolver);\n\n // Logged when the TTL of a node changes\n event NewTTL(bytes32 indexed node, uint64 ttl);\n\n // Logged when an operator is added or removed.\n event ApprovalForAll(\n address indexed owner,\n address indexed operator,\n bool approved\n );\n\n function setRecord(\n bytes32 node,\n address owner,\n address resolver,\n uint64 ttl\n ) external;\n\n function setSubnodeRecord(\n bytes32 node,\n bytes32 label,\n address owner,\n address resolver,\n uint64 ttl\n ) external;\n\n function setSubnodeOwner(\n bytes32 node,\n bytes32 label,\n address owner\n ) external returns (bytes32);\n\n function setResolver(bytes32 node, address resolver) external;\n\n function setOwner(bytes32 node, address owner) external;\n\n function setTTL(bytes32 node, uint64 ttl) external;\n\n function setApprovalForAll(address operator, bool approved) external;\n\n function owner(bytes32 node) external view returns (address);\n\n function resolver(bytes32 node) external view returns (address);\n\n function ttl(bytes32 node) external view returns (uint64);\n\n function recordExists(bytes32 node) external view returns (bool);\n\n function isApprovedForAll(\n address owner,\n address operator\n ) external view returns (bool);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/DelegatableResolver.sol": { + "content": "pragma solidity >=0.8.4;\nimport \"./profiles/ABIResolver.sol\";\nimport \"./profiles/AddrResolver.sol\";\nimport \"./profiles/ContentHashResolver.sol\";\nimport \"./profiles/DNSResolver.sol\";\nimport \"./profiles/InterfaceResolver.sol\";\nimport \"./profiles/NameResolver.sol\";\nimport \"./profiles/PubkeyResolver.sol\";\nimport \"./profiles/TextResolver.sol\";\nimport \"./profiles/ExtendedResolver.sol\";\nimport \"./Multicallable.sol\";\nimport \"./IDelegatableResolver.sol\";\nimport {Clone} from \"clones-with-immutable-args/src/Clone.sol\";\n\n/**\n * A delegated resolver that allows the resolver owner to add an operator to update records of a node on behalf of the owner.\n * address.\n */\ncontract DelegatableResolver is\n Clone,\n Multicallable,\n ABIResolver,\n AddrResolver,\n ContentHashResolver,\n DNSResolver,\n InterfaceResolver,\n NameResolver,\n PubkeyResolver,\n TextResolver,\n ExtendedResolver\n{\n using BytesUtils for bytes;\n\n // Logged when an operator is added or removed.\n event Approval(\n bytes32 indexed node,\n address indexed operator,\n bytes name,\n bool approved\n );\n\n error NotAuthorized(bytes32 node);\n\n //node => (delegate => isAuthorised)\n mapping(bytes32 => mapping(address => bool)) operators;\n\n /*\n * Check to see if the operator has been approved by the owner for the node.\n * @param name The ENS node to query\n * @param offset The offset of the label to query recursively. Start from the 0 position and kepp adding the length of each label as it traverse. The function exits when len is 0.\n * @param operator The address of the operator to query\n * @return node The node of the name passed as an argument\n * @return authorized The boolean state of whether the operator is approved to update record of the name\n */\n function getAuthorisedNode(\n bytes memory name,\n uint256 offset,\n address operator\n ) public view returns (bytes32 node, bool authorized) {\n uint256 len = name.readUint8(offset);\n node = bytes32(0);\n if (len > 0) {\n bytes32 label = name.keccak(offset + 1, len);\n (node, authorized) = getAuthorisedNode(\n name,\n offset + len + 1,\n operator\n );\n node = keccak256(abi.encodePacked(node, label));\n } else {\n return (\n node,\n authorized || operators[node][operator] || owner() == operator\n );\n }\n return (node, authorized || operators[node][operator]);\n }\n\n /**\n * @dev Approve an operator to be able to updated records on a node.\n */\n function approve(\n bytes memory name,\n address operator,\n bool approved\n ) external {\n (bytes32 node, bool authorized) = getAuthorisedNode(\n name,\n 0,\n msg.sender\n );\n if (!authorized) {\n revert NotAuthorized(node);\n }\n operators[node][operator] = approved;\n emit Approval(node, operator, name, approved);\n }\n\n /*\n * Returns the owner address passed set by the Factory\n * @return address The owner address\n */\n function owner() public view returns (address) {\n return _getArgAddress(0);\n }\n\n function isAuthorised(bytes32 node) internal view override returns (bool) {\n return msg.sender == owner() || operators[node][msg.sender];\n }\n\n function supportsInterface(\n bytes4 interfaceID\n )\n public\n view\n virtual\n override(\n Multicallable,\n ABIResolver,\n AddrResolver,\n ContentHashResolver,\n DNSResolver,\n InterfaceResolver,\n NameResolver,\n PubkeyResolver,\n TextResolver\n )\n returns (bool)\n {\n return\n interfaceID == type(IDelegatableResolver).interfaceId ||\n super.supportsInterface(interfaceID);\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/IDelegatableResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface IDelegatableResolver {\n function approve(\n bytes memory name,\n address operator,\n bool approved\n ) external;\n\n function getAuthorisedNode(\n bytes memory name,\n uint256 offset,\n address operator\n ) external returns (bytes32 node, bool authorized);\n\n function owner() external view returns (address);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/IMulticallable.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\ninterface IMulticallable {\n function multicall(\n bytes[] calldata data\n ) external returns (bytes[] memory results);\n\n function multicallWithNodeCheck(\n bytes32,\n bytes[] calldata data\n ) external returns (bytes[] memory results);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/Multicallable.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\nimport \"./IMulticallable.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\n\nabstract contract Multicallable is IMulticallable, ERC165 {\n function _multicall(\n bytes32 nodehash,\n bytes[] calldata data\n ) internal returns (bytes[] memory results) {\n results = new bytes[](data.length);\n for (uint256 i = 0; i < data.length; i++) {\n if (nodehash != bytes32(0)) {\n bytes32 txNamehash = bytes32(data[i][4:36]);\n require(\n txNamehash == nodehash,\n \"multicall: All records must have a matching namehash\"\n );\n }\n (bool success, bytes memory result) = address(this).delegatecall(\n data[i]\n );\n require(success);\n results[i] = result;\n }\n return results;\n }\n\n // This function provides an extra security check when called\n // from priviledged contracts (such as EthRegistrarController)\n // that can set records on behalf of the node owners\n function multicallWithNodeCheck(\n bytes32 nodehash,\n bytes[] calldata data\n ) external returns (bytes[] memory results) {\n return _multicall(nodehash, data);\n }\n\n function multicall(\n bytes[] calldata data\n ) public override returns (bytes[] memory results) {\n return _multicall(bytes32(0), data);\n }\n\n function supportsInterface(\n bytes4 interfaceID\n ) public view virtual override returns (bool) {\n return\n interfaceID == type(IMulticallable).interfaceId ||\n super.supportsInterface(interfaceID);\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/ABIResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\nimport \"./IABIResolver.sol\";\nimport \"../ResolverBase.sol\";\n\nabstract contract ABIResolver is IABIResolver, ResolverBase {\n mapping(uint64 => mapping(bytes32 => mapping(uint256 => bytes))) versionable_abis;\n\n /**\n * Sets the ABI associated with an ENS node.\n * Nodes may have one ABI of each content type. To remove an ABI, set it to\n * the empty string.\n * @param node The node to update.\n * @param contentType The content type of the ABI\n * @param data The ABI data.\n */\n function setABI(\n bytes32 node,\n uint256 contentType,\n bytes calldata data\n ) external virtual authorised(node) {\n // Content types must be powers of 2\n require(((contentType - 1) & contentType) == 0);\n\n versionable_abis[recordVersions[node]][node][contentType] = data;\n emit ABIChanged(node, contentType);\n }\n\n /**\n * Returns the ABI associated with an ENS node.\n * Defined in EIP205.\n * @param node The ENS node to query\n * @param contentTypes A bitwise OR of the ABI formats accepted by the caller.\n * @return contentType The content type of the return value\n * @return data The ABI data\n */\n function ABI(\n bytes32 node,\n uint256 contentTypes\n ) external view virtual override returns (uint256, bytes memory) {\n mapping(uint256 => bytes) storage abiset = versionable_abis[\n recordVersions[node]\n ][node];\n\n for (\n uint256 contentType = 1;\n contentType <= contentTypes;\n contentType <<= 1\n ) {\n if (\n (contentType & contentTypes) != 0 &&\n abiset[contentType].length > 0\n ) {\n return (contentType, abiset[contentType]);\n }\n }\n\n return (0, bytes(\"\"));\n }\n\n function supportsInterface(\n bytes4 interfaceID\n ) public view virtual override returns (bool) {\n return\n interfaceID == type(IABIResolver).interfaceId ||\n super.supportsInterface(interfaceID);\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/AddrResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\nimport \"../ResolverBase.sol\";\nimport \"./IAddrResolver.sol\";\nimport \"./IAddressResolver.sol\";\n\nabstract contract AddrResolver is\n IAddrResolver,\n IAddressResolver,\n ResolverBase\n{\n uint256 private constant COIN_TYPE_ETH = 60;\n\n mapping(uint64 => mapping(bytes32 => mapping(uint256 => bytes))) versionable_addresses;\n\n /**\n * Sets the address associated with an ENS node.\n * May only be called by the owner of that node in the ENS registry.\n * @param node The node to update.\n * @param a The address to set.\n */\n function setAddr(\n bytes32 node,\n address a\n ) external virtual authorised(node) {\n setAddr(node, COIN_TYPE_ETH, addressToBytes(a));\n }\n\n /**\n * Returns the address associated with an ENS node.\n * @param node The ENS node to query.\n * @return The associated address.\n */\n function addr(\n bytes32 node\n ) public view virtual override returns (address payable) {\n bytes memory a = addr(node, COIN_TYPE_ETH);\n if (a.length == 0) {\n return payable(0);\n }\n return bytesToAddress(a);\n }\n\n function setAddr(\n bytes32 node,\n uint256 coinType,\n bytes memory a\n ) public virtual authorised(node) {\n emit AddressChanged(node, coinType, a);\n if (coinType == COIN_TYPE_ETH) {\n emit AddrChanged(node, bytesToAddress(a));\n }\n versionable_addresses[recordVersions[node]][node][coinType] = a;\n }\n\n function addr(\n bytes32 node,\n uint256 coinType\n ) public view virtual override returns (bytes memory) {\n return versionable_addresses[recordVersions[node]][node][coinType];\n }\n\n function supportsInterface(\n bytes4 interfaceID\n ) public view virtual override returns (bool) {\n return\n interfaceID == type(IAddrResolver).interfaceId ||\n interfaceID == type(IAddressResolver).interfaceId ||\n super.supportsInterface(interfaceID);\n }\n\n function bytesToAddress(\n bytes memory b\n ) internal pure returns (address payable a) {\n require(b.length == 20);\n assembly {\n a := div(mload(add(b, 32)), exp(256, 12))\n }\n }\n\n function addressToBytes(address a) internal pure returns (bytes memory b) {\n b = new bytes(20);\n assembly {\n mstore(add(b, 32), mul(a, exp(256, 12)))\n }\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/ContentHashResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\nimport \"../ResolverBase.sol\";\nimport \"./IContentHashResolver.sol\";\n\nabstract contract ContentHashResolver is IContentHashResolver, ResolverBase {\n mapping(uint64 => mapping(bytes32 => bytes)) versionable_hashes;\n\n /**\n * Sets the contenthash associated with an ENS node.\n * May only be called by the owner of that node in the ENS registry.\n * @param node The node to update.\n * @param hash The contenthash to set\n */\n function setContenthash(\n bytes32 node,\n bytes calldata hash\n ) external virtual authorised(node) {\n versionable_hashes[recordVersions[node]][node] = hash;\n emit ContenthashChanged(node, hash);\n }\n\n /**\n * Returns the contenthash associated with an ENS node.\n * @param node The ENS node to query.\n * @return The associated contenthash.\n */\n function contenthash(\n bytes32 node\n ) external view virtual override returns (bytes memory) {\n return versionable_hashes[recordVersions[node]][node];\n }\n\n function supportsInterface(\n bytes4 interfaceID\n ) public view virtual override returns (bool) {\n return\n interfaceID == type(IContentHashResolver).interfaceId ||\n super.supportsInterface(interfaceID);\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/DNSResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\nimport \"../ResolverBase.sol\";\nimport \"../../dnssec-oracle/RRUtils.sol\";\nimport \"./IDNSRecordResolver.sol\";\nimport \"./IDNSZoneResolver.sol\";\n\nabstract contract DNSResolver is\n IDNSRecordResolver,\n IDNSZoneResolver,\n ResolverBase\n{\n using RRUtils for *;\n using BytesUtils for bytes;\n\n // Zone hashes for the domains.\n // A zone hash is an EIP-1577 content hash in binary format that should point to a\n // resource containing a single zonefile.\n // node => contenthash\n mapping(uint64 => mapping(bytes32 => bytes)) private versionable_zonehashes;\n\n // The records themselves. Stored as binary RRSETs\n // node => version => name => resource => data\n mapping(uint64 => mapping(bytes32 => mapping(bytes32 => mapping(uint16 => bytes))))\n private versionable_records;\n\n // Count of number of entries for a given name. Required for DNS resolvers\n // when resolving wildcards.\n // node => version => name => number of records\n mapping(uint64 => mapping(bytes32 => mapping(bytes32 => uint16)))\n private versionable_nameEntriesCount;\n\n /**\n * Set one or more DNS records. Records are supplied in wire-format.\n * Records with the same node/name/resource must be supplied one after the\n * other to ensure the data is updated correctly. For example, if the data\n * was supplied:\n * a.example.com IN A 1.2.3.4\n * a.example.com IN A 5.6.7.8\n * www.example.com IN CNAME a.example.com.\n * then this would store the two A records for a.example.com correctly as a\n * single RRSET, however if the data was supplied:\n * a.example.com IN A 1.2.3.4\n * www.example.com IN CNAME a.example.com.\n * a.example.com IN A 5.6.7.8\n * then this would store the first A record, the CNAME, then the second A\n * record which would overwrite the first.\n *\n * @param node the namehash of the node for which to set the records\n * @param data the DNS wire format records to set\n */\n function setDNSRecords(\n bytes32 node,\n bytes calldata data\n ) external virtual authorised(node) {\n uint16 resource = 0;\n uint256 offset = 0;\n bytes memory name;\n bytes memory value;\n bytes32 nameHash;\n uint64 version = recordVersions[node];\n // Iterate over the data to add the resource records\n for (\n RRUtils.RRIterator memory iter = data.iterateRRs(0);\n !iter.done();\n iter.next()\n ) {\n if (resource == 0) {\n resource = iter.dnstype;\n name = iter.name();\n nameHash = keccak256(abi.encodePacked(name));\n value = bytes(iter.rdata());\n } else {\n bytes memory newName = iter.name();\n if (resource != iter.dnstype || !name.equals(newName)) {\n setDNSRRSet(\n node,\n name,\n resource,\n data,\n offset,\n iter.offset - offset,\n value.length == 0,\n version\n );\n resource = iter.dnstype;\n offset = iter.offset;\n name = newName;\n nameHash = keccak256(name);\n value = bytes(iter.rdata());\n }\n }\n }\n if (name.length > 0) {\n setDNSRRSet(\n node,\n name,\n resource,\n data,\n offset,\n data.length - offset,\n value.length == 0,\n version\n );\n }\n }\n\n /**\n * Obtain a DNS record.\n * @param node the namehash of the node for which to fetch the record\n * @param name the keccak-256 hash of the fully-qualified name for which to fetch the record\n * @param resource the ID of the resource as per https://en.wikipedia.org/wiki/List_of_DNS_record_types\n * @return the DNS record in wire format if present, otherwise empty\n */\n function dnsRecord(\n bytes32 node,\n bytes32 name,\n uint16 resource\n ) public view virtual override returns (bytes memory) {\n return versionable_records[recordVersions[node]][node][name][resource];\n }\n\n /**\n * Check if a given node has records.\n * @param node the namehash of the node for which to check the records\n * @param name the namehash of the node for which to check the records\n */\n function hasDNSRecords(\n bytes32 node,\n bytes32 name\n ) public view virtual returns (bool) {\n return (versionable_nameEntriesCount[recordVersions[node]][node][\n name\n ] != 0);\n }\n\n /**\n * setZonehash sets the hash for the zone.\n * May only be called by the owner of that node in the ENS registry.\n * @param node The node to update.\n * @param hash The zonehash to set\n */\n function setZonehash(\n bytes32 node,\n bytes calldata hash\n ) external virtual authorised(node) {\n uint64 currentRecordVersion = recordVersions[node];\n bytes memory oldhash = versionable_zonehashes[currentRecordVersion][\n node\n ];\n versionable_zonehashes[currentRecordVersion][node] = hash;\n emit DNSZonehashChanged(node, oldhash, hash);\n }\n\n /**\n * zonehash obtains the hash for the zone.\n * @param node The ENS node to query.\n * @return The associated contenthash.\n */\n function zonehash(\n bytes32 node\n ) external view virtual override returns (bytes memory) {\n return versionable_zonehashes[recordVersions[node]][node];\n }\n\n function supportsInterface(\n bytes4 interfaceID\n ) public view virtual override returns (bool) {\n return\n interfaceID == type(IDNSRecordResolver).interfaceId ||\n interfaceID == type(IDNSZoneResolver).interfaceId ||\n super.supportsInterface(interfaceID);\n }\n\n function setDNSRRSet(\n bytes32 node,\n bytes memory name,\n uint16 resource,\n bytes memory data,\n uint256 offset,\n uint256 size,\n bool deleteRecord,\n uint64 version\n ) private {\n bytes32 nameHash = keccak256(name);\n bytes memory rrData = data.substring(offset, size);\n if (deleteRecord) {\n if (\n versionable_records[version][node][nameHash][resource].length !=\n 0\n ) {\n versionable_nameEntriesCount[version][node][nameHash]--;\n }\n delete (versionable_records[version][node][nameHash][resource]);\n emit DNSRecordDeleted(node, name, resource);\n } else {\n if (\n versionable_records[version][node][nameHash][resource].length ==\n 0\n ) {\n versionable_nameEntriesCount[version][node][nameHash]++;\n }\n versionable_records[version][node][nameHash][resource] = rrData;\n emit DNSRecordChanged(node, name, resource, rrData);\n }\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/ExtendedResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\ncontract ExtendedResolver {\n function resolve(\n bytes memory /* name */,\n bytes memory data\n ) external view returns (bytes memory) {\n (bool success, bytes memory result) = address(this).staticcall(data);\n if (success) {\n return result;\n } else {\n // Revert with the reason provided by the call\n assembly {\n revert(add(result, 0x20), mload(result))\n }\n }\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/IABIResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface IABIResolver {\n event ABIChanged(bytes32 indexed node, uint256 indexed contentType);\n\n /**\n * Returns the ABI associated with an ENS node.\n * Defined in EIP205.\n * @param node The ENS node to query\n * @param contentTypes A bitwise OR of the ABI formats accepted by the caller.\n * @return contentType The content type of the return value\n * @return data The ABI data\n */\n function ABI(\n bytes32 node,\n uint256 contentTypes\n ) external view returns (uint256, bytes memory);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/IAddressResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\n/**\n * Interface for the new (multicoin) addr function.\n */\ninterface IAddressResolver {\n event AddressChanged(\n bytes32 indexed node,\n uint256 coinType,\n bytes newAddress\n );\n\n function addr(\n bytes32 node,\n uint256 coinType\n ) external view returns (bytes memory);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/IAddrResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\n/**\n * Interface for the legacy (ETH-only) addr function.\n */\ninterface IAddrResolver {\n event AddrChanged(bytes32 indexed node, address a);\n\n /**\n * Returns the address associated with an ENS node.\n * @param node The ENS node to query.\n * @return The associated address.\n */\n function addr(bytes32 node) external view returns (address payable);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/IContentHashResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface IContentHashResolver {\n event ContenthashChanged(bytes32 indexed node, bytes hash);\n\n /**\n * Returns the contenthash associated with an ENS node.\n * @param node The ENS node to query.\n * @return The associated contenthash.\n */\n function contenthash(bytes32 node) external view returns (bytes memory);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/IDNSRecordResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface IDNSRecordResolver {\n // DNSRecordChanged is emitted whenever a given node/name/resource's RRSET is updated.\n event DNSRecordChanged(\n bytes32 indexed node,\n bytes name,\n uint16 resource,\n bytes record\n );\n // DNSRecordDeleted is emitted whenever a given node/name/resource's RRSET is deleted.\n event DNSRecordDeleted(bytes32 indexed node, bytes name, uint16 resource);\n\n /**\n * Obtain a DNS record.\n * @param node the namehash of the node for which to fetch the record\n * @param name the keccak-256 hash of the fully-qualified name for which to fetch the record\n * @param resource the ID of the resource as per https://en.wikipedia.org/wiki/List_of_DNS_record_types\n * @return the DNS record in wire format if present, otherwise empty\n */\n function dnsRecord(\n bytes32 node,\n bytes32 name,\n uint16 resource\n ) external view returns (bytes memory);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/IDNSZoneResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface IDNSZoneResolver {\n // DNSZonehashChanged is emitted whenever a given node's zone hash is updated.\n event DNSZonehashChanged(\n bytes32 indexed node,\n bytes lastzonehash,\n bytes zonehash\n );\n\n /**\n * zonehash obtains the hash for the zone.\n * @param node The ENS node to query.\n * @return The associated contenthash.\n */\n function zonehash(bytes32 node) external view returns (bytes memory);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/IExtendedResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\ninterface IExtendedResolver {\n function resolve(\n bytes memory name,\n bytes memory data\n ) external view returns (bytes memory);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/IInterfaceResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface IInterfaceResolver {\n event InterfaceChanged(\n bytes32 indexed node,\n bytes4 indexed interfaceID,\n address implementer\n );\n\n /**\n * Returns the address of a contract that implements the specified interface for this name.\n * If an implementer has not been set for this interfaceID and name, the resolver will query\n * the contract at `addr()`. If `addr()` is set, a contract exists at that address, and that\n * contract implements EIP165 and returns `true` for the specified interfaceID, its address\n * will be returned.\n * @param node The ENS node to query.\n * @param interfaceID The EIP 165 interface ID to check for.\n * @return The address that implements this interface, or 0 if the interface is unsupported.\n */\n function interfaceImplementer(\n bytes32 node,\n bytes4 interfaceID\n ) external view returns (address);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/INameResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface INameResolver {\n event NameChanged(bytes32 indexed node, string name);\n\n /**\n * Returns the name associated with an ENS node, for reverse records.\n * Defined in EIP181.\n * @param node The ENS node to query.\n * @return The associated name.\n */\n function name(bytes32 node) external view returns (string memory);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/InterfaceResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\nimport \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport \"../ResolverBase.sol\";\nimport \"./AddrResolver.sol\";\nimport \"./IInterfaceResolver.sol\";\n\nabstract contract InterfaceResolver is IInterfaceResolver, AddrResolver {\n mapping(uint64 => mapping(bytes32 => mapping(bytes4 => address))) versionable_interfaces;\n\n /**\n * Sets an interface associated with a name.\n * Setting the address to 0 restores the default behaviour of querying the contract at `addr()` for interface support.\n * @param node The node to update.\n * @param interfaceID The EIP 165 interface ID.\n * @param implementer The address of a contract that implements this interface for this node.\n */\n function setInterface(\n bytes32 node,\n bytes4 interfaceID,\n address implementer\n ) external virtual authorised(node) {\n versionable_interfaces[recordVersions[node]][node][\n interfaceID\n ] = implementer;\n emit InterfaceChanged(node, interfaceID, implementer);\n }\n\n /**\n * Returns the address of a contract that implements the specified interface for this name.\n * If an implementer has not been set for this interfaceID and name, the resolver will query\n * the contract at `addr()`. If `addr()` is set, a contract exists at that address, and that\n * contract implements EIP165 and returns `true` for the specified interfaceID, its address\n * will be returned.\n * @param node The ENS node to query.\n * @param interfaceID The EIP 165 interface ID to check for.\n * @return The address that implements this interface, or 0 if the interface is unsupported.\n */\n function interfaceImplementer(\n bytes32 node,\n bytes4 interfaceID\n ) external view virtual override returns (address) {\n address implementer = versionable_interfaces[recordVersions[node]][\n node\n ][interfaceID];\n if (implementer != address(0)) {\n return implementer;\n }\n\n address a = addr(node);\n if (a == address(0)) {\n return address(0);\n }\n\n (bool success, bytes memory returnData) = a.staticcall(\n abi.encodeWithSignature(\n \"supportsInterface(bytes4)\",\n type(IERC165).interfaceId\n )\n );\n if (!success || returnData.length < 32 || returnData[31] == 0) {\n // EIP 165 not supported by target\n return address(0);\n }\n\n (success, returnData) = a.staticcall(\n abi.encodeWithSignature(\"supportsInterface(bytes4)\", interfaceID)\n );\n if (!success || returnData.length < 32 || returnData[31] == 0) {\n // Specified interface not supported by target\n return address(0);\n }\n\n return a;\n }\n\n function supportsInterface(\n bytes4 interfaceID\n ) public view virtual override returns (bool) {\n return\n interfaceID == type(IInterfaceResolver).interfaceId ||\n super.supportsInterface(interfaceID);\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/IPubkeyResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface IPubkeyResolver {\n event PubkeyChanged(bytes32 indexed node, bytes32 x, bytes32 y);\n\n /**\n * Returns the SECP256k1 public key associated with an ENS node.\n * Defined in EIP 619.\n * @param node The ENS node to query\n * @return x The X coordinate of the curve point for the public key.\n * @return y The Y coordinate of the curve point for the public key.\n */\n function pubkey(bytes32 node) external view returns (bytes32 x, bytes32 y);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/ITextResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface ITextResolver {\n event TextChanged(\n bytes32 indexed node,\n string indexed indexedKey,\n string key,\n string value\n );\n\n /**\n * Returns the text data associated with an ENS node and key.\n * @param node The ENS node to query.\n * @param key The text data key to query.\n * @return The associated text data.\n */\n function text(\n bytes32 node,\n string calldata key\n ) external view returns (string memory);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/IVersionableResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface IVersionableResolver {\n event VersionChanged(bytes32 indexed node, uint64 newVersion);\n\n function recordVersions(bytes32 node) external view returns (uint64);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/NameResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\nimport \"../ResolverBase.sol\";\nimport \"./INameResolver.sol\";\n\nabstract contract NameResolver is INameResolver, ResolverBase {\n mapping(uint64 => mapping(bytes32 => string)) versionable_names;\n\n /**\n * Sets the name associated with an ENS node, for reverse records.\n * May only be called by the owner of that node in the ENS registry.\n * @param node The node to update.\n */\n function setName(\n bytes32 node,\n string calldata newName\n ) external virtual authorised(node) {\n versionable_names[recordVersions[node]][node] = newName;\n emit NameChanged(node, newName);\n }\n\n /**\n * Returns the name associated with an ENS node, for reverse records.\n * Defined in EIP181.\n * @param node The ENS node to query.\n * @return The associated name.\n */\n function name(\n bytes32 node\n ) external view virtual override returns (string memory) {\n return versionable_names[recordVersions[node]][node];\n }\n\n function supportsInterface(\n bytes4 interfaceID\n ) public view virtual override returns (bool) {\n return\n interfaceID == type(INameResolver).interfaceId ||\n super.supportsInterface(interfaceID);\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/PubkeyResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\nimport \"../ResolverBase.sol\";\nimport \"./IPubkeyResolver.sol\";\n\nabstract contract PubkeyResolver is IPubkeyResolver, ResolverBase {\n struct PublicKey {\n bytes32 x;\n bytes32 y;\n }\n\n mapping(uint64 => mapping(bytes32 => PublicKey)) versionable_pubkeys;\n\n /**\n * Sets the SECP256k1 public key associated with an ENS node.\n * @param node The ENS node to query\n * @param x the X coordinate of the curve point for the public key.\n * @param y the Y coordinate of the curve point for the public key.\n */\n function setPubkey(\n bytes32 node,\n bytes32 x,\n bytes32 y\n ) external virtual authorised(node) {\n versionable_pubkeys[recordVersions[node]][node] = PublicKey(x, y);\n emit PubkeyChanged(node, x, y);\n }\n\n /**\n * Returns the SECP256k1 public key associated with an ENS node.\n * Defined in EIP 619.\n * @param node The ENS node to query\n * @return x The X coordinate of the curve point for the public key.\n * @return y The Y coordinate of the curve point for the public key.\n */\n function pubkey(\n bytes32 node\n ) external view virtual override returns (bytes32 x, bytes32 y) {\n uint64 currentRecordVersion = recordVersions[node];\n return (\n versionable_pubkeys[currentRecordVersion][node].x,\n versionable_pubkeys[currentRecordVersion][node].y\n );\n }\n\n function supportsInterface(\n bytes4 interfaceID\n ) public view virtual override returns (bool) {\n return\n interfaceID == type(IPubkeyResolver).interfaceId ||\n super.supportsInterface(interfaceID);\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/TextResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\nimport \"../ResolverBase.sol\";\nimport \"./ITextResolver.sol\";\n\nabstract contract TextResolver is ITextResolver, ResolverBase {\n mapping(uint64 => mapping(bytes32 => mapping(string => string))) versionable_texts;\n\n /**\n * Sets the text data associated with an ENS node and key.\n * May only be called by the owner of that node in the ENS registry.\n * @param node The node to update.\n * @param key The key to set.\n * @param value The text data value to set.\n */\n function setText(\n bytes32 node,\n string calldata key,\n string calldata value\n ) external virtual authorised(node) {\n versionable_texts[recordVersions[node]][node][key] = value;\n emit TextChanged(node, key, key, value);\n }\n\n /**\n * Returns the text data associated with an ENS node and key.\n * @param node The ENS node to query.\n * @param key The text data key to query.\n * @return The associated text data.\n */\n function text(\n bytes32 node,\n string calldata key\n ) external view virtual override returns (string memory) {\n return versionable_texts[recordVersions[node]][node][key];\n }\n\n function supportsInterface(\n bytes4 interfaceID\n ) public view virtual override returns (bool) {\n return\n interfaceID == type(ITextResolver).interfaceId ||\n super.supportsInterface(interfaceID);\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/ResolverBase.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\nimport \"./profiles/IVersionableResolver.sol\";\n\nabstract contract ResolverBase is ERC165, IVersionableResolver {\n mapping(bytes32 => uint64) public recordVersions;\n\n function isAuthorised(bytes32 node) internal view virtual returns (bool);\n\n modifier authorised(bytes32 node) {\n require(isAuthorised(node));\n _;\n }\n\n /**\n * Increments the record version associated with an ENS node.\n * May only be called by the owner of that node in the ENS registry.\n * @param node The node to update.\n */\n function clearRecords(bytes32 node) public virtual authorised(node) {\n recordVersions[node]++;\n emit VersionChanged(node, recordVersions[node]);\n }\n\n function supportsInterface(\n bytes4 interfaceID\n ) public view virtual override returns (bool) {\n return\n interfaceID == type(IVersionableResolver).interfaceId ||\n super.supportsInterface(interfaceID);\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/wrapper/IMetadataService.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity ~0.8.17;\n\ninterface IMetadataService {\n function uri(uint256) external view returns (string memory);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/wrapper/INameWrapper.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity ~0.8.17;\n\nimport \"../registry/ENS.sol\";\nimport \"../ethregistrar/IBaseRegistrar.sol\";\nimport \"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\";\nimport \"./IMetadataService.sol\";\nimport \"./INameWrapperUpgrade.sol\";\n\nuint32 constant CANNOT_UNWRAP = 1;\nuint32 constant CANNOT_BURN_FUSES = 2;\nuint32 constant CANNOT_TRANSFER = 4;\nuint32 constant CANNOT_SET_RESOLVER = 8;\nuint32 constant CANNOT_SET_TTL = 16;\nuint32 constant CANNOT_CREATE_SUBDOMAIN = 32;\nuint32 constant CANNOT_APPROVE = 64;\n//uint16 reserved for parent controlled fuses from bit 17 to bit 32\nuint32 constant PARENT_CANNOT_CONTROL = 1 << 16;\nuint32 constant IS_DOT_ETH = 1 << 17;\nuint32 constant CAN_EXTEND_EXPIRY = 1 << 18;\nuint32 constant CAN_DO_EVERYTHING = 0;\nuint32 constant PARENT_CONTROLLED_FUSES = 0xFFFF0000;\n// all fuses apart from IS_DOT_ETH\nuint32 constant USER_SETTABLE_FUSES = 0xFFFDFFFF;\n\ninterface INameWrapper is IERC1155 {\n event NameWrapped(\n bytes32 indexed node,\n bytes name,\n address owner,\n uint32 fuses,\n uint64 expiry\n );\n\n event NameUnwrapped(bytes32 indexed node, address owner);\n\n event FusesSet(bytes32 indexed node, uint32 fuses);\n event ExpiryExtended(bytes32 indexed node, uint64 expiry);\n\n function ens() external view returns (ENS);\n\n function registrar() external view returns (IBaseRegistrar);\n\n function metadataService() external view returns (IMetadataService);\n\n function names(bytes32) external view returns (bytes memory);\n\n function name() external view returns (string memory);\n\n function upgradeContract() external view returns (INameWrapperUpgrade);\n\n function supportsInterface(bytes4 interfaceID) external view returns (bool);\n\n function wrap(\n bytes calldata name,\n address wrappedOwner,\n address resolver\n ) external;\n\n function wrapETH2LD(\n string calldata label,\n address wrappedOwner,\n uint16 ownerControlledFuses,\n address resolver\n ) external returns (uint64 expires);\n\n function registerAndWrapETH2LD(\n string calldata label,\n address wrappedOwner,\n uint256 duration,\n address resolver,\n uint16 ownerControlledFuses\n ) external returns (uint256 registrarExpiry);\n\n function renew(\n uint256 labelHash,\n uint256 duration\n ) external returns (uint256 expires);\n\n function unwrap(bytes32 node, bytes32 label, address owner) external;\n\n function unwrapETH2LD(\n bytes32 label,\n address newRegistrant,\n address newController\n ) external;\n\n function upgrade(bytes calldata name, bytes calldata extraData) external;\n\n function setFuses(\n bytes32 node,\n uint16 ownerControlledFuses\n ) external returns (uint32 newFuses);\n\n function setChildFuses(\n bytes32 parentNode,\n bytes32 labelhash,\n uint32 fuses,\n uint64 expiry\n ) external;\n\n function setSubnodeRecord(\n bytes32 node,\n string calldata label,\n address owner,\n address resolver,\n uint64 ttl,\n uint32 fuses,\n uint64 expiry\n ) external returns (bytes32);\n\n function setRecord(\n bytes32 node,\n address owner,\n address resolver,\n uint64 ttl\n ) external;\n\n function setSubnodeOwner(\n bytes32 node,\n string calldata label,\n address newOwner,\n uint32 fuses,\n uint64 expiry\n ) external returns (bytes32);\n\n function extendExpiry(\n bytes32 node,\n bytes32 labelhash,\n uint64 expiry\n ) external returns (uint64);\n\n function canModifyName(\n bytes32 node,\n address addr\n ) external view returns (bool);\n\n function setResolver(bytes32 node, address resolver) external;\n\n function setTTL(bytes32 node, uint64 ttl) external;\n\n function ownerOf(uint256 id) external view returns (address owner);\n\n function approve(address to, uint256 tokenId) external;\n\n function getApproved(uint256 tokenId) external view returns (address);\n\n function getData(\n uint256 id\n ) external view returns (address, uint32, uint64);\n\n function setMetadataService(IMetadataService _metadataService) external;\n\n function uri(uint256 tokenId) external view returns (string memory);\n\n function setUpgradeContract(INameWrapperUpgrade _upgradeAddress) external;\n\n function allFusesBurned(\n bytes32 node,\n uint32 fuseMask\n ) external view returns (bool);\n\n function isWrapped(bytes32) external view returns (bool);\n\n function isWrapped(bytes32, bytes32) external view returns (bool);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/wrapper/INameWrapperUpgrade.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity ~0.8.17;\n\ninterface INameWrapperUpgrade {\n function wrapFromUpgrade(\n bytes calldata name,\n address wrappedOwner,\n uint32 fuses,\n uint64 expiry,\n address approved,\n bytes calldata extraData\n ) external;\n}\n" + }, + "@ensdomains/evm-verifier/contracts/EVMFetcher.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\nimport { IEVMVerifier } from './IEVMVerifier.sol';\nimport { EVMFetchTarget } from './EVMFetchTarget.sol';\nimport { Address } from '@openzeppelin/contracts/utils/Address.sol';\n\ninterface IEVMGateway {\n function getStorageSlots(address addr, bytes32[] memory commands, bytes[] memory constants) external pure returns(bytes memory witness);\n}\n\nuint8 constant FLAG_DYNAMIC = 0x01;\nuint8 constant OP_CONSTANT = 0x00;\nuint8 constant OP_BACKREF = 0x20;\nuint8 constant OP_END = 0xff;\n\n/**\n * @dev A library to facilitate requesting storage data proofs from contracts, possibly on a different chain.\n * See l1-verifier/test/TestL1.sol for example usage.\n */\nlibrary EVMFetcher {\n uint256 constant MAX_COMMANDS = 32;\n uint256 constant MAX_CONSTANTS = 32; // Must not be greater than 32\n\n using Address for address;\n\n error TooManyCommands(uint256 max);\n error CommandTooLong();\n error InvalidReference(uint256 value, uint256 max);\n error OffchainLookup(address sender, string[] urls, bytes callData, bytes4 callbackFunction, bytes extraData);\n\n struct EVMFetchRequest {\n IEVMVerifier verifier;\n address target;\n bytes32[] commands;\n uint256 operationIdx;\n bytes[] constants;\n }\n\n /**\n * @dev Creates a request to fetch the value of multiple storage slots from a contract via CCIP-Read, possibly from\n * another chain.\n * Supports dynamic length values and slot numbers derived from other retrieved values.\n * @param verifier An instance of a verifier contract that can provide and verify the storage slot information.\n * @param target The address of the contract to fetch storage proofs for.\n */\n function newFetchRequest(IEVMVerifier verifier, address target) internal pure returns (EVMFetchRequest memory) {\n bytes32[] memory commands = new bytes32[](MAX_COMMANDS);\n bytes[] memory constants = new bytes[](MAX_CONSTANTS);\n assembly {\n mstore(commands, 0) // Set current array length to 0\n mstore(constants, 0)\n } \n return EVMFetchRequest(verifier, target, commands, 0, constants);\n }\n\n /**\n * @dev Starts describing a new fetch request.\n * Paths specify a series of hashing operations to derive the final slot ID.\n * See https://docs.soliditylang.org/en/v0.8.17/internals/layout_in_storage.html for details on how Solidity\n * lays out storage variables.\n * @param request The request object being operated on.\n * @param baseSlot The base slot ID that forms the root of the path.\n */\n function getStatic(EVMFetchRequest memory request, uint256 baseSlot) internal pure returns (EVMFetchRequest memory) {\n bytes32[] memory commands = request.commands;\n uint256 commandIdx = commands.length;\n if(commandIdx > 0 && request.operationIdx < 32) {\n // Terminate previous command\n _addOperation(request, OP_END);\n }\n assembly {\n mstore(commands, add(commandIdx, 1)) // Increment command array length\n }\n if(request.commands.length > MAX_COMMANDS) {\n revert TooManyCommands(MAX_COMMANDS);\n }\n request.operationIdx = 0;\n _addOperation(request, 0);\n _addOperation(request, _addConstant(request, abi.encode(baseSlot)));\n return request;\n }\n\n /**\n * @dev Starts describing a new fetch request.\n * Paths specify a series of hashing operations to derive the final slot ID.\n * See https://docs.soliditylang.org/en/v0.8.17/internals/layout_in_storage.html for details on how Solidity\n * lays out storage variables.\n * @param request The request object being operated on.\n * @param baseSlot The base slot ID that forms the root of the path.\n */\n function getDynamic(EVMFetchRequest memory request, uint256 baseSlot) internal pure returns (EVMFetchRequest memory) {\n bytes32[] memory commands = request.commands;\n uint256 commandIdx = commands.length;\n if(commandIdx > 0 && request.operationIdx < 32) {\n // Terminate previous command\n _addOperation(request, OP_END);\n }\n assembly {\n mstore(commands, add(commandIdx, 1)) // Increment command array length\n }\n if(request.commands.length > MAX_COMMANDS) {\n revert TooManyCommands(MAX_COMMANDS);\n }\n request.operationIdx = 0;\n _addOperation(request, FLAG_DYNAMIC);\n _addOperation(request, _addConstant(request, abi.encode(baseSlot)));\n return request;\n }\n\n /**\n * @dev Adds a `uint256` element to the current path.\n * @param request The request object being operated on.\n * @param el The element to add.\n */\n function element(EVMFetchRequest memory request, uint256 el) internal pure returns (EVMFetchRequest memory) {\n if(request.operationIdx >= 32) {\n revert CommandTooLong();\n }\n _addOperation(request, _addConstant(request, abi.encode(el)));\n return request;\n }\n\n /**\n * @dev Adds a `bytes32` element to the current path.\n * @param request The request object being operated on.\n * @param el The element to add.\n */\n function element(EVMFetchRequest memory request, bytes32 el) internal pure returns (EVMFetchRequest memory) {\n if(request.operationIdx >= 32) {\n revert CommandTooLong();\n }\n _addOperation(request, _addConstant(request, abi.encode(el)));\n return request;\n }\n\n /**\n * @dev Adds an `address` element to the current path.\n * @param request The request object being operated on.\n * @param el The element to add.\n */\n function element(EVMFetchRequest memory request, address el) internal pure returns (EVMFetchRequest memory) {\n if(request.operationIdx >= 32) {\n revert CommandTooLong();\n }\n _addOperation(request, _addConstant(request, abi.encode(el)));\n return request;\n }\n\n /**\n * @dev Adds a `bytes` element to the current path.\n * @param request The request object being operated on.\n * @param el The element to add.\n */\n function element(EVMFetchRequest memory request, bytes memory el) internal pure returns (EVMFetchRequest memory) {\n if(request.operationIdx >= 32) {\n revert CommandTooLong();\n }\n _addOperation(request, _addConstant(request, el));\n return request;\n }\n\n /**\n * @dev Adds a `string` element to the current path.\n * @param request The request object being operated on.\n * @param el The element to add.\n */\n function element(EVMFetchRequest memory request, string memory el) internal pure returns (EVMFetchRequest memory) {\n if(request.operationIdx >= 32) {\n revert CommandTooLong();\n }\n _addOperation(request, _addConstant(request, bytes(el)));\n return request;\n }\n\n /**\n * @dev Adds a reference to a previous fetch to the current path.\n * @param request The request object being operated on.\n * @param idx The index of the previous fetch request, starting at 0.\n */\n function ref(EVMFetchRequest memory request, uint8 idx) internal pure returns (EVMFetchRequest memory) {\n if(request.operationIdx >= 32) {\n revert CommandTooLong();\n }\n if(idx > request.commands.length || idx > 31) {\n revert InvalidReference(idx, request.commands.length);\n }\n _addOperation(request, OP_BACKREF | idx);\n return request;\n }\n\n /**\n * @dev Initiates the fetch request.\n * Calling this function terminates execution; clients that implement CCIP-Read will make a callback to\n * `callback` with the results of the operation.\n * @param callbackId A callback function selector on this contract that will be invoked via CCIP-Read with the result of the lookup.\n * The function must have a signature matching `(bytes[] memory values, bytes callbackData)` with a return type matching the call in which\n * this function was invoked. Its return data will be returned as the return value of the entire CCIP-read operation.\n * @param callbackData Extra data to supply to the callback.\n */\n function fetch(EVMFetchRequest memory request, bytes4 callbackId, bytes memory callbackData) internal view {\n if(request.commands.length > 0 && request.operationIdx < 32) {\n // Terminate last command\n _addOperation(request, OP_END);\n }\n revert OffchainLookup(\n address(this),\n request.verifier.gatewayURLs(),\n abi.encodeCall(IEVMGateway.getStorageSlots, (request.target, request.commands, request.constants)),\n EVMFetchTarget.getStorageSlotsCallback.selector,\n abi.encode(request.verifier, request.target, request.commands, request.constants, callbackId, callbackData)\n );\n }\n\n function _addConstant(EVMFetchRequest memory request, bytes memory value) private pure returns(uint8 idx) {\n bytes[] memory constants = request.constants;\n idx = uint8(constants.length);\n assembly {\n mstore(constants, add(idx, 1)) // Increment constant array length\n }\n constants[idx] = value;\n }\n\n function _addOperation(EVMFetchRequest memory request, uint8 op) private pure {\n uint256 commandIdx = request.commands.length - 1;\n request.commands[commandIdx] = request.commands[commandIdx] | (bytes32(bytes1(op)) >> (8 * request.operationIdx++));\n }\n}\n" + }, + "@ensdomains/evm-verifier/contracts/EVMFetchTarget.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\nimport { IEVMVerifier } from './IEVMVerifier.sol';\nimport { Address } from '@openzeppelin/contracts/utils/Address.sol';\n\n/**\n * @dev Callback implementation for users of `EVMFetcher`. If you use `EVMFetcher`, your contract must\n * inherit from this contract in order to handle callbacks correctly.\n */\nabstract contract EVMFetchTarget {\n using Address for address;\n\n error ResponseLengthMismatch(uint256 actual, uint256 expected);\n\n /**\n * @dev Internal callback function invoked by CCIP-Read in response to a `getStorageSlots` request.\n */\n function getStorageSlotsCallback(bytes calldata response, bytes calldata extradata) external {\n bytes memory proof = abi.decode(response, (bytes));\n (IEVMVerifier verifier, address addr, bytes32[] memory commands, bytes[] memory constants, bytes4 callback, bytes memory callbackData) =\n abi.decode(extradata, (IEVMVerifier, address, bytes32[], bytes[], bytes4, bytes));\n bytes[] memory values = verifier.getStorageValues(addr, commands, constants, proof);\n if(values.length != commands.length) {\n revert ResponseLengthMismatch(values.length, commands.length);\n }\n bytes memory ret = address(this).functionCall(abi.encodeWithSelector(callback, values, callbackData));\n assembly {\n return(add(ret, 32), mload(ret))\n }\n }\n}\n" + }, + "@ensdomains/evm-verifier/contracts/IEVMVerifier.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\ninterface IEVMVerifier {\n function gatewayURLs() external view returns(string[] memory);\n function getStorageValues(address target, bytes32[] memory commands, bytes[] memory constants, bytes memory proof) external view returns(bytes[] memory values);\n}\n" + }, + "@openzeppelin/contracts/token/ERC1155/IERC1155.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/IERC1155.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\n *\n * _Available since v3.1._\n */\ninterface IERC1155 is IERC165 {\n /**\n * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\n */\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\n\n /**\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\n * transfers.\n */\n event TransferBatch(\n address indexed operator,\n address indexed from,\n address indexed to,\n uint256[] ids,\n uint256[] values\n );\n\n /**\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\n * `approved`.\n */\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\n\n /**\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\n *\n * If an {URI} event was emitted for `id`, the standard\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\n * returned by {IERC1155MetadataURI-uri}.\n */\n event URI(string value, uint256 indexed id);\n\n /**\n * @dev Returns the amount of tokens of token type `id` owned by `account`.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function balanceOf(address account, uint256 id) external view returns (uint256);\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\n *\n * Requirements:\n *\n * - `accounts` and `ids` must have the same length.\n */\n function balanceOfBatch(\n address[] calldata accounts,\n uint256[] calldata ids\n ) external view returns (uint256[] memory);\n\n /**\n * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\n *\n * Emits an {ApprovalForAll} event.\n *\n * Requirements:\n *\n * - `operator` cannot be the caller.\n */\n function setApprovalForAll(address operator, bool approved) external;\n\n /**\n * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\n *\n * See {setApprovalForAll}.\n */\n function isApprovedForAll(address account, address operator) external view returns (bool);\n\n /**\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\n *\n * Emits a {TransferSingle} event.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\n * acceptance magic value.\n */\n function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external;\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\n *\n * Emits a {TransferBatch} event.\n *\n * Requirements:\n *\n * - `ids` and `amounts` must have the same length.\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\n * acceptance magic value.\n */\n function safeBatchTransferFrom(\n address from,\n address to,\n uint256[] calldata ids,\n uint256[] calldata amounts,\n bytes calldata data\n ) external;\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/IERC721.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev Required interface of an ERC721 compliant contract.\n */\ninterface IERC721 is IERC165 {\n /**\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\n */\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\n\n /**\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\n */\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\n\n /**\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\n */\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\n\n /**\n * @dev Returns the number of tokens in ``owner``'s account.\n */\n function balanceOf(address owner) external view returns (uint256 balance);\n\n /**\n * @dev Returns the owner of the `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function ownerOf(uint256 tokenId) external view returns (address owner);\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(address from, address to, uint256 tokenId) external;\n\n /**\n * @dev Transfers `tokenId` token from `from` to `to`.\n *\n * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721\n * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must\n * understand this adds an external call which potentially creates a reentrancy vulnerability.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must be owned by `from`.\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address from, address to, uint256 tokenId) external;\n\n /**\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\n * The approval is cleared when the token is transferred.\n *\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\n *\n * Requirements:\n *\n * - The caller must own the token or be an approved operator.\n * - `tokenId` must exist.\n *\n * Emits an {Approval} event.\n */\n function approve(address to, uint256 tokenId) external;\n\n /**\n * @dev Approve or remove `operator` as an operator for the caller.\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\n *\n * Requirements:\n *\n * - The `operator` cannot be the caller.\n *\n * Emits an {ApprovalForAll} event.\n */\n function setApprovalForAll(address operator, bool approved) external;\n\n /**\n * @dev Returns the account approved for `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function getApproved(uint256 tokenId) external view returns (address operator);\n\n /**\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\n *\n * See {setApprovalForAll}\n */\n function isApprovedForAll(address owner, address operator) external view returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n *\n * Furthermore, `isContract` will also return true if the target contract within\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n * which only has an effect at the end of a transaction.\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/ERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n *\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\n */\nabstract contract ERC165 is IERC165 {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "clones-with-immutable-args/src/Clone.sol": { + "content": "// SPDX-License-Identifier: BSD\npragma solidity ^0.8.4;\n\n/// @title Clone\n/// @author zefram.eth\n/// @notice Provides helper functions for reading immutable args from calldata\ncontract Clone {\n /// @notice Reads an immutable arg with type address\n /// @param argOffset The offset of the arg in the packed data\n /// @return arg The arg value\n function _getArgAddress(uint256 argOffset)\n internal\n pure\n returns (address arg)\n {\n uint256 offset = _getImmutableArgsOffset();\n // solhint-disable-next-line no-inline-assembly\n assembly {\n arg := shr(0x60, calldataload(add(offset, argOffset)))\n }\n }\n\n /// @notice Reads an immutable arg with type uint256\n /// @param argOffset The offset of the arg in the packed data\n /// @return arg The arg value\n function _getArgUint256(uint256 argOffset)\n internal\n pure\n returns (uint256 arg)\n {\n uint256 offset = _getImmutableArgsOffset();\n // solhint-disable-next-line no-inline-assembly\n assembly {\n arg := calldataload(add(offset, argOffset))\n }\n }\n\n /// @notice Reads a uint256 array stored in the immutable args.\n /// @param argOffset The offset of the arg in the packed data\n /// @param arrLen Number of elements in the array\n /// @return arr The array\n function _getArgUint256Array(uint256 argOffset, uint64 arrLen)\n internal\n pure\n returns (uint256[] memory arr)\n {\n uint256 offset = _getImmutableArgsOffset();\n uint256 el;\n arr = new uint256[](arrLen);\n for (uint64 i = 0; i < arrLen; i++) {\n assembly {\n // solhint-disable-next-line no-inline-assembly\n el := calldataload(add(add(offset, argOffset), mul(i, 32)))\n }\n arr[i] = el;\n }\n return arr;\n }\n\n /// @notice Reads an immutable arg with type uint64\n /// @param argOffset The offset of the arg in the packed data\n /// @return arg The arg value\n function _getArgUint64(uint256 argOffset)\n internal\n pure\n returns (uint64 arg)\n {\n uint256 offset = _getImmutableArgsOffset();\n // solhint-disable-next-line no-inline-assembly\n assembly {\n arg := shr(0xc0, calldataload(add(offset, argOffset)))\n }\n }\n\n /// @notice Reads an immutable arg with type uint8\n /// @param argOffset The offset of the arg in the packed data\n /// @return arg The arg value\n function _getArgUint8(uint256 argOffset) internal pure returns (uint8 arg) {\n uint256 offset = _getImmutableArgsOffset();\n // solhint-disable-next-line no-inline-assembly\n assembly {\n arg := shr(0xf8, calldataload(add(offset, argOffset)))\n }\n }\n\n /// @return offset The offset of the packed immutable args in calldata\n function _getImmutableArgsOffset() internal pure returns (uint256 offset) {\n // solhint-disable-next-line no-inline-assembly\n assembly {\n offset := sub(\n calldatasize(),\n add(shr(240, calldataload(sub(calldatasize(), 2))), 2)\n )\n }\n }\n}\n" + }, + "contracts/DelegatableResolverRegistrar.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\nimport {DelegatableResolver} from \"@ensdomains/ens-contracts/contracts/resolvers/DelegatableResolver.sol\";\n\n/**\n * A sample delegated resolver registrar that allows anyone to register subname\n */\ncontract DelegatableResolverRegistrar {\n DelegatableResolver public resolver;\n\n constructor(DelegatableResolver _resolver) {\n resolver = _resolver;\n }\n\n /**\n * @dev Approve an operator to be able to updated records on a node.\n * @param name The encoded subname\n * @param operator The address to approve\n */\n\n function register(bytes memory name, address operator) external {\n (bytes32 node, bool authorized) = resolver.getAuthorisedNode(\n name,\n 0,\n operator\n );\n if (authorized == false) {\n resolver.approve(name, operator, true);\n }\n }\n}" + }, + "contracts/IMetadataResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\ninterface IMetadataResolver {\n /*\n * @notice Get metadata about the CCIP Resolver ENSIP 16 https://docs.ens.domains/ens-improvement-proposals/ensip-16-offchain-metadata\n * @dev This function provides metadata about the CCIP Resolver, including its name, coin type, GraphQL URL, storage type, and encoded information.\n * @param name The domain name in format (dnsEncoded)\n * @return coinType The cointype of the chain the target contract locates such as Optimism, Base, Arb, etc\n * @return graphqlUrl The GraphQL URL used by the resolver\n * @return storageType 0 = EVM, 1 = Non blockchain, 2 = Starknet\n * @return storageLocation The storage identifier. For EVM chains, this is the address of the resolver contract.\n * @return context. An identifier used by l2 graph indexer for Domain schema id (`context-namehash`) allowing multiple resolver contracts to have own namespace.\n *\n */\n function metadata(bytes calldata name) external view returns (\n uint256 coinType,\n string memory graphqlUrl,\n uint8 storageType,\n bytes memory storageLocation,\n bytes memory context\n );\n\n event MetadataChanged(\n bytes name,\n uint256 coinType,\n string graphqlUrl,\n uint8 storageType,\n bytes storageLocation,\n bytes context\n );\n}" + }, + "contracts/ITargetResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\ninterface ITargetResolver{\n function getTarget(\n bytes memory name\n ) external view returns (bytes32 node, address target);\n}\n" + }, + "contracts/L1Resolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\nimport {EVMFetcher} from '@ensdomains/evm-verifier/contracts/EVMFetcher.sol';\nimport {EVMFetchTarget} from '@ensdomains/evm-verifier/contracts/EVMFetchTarget.sol';\nimport {IEVMVerifier} from '@ensdomains/evm-verifier/contracts/IEVMVerifier.sol';\nimport \"@ensdomains/ens-contracts/contracts/registry/ENS.sol\";\nimport {INameWrapper} from \"@ensdomains/ens-contracts/contracts/wrapper/INameWrapper.sol\";\nimport {BytesUtils} from \"@ensdomains/ens-contracts/contracts/dnssec-oracle/BytesUtils.sol\";\nimport {IAddrResolver} from \"@ensdomains/ens-contracts/contracts/resolvers/profiles/IAddrResolver.sol\";\nimport {IAddressResolver} from \"@ensdomains/ens-contracts/contracts/resolvers/profiles/IAddressResolver.sol\";\nimport {ITextResolver} from \"@ensdomains/ens-contracts/contracts/resolvers/profiles/ITextResolver.sol\";\nimport {IContentHashResolver} from \"@ensdomains/ens-contracts/contracts/resolvers/profiles/IContentHashResolver.sol\";\nimport \"@ensdomains/ens-contracts/contracts/resolvers/profiles/IExtendedResolver.sol\";\nimport {ITargetResolver} from './ITargetResolver.sol';\nimport {IMetadataResolver} from './IMetadataResolver.sol';\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\n\ncontract L1Resolver is EVMFetchTarget, ITargetResolver, IMetadataResolver, IExtendedResolver, ERC165 {\n using EVMFetcher for EVMFetcher.EVMFetchRequest;\n using BytesUtils for bytes;\n IEVMVerifier public immutable verifier;\n ENS public immutable ens;\n INameWrapper public immutable nameWrapper;\n mapping(bytes32 => address) targets;\n uint256 constant COIN_TYPE_ETH = 60;\n uint256 constant RECORD_VERSIONS_SLOT = 0;\n uint256 constant VERSIONABLE_ADDRESSES_SLOT = 2;\n uint256 constant VERSIONABLE_HASHES_SLOT = 3;\n uint256 constant VERSIONABLE_TEXTS_SLOT = 10;\n string public graphqlUrl;\n uint256 public l2ResolverCoinType;\n\n event TargetSet(bytes name, address target);\n function isAuthorised(bytes32 node) internal view returns (bool) {\n // TODO: Add support for\n // trustedETHController\n // trustedReverseRegistrar\n // isApprovedForAll\n // isApprovedFor\n address owner = ens.owner(node);\n if (owner == address(nameWrapper)) {\n owner = nameWrapper.ownerOf(uint256(node));\n }\n return owner == msg.sender;\n }\n\n /**\n * @param _verifier The chain verifier address\n * @param _ens The ENS registry address\n * @param _nameWrapper The ENS name wrapper address\n * @param _graphqlUrl The offchain/l2 graphql endpoint url\n * @param _l2ResolverCoinType The chainId at which the resolver resolves data from. 0 if storageLocation is offChain\n */\n constructor(\n IEVMVerifier _verifier,\n ENS _ens,\n INameWrapper _nameWrapper,\n string memory _graphqlUrl,\n uint256 _l2ResolverCoinType\n ){\n require(address(_nameWrapper) != address(0), \"Name Wrapper address must be set\");\n require(address(_verifier) != address(0), \"Verifier address must be set\");\n require(address(_ens) != address(0), \"Registry address must be set\");\n verifier = _verifier;\n ens = _ens;\n nameWrapper = _nameWrapper;\n graphqlUrl = _graphqlUrl;\n l2ResolverCoinType = _l2ResolverCoinType;\n }\n\n /**\n * Set target address to verify aagainst\n * @param name The encoded name to query.\n * @param target The L2 resolver address to verify against.\n */\n function setTarget(bytes calldata name, address target) public {\n (bytes32 node,) = getTarget(name);\n require(isAuthorised(node));\n targets[node] = target;\n emit TargetSet(name, target);\n (\n ,,\n uint8 storageType,\n bytes memory storageLocation,\n bytes memory context\n ) = metadata(name);\n emit MetadataChanged(\n name,\n l2ResolverCoinType,\n graphqlUrl,\n storageType,\n storageLocation,\n context\n );\n }\n\n /**\n * @dev Returns the L2 target address that can answer queries for `name`.\n * @param name DNS encoded ENS name to query\n * @return node The node of the name\n * @return target The L2 resolver address to verify against.\n */\n function getTarget(\n bytes memory name\n ) public view returns (bytes32 node, address target) {\n return _getTarget(name, 0);\n }\n\n function _getTarget(\n bytes memory name,\n uint256 offset\n ) private view returns (bytes32 node, address target) {\n uint256 len = name.readUint8(offset);\n node = bytes32(0);\n if (len > 0) {\n bytes32 label = name.keccak(offset + 1, len);\n (node, target) = _getTarget(\n name,\n offset + len + 1\n );\n node = keccak256(abi.encodePacked(node, label));\n if(targets[node] != address(0)){\n return (\n node,\n targets[node]\n );\n }\n } else {\n return (\n bytes32(0),\n address(0)\n );\n }\n return (node, target);\n }\n\n /** \n * @dev Resolve and verify a record stored in l2 target address. It supports subname by fetching target recursively to the nearlest parent.\n * @param name DNS encoded ENS name to query\n * @param data The actual calldata\n * @return result result of the call\n */\n function resolve(bytes calldata name, bytes calldata data) external view returns (bytes memory result) {\n (, address target) = _getTarget(name, 0);\n bytes4 selector = bytes4(data);\n\n if (selector == IAddrResolver.addr.selector) {\n (bytes32 node) = abi.decode(data[4:], (bytes32));\n return _addr(node, target);\n }\n if (selector == IAddressResolver.addr.selector) {\n (bytes32 node, uint256 cointype) = abi.decode(data[4:], (bytes32, uint256));\n return _addr(node, cointype, target);\n }\n if (selector == ITextResolver.text.selector) {\n (bytes32 node, string memory key) = abi.decode(data[4:], (bytes32, string));\n return bytes(_text(node, key, target));\n }\n if (selector == IContentHashResolver.contenthash.selector) {\n (bytes32 node) = abi.decode(data[4:], (bytes32));\n return _contenthash(node, target);\n }\n }\n\n function _addr(bytes32 node, address target) private view returns (bytes memory) {\n EVMFetcher.newFetchRequest(verifier, target)\n .getStatic(RECORD_VERSIONS_SLOT)\n .element(node)\n .getDynamic(VERSIONABLE_ADDRESSES_SLOT)\n .ref(0)\n .element(node)\n .element(COIN_TYPE_ETH)\n .fetch(this.addrCallback.selector, ''); // recordVersions\n }\n\n function addrCallback(\n bytes[] memory values,\n bytes memory\n ) public pure returns (bytes memory) {\n return abi.encode(address(bytes20(values[1])));\n }\n\n function _addr(\n bytes32 node,\n uint256 coinType,\n address target\n ) private view returns (bytes memory) {\n EVMFetcher.newFetchRequest(verifier, target)\n .getStatic(RECORD_VERSIONS_SLOT)\n .element(node)\n .getDynamic(VERSIONABLE_ADDRESSES_SLOT)\n .ref(0)\n .element(node)\n .element(coinType)\n .fetch(this.addrCoinTypeCallback.selector, '');\n }\n\n function addrCoinTypeCallback(\n bytes[] memory values,\n bytes memory\n ) public pure returns (bytes memory) {\n return abi.encode(values[1]);\n }\n\n function _text(\n bytes32 node,\n string memory key,\n address target\n ) private view returns (bytes memory) {\n EVMFetcher.newFetchRequest(verifier, target)\n .getStatic(RECORD_VERSIONS_SLOT)\n .element(node)\n .getDynamic(VERSIONABLE_TEXTS_SLOT)\n .ref(0)\n .element(node)\n .element(key)\n .fetch(this.textCallback.selector, '');\n }\n\n function textCallback(\n bytes[] memory values,\n bytes memory\n ) public pure returns (bytes memory) {\n return abi.encode(string(values[1]));\n }\n\n function _contenthash(bytes32 node, address target) private view returns (bytes memory) {\n EVMFetcher.newFetchRequest(verifier, target)\n .getStatic(RECORD_VERSIONS_SLOT)\n .element(node)\n .getDynamic(VERSIONABLE_HASHES_SLOT)\n .ref(0)\n .element(node)\n .fetch(this.contenthashCallback.selector, '');\n }\n\n function contenthashCallback(\n bytes[] memory values,\n bytes memory\n ) public pure returns (bytes memory) {\n return abi.encode(values[1]);\n }\n\n /**\n * @notice Get metadata about the L1 Resolver\n * @dev This function provides metadata about the L1 Resolver, including its name, coin type, GraphQL URL, storage type, and encoded information.\n * @param name The domain name in format (dnsEncoded)\n * @return coinType The cointype of the chain the target contract locates such as Optimism, Base, Arb, etc\n * @return graphqlUrl The GraphQL URL used by the resolver\n * @return storageType Storage Type (0 for EVM)\n * @return storageLocation The storage identifier. For EVM chains, this is the address of the resolver contract.\n * @return context. An identifier used by l2 graph indexer for Domain schema id (`context-namehash`) allowing multiple resolver contracts to have own namespace.\n */\n function metadata(\n bytes calldata name\n ) public view returns (uint256, string memory, uint8, bytes memory, bytes memory) {\n (, address target) = getTarget(name);\n\n return (\n l2ResolverCoinType,\n graphqlUrl,\n uint8(0), // storage Type 0 => EVM\n abi.encodePacked(address(target)), // storage location => l2 resolver address\n abi.encodePacked(address(target)) // context => l2 resolver address\n );\n }\n\n function supportsInterface(\n bytes4 interfaceId\n ) public override view returns (bool) {\n return\n interfaceId == type(IExtendedResolver).interfaceId ||\n interfaceId == type(ITargetResolver).interfaceId ||\n interfaceId == type(IMetadataResolver).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 1200 + }, + "viaIR": true, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates", + "storageLayout" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/crosschain-resolver/deployments/sepolia/solcInputs/f62af331815cb4e74689ba5fa814dd3e.json b/crosschain-resolver/deployments/sepolia/solcInputs/f62af331815cb4e74689ba5fa814dd3e.json new file mode 100644 index 00000000..818a9520 --- /dev/null +++ b/crosschain-resolver/deployments/sepolia/solcInputs/f62af331815cb4e74689ba5fa814dd3e.json @@ -0,0 +1,280 @@ +{ + "language": "Solidity", + "sources": { + "@ensdomains/buffer/contracts/Buffer.sol": { + "content": "// SPDX-License-Identifier: BSD-2-Clause\npragma solidity ^0.8.4;\n\n/**\n* @dev A library for working with mutable byte buffers in Solidity.\n*\n* Byte buffers are mutable and expandable, and provide a variety of primitives\n* for appending to them. At any time you can fetch a bytes object containing the\n* current contents of the buffer. The bytes object should not be stored between\n* operations, as it may change due to resizing of the buffer.\n*/\nlibrary Buffer {\n /**\n * @dev Represents a mutable buffer. Buffers have a current value (buf) and\n * a capacity. The capacity may be longer than the current value, in\n * which case it can be extended without the need to allocate more memory.\n */\n struct buffer {\n bytes buf;\n uint capacity;\n }\n\n /**\n * @dev Initializes a buffer with an initial capacity.\n * @param buf The buffer to initialize.\n * @param capacity The number of bytes of space to allocate the buffer.\n * @return The buffer, for chaining.\n */\n function init(buffer memory buf, uint capacity) internal pure returns(buffer memory) {\n if (capacity % 32 != 0) {\n capacity += 32 - (capacity % 32);\n }\n // Allocate space for the buffer data\n buf.capacity = capacity;\n assembly {\n let ptr := mload(0x40)\n mstore(buf, ptr)\n mstore(ptr, 0)\n let fpm := add(32, add(ptr, capacity))\n if lt(fpm, ptr) {\n revert(0, 0)\n }\n mstore(0x40, fpm)\n }\n return buf;\n }\n\n /**\n * @dev Initializes a new buffer from an existing bytes object.\n * Changes to the buffer may mutate the original value.\n * @param b The bytes object to initialize the buffer with.\n * @return A new buffer.\n */\n function fromBytes(bytes memory b) internal pure returns(buffer memory) {\n buffer memory buf;\n buf.buf = b;\n buf.capacity = b.length;\n return buf;\n }\n\n function resize(buffer memory buf, uint capacity) private pure {\n bytes memory oldbuf = buf.buf;\n init(buf, capacity);\n append(buf, oldbuf);\n }\n\n /**\n * @dev Sets buffer length to 0.\n * @param buf The buffer to truncate.\n * @return The original buffer, for chaining..\n */\n function truncate(buffer memory buf) internal pure returns (buffer memory) {\n assembly {\n let bufptr := mload(buf)\n mstore(bufptr, 0)\n }\n return buf;\n }\n\n /**\n * @dev Appends len bytes of a byte string to a buffer. Resizes if doing so would exceed\n * the capacity of the buffer.\n * @param buf The buffer to append to.\n * @param data The data to append.\n * @param len The number of bytes to copy.\n * @return The original buffer, for chaining.\n */\n function append(buffer memory buf, bytes memory data, uint len) internal pure returns(buffer memory) {\n require(len <= data.length);\n\n uint off = buf.buf.length;\n uint newCapacity = off + len;\n if (newCapacity > buf.capacity) {\n resize(buf, newCapacity * 2);\n }\n\n uint dest;\n uint src;\n assembly {\n // Memory address of the buffer data\n let bufptr := mload(buf)\n // Length of existing buffer data\n let buflen := mload(bufptr)\n // Start address = buffer address + offset + sizeof(buffer length)\n dest := add(add(bufptr, 32), off)\n // Update buffer length if we're extending it\n if gt(newCapacity, buflen) {\n mstore(bufptr, newCapacity)\n }\n src := add(data, 32)\n }\n\n // Copy word-length chunks while possible\n for (; len >= 32; len -= 32) {\n assembly {\n mstore(dest, mload(src))\n }\n dest += 32;\n src += 32;\n }\n\n // Copy remaining bytes\n unchecked {\n uint mask = (256 ** (32 - len)) - 1;\n assembly {\n let srcpart := and(mload(src), not(mask))\n let destpart := and(mload(dest), mask)\n mstore(dest, or(destpart, srcpart))\n }\n }\n\n return buf;\n }\n\n /**\n * @dev Appends a byte string to a buffer. Resizes if doing so would exceed\n * the capacity of the buffer.\n * @param buf The buffer to append to.\n * @param data The data to append.\n * @return The original buffer, for chaining.\n */\n function append(buffer memory buf, bytes memory data) internal pure returns (buffer memory) {\n return append(buf, data, data.length);\n }\n\n /**\n * @dev Appends a byte to the buffer. Resizes if doing so would exceed the\n * capacity of the buffer.\n * @param buf The buffer to append to.\n * @param data The data to append.\n * @return The original buffer, for chaining.\n */\n function appendUint8(buffer memory buf, uint8 data) internal pure returns(buffer memory) {\n uint off = buf.buf.length;\n uint offPlusOne = off + 1;\n if (off >= buf.capacity) {\n resize(buf, offPlusOne * 2);\n }\n\n assembly {\n // Memory address of the buffer data\n let bufptr := mload(buf)\n // Address = buffer address + sizeof(buffer length) + off\n let dest := add(add(bufptr, off), 32)\n mstore8(dest, data)\n // Update buffer length if we extended it\n if gt(offPlusOne, mload(bufptr)) {\n mstore(bufptr, offPlusOne)\n }\n }\n\n return buf;\n }\n\n /**\n * @dev Appends len bytes of bytes32 to a buffer. Resizes if doing so would\n * exceed the capacity of the buffer.\n * @param buf The buffer to append to.\n * @param data The data to append.\n * @param len The number of bytes to write (left-aligned).\n * @return The original buffer, for chaining.\n */\n function append(buffer memory buf, bytes32 data, uint len) private pure returns(buffer memory) {\n uint off = buf.buf.length;\n uint newCapacity = len + off;\n if (newCapacity > buf.capacity) {\n resize(buf, newCapacity * 2);\n }\n\n unchecked {\n uint mask = (256 ** len) - 1;\n // Right-align data\n data = data >> (8 * (32 - len));\n assembly {\n // Memory address of the buffer data\n let bufptr := mload(buf)\n // Address = buffer address + sizeof(buffer length) + newCapacity\n let dest := add(bufptr, newCapacity)\n mstore(dest, or(and(mload(dest), not(mask)), data))\n // Update buffer length if we extended it\n if gt(newCapacity, mload(bufptr)) {\n mstore(bufptr, newCapacity)\n }\n }\n }\n return buf;\n }\n\n /**\n * @dev Appends a bytes20 to the buffer. Resizes if doing so would exceed\n * the capacity of the buffer.\n * @param buf The buffer to append to.\n * @param data The data to append.\n * @return The original buffer, for chhaining.\n */\n function appendBytes20(buffer memory buf, bytes20 data) internal pure returns (buffer memory) {\n return append(buf, bytes32(data), 20);\n }\n\n /**\n * @dev Appends a bytes32 to the buffer. Resizes if doing so would exceed\n * the capacity of the buffer.\n * @param buf The buffer to append to.\n * @param data The data to append.\n * @return The original buffer, for chaining.\n */\n function appendBytes32(buffer memory buf, bytes32 data) internal pure returns (buffer memory) {\n return append(buf, data, 32);\n }\n\n /**\n * @dev Appends a byte to the end of the buffer. Resizes if doing so would\n * exceed the capacity of the buffer.\n * @param buf The buffer to append to.\n * @param data The data to append.\n * @param len The number of bytes to write (right-aligned).\n * @return The original buffer.\n */\n function appendInt(buffer memory buf, uint data, uint len) internal pure returns(buffer memory) {\n uint off = buf.buf.length;\n uint newCapacity = len + off;\n if (newCapacity > buf.capacity) {\n resize(buf, newCapacity * 2);\n }\n\n uint mask = (256 ** len) - 1;\n assembly {\n // Memory address of the buffer data\n let bufptr := mload(buf)\n // Address = buffer address + sizeof(buffer length) + newCapacity\n let dest := add(bufptr, newCapacity)\n mstore(dest, or(and(mload(dest), not(mask)), data))\n // Update buffer length if we extended it\n if gt(newCapacity, mload(bufptr)) {\n mstore(bufptr, newCapacity)\n }\n }\n return buf;\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/dnssec-oracle/BytesUtils.sol": { + "content": "pragma solidity ^0.8.4;\n\nlibrary BytesUtils {\n error OffsetOutOfBoundsError(uint256 offset, uint256 length);\n\n /*\n * @dev Returns the keccak-256 hash of a byte range.\n * @param self The byte string to hash.\n * @param offset The position to start hashing at.\n * @param len The number of bytes to hash.\n * @return The hash of the byte range.\n */\n function keccak(\n bytes memory self,\n uint256 offset,\n uint256 len\n ) internal pure returns (bytes32 ret) {\n require(offset + len <= self.length);\n assembly {\n ret := keccak256(add(add(self, 32), offset), len)\n }\n }\n\n /*\n * @dev Returns a positive number if `other` comes lexicographically after\n * `self`, a negative number if it comes before, or zero if the\n * contents of the two bytes are equal.\n * @param self The first bytes to compare.\n * @param other The second bytes to compare.\n * @return The result of the comparison.\n */\n function compare(\n bytes memory self,\n bytes memory other\n ) internal pure returns (int256) {\n return compare(self, 0, self.length, other, 0, other.length);\n }\n\n /*\n * @dev Returns a positive number if `other` comes lexicographically after\n * `self`, a negative number if it comes before, or zero if the\n * contents of the two bytes are equal. Comparison is done per-rune,\n * on unicode codepoints.\n * @param self The first bytes to compare.\n * @param offset The offset of self.\n * @param len The length of self.\n * @param other The second bytes to compare.\n * @param otheroffset The offset of the other string.\n * @param otherlen The length of the other string.\n * @return The result of the comparison.\n */\n function compare(\n bytes memory self,\n uint256 offset,\n uint256 len,\n bytes memory other,\n uint256 otheroffset,\n uint256 otherlen\n ) internal pure returns (int256) {\n if (offset + len > self.length) {\n revert OffsetOutOfBoundsError(offset + len, self.length);\n }\n if (otheroffset + otherlen > other.length) {\n revert OffsetOutOfBoundsError(otheroffset + otherlen, other.length);\n }\n\n uint256 shortest = len;\n if (otherlen < len) shortest = otherlen;\n\n uint256 selfptr;\n uint256 otherptr;\n\n assembly {\n selfptr := add(self, add(offset, 32))\n otherptr := add(other, add(otheroffset, 32))\n }\n for (uint256 idx = 0; idx < shortest; idx += 32) {\n uint256 a;\n uint256 b;\n assembly {\n a := mload(selfptr)\n b := mload(otherptr)\n }\n if (a != b) {\n // Mask out irrelevant bytes and check again\n uint256 mask;\n if (shortest - idx >= 32) {\n mask = type(uint256).max;\n } else {\n mask = ~(2 ** (8 * (idx + 32 - shortest)) - 1);\n }\n int256 diff = int256(a & mask) - int256(b & mask);\n if (diff != 0) return diff;\n }\n selfptr += 32;\n otherptr += 32;\n }\n\n return int256(len) - int256(otherlen);\n }\n\n /*\n * @dev Returns true if the two byte ranges are equal.\n * @param self The first byte range to compare.\n * @param offset The offset into the first byte range.\n * @param other The second byte range to compare.\n * @param otherOffset The offset into the second byte range.\n * @param len The number of bytes to compare\n * @return True if the byte ranges are equal, false otherwise.\n */\n function equals(\n bytes memory self,\n uint256 offset,\n bytes memory other,\n uint256 otherOffset,\n uint256 len\n ) internal pure returns (bool) {\n return keccak(self, offset, len) == keccak(other, otherOffset, len);\n }\n\n /*\n * @dev Returns true if the two byte ranges are equal with offsets.\n * @param self The first byte range to compare.\n * @param offset The offset into the first byte range.\n * @param other The second byte range to compare.\n * @param otherOffset The offset into the second byte range.\n * @return True if the byte ranges are equal, false otherwise.\n */\n function equals(\n bytes memory self,\n uint256 offset,\n bytes memory other,\n uint256 otherOffset\n ) internal pure returns (bool) {\n return\n keccak(self, offset, self.length - offset) ==\n keccak(other, otherOffset, other.length - otherOffset);\n }\n\n /*\n * @dev Compares a range of 'self' to all of 'other' and returns True iff\n * they are equal.\n * @param self The first byte range to compare.\n * @param offset The offset into the first byte range.\n * @param other The second byte range to compare.\n * @return True if the byte ranges are equal, false otherwise.\n */\n function equals(\n bytes memory self,\n uint256 offset,\n bytes memory other\n ) internal pure returns (bool) {\n return\n self.length == offset + other.length &&\n equals(self, offset, other, 0, other.length);\n }\n\n /*\n * @dev Returns true if the two byte ranges are equal.\n * @param self The first byte range to compare.\n * @param other The second byte range to compare.\n * @return True if the byte ranges are equal, false otherwise.\n */\n function equals(\n bytes memory self,\n bytes memory other\n ) internal pure returns (bool) {\n return\n self.length == other.length &&\n equals(self, 0, other, 0, self.length);\n }\n\n /*\n * @dev Returns the 8-bit number at the specified index of self.\n * @param self The byte string.\n * @param idx The index into the bytes\n * @return The specified 8 bits of the string, interpreted as an integer.\n */\n function readUint8(\n bytes memory self,\n uint256 idx\n ) internal pure returns (uint8 ret) {\n return uint8(self[idx]);\n }\n\n /*\n * @dev Returns the 16-bit number at the specified index of self.\n * @param self The byte string.\n * @param idx The index into the bytes\n * @return The specified 16 bits of the string, interpreted as an integer.\n */\n function readUint16(\n bytes memory self,\n uint256 idx\n ) internal pure returns (uint16 ret) {\n require(idx + 2 <= self.length);\n assembly {\n ret := and(mload(add(add(self, 2), idx)), 0xFFFF)\n }\n }\n\n /*\n * @dev Returns the 32-bit number at the specified index of self.\n * @param self The byte string.\n * @param idx The index into the bytes\n * @return The specified 32 bits of the string, interpreted as an integer.\n */\n function readUint32(\n bytes memory self,\n uint256 idx\n ) internal pure returns (uint32 ret) {\n require(idx + 4 <= self.length);\n assembly {\n ret := and(mload(add(add(self, 4), idx)), 0xFFFFFFFF)\n }\n }\n\n /*\n * @dev Returns the 32 byte value at the specified index of self.\n * @param self The byte string.\n * @param idx The index into the bytes\n * @return The specified 32 bytes of the string.\n */\n function readBytes32(\n bytes memory self,\n uint256 idx\n ) internal pure returns (bytes32 ret) {\n require(idx + 32 <= self.length);\n assembly {\n ret := mload(add(add(self, 32), idx))\n }\n }\n\n /*\n * @dev Returns the 32 byte value at the specified index of self.\n * @param self The byte string.\n * @param idx The index into the bytes\n * @return The specified 32 bytes of the string.\n */\n function readBytes20(\n bytes memory self,\n uint256 idx\n ) internal pure returns (bytes20 ret) {\n require(idx + 20 <= self.length);\n assembly {\n ret := and(\n mload(add(add(self, 32), idx)),\n 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000\n )\n }\n }\n\n /*\n * @dev Returns the n byte value at the specified index of self.\n * @param self The byte string.\n * @param idx The index into the bytes.\n * @param len The number of bytes.\n * @return The specified 32 bytes of the string.\n */\n function readBytesN(\n bytes memory self,\n uint256 idx,\n uint256 len\n ) internal pure returns (bytes32 ret) {\n require(len <= 32);\n require(idx + len <= self.length);\n assembly {\n let mask := not(sub(exp(256, sub(32, len)), 1))\n ret := and(mload(add(add(self, 32), idx)), mask)\n }\n }\n\n function memcpy(uint256 dest, uint256 src, uint256 len) private pure {\n // Copy word-length chunks while possible\n for (; len >= 32; len -= 32) {\n assembly {\n mstore(dest, mload(src))\n }\n dest += 32;\n src += 32;\n }\n\n // Copy remaining bytes\n unchecked {\n uint256 mask = (256 ** (32 - len)) - 1;\n assembly {\n let srcpart := and(mload(src), not(mask))\n let destpart := and(mload(dest), mask)\n mstore(dest, or(destpart, srcpart))\n }\n }\n }\n\n /*\n * @dev Copies a substring into a new byte string.\n * @param self The byte string to copy from.\n * @param offset The offset to start copying at.\n * @param len The number of bytes to copy.\n */\n function substring(\n bytes memory self,\n uint256 offset,\n uint256 len\n ) internal pure returns (bytes memory) {\n require(offset + len <= self.length);\n\n bytes memory ret = new bytes(len);\n uint256 dest;\n uint256 src;\n\n assembly {\n dest := add(ret, 32)\n src := add(add(self, 32), offset)\n }\n memcpy(dest, src, len);\n\n return ret;\n }\n\n // Maps characters from 0x30 to 0x7A to their base32 values.\n // 0xFF represents invalid characters in that range.\n bytes constant base32HexTable =\n hex\"00010203040506070809FFFFFFFFFFFFFF0A0B0C0D0E0F101112131415161718191A1B1C1D1E1FFFFFFFFFFFFFFFFFFFFF0A0B0C0D0E0F101112131415161718191A1B1C1D1E1F\";\n\n /**\n * @dev Decodes unpadded base32 data of up to one word in length.\n * @param self The data to decode.\n * @param off Offset into the string to start at.\n * @param len Number of characters to decode.\n * @return The decoded data, left aligned.\n */\n function base32HexDecodeWord(\n bytes memory self,\n uint256 off,\n uint256 len\n ) internal pure returns (bytes32) {\n require(len <= 52);\n\n uint256 ret = 0;\n uint8 decoded;\n for (uint256 i = 0; i < len; i++) {\n bytes1 char = self[off + i];\n require(char >= 0x30 && char <= 0x7A);\n decoded = uint8(base32HexTable[uint256(uint8(char)) - 0x30]);\n require(decoded <= 0x20);\n if (i == len - 1) {\n break;\n }\n ret = (ret << 5) | decoded;\n }\n\n uint256 bitlen = len * 5;\n if (len % 8 == 0) {\n // Multiple of 8 characters, no padding\n ret = (ret << 5) | decoded;\n } else if (len % 8 == 2) {\n // Two extra characters - 1 byte\n ret = (ret << 3) | (decoded >> 2);\n bitlen -= 2;\n } else if (len % 8 == 4) {\n // Four extra characters - 2 bytes\n ret = (ret << 1) | (decoded >> 4);\n bitlen -= 4;\n } else if (len % 8 == 5) {\n // Five extra characters - 3 bytes\n ret = (ret << 4) | (decoded >> 1);\n bitlen -= 1;\n } else if (len % 8 == 7) {\n // Seven extra characters - 4 bytes\n ret = (ret << 2) | (decoded >> 3);\n bitlen -= 3;\n } else {\n revert();\n }\n\n return bytes32(ret << (256 - bitlen));\n }\n\n /**\n * @dev Finds the first occurrence of the byte `needle` in `self`.\n * @param self The string to search\n * @param off The offset to start searching at\n * @param len The number of bytes to search\n * @param needle The byte to search for\n * @return The offset of `needle` in `self`, or 2**256-1 if it was not found.\n */\n function find(\n bytes memory self,\n uint256 off,\n uint256 len,\n bytes1 needle\n ) internal pure returns (uint256) {\n for (uint256 idx = off; idx < off + len; idx++) {\n if (self[idx] == needle) {\n return idx;\n }\n }\n return type(uint256).max;\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/dnssec-oracle/RRUtils.sol": { + "content": "pragma solidity ^0.8.4;\n\nimport \"./BytesUtils.sol\";\nimport \"@ensdomains/buffer/contracts/Buffer.sol\";\n\n/**\n * @dev RRUtils is a library that provides utilities for parsing DNS resource records.\n */\nlibrary RRUtils {\n using BytesUtils for *;\n using Buffer for *;\n\n /**\n * @dev Returns the number of bytes in the DNS name at 'offset' in 'self'.\n * @param self The byte array to read a name from.\n * @param offset The offset to start reading at.\n * @return The length of the DNS name at 'offset', in bytes.\n */\n function nameLength(\n bytes memory self,\n uint256 offset\n ) internal pure returns (uint256) {\n uint256 idx = offset;\n while (true) {\n assert(idx < self.length);\n uint256 labelLen = self.readUint8(idx);\n idx += labelLen + 1;\n if (labelLen == 0) {\n break;\n }\n }\n return idx - offset;\n }\n\n /**\n * @dev Returns a DNS format name at the specified offset of self.\n * @param self The byte array to read a name from.\n * @param offset The offset to start reading at.\n * @return ret The name.\n */\n function readName(\n bytes memory self,\n uint256 offset\n ) internal pure returns (bytes memory ret) {\n uint256 len = nameLength(self, offset);\n return self.substring(offset, len);\n }\n\n /**\n * @dev Returns the number of labels in the DNS name at 'offset' in 'self'.\n * @param self The byte array to read a name from.\n * @param offset The offset to start reading at.\n * @return The number of labels in the DNS name at 'offset', in bytes.\n */\n function labelCount(\n bytes memory self,\n uint256 offset\n ) internal pure returns (uint256) {\n uint256 count = 0;\n while (true) {\n assert(offset < self.length);\n uint256 labelLen = self.readUint8(offset);\n offset += labelLen + 1;\n if (labelLen == 0) {\n break;\n }\n count += 1;\n }\n return count;\n }\n\n uint256 constant RRSIG_TYPE = 0;\n uint256 constant RRSIG_ALGORITHM = 2;\n uint256 constant RRSIG_LABELS = 3;\n uint256 constant RRSIG_TTL = 4;\n uint256 constant RRSIG_EXPIRATION = 8;\n uint256 constant RRSIG_INCEPTION = 12;\n uint256 constant RRSIG_KEY_TAG = 16;\n uint256 constant RRSIG_SIGNER_NAME = 18;\n\n struct SignedSet {\n uint16 typeCovered;\n uint8 algorithm;\n uint8 labels;\n uint32 ttl;\n uint32 expiration;\n uint32 inception;\n uint16 keytag;\n bytes signerName;\n bytes data;\n bytes name;\n }\n\n function readSignedSet(\n bytes memory data\n ) internal pure returns (SignedSet memory self) {\n self.typeCovered = data.readUint16(RRSIG_TYPE);\n self.algorithm = data.readUint8(RRSIG_ALGORITHM);\n self.labels = data.readUint8(RRSIG_LABELS);\n self.ttl = data.readUint32(RRSIG_TTL);\n self.expiration = data.readUint32(RRSIG_EXPIRATION);\n self.inception = data.readUint32(RRSIG_INCEPTION);\n self.keytag = data.readUint16(RRSIG_KEY_TAG);\n self.signerName = readName(data, RRSIG_SIGNER_NAME);\n self.data = data.substring(\n RRSIG_SIGNER_NAME + self.signerName.length,\n data.length - RRSIG_SIGNER_NAME - self.signerName.length\n );\n }\n\n function rrs(\n SignedSet memory rrset\n ) internal pure returns (RRIterator memory) {\n return iterateRRs(rrset.data, 0);\n }\n\n /**\n * @dev An iterator over resource records.\n */\n struct RRIterator {\n bytes data;\n uint256 offset;\n uint16 dnstype;\n uint16 class;\n uint32 ttl;\n uint256 rdataOffset;\n uint256 nextOffset;\n }\n\n /**\n * @dev Begins iterating over resource records.\n * @param self The byte string to read from.\n * @param offset The offset to start reading at.\n * @return ret An iterator object.\n */\n function iterateRRs(\n bytes memory self,\n uint256 offset\n ) internal pure returns (RRIterator memory ret) {\n ret.data = self;\n ret.nextOffset = offset;\n next(ret);\n }\n\n /**\n * @dev Returns true iff there are more RRs to iterate.\n * @param iter The iterator to check.\n * @return True iff the iterator has finished.\n */\n function done(RRIterator memory iter) internal pure returns (bool) {\n return iter.offset >= iter.data.length;\n }\n\n /**\n * @dev Moves the iterator to the next resource record.\n * @param iter The iterator to advance.\n */\n function next(RRIterator memory iter) internal pure {\n iter.offset = iter.nextOffset;\n if (iter.offset >= iter.data.length) {\n return;\n }\n\n // Skip the name\n uint256 off = iter.offset + nameLength(iter.data, iter.offset);\n\n // Read type, class, and ttl\n iter.dnstype = iter.data.readUint16(off);\n off += 2;\n iter.class = iter.data.readUint16(off);\n off += 2;\n iter.ttl = iter.data.readUint32(off);\n off += 4;\n\n // Read the rdata\n uint256 rdataLength = iter.data.readUint16(off);\n off += 2;\n iter.rdataOffset = off;\n iter.nextOffset = off + rdataLength;\n }\n\n /**\n * @dev Returns the name of the current record.\n * @param iter The iterator.\n * @return A new bytes object containing the owner name from the RR.\n */\n function name(RRIterator memory iter) internal pure returns (bytes memory) {\n return\n iter.data.substring(\n iter.offset,\n nameLength(iter.data, iter.offset)\n );\n }\n\n /**\n * @dev Returns the rdata portion of the current record.\n * @param iter The iterator.\n * @return A new bytes object containing the RR's RDATA.\n */\n function rdata(\n RRIterator memory iter\n ) internal pure returns (bytes memory) {\n return\n iter.data.substring(\n iter.rdataOffset,\n iter.nextOffset - iter.rdataOffset\n );\n }\n\n uint256 constant DNSKEY_FLAGS = 0;\n uint256 constant DNSKEY_PROTOCOL = 2;\n uint256 constant DNSKEY_ALGORITHM = 3;\n uint256 constant DNSKEY_PUBKEY = 4;\n\n struct DNSKEY {\n uint16 flags;\n uint8 protocol;\n uint8 algorithm;\n bytes publicKey;\n }\n\n function readDNSKEY(\n bytes memory data,\n uint256 offset,\n uint256 length\n ) internal pure returns (DNSKEY memory self) {\n self.flags = data.readUint16(offset + DNSKEY_FLAGS);\n self.protocol = data.readUint8(offset + DNSKEY_PROTOCOL);\n self.algorithm = data.readUint8(offset + DNSKEY_ALGORITHM);\n self.publicKey = data.substring(\n offset + DNSKEY_PUBKEY,\n length - DNSKEY_PUBKEY\n );\n }\n\n uint256 constant DS_KEY_TAG = 0;\n uint256 constant DS_ALGORITHM = 2;\n uint256 constant DS_DIGEST_TYPE = 3;\n uint256 constant DS_DIGEST = 4;\n\n struct DS {\n uint16 keytag;\n uint8 algorithm;\n uint8 digestType;\n bytes digest;\n }\n\n function readDS(\n bytes memory data,\n uint256 offset,\n uint256 length\n ) internal pure returns (DS memory self) {\n self.keytag = data.readUint16(offset + DS_KEY_TAG);\n self.algorithm = data.readUint8(offset + DS_ALGORITHM);\n self.digestType = data.readUint8(offset + DS_DIGEST_TYPE);\n self.digest = data.substring(offset + DS_DIGEST, length - DS_DIGEST);\n }\n\n function isSubdomainOf(\n bytes memory self,\n bytes memory other\n ) internal pure returns (bool) {\n uint256 off = 0;\n uint256 counts = labelCount(self, 0);\n uint256 othercounts = labelCount(other, 0);\n\n while (counts > othercounts) {\n off = progress(self, off);\n counts--;\n }\n\n return self.equals(off, other, 0);\n }\n\n function compareNames(\n bytes memory self,\n bytes memory other\n ) internal pure returns (int256) {\n if (self.equals(other)) {\n return 0;\n }\n\n uint256 off;\n uint256 otheroff;\n uint256 prevoff;\n uint256 otherprevoff;\n uint256 counts = labelCount(self, 0);\n uint256 othercounts = labelCount(other, 0);\n\n // Keep removing labels from the front of the name until both names are equal length\n while (counts > othercounts) {\n prevoff = off;\n off = progress(self, off);\n counts--;\n }\n\n while (othercounts > counts) {\n otherprevoff = otheroff;\n otheroff = progress(other, otheroff);\n othercounts--;\n }\n\n // Compare the last nonequal labels to each other\n while (counts > 0 && !self.equals(off, other, otheroff)) {\n prevoff = off;\n off = progress(self, off);\n otherprevoff = otheroff;\n otheroff = progress(other, otheroff);\n counts -= 1;\n }\n\n if (off == 0) {\n return -1;\n }\n if (otheroff == 0) {\n return 1;\n }\n\n return\n self.compare(\n prevoff + 1,\n self.readUint8(prevoff),\n other,\n otherprevoff + 1,\n other.readUint8(otherprevoff)\n );\n }\n\n /**\n * @dev Compares two serial numbers using RFC1982 serial number math.\n */\n function serialNumberGte(\n uint32 i1,\n uint32 i2\n ) internal pure returns (bool) {\n unchecked {\n return int32(i1) - int32(i2) >= 0;\n }\n }\n\n function progress(\n bytes memory body,\n uint256 off\n ) internal pure returns (uint256) {\n return off + 1 + body.readUint8(off);\n }\n\n /**\n * @dev Computes the keytag for a chunk of data.\n * @param data The data to compute a keytag for.\n * @return The computed key tag.\n */\n function computeKeytag(bytes memory data) internal pure returns (uint16) {\n /* This function probably deserves some explanation.\n * The DNSSEC keytag function is a checksum that relies on summing up individual bytes\n * from the input string, with some mild bitshifting. Here's a Naive solidity implementation:\n *\n * function computeKeytag(bytes memory data) internal pure returns (uint16) {\n * uint ac;\n * for (uint i = 0; i < data.length; i++) {\n * ac += i & 1 == 0 ? uint16(data.readUint8(i)) << 8 : data.readUint8(i);\n * }\n * return uint16(ac + (ac >> 16));\n * }\n *\n * The EVM, with its 256 bit words, is exceedingly inefficient at doing byte-by-byte operations;\n * the code above, on reasonable length inputs, consumes over 100k gas. But we can make the EVM's\n * large words work in our favour.\n *\n * The code below works by treating the input as a series of 256 bit words. It first masks out\n * even and odd bytes from each input word, adding them to two separate accumulators `ac1` and `ac2`.\n * The bytes are separated by empty bytes, so as long as no individual sum exceeds 2^16-1, we're\n * effectively summing 16 different numbers with each EVM ADD opcode.\n *\n * Once it's added up all the inputs, it has to add all the 16 bit values in `ac1` and `ac2` together.\n * It does this using the same trick - mask out every other value, shift to align them, add them together.\n * After the first addition on both accumulators, there's enough room to add the two accumulators together,\n * and the remaining sums can be done just on ac1.\n */\n unchecked {\n require(data.length <= 8192, \"Long keys not permitted\");\n uint256 ac1;\n uint256 ac2;\n for (uint256 i = 0; i < data.length + 31; i += 32) {\n uint256 word;\n assembly {\n word := mload(add(add(data, 32), i))\n }\n if (i + 32 > data.length) {\n uint256 unused = 256 - (data.length - i) * 8;\n word = (word >> unused) << unused;\n }\n ac1 +=\n (word &\n 0xFF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00) >>\n 8;\n ac2 += (word &\n 0x00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF);\n }\n ac1 =\n (ac1 &\n 0x0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF) +\n ((ac1 &\n 0xFFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000) >>\n 16);\n ac2 =\n (ac2 &\n 0x0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF) +\n ((ac2 &\n 0xFFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000) >>\n 16);\n ac1 = (ac1 << 8) + ac2;\n ac1 =\n (ac1 &\n 0x00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF) +\n ((ac1 &\n 0xFFFFFFFF00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF00000000) >>\n 32);\n ac1 =\n (ac1 &\n 0x0000000000000000FFFFFFFFFFFFFFFF0000000000000000FFFFFFFFFFFFFFFF) +\n ((ac1 &\n 0xFFFFFFFFFFFFFFFF0000000000000000FFFFFFFFFFFFFFFF0000000000000000) >>\n 64);\n ac1 =\n (ac1 &\n 0x00000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) +\n (ac1 >> 128);\n ac1 += (ac1 >> 16) & 0xFFFF;\n return uint16(ac1);\n }\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/ethregistrar/BaseRegistrarImplementation.sol": { + "content": "pragma solidity >=0.8.4;\n\nimport \"../registry/ENS.sol\";\nimport \"./IBaseRegistrar.sol\";\nimport \"@openzeppelin/contracts/token/ERC721/ERC721.sol\";\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\n\ncontract BaseRegistrarImplementation is ERC721, IBaseRegistrar, Ownable {\n // A map of expiry times\n mapping(uint256 => uint256) expiries;\n // The ENS registry\n ENS public ens;\n // The namehash of the TLD this registrar owns (eg, .eth)\n bytes32 public baseNode;\n // A map of addresses that are authorised to register and renew names.\n mapping(address => bool) public controllers;\n uint256 public constant GRACE_PERIOD = 90 days;\n bytes4 private constant INTERFACE_META_ID =\n bytes4(keccak256(\"supportsInterface(bytes4)\"));\n bytes4 private constant ERC721_ID =\n bytes4(\n keccak256(\"balanceOf(address)\") ^\n keccak256(\"ownerOf(uint256)\") ^\n keccak256(\"approve(address,uint256)\") ^\n keccak256(\"getApproved(uint256)\") ^\n keccak256(\"setApprovalForAll(address,bool)\") ^\n keccak256(\"isApprovedForAll(address,address)\") ^\n keccak256(\"transferFrom(address,address,uint256)\") ^\n keccak256(\"safeTransferFrom(address,address,uint256)\") ^\n keccak256(\"safeTransferFrom(address,address,uint256,bytes)\")\n );\n bytes4 private constant RECLAIM_ID =\n bytes4(keccak256(\"reclaim(uint256,address)\"));\n\n /**\n * v2.1.3 version of _isApprovedOrOwner which calls ownerOf(tokenId) and takes grace period into consideration instead of ERC721.ownerOf(tokenId);\n * https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v2.1.3/contracts/token/ERC721/ERC721.sol#L187\n * @dev Returns whether the given spender can transfer a given token ID\n * @param spender address of the spender to query\n * @param tokenId uint256 ID of the token to be transferred\n * @return bool whether the msg.sender is approved for the given token ID,\n * is an operator of the owner, or is the owner of the token\n */\n function _isApprovedOrOwner(\n address spender,\n uint256 tokenId\n ) internal view override returns (bool) {\n address owner = ownerOf(tokenId);\n return (spender == owner ||\n getApproved(tokenId) == spender ||\n isApprovedForAll(owner, spender));\n }\n\n constructor(ENS _ens, bytes32 _baseNode) ERC721(\"\", \"\") {\n ens = _ens;\n baseNode = _baseNode;\n }\n\n modifier live() {\n require(ens.owner(baseNode) == address(this));\n _;\n }\n\n modifier onlyController() {\n require(controllers[msg.sender]);\n _;\n }\n\n /**\n * @dev Gets the owner of the specified token ID. Names become unowned\n * when their registration expires.\n * @param tokenId uint256 ID of the token to query the owner of\n * @return address currently marked as the owner of the given token ID\n */\n function ownerOf(\n uint256 tokenId\n ) public view override(IERC721, ERC721) returns (address) {\n require(expiries[tokenId] > block.timestamp);\n return super.ownerOf(tokenId);\n }\n\n // Authorises a controller, who can register and renew domains.\n function addController(address controller) external override onlyOwner {\n controllers[controller] = true;\n emit ControllerAdded(controller);\n }\n\n // Revoke controller permission for an address.\n function removeController(address controller) external override onlyOwner {\n controllers[controller] = false;\n emit ControllerRemoved(controller);\n }\n\n // Set the resolver for the TLD this registrar manages.\n function setResolver(address resolver) external override onlyOwner {\n ens.setResolver(baseNode, resolver);\n }\n\n // Returns the expiration timestamp of the specified id.\n function nameExpires(uint256 id) external view override returns (uint256) {\n return expiries[id];\n }\n\n // Returns true iff the specified name is available for registration.\n function available(uint256 id) public view override returns (bool) {\n // Not available if it's registered here or in its grace period.\n return expiries[id] + GRACE_PERIOD < block.timestamp;\n }\n\n /**\n * @dev Register a name.\n * @param id The token ID (keccak256 of the label).\n * @param owner The address that should own the registration.\n * @param duration Duration in seconds for the registration.\n */\n function register(\n uint256 id,\n address owner,\n uint256 duration\n ) external override returns (uint256) {\n return _register(id, owner, duration, true);\n }\n\n /**\n * @dev Register a name, without modifying the registry.\n * @param id The token ID (keccak256 of the label).\n * @param owner The address that should own the registration.\n * @param duration Duration in seconds for the registration.\n */\n function registerOnly(\n uint256 id,\n address owner,\n uint256 duration\n ) external returns (uint256) {\n return _register(id, owner, duration, false);\n }\n\n function _register(\n uint256 id,\n address owner,\n uint256 duration,\n bool updateRegistry\n ) internal live onlyController returns (uint256) {\n require(available(id));\n require(\n block.timestamp + duration + GRACE_PERIOD >\n block.timestamp + GRACE_PERIOD\n ); // Prevent future overflow\n\n expiries[id] = block.timestamp + duration;\n if (_exists(id)) {\n // Name was previously owned, and expired\n _burn(id);\n }\n _mint(owner, id);\n if (updateRegistry) {\n ens.setSubnodeOwner(baseNode, bytes32(id), owner);\n }\n\n emit NameRegistered(id, owner, block.timestamp + duration);\n\n return block.timestamp + duration;\n }\n\n function renew(\n uint256 id,\n uint256 duration\n ) external override live onlyController returns (uint256) {\n require(expiries[id] + GRACE_PERIOD >= block.timestamp); // Name must be registered here or in grace period\n require(\n expiries[id] + duration + GRACE_PERIOD > duration + GRACE_PERIOD\n ); // Prevent future overflow\n\n expiries[id] += duration;\n emit NameRenewed(id, expiries[id]);\n return expiries[id];\n }\n\n /**\n * @dev Reclaim ownership of a name in ENS, if you own it in the registrar.\n */\n function reclaim(uint256 id, address owner) external override live {\n require(_isApprovedOrOwner(msg.sender, id));\n ens.setSubnodeOwner(baseNode, bytes32(id), owner);\n }\n\n function supportsInterface(\n bytes4 interfaceID\n ) public view override(ERC721, IERC165) returns (bool) {\n return\n interfaceID == INTERFACE_META_ID ||\n interfaceID == ERC721_ID ||\n interfaceID == RECLAIM_ID;\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/ethregistrar/IBaseRegistrar.sol": { + "content": "import \"../registry/ENS.sol\";\nimport \"./IBaseRegistrar.sol\";\nimport \"@openzeppelin/contracts/token/ERC721/IERC721.sol\";\n\ninterface IBaseRegistrar is IERC721 {\n event ControllerAdded(address indexed controller);\n event ControllerRemoved(address indexed controller);\n event NameMigrated(\n uint256 indexed id,\n address indexed owner,\n uint256 expires\n );\n event NameRegistered(\n uint256 indexed id,\n address indexed owner,\n uint256 expires\n );\n event NameRenewed(uint256 indexed id, uint256 expires);\n\n // Authorises a controller, who can register and renew domains.\n function addController(address controller) external;\n\n // Revoke controller permission for an address.\n function removeController(address controller) external;\n\n // Set the resolver for the TLD this registrar manages.\n function setResolver(address resolver) external;\n\n // Returns the expiration timestamp of the specified label hash.\n function nameExpires(uint256 id) external view returns (uint256);\n\n // Returns true if the specified name is available for registration.\n function available(uint256 id) external view returns (bool);\n\n /**\n * @dev Register a name.\n */\n function register(\n uint256 id,\n address owner,\n uint256 duration\n ) external returns (uint256);\n\n function renew(uint256 id, uint256 duration) external returns (uint256);\n\n /**\n * @dev Reclaim ownership of a name in ENS, if you own it in the registrar.\n */\n function reclaim(uint256 id, address owner) external;\n}\n" + }, + "@ensdomains/ens-contracts/contracts/registry/ENS.sol": { + "content": "pragma solidity >=0.8.4;\n\ninterface ENS {\n // Logged when the owner of a node assigns a new owner to a subnode.\n event NewOwner(bytes32 indexed node, bytes32 indexed label, address owner);\n\n // Logged when the owner of a node transfers ownership to a new account.\n event Transfer(bytes32 indexed node, address owner);\n\n // Logged when the resolver for a node changes.\n event NewResolver(bytes32 indexed node, address resolver);\n\n // Logged when the TTL of a node changes\n event NewTTL(bytes32 indexed node, uint64 ttl);\n\n // Logged when an operator is added or removed.\n event ApprovalForAll(\n address indexed owner,\n address indexed operator,\n bool approved\n );\n\n function setRecord(\n bytes32 node,\n address owner,\n address resolver,\n uint64 ttl\n ) external;\n\n function setSubnodeRecord(\n bytes32 node,\n bytes32 label,\n address owner,\n address resolver,\n uint64 ttl\n ) external;\n\n function setSubnodeOwner(\n bytes32 node,\n bytes32 label,\n address owner\n ) external returns (bytes32);\n\n function setResolver(bytes32 node, address resolver) external;\n\n function setOwner(bytes32 node, address owner) external;\n\n function setTTL(bytes32 node, uint64 ttl) external;\n\n function setApprovalForAll(address operator, bool approved) external;\n\n function owner(bytes32 node) external view returns (address);\n\n function resolver(bytes32 node) external view returns (address);\n\n function ttl(bytes32 node) external view returns (uint64);\n\n function recordExists(bytes32 node) external view returns (bool);\n\n function isApprovedForAll(\n address owner,\n address operator\n ) external view returns (bool);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/registry/ENSRegistry.sol": { + "content": "pragma solidity >=0.8.4;\n\nimport \"./ENS.sol\";\n\n/**\n * The ENS registry contract.\n */\ncontract ENSRegistry is ENS {\n struct Record {\n address owner;\n address resolver;\n uint64 ttl;\n }\n\n mapping(bytes32 => Record) records;\n mapping(address => mapping(address => bool)) operators;\n\n // Permits modifications only by the owner of the specified node.\n modifier authorised(bytes32 node) {\n address owner = records[node].owner;\n require(owner == msg.sender || operators[owner][msg.sender]);\n _;\n }\n\n /**\n * @dev Constructs a new ENS registry.\n */\n constructor() public {\n records[0x0].owner = msg.sender;\n }\n\n /**\n * @dev Sets the record for a node.\n * @param node The node to update.\n * @param owner The address of the new owner.\n * @param resolver The address of the resolver.\n * @param ttl The TTL in seconds.\n */\n function setRecord(\n bytes32 node,\n address owner,\n address resolver,\n uint64 ttl\n ) external virtual override {\n setOwner(node, owner);\n _setResolverAndTTL(node, resolver, ttl);\n }\n\n /**\n * @dev Sets the record for a subnode.\n * @param node The parent node.\n * @param label The hash of the label specifying the subnode.\n * @param owner The address of the new owner.\n * @param resolver The address of the resolver.\n * @param ttl The TTL in seconds.\n */\n function setSubnodeRecord(\n bytes32 node,\n bytes32 label,\n address owner,\n address resolver,\n uint64 ttl\n ) external virtual override {\n bytes32 subnode = setSubnodeOwner(node, label, owner);\n _setResolverAndTTL(subnode, resolver, ttl);\n }\n\n /**\n * @dev Transfers ownership of a node to a new address. May only be called by the current owner of the node.\n * @param node The node to transfer ownership of.\n * @param owner The address of the new owner.\n */\n function setOwner(\n bytes32 node,\n address owner\n ) public virtual override authorised(node) {\n _setOwner(node, owner);\n emit Transfer(node, owner);\n }\n\n /**\n * @dev Transfers ownership of a subnode keccak256(node, label) to a new address. May only be called by the owner of the parent node.\n * @param node The parent node.\n * @param label The hash of the label specifying the subnode.\n * @param owner The address of the new owner.\n */\n function setSubnodeOwner(\n bytes32 node,\n bytes32 label,\n address owner\n ) public virtual override authorised(node) returns (bytes32) {\n bytes32 subnode = keccak256(abi.encodePacked(node, label));\n _setOwner(subnode, owner);\n emit NewOwner(node, label, owner);\n return subnode;\n }\n\n /**\n * @dev Sets the resolver address for the specified node.\n * @param node The node to update.\n * @param resolver The address of the resolver.\n */\n function setResolver(\n bytes32 node,\n address resolver\n ) public virtual override authorised(node) {\n emit NewResolver(node, resolver);\n records[node].resolver = resolver;\n }\n\n /**\n * @dev Sets the TTL for the specified node.\n * @param node The node to update.\n * @param ttl The TTL in seconds.\n */\n function setTTL(\n bytes32 node,\n uint64 ttl\n ) public virtual override authorised(node) {\n emit NewTTL(node, ttl);\n records[node].ttl = ttl;\n }\n\n /**\n * @dev Enable or disable approval for a third party (\"operator\") to manage\n * all of `msg.sender`'s ENS records. Emits the ApprovalForAll event.\n * @param operator Address to add to the set of authorized operators.\n * @param approved True if the operator is approved, false to revoke approval.\n */\n function setApprovalForAll(\n address operator,\n bool approved\n ) external virtual override {\n operators[msg.sender][operator] = approved;\n emit ApprovalForAll(msg.sender, operator, approved);\n }\n\n /**\n * @dev Returns the address that owns the specified node.\n * @param node The specified node.\n * @return address of the owner.\n */\n function owner(\n bytes32 node\n ) public view virtual override returns (address) {\n address addr = records[node].owner;\n if (addr == address(this)) {\n return address(0x0);\n }\n\n return addr;\n }\n\n /**\n * @dev Returns the address of the resolver for the specified node.\n * @param node The specified node.\n * @return address of the resolver.\n */\n function resolver(\n bytes32 node\n ) public view virtual override returns (address) {\n return records[node].resolver;\n }\n\n /**\n * @dev Returns the TTL of a node, and any records associated with it.\n * @param node The specified node.\n * @return ttl of the node.\n */\n function ttl(bytes32 node) public view virtual override returns (uint64) {\n return records[node].ttl;\n }\n\n /**\n * @dev Returns whether a record has been imported to the registry.\n * @param node The specified node.\n * @return Bool if record exists\n */\n function recordExists(\n bytes32 node\n ) public view virtual override returns (bool) {\n return records[node].owner != address(0x0);\n }\n\n /**\n * @dev Query if an address is an authorized operator for another address.\n * @param owner The address that owns the records.\n * @param operator The address that acts on behalf of the owner.\n * @return True if `operator` is an approved operator for `owner`, false otherwise.\n */\n function isApprovedForAll(\n address owner,\n address operator\n ) external view virtual override returns (bool) {\n return operators[owner][operator];\n }\n\n function _setOwner(bytes32 node, address owner) internal virtual {\n records[node].owner = owner;\n }\n\n function _setResolverAndTTL(\n bytes32 node,\n address resolver,\n uint64 ttl\n ) internal {\n if (resolver != records[node].resolver) {\n records[node].resolver = resolver;\n emit NewResolver(node, resolver);\n }\n\n if (ttl != records[node].ttl) {\n records[node].ttl = ttl;\n emit NewTTL(node, ttl);\n }\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/DelegatableResolver.sol": { + "content": "pragma solidity >=0.8.4;\nimport \"./profiles/ABIResolver.sol\";\nimport \"./profiles/AddrResolver.sol\";\nimport \"./profiles/ContentHashResolver.sol\";\nimport \"./profiles/DNSResolver.sol\";\nimport \"./profiles/InterfaceResolver.sol\";\nimport \"./profiles/NameResolver.sol\";\nimport \"./profiles/PubkeyResolver.sol\";\nimport \"./profiles/TextResolver.sol\";\nimport \"./profiles/ExtendedResolver.sol\";\nimport \"./Multicallable.sol\";\nimport \"./IDelegatableResolver.sol\";\nimport {Clone} from \"clones-with-immutable-args/src/Clone.sol\";\n\n/**\n * A delegated resolver that allows the resolver owner to add an operator to update records of a node on behalf of the owner.\n * address.\n */\ncontract DelegatableResolver is\n Clone,\n Multicallable,\n ABIResolver,\n AddrResolver,\n ContentHashResolver,\n DNSResolver,\n InterfaceResolver,\n NameResolver,\n PubkeyResolver,\n TextResolver,\n ExtendedResolver\n{\n using BytesUtils for bytes;\n\n // Logged when an operator is added or removed.\n event Approval(\n bytes32 indexed node,\n address indexed operator,\n bytes name,\n bool approved\n );\n\n error NotAuthorized(bytes32 node);\n\n //node => (delegate => isAuthorised)\n mapping(bytes32 => mapping(address => bool)) operators;\n\n /*\n * Check to see if the operator has been approved by the owner for the node.\n * @param name The ENS node to query\n * @param offset The offset of the label to query recursively. Start from the 0 position and kepp adding the length of each label as it traverse. The function exits when len is 0.\n * @param operator The address of the operator to query\n * @return node The node of the name passed as an argument\n * @return authorized The boolean state of whether the operator is approved to update record of the name\n */\n function getAuthorisedNode(\n bytes memory name,\n uint256 offset,\n address operator\n ) public view returns (bytes32 node, bool authorized) {\n uint256 len = name.readUint8(offset);\n node = bytes32(0);\n if (len > 0) {\n bytes32 label = name.keccak(offset + 1, len);\n (node, authorized) = getAuthorisedNode(\n name,\n offset + len + 1,\n operator\n );\n node = keccak256(abi.encodePacked(node, label));\n } else {\n return (\n node,\n authorized || operators[node][operator] || owner() == operator\n );\n }\n return (node, authorized || operators[node][operator]);\n }\n\n /**\n * @dev Approve an operator to be able to updated records on a node.\n */\n function approve(\n bytes memory name,\n address operator,\n bool approved\n ) external {\n (bytes32 node, bool authorized) = getAuthorisedNode(\n name,\n 0,\n msg.sender\n );\n if (!authorized) {\n revert NotAuthorized(node);\n }\n operators[node][operator] = approved;\n emit Approval(node, operator, name, approved);\n }\n\n /*\n * Returns the owner address passed set by the Factory\n * @return address The owner address\n */\n function owner() public view returns (address) {\n return _getArgAddress(0);\n }\n\n function isAuthorised(bytes32 node) internal view override returns (bool) {\n return msg.sender == owner() || operators[node][msg.sender];\n }\n\n function supportsInterface(\n bytes4 interfaceID\n )\n public\n view\n virtual\n override(\n Multicallable,\n ABIResolver,\n AddrResolver,\n ContentHashResolver,\n DNSResolver,\n InterfaceResolver,\n NameResolver,\n PubkeyResolver,\n TextResolver\n )\n returns (bool)\n {\n return\n interfaceID == type(IDelegatableResolver).interfaceId ||\n super.supportsInterface(interfaceID);\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/DelegatableResolverFactory.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\nimport \"./DelegatableResolver.sol\";\nimport {ClonesWithImmutableArgs} from \"clones-with-immutable-args/src/ClonesWithImmutableArgs.sol\";\n\n/**\n * A resolver factory that creates a dedicated resolver for each user\n */\n\ncontract DelegatableResolverFactory {\n using ClonesWithImmutableArgs for address;\n\n DelegatableResolver public implementation;\n event NewDelegatableResolver(address resolver, address owner);\n\n constructor(DelegatableResolver _implementation) {\n implementation = _implementation;\n }\n\n /*\n * Create the unique address unique to the owner\n * @param address The address of the resolver owner\n * @return address The address of the newly created Resolver\n */\n function create(\n address owner\n ) external returns (DelegatableResolver clone) {\n bytes memory data = abi.encodePacked(owner);\n clone = DelegatableResolver(address(implementation).clone2(data));\n emit NewDelegatableResolver(address(clone), owner);\n }\n\n /*\n * Returns the unique address unique to the owner\n * @param address The address of the resolver owner\n * @return address The address of the newly created Resolver\n */\n function predictAddress(address owner) external returns (address clone) {\n bytes memory data = abi.encodePacked(owner);\n clone = address(implementation).addressOfClone2(data);\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/IDelegatableResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface IDelegatableResolver {\n function approve(\n bytes memory name,\n address operator,\n bool approved\n ) external;\n\n function getAuthorisedNode(\n bytes memory name,\n uint256 offset,\n address operator\n ) external returns (bytes32 node, bool authorized);\n\n function owner() external view returns (address);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/IMulticallable.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\ninterface IMulticallable {\n function multicall(\n bytes[] calldata data\n ) external returns (bytes[] memory results);\n\n function multicallWithNodeCheck(\n bytes32,\n bytes[] calldata data\n ) external returns (bytes[] memory results);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/Multicallable.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\nimport \"./IMulticallable.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\n\nabstract contract Multicallable is IMulticallable, ERC165 {\n function _multicall(\n bytes32 nodehash,\n bytes[] calldata data\n ) internal returns (bytes[] memory results) {\n results = new bytes[](data.length);\n for (uint256 i = 0; i < data.length; i++) {\n if (nodehash != bytes32(0)) {\n bytes32 txNamehash = bytes32(data[i][4:36]);\n require(\n txNamehash == nodehash,\n \"multicall: All records must have a matching namehash\"\n );\n }\n (bool success, bytes memory result) = address(this).delegatecall(\n data[i]\n );\n require(success);\n results[i] = result;\n }\n return results;\n }\n\n // This function provides an extra security check when called\n // from priviledged contracts (such as EthRegistrarController)\n // that can set records on behalf of the node owners\n function multicallWithNodeCheck(\n bytes32 nodehash,\n bytes[] calldata data\n ) external returns (bytes[] memory results) {\n return _multicall(nodehash, data);\n }\n\n function multicall(\n bytes[] calldata data\n ) public override returns (bytes[] memory results) {\n return _multicall(bytes32(0), data);\n }\n\n function supportsInterface(\n bytes4 interfaceID\n ) public view virtual override returns (bool) {\n return\n interfaceID == type(IMulticallable).interfaceId ||\n super.supportsInterface(interfaceID);\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/ABIResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\nimport \"./IABIResolver.sol\";\nimport \"../ResolverBase.sol\";\n\nabstract contract ABIResolver is IABIResolver, ResolverBase {\n mapping(uint64 => mapping(bytes32 => mapping(uint256 => bytes))) versionable_abis;\n\n /**\n * Sets the ABI associated with an ENS node.\n * Nodes may have one ABI of each content type. To remove an ABI, set it to\n * the empty string.\n * @param node The node to update.\n * @param contentType The content type of the ABI\n * @param data The ABI data.\n */\n function setABI(\n bytes32 node,\n uint256 contentType,\n bytes calldata data\n ) external virtual authorised(node) {\n // Content types must be powers of 2\n require(((contentType - 1) & contentType) == 0);\n\n versionable_abis[recordVersions[node]][node][contentType] = data;\n emit ABIChanged(node, contentType);\n }\n\n /**\n * Returns the ABI associated with an ENS node.\n * Defined in EIP205.\n * @param node The ENS node to query\n * @param contentTypes A bitwise OR of the ABI formats accepted by the caller.\n * @return contentType The content type of the return value\n * @return data The ABI data\n */\n function ABI(\n bytes32 node,\n uint256 contentTypes\n ) external view virtual override returns (uint256, bytes memory) {\n mapping(uint256 => bytes) storage abiset = versionable_abis[\n recordVersions[node]\n ][node];\n\n for (\n uint256 contentType = 1;\n contentType <= contentTypes;\n contentType <<= 1\n ) {\n if (\n (contentType & contentTypes) != 0 &&\n abiset[contentType].length > 0\n ) {\n return (contentType, abiset[contentType]);\n }\n }\n\n return (0, bytes(\"\"));\n }\n\n function supportsInterface(\n bytes4 interfaceID\n ) public view virtual override returns (bool) {\n return\n interfaceID == type(IABIResolver).interfaceId ||\n super.supportsInterface(interfaceID);\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/AddrResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\nimport \"../ResolverBase.sol\";\nimport \"./IAddrResolver.sol\";\nimport \"./IAddressResolver.sol\";\n\nabstract contract AddrResolver is\n IAddrResolver,\n IAddressResolver,\n ResolverBase\n{\n uint256 private constant COIN_TYPE_ETH = 60;\n\n mapping(uint64 => mapping(bytes32 => mapping(uint256 => bytes))) versionable_addresses;\n\n /**\n * Sets the address associated with an ENS node.\n * May only be called by the owner of that node in the ENS registry.\n * @param node The node to update.\n * @param a The address to set.\n */\n function setAddr(\n bytes32 node,\n address a\n ) external virtual authorised(node) {\n setAddr(node, COIN_TYPE_ETH, addressToBytes(a));\n }\n\n /**\n * Returns the address associated with an ENS node.\n * @param node The ENS node to query.\n * @return The associated address.\n */\n function addr(\n bytes32 node\n ) public view virtual override returns (address payable) {\n bytes memory a = addr(node, COIN_TYPE_ETH);\n if (a.length == 0) {\n return payable(0);\n }\n return bytesToAddress(a);\n }\n\n function setAddr(\n bytes32 node,\n uint256 coinType,\n bytes memory a\n ) public virtual authorised(node) {\n emit AddressChanged(node, coinType, a);\n if (coinType == COIN_TYPE_ETH) {\n emit AddrChanged(node, bytesToAddress(a));\n }\n versionable_addresses[recordVersions[node]][node][coinType] = a;\n }\n\n function addr(\n bytes32 node,\n uint256 coinType\n ) public view virtual override returns (bytes memory) {\n return versionable_addresses[recordVersions[node]][node][coinType];\n }\n\n function supportsInterface(\n bytes4 interfaceID\n ) public view virtual override returns (bool) {\n return\n interfaceID == type(IAddrResolver).interfaceId ||\n interfaceID == type(IAddressResolver).interfaceId ||\n super.supportsInterface(interfaceID);\n }\n\n function bytesToAddress(\n bytes memory b\n ) internal pure returns (address payable a) {\n require(b.length == 20);\n assembly {\n a := div(mload(add(b, 32)), exp(256, 12))\n }\n }\n\n function addressToBytes(address a) internal pure returns (bytes memory b) {\n b = new bytes(20);\n assembly {\n mstore(add(b, 32), mul(a, exp(256, 12)))\n }\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/ContentHashResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\nimport \"../ResolverBase.sol\";\nimport \"./IContentHashResolver.sol\";\n\nabstract contract ContentHashResolver is IContentHashResolver, ResolverBase {\n mapping(uint64 => mapping(bytes32 => bytes)) versionable_hashes;\n\n /**\n * Sets the contenthash associated with an ENS node.\n * May only be called by the owner of that node in the ENS registry.\n * @param node The node to update.\n * @param hash The contenthash to set\n */\n function setContenthash(\n bytes32 node,\n bytes calldata hash\n ) external virtual authorised(node) {\n versionable_hashes[recordVersions[node]][node] = hash;\n emit ContenthashChanged(node, hash);\n }\n\n /**\n * Returns the contenthash associated with an ENS node.\n * @param node The ENS node to query.\n * @return The associated contenthash.\n */\n function contenthash(\n bytes32 node\n ) external view virtual override returns (bytes memory) {\n return versionable_hashes[recordVersions[node]][node];\n }\n\n function supportsInterface(\n bytes4 interfaceID\n ) public view virtual override returns (bool) {\n return\n interfaceID == type(IContentHashResolver).interfaceId ||\n super.supportsInterface(interfaceID);\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/DNSResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\nimport \"../ResolverBase.sol\";\nimport \"../../dnssec-oracle/RRUtils.sol\";\nimport \"./IDNSRecordResolver.sol\";\nimport \"./IDNSZoneResolver.sol\";\n\nabstract contract DNSResolver is\n IDNSRecordResolver,\n IDNSZoneResolver,\n ResolverBase\n{\n using RRUtils for *;\n using BytesUtils for bytes;\n\n // Zone hashes for the domains.\n // A zone hash is an EIP-1577 content hash in binary format that should point to a\n // resource containing a single zonefile.\n // node => contenthash\n mapping(uint64 => mapping(bytes32 => bytes)) private versionable_zonehashes;\n\n // The records themselves. Stored as binary RRSETs\n // node => version => name => resource => data\n mapping(uint64 => mapping(bytes32 => mapping(bytes32 => mapping(uint16 => bytes))))\n private versionable_records;\n\n // Count of number of entries for a given name. Required for DNS resolvers\n // when resolving wildcards.\n // node => version => name => number of records\n mapping(uint64 => mapping(bytes32 => mapping(bytes32 => uint16)))\n private versionable_nameEntriesCount;\n\n /**\n * Set one or more DNS records. Records are supplied in wire-format.\n * Records with the same node/name/resource must be supplied one after the\n * other to ensure the data is updated correctly. For example, if the data\n * was supplied:\n * a.example.com IN A 1.2.3.4\n * a.example.com IN A 5.6.7.8\n * www.example.com IN CNAME a.example.com.\n * then this would store the two A records for a.example.com correctly as a\n * single RRSET, however if the data was supplied:\n * a.example.com IN A 1.2.3.4\n * www.example.com IN CNAME a.example.com.\n * a.example.com IN A 5.6.7.8\n * then this would store the first A record, the CNAME, then the second A\n * record which would overwrite the first.\n *\n * @param node the namehash of the node for which to set the records\n * @param data the DNS wire format records to set\n */\n function setDNSRecords(\n bytes32 node,\n bytes calldata data\n ) external virtual authorised(node) {\n uint16 resource = 0;\n uint256 offset = 0;\n bytes memory name;\n bytes memory value;\n bytes32 nameHash;\n uint64 version = recordVersions[node];\n // Iterate over the data to add the resource records\n for (\n RRUtils.RRIterator memory iter = data.iterateRRs(0);\n !iter.done();\n iter.next()\n ) {\n if (resource == 0) {\n resource = iter.dnstype;\n name = iter.name();\n nameHash = keccak256(abi.encodePacked(name));\n value = bytes(iter.rdata());\n } else {\n bytes memory newName = iter.name();\n if (resource != iter.dnstype || !name.equals(newName)) {\n setDNSRRSet(\n node,\n name,\n resource,\n data,\n offset,\n iter.offset - offset,\n value.length == 0,\n version\n );\n resource = iter.dnstype;\n offset = iter.offset;\n name = newName;\n nameHash = keccak256(name);\n value = bytes(iter.rdata());\n }\n }\n }\n if (name.length > 0) {\n setDNSRRSet(\n node,\n name,\n resource,\n data,\n offset,\n data.length - offset,\n value.length == 0,\n version\n );\n }\n }\n\n /**\n * Obtain a DNS record.\n * @param node the namehash of the node for which to fetch the record\n * @param name the keccak-256 hash of the fully-qualified name for which to fetch the record\n * @param resource the ID of the resource as per https://en.wikipedia.org/wiki/List_of_DNS_record_types\n * @return the DNS record in wire format if present, otherwise empty\n */\n function dnsRecord(\n bytes32 node,\n bytes32 name,\n uint16 resource\n ) public view virtual override returns (bytes memory) {\n return versionable_records[recordVersions[node]][node][name][resource];\n }\n\n /**\n * Check if a given node has records.\n * @param node the namehash of the node for which to check the records\n * @param name the namehash of the node for which to check the records\n */\n function hasDNSRecords(\n bytes32 node,\n bytes32 name\n ) public view virtual returns (bool) {\n return (versionable_nameEntriesCount[recordVersions[node]][node][\n name\n ] != 0);\n }\n\n /**\n * setZonehash sets the hash for the zone.\n * May only be called by the owner of that node in the ENS registry.\n * @param node The node to update.\n * @param hash The zonehash to set\n */\n function setZonehash(\n bytes32 node,\n bytes calldata hash\n ) external virtual authorised(node) {\n uint64 currentRecordVersion = recordVersions[node];\n bytes memory oldhash = versionable_zonehashes[currentRecordVersion][\n node\n ];\n versionable_zonehashes[currentRecordVersion][node] = hash;\n emit DNSZonehashChanged(node, oldhash, hash);\n }\n\n /**\n * zonehash obtains the hash for the zone.\n * @param node The ENS node to query.\n * @return The associated contenthash.\n */\n function zonehash(\n bytes32 node\n ) external view virtual override returns (bytes memory) {\n return versionable_zonehashes[recordVersions[node]][node];\n }\n\n function supportsInterface(\n bytes4 interfaceID\n ) public view virtual override returns (bool) {\n return\n interfaceID == type(IDNSRecordResolver).interfaceId ||\n interfaceID == type(IDNSZoneResolver).interfaceId ||\n super.supportsInterface(interfaceID);\n }\n\n function setDNSRRSet(\n bytes32 node,\n bytes memory name,\n uint16 resource,\n bytes memory data,\n uint256 offset,\n uint256 size,\n bool deleteRecord,\n uint64 version\n ) private {\n bytes32 nameHash = keccak256(name);\n bytes memory rrData = data.substring(offset, size);\n if (deleteRecord) {\n if (\n versionable_records[version][node][nameHash][resource].length !=\n 0\n ) {\n versionable_nameEntriesCount[version][node][nameHash]--;\n }\n delete (versionable_records[version][node][nameHash][resource]);\n emit DNSRecordDeleted(node, name, resource);\n } else {\n if (\n versionable_records[version][node][nameHash][resource].length ==\n 0\n ) {\n versionable_nameEntriesCount[version][node][nameHash]++;\n }\n versionable_records[version][node][nameHash][resource] = rrData;\n emit DNSRecordChanged(node, name, resource, rrData);\n }\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/ExtendedResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\ncontract ExtendedResolver {\n function resolve(\n bytes memory /* name */,\n bytes memory data\n ) external view returns (bytes memory) {\n (bool success, bytes memory result) = address(this).staticcall(data);\n if (success) {\n return result;\n } else {\n // Revert with the reason provided by the call\n assembly {\n revert(add(result, 0x20), mload(result))\n }\n }\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/IABIResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface IABIResolver {\n event ABIChanged(bytes32 indexed node, uint256 indexed contentType);\n\n /**\n * Returns the ABI associated with an ENS node.\n * Defined in EIP205.\n * @param node The ENS node to query\n * @param contentTypes A bitwise OR of the ABI formats accepted by the caller.\n * @return contentType The content type of the return value\n * @return data The ABI data\n */\n function ABI(\n bytes32 node,\n uint256 contentTypes\n ) external view returns (uint256, bytes memory);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/IAddressResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\n/**\n * Interface for the new (multicoin) addr function.\n */\ninterface IAddressResolver {\n event AddressChanged(\n bytes32 indexed node,\n uint256 coinType,\n bytes newAddress\n );\n\n function addr(\n bytes32 node,\n uint256 coinType\n ) external view returns (bytes memory);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/IAddrResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\n/**\n * Interface for the legacy (ETH-only) addr function.\n */\ninterface IAddrResolver {\n event AddrChanged(bytes32 indexed node, address a);\n\n /**\n * Returns the address associated with an ENS node.\n * @param node The ENS node to query.\n * @return The associated address.\n */\n function addr(bytes32 node) external view returns (address payable);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/IContentHashResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface IContentHashResolver {\n event ContenthashChanged(bytes32 indexed node, bytes hash);\n\n /**\n * Returns the contenthash associated with an ENS node.\n * @param node The ENS node to query.\n * @return The associated contenthash.\n */\n function contenthash(bytes32 node) external view returns (bytes memory);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/IDNSRecordResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface IDNSRecordResolver {\n // DNSRecordChanged is emitted whenever a given node/name/resource's RRSET is updated.\n event DNSRecordChanged(\n bytes32 indexed node,\n bytes name,\n uint16 resource,\n bytes record\n );\n // DNSRecordDeleted is emitted whenever a given node/name/resource's RRSET is deleted.\n event DNSRecordDeleted(bytes32 indexed node, bytes name, uint16 resource);\n\n /**\n * Obtain a DNS record.\n * @param node the namehash of the node for which to fetch the record\n * @param name the keccak-256 hash of the fully-qualified name for which to fetch the record\n * @param resource the ID of the resource as per https://en.wikipedia.org/wiki/List_of_DNS_record_types\n * @return the DNS record in wire format if present, otherwise empty\n */\n function dnsRecord(\n bytes32 node,\n bytes32 name,\n uint16 resource\n ) external view returns (bytes memory);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/IDNSZoneResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface IDNSZoneResolver {\n // DNSZonehashChanged is emitted whenever a given node's zone hash is updated.\n event DNSZonehashChanged(\n bytes32 indexed node,\n bytes lastzonehash,\n bytes zonehash\n );\n\n /**\n * zonehash obtains the hash for the zone.\n * @param node The ENS node to query.\n * @return The associated contenthash.\n */\n function zonehash(bytes32 node) external view returns (bytes memory);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/IExtendedResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\ninterface IExtendedResolver {\n function resolve(\n bytes memory name,\n bytes memory data\n ) external view returns (bytes memory);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/IInterfaceResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface IInterfaceResolver {\n event InterfaceChanged(\n bytes32 indexed node,\n bytes4 indexed interfaceID,\n address implementer\n );\n\n /**\n * Returns the address of a contract that implements the specified interface for this name.\n * If an implementer has not been set for this interfaceID and name, the resolver will query\n * the contract at `addr()`. If `addr()` is set, a contract exists at that address, and that\n * contract implements EIP165 and returns `true` for the specified interfaceID, its address\n * will be returned.\n * @param node The ENS node to query.\n * @param interfaceID The EIP 165 interface ID to check for.\n * @return The address that implements this interface, or 0 if the interface is unsupported.\n */\n function interfaceImplementer(\n bytes32 node,\n bytes4 interfaceID\n ) external view returns (address);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/INameResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface INameResolver {\n event NameChanged(bytes32 indexed node, string name);\n\n /**\n * Returns the name associated with an ENS node, for reverse records.\n * Defined in EIP181.\n * @param node The ENS node to query.\n * @return The associated name.\n */\n function name(bytes32 node) external view returns (string memory);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/InterfaceResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\nimport \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport \"../ResolverBase.sol\";\nimport \"./AddrResolver.sol\";\nimport \"./IInterfaceResolver.sol\";\n\nabstract contract InterfaceResolver is IInterfaceResolver, AddrResolver {\n mapping(uint64 => mapping(bytes32 => mapping(bytes4 => address))) versionable_interfaces;\n\n /**\n * Sets an interface associated with a name.\n * Setting the address to 0 restores the default behaviour of querying the contract at `addr()` for interface support.\n * @param node The node to update.\n * @param interfaceID The EIP 165 interface ID.\n * @param implementer The address of a contract that implements this interface for this node.\n */\n function setInterface(\n bytes32 node,\n bytes4 interfaceID,\n address implementer\n ) external virtual authorised(node) {\n versionable_interfaces[recordVersions[node]][node][\n interfaceID\n ] = implementer;\n emit InterfaceChanged(node, interfaceID, implementer);\n }\n\n /**\n * Returns the address of a contract that implements the specified interface for this name.\n * If an implementer has not been set for this interfaceID and name, the resolver will query\n * the contract at `addr()`. If `addr()` is set, a contract exists at that address, and that\n * contract implements EIP165 and returns `true` for the specified interfaceID, its address\n * will be returned.\n * @param node The ENS node to query.\n * @param interfaceID The EIP 165 interface ID to check for.\n * @return The address that implements this interface, or 0 if the interface is unsupported.\n */\n function interfaceImplementer(\n bytes32 node,\n bytes4 interfaceID\n ) external view virtual override returns (address) {\n address implementer = versionable_interfaces[recordVersions[node]][\n node\n ][interfaceID];\n if (implementer != address(0)) {\n return implementer;\n }\n\n address a = addr(node);\n if (a == address(0)) {\n return address(0);\n }\n\n (bool success, bytes memory returnData) = a.staticcall(\n abi.encodeWithSignature(\n \"supportsInterface(bytes4)\",\n type(IERC165).interfaceId\n )\n );\n if (!success || returnData.length < 32 || returnData[31] == 0) {\n // EIP 165 not supported by target\n return address(0);\n }\n\n (success, returnData) = a.staticcall(\n abi.encodeWithSignature(\"supportsInterface(bytes4)\", interfaceID)\n );\n if (!success || returnData.length < 32 || returnData[31] == 0) {\n // Specified interface not supported by target\n return address(0);\n }\n\n return a;\n }\n\n function supportsInterface(\n bytes4 interfaceID\n ) public view virtual override returns (bool) {\n return\n interfaceID == type(IInterfaceResolver).interfaceId ||\n super.supportsInterface(interfaceID);\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/IPubkeyResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface IPubkeyResolver {\n event PubkeyChanged(bytes32 indexed node, bytes32 x, bytes32 y);\n\n /**\n * Returns the SECP256k1 public key associated with an ENS node.\n * Defined in EIP 619.\n * @param node The ENS node to query\n * @return x The X coordinate of the curve point for the public key.\n * @return y The Y coordinate of the curve point for the public key.\n */\n function pubkey(bytes32 node) external view returns (bytes32 x, bytes32 y);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/ITextResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface ITextResolver {\n event TextChanged(\n bytes32 indexed node,\n string indexed indexedKey,\n string key,\n string value\n );\n\n /**\n * Returns the text data associated with an ENS node and key.\n * @param node The ENS node to query.\n * @param key The text data key to query.\n * @return The associated text data.\n */\n function text(\n bytes32 node,\n string calldata key\n ) external view returns (string memory);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/IVersionableResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface IVersionableResolver {\n event VersionChanged(bytes32 indexed node, uint64 newVersion);\n\n function recordVersions(bytes32 node) external view returns (uint64);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/NameResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\nimport \"../ResolverBase.sol\";\nimport \"./INameResolver.sol\";\n\nabstract contract NameResolver is INameResolver, ResolverBase {\n mapping(uint64 => mapping(bytes32 => string)) versionable_names;\n\n /**\n * Sets the name associated with an ENS node, for reverse records.\n * May only be called by the owner of that node in the ENS registry.\n * @param node The node to update.\n */\n function setName(\n bytes32 node,\n string calldata newName\n ) external virtual authorised(node) {\n versionable_names[recordVersions[node]][node] = newName;\n emit NameChanged(node, newName);\n }\n\n /**\n * Returns the name associated with an ENS node, for reverse records.\n * Defined in EIP181.\n * @param node The ENS node to query.\n * @return The associated name.\n */\n function name(\n bytes32 node\n ) external view virtual override returns (string memory) {\n return versionable_names[recordVersions[node]][node];\n }\n\n function supportsInterface(\n bytes4 interfaceID\n ) public view virtual override returns (bool) {\n return\n interfaceID == type(INameResolver).interfaceId ||\n super.supportsInterface(interfaceID);\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/PubkeyResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\nimport \"../ResolverBase.sol\";\nimport \"./IPubkeyResolver.sol\";\n\nabstract contract PubkeyResolver is IPubkeyResolver, ResolverBase {\n struct PublicKey {\n bytes32 x;\n bytes32 y;\n }\n\n mapping(uint64 => mapping(bytes32 => PublicKey)) versionable_pubkeys;\n\n /**\n * Sets the SECP256k1 public key associated with an ENS node.\n * @param node The ENS node to query\n * @param x the X coordinate of the curve point for the public key.\n * @param y the Y coordinate of the curve point for the public key.\n */\n function setPubkey(\n bytes32 node,\n bytes32 x,\n bytes32 y\n ) external virtual authorised(node) {\n versionable_pubkeys[recordVersions[node]][node] = PublicKey(x, y);\n emit PubkeyChanged(node, x, y);\n }\n\n /**\n * Returns the SECP256k1 public key associated with an ENS node.\n * Defined in EIP 619.\n * @param node The ENS node to query\n * @return x The X coordinate of the curve point for the public key.\n * @return y The Y coordinate of the curve point for the public key.\n */\n function pubkey(\n bytes32 node\n ) external view virtual override returns (bytes32 x, bytes32 y) {\n uint64 currentRecordVersion = recordVersions[node];\n return (\n versionable_pubkeys[currentRecordVersion][node].x,\n versionable_pubkeys[currentRecordVersion][node].y\n );\n }\n\n function supportsInterface(\n bytes4 interfaceID\n ) public view virtual override returns (bool) {\n return\n interfaceID == type(IPubkeyResolver).interfaceId ||\n super.supportsInterface(interfaceID);\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/TextResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\nimport \"../ResolverBase.sol\";\nimport \"./ITextResolver.sol\";\n\nabstract contract TextResolver is ITextResolver, ResolverBase {\n mapping(uint64 => mapping(bytes32 => mapping(string => string))) versionable_texts;\n\n /**\n * Sets the text data associated with an ENS node and key.\n * May only be called by the owner of that node in the ENS registry.\n * @param node The node to update.\n * @param key The key to set.\n * @param value The text data value to set.\n */\n function setText(\n bytes32 node,\n string calldata key,\n string calldata value\n ) external virtual authorised(node) {\n versionable_texts[recordVersions[node]][node][key] = value;\n emit TextChanged(node, key, key, value);\n }\n\n /**\n * Returns the text data associated with an ENS node and key.\n * @param node The ENS node to query.\n * @param key The text data key to query.\n * @return The associated text data.\n */\n function text(\n bytes32 node,\n string calldata key\n ) external view virtual override returns (string memory) {\n return versionable_texts[recordVersions[node]][node][key];\n }\n\n function supportsInterface(\n bytes4 interfaceID\n ) public view virtual override returns (bool) {\n return\n interfaceID == type(ITextResolver).interfaceId ||\n super.supportsInterface(interfaceID);\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/PublicResolver.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity >=0.8.17 <0.9.0;\n\nimport \"../registry/ENS.sol\";\nimport \"./profiles/ABIResolver.sol\";\nimport \"./profiles/AddrResolver.sol\";\nimport \"./profiles/ContentHashResolver.sol\";\nimport \"./profiles/DNSResolver.sol\";\nimport \"./profiles/InterfaceResolver.sol\";\nimport \"./profiles/NameResolver.sol\";\nimport \"./profiles/PubkeyResolver.sol\";\nimport \"./profiles/TextResolver.sol\";\nimport \"./Multicallable.sol\";\nimport {ReverseClaimer} from \"../reverseRegistrar/ReverseClaimer.sol\";\nimport {INameWrapper} from \"../wrapper/INameWrapper.sol\";\n\n/**\n * A simple resolver anyone can use; only allows the owner of a node to set its\n * address.\n */\ncontract PublicResolver is\n Multicallable,\n ABIResolver,\n AddrResolver,\n ContentHashResolver,\n DNSResolver,\n InterfaceResolver,\n NameResolver,\n PubkeyResolver,\n TextResolver,\n ReverseClaimer\n{\n ENS immutable ens;\n INameWrapper immutable nameWrapper;\n address immutable trustedETHController;\n address immutable trustedReverseRegistrar;\n\n /**\n * A mapping of operators. An address that is authorised for an address\n * may make any changes to the name that the owner could, but may not update\n * the set of authorisations.\n * (owner, operator) => approved\n */\n mapping(address => mapping(address => bool)) private _operatorApprovals;\n\n /**\n * A mapping of delegates. A delegate that is authorised by an owner\n * for a name may make changes to the name's resolver, but may not update\n * the set of token approvals.\n * (owner, name, delegate) => approved\n */\n mapping(address => mapping(bytes32 => mapping(address => bool)))\n private _tokenApprovals;\n\n // Logged when an operator is added or removed.\n event ApprovalForAll(\n address indexed owner,\n address indexed operator,\n bool approved\n );\n\n // Logged when a delegate is approved or an approval is revoked.\n event Approved(\n address owner,\n bytes32 indexed node,\n address indexed delegate,\n bool indexed approved\n );\n\n constructor(\n ENS _ens,\n INameWrapper wrapperAddress,\n address _trustedETHController,\n address _trustedReverseRegistrar\n ) ReverseClaimer(_ens, msg.sender) {\n ens = _ens;\n nameWrapper = wrapperAddress;\n trustedETHController = _trustedETHController;\n trustedReverseRegistrar = _trustedReverseRegistrar;\n }\n\n /**\n * @dev See {IERC1155-setApprovalForAll}.\n */\n function setApprovalForAll(address operator, bool approved) external {\n require(\n msg.sender != operator,\n \"ERC1155: setting approval status for self\"\n );\n\n _operatorApprovals[msg.sender][operator] = approved;\n emit ApprovalForAll(msg.sender, operator, approved);\n }\n\n /**\n * @dev See {IERC1155-isApprovedForAll}.\n */\n function isApprovedForAll(\n address account,\n address operator\n ) public view returns (bool) {\n return _operatorApprovals[account][operator];\n }\n\n /**\n * @dev Approve a delegate to be able to updated records on a node.\n */\n function approve(bytes32 node, address delegate, bool approved) external {\n require(msg.sender != delegate, \"Setting delegate status for self\");\n\n _tokenApprovals[msg.sender][node][delegate] = approved;\n emit Approved(msg.sender, node, delegate, approved);\n }\n\n /**\n * @dev Check to see if the delegate has been approved by the owner for the node.\n */\n function isApprovedFor(\n address owner,\n bytes32 node,\n address delegate\n ) public view returns (bool) {\n return _tokenApprovals[owner][node][delegate];\n }\n\n function isAuthorised(bytes32 node) internal view override returns (bool) {\n if (\n msg.sender == trustedETHController ||\n msg.sender == trustedReverseRegistrar\n ) {\n return true;\n }\n address owner = ens.owner(node);\n if (owner == address(nameWrapper)) {\n owner = nameWrapper.ownerOf(uint256(node));\n }\n return\n owner == msg.sender ||\n isApprovedForAll(owner, msg.sender) ||\n isApprovedFor(owner, node, msg.sender);\n }\n\n function supportsInterface(\n bytes4 interfaceID\n )\n public\n view\n override(\n Multicallable,\n ABIResolver,\n AddrResolver,\n ContentHashResolver,\n DNSResolver,\n InterfaceResolver,\n NameResolver,\n PubkeyResolver,\n TextResolver\n )\n returns (bool)\n {\n return super.supportsInterface(interfaceID);\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/ResolverBase.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\nimport \"./profiles/IVersionableResolver.sol\";\n\nabstract contract ResolverBase is ERC165, IVersionableResolver {\n mapping(bytes32 => uint64) public recordVersions;\n\n function isAuthorised(bytes32 node) internal view virtual returns (bool);\n\n modifier authorised(bytes32 node) {\n require(isAuthorised(node));\n _;\n }\n\n /**\n * Increments the record version associated with an ENS node.\n * May only be called by the owner of that node in the ENS registry.\n * @param node The node to update.\n */\n function clearRecords(bytes32 node) public virtual authorised(node) {\n recordVersions[node]++;\n emit VersionChanged(node, recordVersions[node]);\n }\n\n function supportsInterface(\n bytes4 interfaceID\n ) public view virtual override returns (bool) {\n return\n interfaceID == type(IVersionableResolver).interfaceId ||\n super.supportsInterface(interfaceID);\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/reverseRegistrar/IReverseRegistrar.sol": { + "content": "pragma solidity >=0.8.4;\n\ninterface IReverseRegistrar {\n function setDefaultResolver(address resolver) external;\n\n function claim(address owner) external returns (bytes32);\n\n function claimForAddr(\n address addr,\n address owner,\n address resolver\n ) external returns (bytes32);\n\n function claimForAddrWithSignature(\n address addr,\n address owner,\n address resolver,\n address relayer,\n uint256 signatureExpiry,\n bytes calldata signature\n ) external returns (bytes32);\n\n function claimWithResolver(\n address owner,\n address resolver\n ) external returns (bytes32);\n\n function setName(string memory name) external returns (bytes32);\n\n function setNameForAddr(\n address addr,\n address owner,\n address resolver,\n string memory name\n ) external returns (bytes32);\n\n function setNameForAddrWithSignature(\n address addr,\n address owner,\n address resolver,\n address relayer,\n uint256 signatureExpiry,\n bytes calldata signature,\n string memory name\n ) external returns (bytes32);\n\n function node(address addr) external pure returns (bytes32);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/reverseRegistrar/ReverseClaimer.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity >=0.8.17 <0.9.0;\n\nimport {ENS} from \"../registry/ENS.sol\";\nimport {IReverseRegistrar} from \"../reverseRegistrar/IReverseRegistrar.sol\";\n\ncontract ReverseClaimer {\n bytes32 constant ADDR_REVERSE_NODE =\n 0x91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e2;\n\n constructor(ENS ens, address claimant) {\n IReverseRegistrar reverseRegistrar = IReverseRegistrar(\n ens.owner(ADDR_REVERSE_NODE)\n );\n reverseRegistrar.claim(claimant);\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/reverseRegistrar/ReverseRegistrar.sol": { + "content": "pragma solidity >=0.8.4;\n\nimport \"../registry/ENS.sol\";\nimport \"./IReverseRegistrar.sol\";\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\";\nimport \"../root/Controllable.sol\";\n\nabstract contract NameResolver {\n function setName(bytes32 node, string memory name) public virtual;\n}\n\nbytes32 constant lookup = 0x3031323334353637383961626364656600000000000000000000000000000000;\n\nbytes32 constant ADDR_REVERSE_NODE = 0x91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e2;\n\nerror InvalidSignature();\n\n// namehash('addr.reverse')\n\ncontract ReverseRegistrar is Ownable, Controllable, IReverseRegistrar {\n ENS public immutable ens;\n NameResolver public defaultResolver;\n using ECDSA for bytes32;\n\n event ReverseClaimed(address indexed addr, bytes32 indexed node);\n event DefaultResolverChanged(NameResolver indexed resolver);\n\n /**\n * @dev Constructor\n * @param ensAddr The address of the ENS registry.\n */\n constructor(ENS ensAddr) {\n ens = ensAddr;\n\n // Assign ownership of the reverse record to our deployer\n ReverseRegistrar oldRegistrar = ReverseRegistrar(\n ensAddr.owner(ADDR_REVERSE_NODE)\n );\n if (address(oldRegistrar) != address(0x0)) {\n oldRegistrar.claim(msg.sender);\n }\n }\n\n modifier authorised(address addr) {\n require(\n addr == msg.sender ||\n controllers[msg.sender] ||\n ens.isApprovedForAll(addr, msg.sender) ||\n ownsContract(addr),\n \"ReverseRegistrar: Caller is not a controller or authorised by address or the address itself\"\n );\n _;\n }\n\n function setDefaultResolver(address resolver) public override onlyOwner {\n require(\n address(resolver) != address(0),\n \"ReverseRegistrar: Resolver address must not be 0\"\n );\n defaultResolver = NameResolver(resolver);\n emit DefaultResolverChanged(NameResolver(resolver));\n }\n\n /**\n * @dev Transfers ownership of the reverse ENS record associated with the\n * calling account.\n * @param owner The address to set as the owner of the reverse record in ENS.\n * @return The ENS node hash of the reverse record.\n */\n function claim(address owner) public override returns (bytes32) {\n return claimForAddr(msg.sender, owner, address(defaultResolver));\n }\n\n /**\n * @dev Transfers ownership of the reverse ENS record associated with the\n * calling account.\n * @param addr The reverse record to set\n * @param owner The address to set as the owner of the reverse record in ENS.\n * @param resolver The resolver of the reverse node\n * @return The ENS node hash of the reverse record.\n */\n function claimForAddr(\n address addr,\n address owner,\n address resolver\n ) public override authorised(addr) returns (bytes32) {\n bytes32 labelHash = sha3HexAddress(addr);\n bytes32 reverseNode = keccak256(\n abi.encodePacked(ADDR_REVERSE_NODE, labelHash)\n );\n emit ReverseClaimed(addr, reverseNode);\n ens.setSubnodeRecord(ADDR_REVERSE_NODE, labelHash, owner, resolver, 0);\n return reverseNode;\n }\n\n /**\n * @dev Transfers ownership of the reverse ENS record associated with the\n * calling account.\n * @param addr The reverse record to set\n * @param owner The address to set as the owner of the reverse record in ENS.\n * @param resolver The resolver of the reverse node\n * @return The ENS node hash of the reverse record.\n */\n function claimForAddrWithSignature(\n address addr,\n address owner,\n address resolver,\n address relayer,\n uint256 signatureExpiry,\n bytes memory signature\n ) public override returns (bytes32) {\n bytes32 labelHash = sha3HexAddress(addr);\n bytes32 reverseNode = keccak256(\n abi.encodePacked(ADDR_REVERSE_NODE, labelHash)\n );\n\n bytes32 hash = keccak256(\n abi.encodePacked(\n IReverseRegistrar.claimForAddrWithSignature.selector,\n addr,\n owner,\n resolver,\n relayer,\n signatureExpiry\n )\n );\n\n bytes32 message = hash.toEthSignedMessageHash();\n\n if (\n !SignatureChecker.isValidSignatureNow(addr, message, signature) ||\n relayer != msg.sender ||\n signatureExpiry < block.timestamp ||\n signatureExpiry > block.timestamp + 1 days\n ) {\n revert InvalidSignature();\n }\n\n emit ReverseClaimed(addr, reverseNode);\n ens.setSubnodeRecord(ADDR_REVERSE_NODE, labelHash, owner, resolver, 0);\n return reverseNode;\n }\n\n /**\n * @dev Transfers ownership of the reverse ENS record associated with the\n * calling account.\n * @param owner The address to set as the owner of the reverse record in ENS.\n * @param resolver The address of the resolver to set; 0 to leave unchanged.\n * @return The ENS node hash of the reverse record.\n */\n function claimWithResolver(\n address owner,\n address resolver\n ) public override returns (bytes32) {\n return claimForAddr(msg.sender, owner, resolver);\n }\n\n /**\n * @dev Sets the `name()` record for the reverse ENS record associated with\n * the calling account. First updates the resolver to the default reverse\n * resolver if necessary.\n * @param name The name to set for this address.\n * @return The ENS node hash of the reverse record.\n */\n function setName(string memory name) public override returns (bytes32) {\n return\n setNameForAddr(\n msg.sender,\n msg.sender,\n address(defaultResolver),\n name\n );\n }\n\n /**\n * @dev Sets the `name()` record for the reverse ENS record associated with\n * the account provided. Updates the resolver to a designated resolver\n * Only callable by controllers and authorised users\n * @param addr The reverse record to set\n * @param owner The owner of the reverse node\n * @param resolver The resolver of the reverse node\n * @param name The name to set for this address.\n * @return The ENS node hash of the reverse record.\n */\n function setNameForAddr(\n address addr,\n address owner,\n address resolver,\n string memory name\n ) public override returns (bytes32) {\n bytes32 node = claimForAddr(addr, owner, resolver);\n NameResolver(resolver).setName(node, name);\n return node;\n }\n\n /**\n * @dev Sets the `name()` record for the reverse ENS record associated with\n * the account provided. Updates the resolver to a designated resolver\n * Only callable by controllers and authorised users\n * @param addr The reverse record to set\n * @param owner The owner of the reverse node\n * @param resolver The resolver of the reverse node\n * @param name The name to set for this address.\n * @return The ENS node hash of the reverse record.\n */\n function setNameForAddrWithSignature(\n address addr,\n address owner,\n address resolver,\n address relayer,\n uint256 signatureExpiry,\n bytes memory signature,\n string memory name\n ) public override returns (bytes32) {\n bytes32 node = claimForAddrWithSignature(\n addr,\n owner,\n resolver,\n relayer,\n signatureExpiry,\n signature\n );\n NameResolver(resolver).setName(node, name);\n return node;\n }\n\n /**\n * @dev Returns the node hash for a given account's reverse records.\n * @param addr The address to hash\n * @return The ENS node hash.\n */\n function node(address addr) public pure override returns (bytes32) {\n return\n keccak256(\n abi.encodePacked(ADDR_REVERSE_NODE, sha3HexAddress(addr))\n );\n }\n\n /**\n * @dev An optimised function to compute the sha3 of the lower-case\n * hexadecimal representation of an Ethereum address.\n * @param addr The address to hash\n * @return ret The SHA3 hash of the lower-case hexadecimal encoding of the\n * input address.\n */\n function sha3HexAddress(address addr) private pure returns (bytes32 ret) {\n assembly {\n for {\n let i := 40\n } gt(i, 0) {\n\n } {\n i := sub(i, 1)\n mstore8(i, byte(and(addr, 0xf), lookup))\n addr := div(addr, 0x10)\n i := sub(i, 1)\n mstore8(i, byte(and(addr, 0xf), lookup))\n addr := div(addr, 0x10)\n }\n\n ret := keccak256(0, 40)\n }\n }\n\n function ownsContract(address addr) internal view returns (bool) {\n try Ownable(addr).owner() returns (address owner) {\n return owner == msg.sender;\n } catch {\n return false;\n }\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/root/Controllable.sol": { + "content": "pragma solidity ^0.8.4;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\n\ncontract Controllable is Ownable {\n mapping(address => bool) public controllers;\n\n event ControllerChanged(address indexed controller, bool enabled);\n\n modifier onlyController() {\n require(\n controllers[msg.sender],\n \"Controllable: Caller is not a controller\"\n );\n _;\n }\n\n function setController(address controller, bool enabled) public onlyOwner {\n controllers[controller] = enabled;\n emit ControllerChanged(controller, enabled);\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/utils/ERC20Recoverable.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity >=0.8.17 <0.9.0;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\n\n/**\n @notice Contract is used to recover ERC20 tokens sent to the contract by mistake.\n */\n\ncontract ERC20Recoverable is Ownable {\n /**\n @notice Recover ERC20 tokens sent to the contract by mistake.\n @dev The contract is Ownable and only the owner can call the recover function.\n @param _to The address to send the tokens to.\n@param _token The address of the ERC20 token to recover\n @param _amount The amount of tokens to recover.\n */\n function recoverFunds(\n address _token,\n address _to,\n uint256 _amount\n ) external onlyOwner {\n IERC20(_token).transfer(_to, _amount);\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/wrapper/BytesUtils.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity ~0.8.17;\n\nlibrary BytesUtils {\n /*\n * @dev Returns the keccak-256 hash of a byte range.\n * @param self The byte string to hash.\n * @param offset The position to start hashing at.\n * @param len The number of bytes to hash.\n * @return The hash of the byte range.\n */\n function keccak(\n bytes memory self,\n uint256 offset,\n uint256 len\n ) internal pure returns (bytes32 ret) {\n require(offset + len <= self.length);\n assembly {\n ret := keccak256(add(add(self, 32), offset), len)\n }\n }\n\n /**\n * @dev Returns the ENS namehash of a DNS-encoded name.\n * @param self The DNS-encoded name to hash.\n * @param offset The offset at which to start hashing.\n * @return The namehash of the name.\n */\n function namehash(\n bytes memory self,\n uint256 offset\n ) internal pure returns (bytes32) {\n (bytes32 labelhash, uint256 newOffset) = readLabel(self, offset);\n if (labelhash == bytes32(0)) {\n require(offset == self.length - 1, \"namehash: Junk at end of name\");\n return bytes32(0);\n }\n return\n keccak256(abi.encodePacked(namehash(self, newOffset), labelhash));\n }\n\n /**\n * @dev Returns the keccak-256 hash of a DNS-encoded label, and the offset to the start of the next label.\n * @param self The byte string to read a label from.\n * @param idx The index to read a label at.\n * @return labelhash The hash of the label at the specified index, or 0 if it is the last label.\n * @return newIdx The index of the start of the next label.\n */\n function readLabel(\n bytes memory self,\n uint256 idx\n ) internal pure returns (bytes32 labelhash, uint256 newIdx) {\n require(idx < self.length, \"readLabel: Index out of bounds\");\n uint256 len = uint256(uint8(self[idx]));\n if (len > 0) {\n labelhash = keccak(self, idx + 1, len);\n } else {\n labelhash = bytes32(0);\n }\n newIdx = idx + len + 1;\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/wrapper/Controllable.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity ~0.8.17;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\n\ncontract Controllable is Ownable {\n mapping(address => bool) public controllers;\n\n event ControllerChanged(address indexed controller, bool active);\n\n function setController(address controller, bool active) public onlyOwner {\n controllers[controller] = active;\n emit ControllerChanged(controller, active);\n }\n\n modifier onlyController() {\n require(\n controllers[msg.sender],\n \"Controllable: Caller is not a controller\"\n );\n _;\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/wrapper/ERC1155Fuse.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity ~0.8.17;\n\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\nimport \"@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol\";\nimport \"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\";\nimport \"@openzeppelin/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol\";\nimport \"@openzeppelin/contracts/utils/Address.sol\";\n\n/* This contract is a variation on ERC1155 with the additions of _setData, getData and _beforeTransfer and ownerOf. _setData and getData allows the use of the other 96 bits next to the address of the owner for extra data. We use this to store 'fuses' that control permissions that can be burnt. 32 bits are used for the fuses themselves and 64 bits are used for the expiry of the name. When a name has expired, its fuses will be be set back to 0 */\n\nabstract contract ERC1155Fuse is ERC165, IERC1155, IERC1155MetadataURI {\n using Address for address;\n /**\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\n */\n event Approval(\n address indexed owner,\n address indexed approved,\n uint256 indexed tokenId\n );\n mapping(uint256 => uint256) public _tokens;\n\n // Mapping from owner to operator approvals\n mapping(address => mapping(address => bool)) private _operatorApprovals;\n // Mapping from token ID to approved address\n mapping(uint256 => address) internal _tokenApprovals;\n\n /**************************************************************************\n * ERC721 methods\n *************************************************************************/\n\n function ownerOf(uint256 id) public view virtual returns (address) {\n (address owner, , ) = getData(id);\n return owner;\n }\n\n /**\n * @dev See {IERC721-approve}.\n */\n function approve(address to, uint256 tokenId) public virtual {\n address owner = ownerOf(tokenId);\n require(to != owner, \"ERC721: approval to current owner\");\n\n require(\n msg.sender == owner || isApprovedForAll(owner, msg.sender),\n \"ERC721: approve caller is not token owner or approved for all\"\n );\n\n _approve(to, tokenId);\n }\n\n /**\n * @dev See {IERC721-getApproved}.\n */\n function getApproved(\n uint256 tokenId\n ) public view virtual returns (address) {\n return _tokenApprovals[tokenId];\n }\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(\n bytes4 interfaceId\n ) public view virtual override(ERC165, IERC165) returns (bool) {\n return\n interfaceId == type(IERC1155).interfaceId ||\n interfaceId == type(IERC1155MetadataURI).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev See {IERC1155-balanceOf}.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function balanceOf(\n address account,\n uint256 id\n ) public view virtual override returns (uint256) {\n require(\n account != address(0),\n \"ERC1155: balance query for the zero address\"\n );\n address owner = ownerOf(id);\n if (owner == account) {\n return 1;\n }\n return 0;\n }\n\n /**\n * @dev See {IERC1155-balanceOfBatch}.\n *\n * Requirements:\n *\n * - `accounts` and `ids` must have the same length.\n */\n function balanceOfBatch(\n address[] memory accounts,\n uint256[] memory ids\n ) public view virtual override returns (uint256[] memory) {\n require(\n accounts.length == ids.length,\n \"ERC1155: accounts and ids length mismatch\"\n );\n\n uint256[] memory batchBalances = new uint256[](accounts.length);\n\n for (uint256 i = 0; i < accounts.length; ++i) {\n batchBalances[i] = balanceOf(accounts[i], ids[i]);\n }\n\n return batchBalances;\n }\n\n /**\n * @dev See {IERC1155-setApprovalForAll}.\n */\n function setApprovalForAll(\n address operator,\n bool approved\n ) public virtual override {\n require(\n msg.sender != operator,\n \"ERC1155: setting approval status for self\"\n );\n\n _operatorApprovals[msg.sender][operator] = approved;\n emit ApprovalForAll(msg.sender, operator, approved);\n }\n\n /**\n * @dev See {IERC1155-isApprovedForAll}.\n */\n function isApprovedForAll(\n address account,\n address operator\n ) public view virtual override returns (bool) {\n return _operatorApprovals[account][operator];\n }\n\n /**\n * @dev Returns the Name's owner address and fuses\n */\n function getData(\n uint256 tokenId\n ) public view virtual returns (address owner, uint32 fuses, uint64 expiry) {\n uint256 t = _tokens[tokenId];\n owner = address(uint160(t));\n expiry = uint64(t >> 192);\n fuses = uint32(t >> 160);\n }\n\n /**\n * @dev See {IERC1155-safeTransferFrom}.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 id,\n uint256 amount,\n bytes memory data\n ) public virtual override {\n require(to != address(0), \"ERC1155: transfer to the zero address\");\n require(\n from == msg.sender || isApprovedForAll(from, msg.sender),\n \"ERC1155: caller is not owner nor approved\"\n );\n\n _transfer(from, to, id, amount, data);\n }\n\n /**\n * @dev See {IERC1155-safeBatchTransferFrom}.\n */\n function safeBatchTransferFrom(\n address from,\n address to,\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n ) public virtual override {\n require(\n ids.length == amounts.length,\n \"ERC1155: ids and amounts length mismatch\"\n );\n require(to != address(0), \"ERC1155: transfer to the zero address\");\n require(\n from == msg.sender || isApprovedForAll(from, msg.sender),\n \"ERC1155: transfer caller is not owner nor approved\"\n );\n\n for (uint256 i = 0; i < ids.length; ++i) {\n uint256 id = ids[i];\n uint256 amount = amounts[i];\n\n (address oldOwner, uint32 fuses, uint64 expiry) = getData(id);\n\n _beforeTransfer(id, fuses, expiry);\n\n require(\n amount == 1 && oldOwner == from,\n \"ERC1155: insufficient balance for transfer\"\n );\n _setData(id, to, fuses, expiry);\n }\n\n emit TransferBatch(msg.sender, from, to, ids, amounts);\n\n _doSafeBatchTransferAcceptanceCheck(\n msg.sender,\n from,\n to,\n ids,\n amounts,\n data\n );\n }\n\n /**************************************************************************\n * Internal/private methods\n *************************************************************************/\n\n /**\n * @dev Sets the Name's owner address and fuses\n */\n function _setData(\n uint256 tokenId,\n address owner,\n uint32 fuses,\n uint64 expiry\n ) internal virtual {\n _tokens[tokenId] =\n uint256(uint160(owner)) |\n (uint256(fuses) << 160) |\n (uint256(expiry) << 192);\n }\n\n function _beforeTransfer(\n uint256 id,\n uint32 fuses,\n uint64 expiry\n ) internal virtual;\n\n function _clearOwnerAndFuses(\n address owner,\n uint32 fuses,\n uint64 expiry\n ) internal virtual returns (address, uint32);\n\n function _mint(\n bytes32 node,\n address owner,\n uint32 fuses,\n uint64 expiry\n ) internal virtual {\n uint256 tokenId = uint256(node);\n (address oldOwner, uint32 oldFuses, uint64 oldExpiry) = getData(\n uint256(node)\n );\n\n uint32 parentControlledFuses = (uint32(type(uint16).max) << 16) &\n oldFuses;\n\n if (oldExpiry > expiry) {\n expiry = oldExpiry;\n }\n\n if (oldExpiry >= block.timestamp) {\n fuses = fuses | parentControlledFuses;\n }\n\n require(oldOwner == address(0), \"ERC1155: mint of existing token\");\n require(owner != address(0), \"ERC1155: mint to the zero address\");\n require(\n owner != address(this),\n \"ERC1155: newOwner cannot be the NameWrapper contract\"\n );\n\n _setData(tokenId, owner, fuses, expiry);\n emit TransferSingle(msg.sender, address(0x0), owner, tokenId, 1);\n _doSafeTransferAcceptanceCheck(\n msg.sender,\n address(0),\n owner,\n tokenId,\n 1,\n \"\"\n );\n }\n\n function _burn(uint256 tokenId) internal virtual {\n (address oldOwner, uint32 fuses, uint64 expiry) = ERC1155Fuse.getData(\n tokenId\n );\n (, fuses) = _clearOwnerAndFuses(oldOwner, fuses, expiry);\n // Clear approvals\n delete _tokenApprovals[tokenId];\n // Fuses and expiry are kept on burn\n _setData(tokenId, address(0x0), fuses, expiry);\n emit TransferSingle(msg.sender, oldOwner, address(0x0), tokenId, 1);\n }\n\n function _transfer(\n address from,\n address to,\n uint256 id,\n uint256 amount,\n bytes memory data\n ) internal {\n (address oldOwner, uint32 fuses, uint64 expiry) = getData(id);\n\n _beforeTransfer(id, fuses, expiry);\n\n require(\n amount == 1 && oldOwner == from,\n \"ERC1155: insufficient balance for transfer\"\n );\n\n if (oldOwner == to) {\n return;\n }\n\n _setData(id, to, fuses, expiry);\n\n emit TransferSingle(msg.sender, from, to, id, amount);\n\n _doSafeTransferAcceptanceCheck(msg.sender, from, to, id, amount, data);\n }\n\n function _doSafeTransferAcceptanceCheck(\n address operator,\n address from,\n address to,\n uint256 id,\n uint256 amount,\n bytes memory data\n ) private {\n if (to.isContract()) {\n try\n IERC1155Receiver(to).onERC1155Received(\n operator,\n from,\n id,\n amount,\n data\n )\n returns (bytes4 response) {\n if (\n response != IERC1155Receiver(to).onERC1155Received.selector\n ) {\n revert(\"ERC1155: ERC1155Receiver rejected tokens\");\n }\n } catch Error(string memory reason) {\n revert(reason);\n } catch {\n revert(\"ERC1155: transfer to non ERC1155Receiver implementer\");\n }\n }\n }\n\n function _doSafeBatchTransferAcceptanceCheck(\n address operator,\n address from,\n address to,\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n ) private {\n if (to.isContract()) {\n try\n IERC1155Receiver(to).onERC1155BatchReceived(\n operator,\n from,\n ids,\n amounts,\n data\n )\n returns (bytes4 response) {\n if (\n response !=\n IERC1155Receiver(to).onERC1155BatchReceived.selector\n ) {\n revert(\"ERC1155: ERC1155Receiver rejected tokens\");\n }\n } catch Error(string memory reason) {\n revert(reason);\n } catch {\n revert(\"ERC1155: transfer to non ERC1155Receiver implementer\");\n }\n }\n }\n\n /* ERC721 internal functions */\n\n /**\n * @dev Approve `to` to operate on `tokenId`\n *\n * Emits an {Approval} event.\n */\n function _approve(address to, uint256 tokenId) internal virtual {\n _tokenApprovals[tokenId] = to;\n emit Approval(ownerOf(tokenId), to, tokenId);\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/wrapper/IMetadataService.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity ~0.8.17;\n\ninterface IMetadataService {\n function uri(uint256) external view returns (string memory);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/wrapper/INameWrapper.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity ~0.8.17;\n\nimport \"../registry/ENS.sol\";\nimport \"../ethregistrar/IBaseRegistrar.sol\";\nimport \"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\";\nimport \"./IMetadataService.sol\";\nimport \"./INameWrapperUpgrade.sol\";\n\nuint32 constant CANNOT_UNWRAP = 1;\nuint32 constant CANNOT_BURN_FUSES = 2;\nuint32 constant CANNOT_TRANSFER = 4;\nuint32 constant CANNOT_SET_RESOLVER = 8;\nuint32 constant CANNOT_SET_TTL = 16;\nuint32 constant CANNOT_CREATE_SUBDOMAIN = 32;\nuint32 constant CANNOT_APPROVE = 64;\n//uint16 reserved for parent controlled fuses from bit 17 to bit 32\nuint32 constant PARENT_CANNOT_CONTROL = 1 << 16;\nuint32 constant IS_DOT_ETH = 1 << 17;\nuint32 constant CAN_EXTEND_EXPIRY = 1 << 18;\nuint32 constant CAN_DO_EVERYTHING = 0;\nuint32 constant PARENT_CONTROLLED_FUSES = 0xFFFF0000;\n// all fuses apart from IS_DOT_ETH\nuint32 constant USER_SETTABLE_FUSES = 0xFFFDFFFF;\n\ninterface INameWrapper is IERC1155 {\n event NameWrapped(\n bytes32 indexed node,\n bytes name,\n address owner,\n uint32 fuses,\n uint64 expiry\n );\n\n event NameUnwrapped(bytes32 indexed node, address owner);\n\n event FusesSet(bytes32 indexed node, uint32 fuses);\n event ExpiryExtended(bytes32 indexed node, uint64 expiry);\n\n function ens() external view returns (ENS);\n\n function registrar() external view returns (IBaseRegistrar);\n\n function metadataService() external view returns (IMetadataService);\n\n function names(bytes32) external view returns (bytes memory);\n\n function name() external view returns (string memory);\n\n function upgradeContract() external view returns (INameWrapperUpgrade);\n\n function supportsInterface(bytes4 interfaceID) external view returns (bool);\n\n function wrap(\n bytes calldata name,\n address wrappedOwner,\n address resolver\n ) external;\n\n function wrapETH2LD(\n string calldata label,\n address wrappedOwner,\n uint16 ownerControlledFuses,\n address resolver\n ) external returns (uint64 expires);\n\n function registerAndWrapETH2LD(\n string calldata label,\n address wrappedOwner,\n uint256 duration,\n address resolver,\n uint16 ownerControlledFuses\n ) external returns (uint256 registrarExpiry);\n\n function renew(\n uint256 labelHash,\n uint256 duration\n ) external returns (uint256 expires);\n\n function unwrap(bytes32 node, bytes32 label, address owner) external;\n\n function unwrapETH2LD(\n bytes32 label,\n address newRegistrant,\n address newController\n ) external;\n\n function upgrade(bytes calldata name, bytes calldata extraData) external;\n\n function setFuses(\n bytes32 node,\n uint16 ownerControlledFuses\n ) external returns (uint32 newFuses);\n\n function setChildFuses(\n bytes32 parentNode,\n bytes32 labelhash,\n uint32 fuses,\n uint64 expiry\n ) external;\n\n function setSubnodeRecord(\n bytes32 node,\n string calldata label,\n address owner,\n address resolver,\n uint64 ttl,\n uint32 fuses,\n uint64 expiry\n ) external returns (bytes32);\n\n function setRecord(\n bytes32 node,\n address owner,\n address resolver,\n uint64 ttl\n ) external;\n\n function setSubnodeOwner(\n bytes32 node,\n string calldata label,\n address newOwner,\n uint32 fuses,\n uint64 expiry\n ) external returns (bytes32);\n\n function extendExpiry(\n bytes32 node,\n bytes32 labelhash,\n uint64 expiry\n ) external returns (uint64);\n\n function canModifyName(\n bytes32 node,\n address addr\n ) external view returns (bool);\n\n function setResolver(bytes32 node, address resolver) external;\n\n function setTTL(bytes32 node, uint64 ttl) external;\n\n function ownerOf(uint256 id) external view returns (address owner);\n\n function approve(address to, uint256 tokenId) external;\n\n function getApproved(uint256 tokenId) external view returns (address);\n\n function getData(\n uint256 id\n ) external view returns (address, uint32, uint64);\n\n function setMetadataService(IMetadataService _metadataService) external;\n\n function uri(uint256 tokenId) external view returns (string memory);\n\n function setUpgradeContract(INameWrapperUpgrade _upgradeAddress) external;\n\n function allFusesBurned(\n bytes32 node,\n uint32 fuseMask\n ) external view returns (bool);\n\n function isWrapped(bytes32) external view returns (bool);\n\n function isWrapped(bytes32, bytes32) external view returns (bool);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/wrapper/INameWrapperUpgrade.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity ~0.8.17;\n\ninterface INameWrapperUpgrade {\n function wrapFromUpgrade(\n bytes calldata name,\n address wrappedOwner,\n uint32 fuses,\n uint64 expiry,\n address approved,\n bytes calldata extraData\n ) external;\n}\n" + }, + "@ensdomains/ens-contracts/contracts/wrapper/NameWrapper.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity ~0.8.17;\n\nimport {ERC1155Fuse, IERC165, IERC1155MetadataURI} from \"./ERC1155Fuse.sol\";\nimport {Controllable} from \"./Controllable.sol\";\nimport {INameWrapper, CANNOT_UNWRAP, CANNOT_BURN_FUSES, CANNOT_TRANSFER, CANNOT_SET_RESOLVER, CANNOT_SET_TTL, CANNOT_CREATE_SUBDOMAIN, CANNOT_APPROVE, PARENT_CANNOT_CONTROL, CAN_DO_EVERYTHING, IS_DOT_ETH, CAN_EXTEND_EXPIRY, PARENT_CONTROLLED_FUSES, USER_SETTABLE_FUSES} from \"./INameWrapper.sol\";\nimport {INameWrapperUpgrade} from \"./INameWrapperUpgrade.sol\";\nimport {IMetadataService} from \"./IMetadataService.sol\";\nimport {ENS} from \"../registry/ENS.sol\";\nimport {IReverseRegistrar} from \"../reverseRegistrar/IReverseRegistrar.sol\";\nimport {ReverseClaimer} from \"../reverseRegistrar/ReverseClaimer.sol\";\nimport {IBaseRegistrar} from \"../ethregistrar/IBaseRegistrar.sol\";\nimport {IERC721Receiver} from \"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\";\nimport \"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\";\nimport {Ownable} from \"@openzeppelin/contracts/access/Ownable.sol\";\nimport {BytesUtils} from \"./BytesUtils.sol\";\nimport {ERC20Recoverable} from \"../utils/ERC20Recoverable.sol\";\n\nerror Unauthorised(bytes32 node, address addr);\nerror IncompatibleParent();\nerror IncorrectTokenType();\nerror LabelMismatch(bytes32 labelHash, bytes32 expectedLabelhash);\nerror LabelTooShort();\nerror LabelTooLong(string label);\nerror IncorrectTargetOwner(address owner);\nerror CannotUpgrade();\nerror OperationProhibited(bytes32 node);\nerror NameIsNotWrapped();\nerror NameIsStillExpired();\n\ncontract NameWrapper is\n Ownable,\n ERC1155Fuse,\n INameWrapper,\n Controllable,\n IERC721Receiver,\n ERC20Recoverable,\n ReverseClaimer\n{\n using BytesUtils for bytes;\n\n ENS public immutable ens;\n IBaseRegistrar public immutable registrar;\n IMetadataService public metadataService;\n mapping(bytes32 => bytes) public names;\n string public constant name = \"NameWrapper\";\n\n uint64 private constant GRACE_PERIOD = 90 days;\n bytes32 private constant ETH_NODE =\n 0x93cdeb708b7545dc668eb9280176169d1c33cfd8ed6f04690a0bcc88a93fc4ae;\n bytes32 private constant ETH_LABELHASH =\n 0x4f5b812789fc606be1b3b16908db13fc7a9adf7ca72641f84d75b47069d3d7f0;\n bytes32 private constant ROOT_NODE =\n 0x0000000000000000000000000000000000000000000000000000000000000000;\n\n INameWrapperUpgrade public upgradeContract;\n uint64 private constant MAX_EXPIRY = type(uint64).max;\n\n constructor(\n ENS _ens,\n IBaseRegistrar _registrar,\n IMetadataService _metadataService\n ) ReverseClaimer(_ens, msg.sender) {\n ens = _ens;\n registrar = _registrar;\n metadataService = _metadataService;\n\n /* Burn PARENT_CANNOT_CONTROL and CANNOT_UNWRAP fuses for ROOT_NODE and ETH_NODE and set expiry to max */\n\n _setData(\n uint256(ETH_NODE),\n address(0),\n uint32(PARENT_CANNOT_CONTROL | CANNOT_UNWRAP),\n MAX_EXPIRY\n );\n _setData(\n uint256(ROOT_NODE),\n address(0),\n uint32(PARENT_CANNOT_CONTROL | CANNOT_UNWRAP),\n MAX_EXPIRY\n );\n names[ROOT_NODE] = \"\\x00\";\n names[ETH_NODE] = \"\\x03eth\\x00\";\n }\n\n function supportsInterface(\n bytes4 interfaceId\n ) public view virtual override(ERC1155Fuse, INameWrapper) returns (bool) {\n return\n interfaceId == type(INameWrapper).interfaceId ||\n interfaceId == type(IERC721Receiver).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n\n /* ERC1155 Fuse */\n\n /**\n * @notice Gets the owner of a name\n * @param id Label as a string of the .eth domain to wrap\n * @return owner The owner of the name\n */\n\n function ownerOf(\n uint256 id\n ) public view override(ERC1155Fuse, INameWrapper) returns (address owner) {\n return super.ownerOf(id);\n }\n\n /**\n * @notice Gets the owner of a name\n * @param id Namehash of the name\n * @return operator Approved operator of a name\n */\n\n function getApproved(\n uint256 id\n )\n public\n view\n override(ERC1155Fuse, INameWrapper)\n returns (address operator)\n {\n address owner = ownerOf(id);\n if (owner == address(0)) {\n return address(0);\n }\n return super.getApproved(id);\n }\n\n /**\n * @notice Approves an address for a name\n * @param to address to approve\n * @param tokenId name to approve\n */\n\n function approve(\n address to,\n uint256 tokenId\n ) public override(ERC1155Fuse, INameWrapper) {\n (, uint32 fuses, ) = getData(tokenId);\n if (fuses & CANNOT_APPROVE == CANNOT_APPROVE) {\n revert OperationProhibited(bytes32(tokenId));\n }\n super.approve(to, tokenId);\n }\n\n /**\n * @notice Gets the data for a name\n * @param id Namehash of the name\n * @return owner Owner of the name\n * @return fuses Fuses of the name\n * @return expiry Expiry of the name\n */\n\n function getData(\n uint256 id\n )\n public\n view\n override(ERC1155Fuse, INameWrapper)\n returns (address owner, uint32 fuses, uint64 expiry)\n {\n (owner, fuses, expiry) = super.getData(id);\n\n (owner, fuses) = _clearOwnerAndFuses(owner, fuses, expiry);\n }\n\n /* Metadata service */\n\n /**\n * @notice Set the metadata service. Only the owner can do this\n * @param _metadataService The new metadata service\n */\n\n function setMetadataService(\n IMetadataService _metadataService\n ) public onlyOwner {\n metadataService = _metadataService;\n }\n\n /**\n * @notice Get the metadata uri\n * @param tokenId The id of the token\n * @return string uri of the metadata service\n */\n\n function uri(\n uint256 tokenId\n )\n public\n view\n override(INameWrapper, IERC1155MetadataURI)\n returns (string memory)\n {\n return metadataService.uri(tokenId);\n }\n\n /**\n * @notice Set the address of the upgradeContract of the contract. only admin can do this\n * @dev The default value of upgradeContract is the 0 address. Use the 0 address at any time\n * to make the contract not upgradable.\n * @param _upgradeAddress address of an upgraded contract\n */\n\n function setUpgradeContract(\n INameWrapperUpgrade _upgradeAddress\n ) public onlyOwner {\n if (address(upgradeContract) != address(0)) {\n registrar.setApprovalForAll(address(upgradeContract), false);\n ens.setApprovalForAll(address(upgradeContract), false);\n }\n\n upgradeContract = _upgradeAddress;\n\n if (address(upgradeContract) != address(0)) {\n registrar.setApprovalForAll(address(upgradeContract), true);\n ens.setApprovalForAll(address(upgradeContract), true);\n }\n }\n\n /**\n * @notice Checks if msg.sender is the owner or operator of the owner of a name\n * @param node namehash of the name to check\n */\n\n modifier onlyTokenOwner(bytes32 node) {\n if (!canModifyName(node, msg.sender)) {\n revert Unauthorised(node, msg.sender);\n }\n\n _;\n }\n\n /**\n * @notice Checks if owner or operator of the owner\n * @param node namehash of the name to check\n * @param addr which address to check permissions for\n * @return whether or not is owner or operator\n */\n\n function canModifyName(\n bytes32 node,\n address addr\n ) public view returns (bool) {\n (address owner, uint32 fuses, uint64 expiry) = getData(uint256(node));\n return\n (owner == addr || isApprovedForAll(owner, addr)) &&\n !_isETH2LDInGracePeriod(fuses, expiry);\n }\n\n /**\n * @notice Checks if owner/operator or approved by owner\n * @param node namehash of the name to check\n * @param addr which address to check permissions for\n * @return whether or not is owner/operator or approved\n */\n\n function canExtendSubnames(\n bytes32 node,\n address addr\n ) public view returns (bool) {\n (address owner, uint32 fuses, uint64 expiry) = getData(uint256(node));\n return\n (owner == addr ||\n isApprovedForAll(owner, addr) ||\n getApproved(uint256(node)) == addr) &&\n !_isETH2LDInGracePeriod(fuses, expiry);\n }\n\n /**\n * @notice Wraps a .eth domain, creating a new token and sending the original ERC721 token to this contract\n * @dev Can be called by the owner of the name on the .eth registrar or an authorised caller on the registrar\n * @param label Label as a string of the .eth domain to wrap\n * @param wrappedOwner Owner of the name in this contract\n * @param ownerControlledFuses Initial owner-controlled fuses to set\n * @param resolver Resolver contract address\n */\n\n function wrapETH2LD(\n string calldata label,\n address wrappedOwner,\n uint16 ownerControlledFuses,\n address resolver\n ) public returns (uint64 expiry) {\n uint256 tokenId = uint256(keccak256(bytes(label)));\n address registrant = registrar.ownerOf(tokenId);\n if (\n registrant != msg.sender &&\n !registrar.isApprovedForAll(registrant, msg.sender)\n ) {\n revert Unauthorised(\n _makeNode(ETH_NODE, bytes32(tokenId)),\n msg.sender\n );\n }\n\n // transfer the token from the user to this contract\n registrar.transferFrom(registrant, address(this), tokenId);\n\n // transfer the ens record back to the new owner (this contract)\n registrar.reclaim(tokenId, address(this));\n\n expiry = uint64(registrar.nameExpires(tokenId)) + GRACE_PERIOD;\n\n _wrapETH2LD(\n label,\n wrappedOwner,\n ownerControlledFuses,\n expiry,\n resolver\n );\n }\n\n /**\n * @dev Registers a new .eth second-level domain and wraps it.\n * Only callable by authorised controllers.\n * @param label The label to register (Eg, 'foo' for 'foo.eth').\n * @param wrappedOwner The owner of the wrapped name.\n * @param duration The duration, in seconds, to register the name for.\n * @param resolver The resolver address to set on the ENS registry (optional).\n * @param ownerControlledFuses Initial owner-controlled fuses to set\n * @return registrarExpiry The expiry date of the new name on the .eth registrar, in seconds since the Unix epoch.\n */\n\n function registerAndWrapETH2LD(\n string calldata label,\n address wrappedOwner,\n uint256 duration,\n address resolver,\n uint16 ownerControlledFuses\n ) external onlyController returns (uint256 registrarExpiry) {\n uint256 tokenId = uint256(keccak256(bytes(label)));\n registrarExpiry = registrar.register(tokenId, address(this), duration);\n _wrapETH2LD(\n label,\n wrappedOwner,\n ownerControlledFuses,\n uint64(registrarExpiry) + GRACE_PERIOD,\n resolver\n );\n }\n\n /**\n * @notice Renews a .eth second-level domain.\n * @dev Only callable by authorised controllers.\n * @param tokenId The hash of the label to register (eg, `keccak256('foo')`, for 'foo.eth').\n * @param duration The number of seconds to renew the name for.\n * @return expires The expiry date of the name on the .eth registrar, in seconds since the Unix epoch.\n */\n\n function renew(\n uint256 tokenId,\n uint256 duration\n ) external onlyController returns (uint256 expires) {\n bytes32 node = _makeNode(ETH_NODE, bytes32(tokenId));\n\n uint256 registrarExpiry = registrar.renew(tokenId, duration);\n\n // Do not set anything in wrapper if name is not wrapped\n try registrar.ownerOf(tokenId) returns (address registrarOwner) {\n if (\n registrarOwner != address(this) ||\n ens.owner(node) != address(this)\n ) {\n return registrarExpiry;\n }\n } catch {\n return registrarExpiry;\n }\n\n // Set expiry in Wrapper\n uint64 expiry = uint64(registrarExpiry) + GRACE_PERIOD;\n\n // Use super to allow names expired on the wrapper, but not expired on the registrar to renew()\n (address owner, uint32 fuses, ) = super.getData(uint256(node));\n _setData(node, owner, fuses, expiry);\n\n return registrarExpiry;\n }\n\n /**\n * @notice Wraps a non .eth domain, of any kind. Could be a DNSSEC name vitalik.xyz or a subdomain\n * @dev Can be called by the owner in the registry or an authorised caller in the registry\n * @param name The name to wrap, in DNS format\n * @param wrappedOwner Owner of the name in this contract\n * @param resolver Resolver contract\n */\n\n function wrap(\n bytes calldata name,\n address wrappedOwner,\n address resolver\n ) public {\n (bytes32 labelhash, uint256 offset) = name.readLabel(0);\n bytes32 parentNode = name.namehash(offset);\n bytes32 node = _makeNode(parentNode, labelhash);\n\n names[node] = name;\n\n if (parentNode == ETH_NODE) {\n revert IncompatibleParent();\n }\n\n address owner = ens.owner(node);\n\n if (owner != msg.sender && !ens.isApprovedForAll(owner, msg.sender)) {\n revert Unauthorised(node, msg.sender);\n }\n\n if (resolver != address(0)) {\n ens.setResolver(node, resolver);\n }\n\n ens.setOwner(node, address(this));\n\n _wrap(node, name, wrappedOwner, 0, 0);\n }\n\n /**\n * @notice Unwraps a .eth domain. e.g. vitalik.eth\n * @dev Can be called by the owner in the wrapper or an authorised caller in the wrapper\n * @param labelhash Labelhash of the .eth domain\n * @param registrant Sets the owner in the .eth registrar to this address\n * @param controller Sets the owner in the registry to this address\n */\n\n function unwrapETH2LD(\n bytes32 labelhash,\n address registrant,\n address controller\n ) public onlyTokenOwner(_makeNode(ETH_NODE, labelhash)) {\n if (registrant == address(this)) {\n revert IncorrectTargetOwner(registrant);\n }\n _unwrap(_makeNode(ETH_NODE, labelhash), controller);\n registrar.safeTransferFrom(\n address(this),\n registrant,\n uint256(labelhash)\n );\n }\n\n /**\n * @notice Unwraps a non .eth domain, of any kind. Could be a DNSSEC name vitalik.xyz or a subdomain\n * @dev Can be called by the owner in the wrapper or an authorised caller in the wrapper\n * @param parentNode Parent namehash of the name e.g. vitalik.xyz would be namehash('xyz')\n * @param labelhash Labelhash of the name, e.g. vitalik.xyz would be keccak256('vitalik')\n * @param controller Sets the owner in the registry to this address\n */\n\n function unwrap(\n bytes32 parentNode,\n bytes32 labelhash,\n address controller\n ) public onlyTokenOwner(_makeNode(parentNode, labelhash)) {\n if (parentNode == ETH_NODE) {\n revert IncompatibleParent();\n }\n if (controller == address(0x0) || controller == address(this)) {\n revert IncorrectTargetOwner(controller);\n }\n _unwrap(_makeNode(parentNode, labelhash), controller);\n }\n\n /**\n * @notice Sets fuses of a name\n * @param node Namehash of the name\n * @param ownerControlledFuses Owner-controlled fuses to burn\n * @return Old fuses\n */\n\n function setFuses(\n bytes32 node,\n uint16 ownerControlledFuses\n )\n public\n onlyTokenOwner(node)\n operationAllowed(node, CANNOT_BURN_FUSES)\n returns (uint32)\n {\n // owner protected by onlyTokenOwner\n (address owner, uint32 oldFuses, uint64 expiry) = getData(\n uint256(node)\n );\n _setFuses(node, owner, ownerControlledFuses | oldFuses, expiry, expiry);\n return oldFuses;\n }\n\n /**\n * @notice Extends expiry for a name\n * @param parentNode Parent namehash of the name e.g. vitalik.xyz would be namehash('xyz')\n * @param labelhash Labelhash of the name, e.g. vitalik.xyz would be keccak256('vitalik')\n * @param expiry When the name will expire in seconds since the Unix epoch\n * @return New expiry\n */\n\n function extendExpiry(\n bytes32 parentNode,\n bytes32 labelhash,\n uint64 expiry\n ) public returns (uint64) {\n bytes32 node = _makeNode(parentNode, labelhash);\n\n if (!_isWrapped(node)) {\n revert NameIsNotWrapped();\n }\n\n // this flag is used later, when checking fuses\n bool canExtendSubname = canExtendSubnames(parentNode, msg.sender);\n // only allow the owner of the name or owner of the parent name\n if (!canExtendSubname && !canModifyName(node, msg.sender)) {\n revert Unauthorised(node, msg.sender);\n }\n\n (address owner, uint32 fuses, uint64 oldExpiry) = getData(\n uint256(node)\n );\n\n // Either CAN_EXTEND_EXPIRY must be set, or the caller must have permission to modify the parent name\n if (!canExtendSubname && fuses & CAN_EXTEND_EXPIRY == 0) {\n revert OperationProhibited(node);\n }\n\n // Max expiry is set to the expiry of the parent\n (, , uint64 maxExpiry) = getData(uint256(parentNode));\n expiry = _normaliseExpiry(expiry, oldExpiry, maxExpiry);\n\n _setData(node, owner, fuses, expiry);\n emit ExpiryExtended(node, expiry);\n return expiry;\n }\n\n /**\n * @notice Upgrades a domain of any kind. Could be a .eth name vitalik.eth, a DNSSEC name vitalik.xyz, or a subdomain\n * @dev Can be called by the owner or an authorised caller\n * @param name The name to upgrade, in DNS format\n * @param extraData Extra data to pass to the upgrade contract\n */\n\n function upgrade(bytes calldata name, bytes calldata extraData) public {\n bytes32 node = name.namehash(0);\n\n if (address(upgradeContract) == address(0)) {\n revert CannotUpgrade();\n }\n\n if (!canModifyName(node, msg.sender)) {\n revert Unauthorised(node, msg.sender);\n }\n\n (address currentOwner, uint32 fuses, uint64 expiry) = getData(\n uint256(node)\n );\n\n address approved = getApproved(uint256(node));\n\n _burn(uint256(node));\n\n upgradeContract.wrapFromUpgrade(\n name,\n currentOwner,\n fuses,\n expiry,\n approved,\n extraData\n );\n }\n\n /** \n /* @notice Sets fuses of a name that you own the parent of\n * @param parentNode Parent namehash of the name e.g. vitalik.xyz would be namehash('xyz')\n * @param labelhash Labelhash of the name, e.g. vitalik.xyz would be keccak256('vitalik')\n * @param fuses Fuses to burn\n * @param expiry When the name will expire in seconds since the Unix epoch\n */\n\n function setChildFuses(\n bytes32 parentNode,\n bytes32 labelhash,\n uint32 fuses,\n uint64 expiry\n ) public {\n bytes32 node = _makeNode(parentNode, labelhash);\n _checkFusesAreSettable(node, fuses);\n (address owner, uint32 oldFuses, uint64 oldExpiry) = getData(\n uint256(node)\n );\n if (owner == address(0) || ens.owner(node) != address(this)) {\n revert NameIsNotWrapped();\n }\n // max expiry is set to the expiry of the parent\n (, uint32 parentFuses, uint64 maxExpiry) = getData(uint256(parentNode));\n if (parentNode == ROOT_NODE) {\n if (!canModifyName(node, msg.sender)) {\n revert Unauthorised(node, msg.sender);\n }\n } else {\n if (!canModifyName(parentNode, msg.sender)) {\n revert Unauthorised(parentNode, msg.sender);\n }\n }\n\n _checkParentFuses(node, fuses, parentFuses);\n\n expiry = _normaliseExpiry(expiry, oldExpiry, maxExpiry);\n\n // if PARENT_CANNOT_CONTROL has been burned and fuses have changed\n if (\n oldFuses & PARENT_CANNOT_CONTROL != 0 &&\n oldFuses | fuses != oldFuses\n ) {\n revert OperationProhibited(node);\n }\n fuses |= oldFuses;\n _setFuses(node, owner, fuses, oldExpiry, expiry);\n }\n\n /**\n * @notice Sets the subdomain owner in the registry and then wraps the subdomain\n * @param parentNode Parent namehash of the subdomain\n * @param label Label of the subdomain as a string\n * @param owner New owner in the wrapper\n * @param fuses Initial fuses for the wrapped subdomain\n * @param expiry When the name will expire in seconds since the Unix epoch\n * @return node Namehash of the subdomain\n */\n\n function setSubnodeOwner(\n bytes32 parentNode,\n string calldata label,\n address owner,\n uint32 fuses,\n uint64 expiry\n ) public onlyTokenOwner(parentNode) returns (bytes32 node) {\n bytes32 labelhash = keccak256(bytes(label));\n node = _makeNode(parentNode, labelhash);\n _checkCanCallSetSubnodeOwner(parentNode, node);\n _checkFusesAreSettable(node, fuses);\n bytes memory name = _saveLabel(parentNode, node, label);\n expiry = _checkParentFusesAndExpiry(parentNode, node, fuses, expiry);\n\n if (!_isWrapped(node)) {\n ens.setSubnodeOwner(parentNode, labelhash, address(this));\n _wrap(node, name, owner, fuses, expiry);\n } else {\n _updateName(parentNode, node, label, owner, fuses, expiry);\n }\n }\n\n /**\n * @notice Sets the subdomain owner in the registry with records and then wraps the subdomain\n * @param parentNode parent namehash of the subdomain\n * @param label label of the subdomain as a string\n * @param owner new owner in the wrapper\n * @param resolver resolver contract in the registry\n * @param ttl ttl in the registry\n * @param fuses initial fuses for the wrapped subdomain\n * @param expiry When the name will expire in seconds since the Unix epoch\n * @return node Namehash of the subdomain\n */\n\n function setSubnodeRecord(\n bytes32 parentNode,\n string memory label,\n address owner,\n address resolver,\n uint64 ttl,\n uint32 fuses,\n uint64 expiry\n ) public onlyTokenOwner(parentNode) returns (bytes32 node) {\n bytes32 labelhash = keccak256(bytes(label));\n node = _makeNode(parentNode, labelhash);\n _checkCanCallSetSubnodeOwner(parentNode, node);\n _checkFusesAreSettable(node, fuses);\n _saveLabel(parentNode, node, label);\n expiry = _checkParentFusesAndExpiry(parentNode, node, fuses, expiry);\n if (!_isWrapped(node)) {\n ens.setSubnodeRecord(\n parentNode,\n labelhash,\n address(this),\n resolver,\n ttl\n );\n _storeNameAndWrap(parentNode, node, label, owner, fuses, expiry);\n } else {\n ens.setSubnodeRecord(\n parentNode,\n labelhash,\n address(this),\n resolver,\n ttl\n );\n _updateName(parentNode, node, label, owner, fuses, expiry);\n }\n }\n\n /**\n * @notice Sets records for the name in the ENS Registry\n * @param node Namehash of the name to set a record for\n * @param owner New owner in the registry\n * @param resolver Resolver contract\n * @param ttl Time to live in the registry\n */\n\n function setRecord(\n bytes32 node,\n address owner,\n address resolver,\n uint64 ttl\n )\n public\n onlyTokenOwner(node)\n operationAllowed(\n node,\n CANNOT_TRANSFER | CANNOT_SET_RESOLVER | CANNOT_SET_TTL\n )\n {\n ens.setRecord(node, address(this), resolver, ttl);\n if (owner == address(0)) {\n (, uint32 fuses, ) = getData(uint256(node));\n if (fuses & IS_DOT_ETH == IS_DOT_ETH) {\n revert IncorrectTargetOwner(owner);\n }\n _unwrap(node, address(0));\n } else {\n address oldOwner = ownerOf(uint256(node));\n _transfer(oldOwner, owner, uint256(node), 1, \"\");\n }\n }\n\n /**\n * @notice Sets resolver contract in the registry\n * @param node namehash of the name\n * @param resolver the resolver contract\n */\n\n function setResolver(\n bytes32 node,\n address resolver\n ) public onlyTokenOwner(node) operationAllowed(node, CANNOT_SET_RESOLVER) {\n ens.setResolver(node, resolver);\n }\n\n /**\n * @notice Sets TTL in the registry\n * @param node Namehash of the name\n * @param ttl TTL in the registry\n */\n\n function setTTL(\n bytes32 node,\n uint64 ttl\n ) public onlyTokenOwner(node) operationAllowed(node, CANNOT_SET_TTL) {\n ens.setTTL(node, ttl);\n }\n\n /**\n * @dev Allows an operation only if none of the specified fuses are burned.\n * @param node The namehash of the name to check fuses on.\n * @param fuseMask A bitmask of fuses that must not be burned.\n */\n\n modifier operationAllowed(bytes32 node, uint32 fuseMask) {\n (, uint32 fuses, ) = getData(uint256(node));\n if (fuses & fuseMask != 0) {\n revert OperationProhibited(node);\n }\n _;\n }\n\n /**\n * @notice Check whether a name can call setSubnodeOwner/setSubnodeRecord\n * @dev Checks both CANNOT_CREATE_SUBDOMAIN and PARENT_CANNOT_CONTROL and whether not they have been burnt\n * and checks whether the owner of the subdomain is 0x0 for creating or already exists for\n * replacing a subdomain. If either conditions are true, then it is possible to call\n * setSubnodeOwner\n * @param parentNode Namehash of the parent name to check\n * @param subnode Namehash of the subname to check\n */\n\n function _checkCanCallSetSubnodeOwner(\n bytes32 parentNode,\n bytes32 subnode\n ) internal view {\n (\n address subnodeOwner,\n uint32 subnodeFuses,\n uint64 subnodeExpiry\n ) = getData(uint256(subnode));\n\n // check if the registry owner is 0 and expired\n // check if the wrapper owner is 0 and expired\n // If either, then check parent fuses for CANNOT_CREATE_SUBDOMAIN\n bool expired = subnodeExpiry < block.timestamp;\n if (\n expired &&\n // protects a name that has been unwrapped with PCC and doesn't allow the parent to take control by recreating it if unexpired\n (subnodeOwner == address(0) ||\n // protects a name that has been burnt and doesn't allow the parent to take control by recreating it if unexpired\n ens.owner(subnode) == address(0))\n ) {\n (, uint32 parentFuses, ) = getData(uint256(parentNode));\n if (parentFuses & CANNOT_CREATE_SUBDOMAIN != 0) {\n revert OperationProhibited(subnode);\n }\n } else {\n if (subnodeFuses & PARENT_CANNOT_CONTROL != 0) {\n revert OperationProhibited(subnode);\n }\n }\n }\n\n /**\n * @notice Checks all Fuses in the mask are burned for the node\n * @param node Namehash of the name\n * @param fuseMask The fuses you want to check\n * @return Boolean of whether or not all the selected fuses are burned\n */\n\n function allFusesBurned(\n bytes32 node,\n uint32 fuseMask\n ) public view returns (bool) {\n (, uint32 fuses, ) = getData(uint256(node));\n return fuses & fuseMask == fuseMask;\n }\n\n /**\n * @notice Checks if a name is wrapped\n * @param node Namehash of the name\n * @return Boolean of whether or not the name is wrapped\n */\n\n function isWrapped(bytes32 node) public view returns (bool) {\n bytes memory name = names[node];\n if (name.length == 0) {\n return false;\n }\n (bytes32 labelhash, uint256 offset) = name.readLabel(0);\n bytes32 parentNode = name.namehash(offset);\n return isWrapped(parentNode, labelhash);\n }\n\n /**\n * @notice Checks if a name is wrapped in a more gas efficient way\n * @param parentNode Namehash of the name\n * @param labelhash Namehash of the name\n * @return Boolean of whether or not the name is wrapped\n */\n\n function isWrapped(\n bytes32 parentNode,\n bytes32 labelhash\n ) public view returns (bool) {\n bytes32 node = _makeNode(parentNode, labelhash);\n bool wrapped = _isWrapped(node);\n if (parentNode != ETH_NODE) {\n return wrapped;\n }\n try registrar.ownerOf(uint256(labelhash)) returns (address owner) {\n return owner == address(this);\n } catch {\n return false;\n }\n }\n\n function onERC721Received(\n address to,\n address,\n uint256 tokenId,\n bytes calldata data\n ) public returns (bytes4) {\n //check if it's the eth registrar ERC721\n if (msg.sender != address(registrar)) {\n revert IncorrectTokenType();\n }\n\n (\n string memory label,\n address owner,\n uint16 ownerControlledFuses,\n address resolver\n ) = abi.decode(data, (string, address, uint16, address));\n\n bytes32 labelhash = bytes32(tokenId);\n bytes32 labelhashFromData = keccak256(bytes(label));\n\n if (labelhashFromData != labelhash) {\n revert LabelMismatch(labelhashFromData, labelhash);\n }\n\n // transfer the ens record back to the new owner (this contract)\n registrar.reclaim(uint256(labelhash), address(this));\n\n uint64 expiry = uint64(registrar.nameExpires(tokenId)) + GRACE_PERIOD;\n\n _wrapETH2LD(label, owner, ownerControlledFuses, expiry, resolver);\n\n return IERC721Receiver(to).onERC721Received.selector;\n }\n\n /***** Internal functions */\n\n function _beforeTransfer(\n uint256 id,\n uint32 fuses,\n uint64 expiry\n ) internal override {\n // For this check, treat .eth 2LDs as expiring at the start of the grace period.\n if (fuses & IS_DOT_ETH == IS_DOT_ETH) {\n expiry -= GRACE_PERIOD;\n }\n\n if (expiry < block.timestamp) {\n // Transferable if the name was not emancipated\n if (fuses & PARENT_CANNOT_CONTROL != 0) {\n revert(\"ERC1155: insufficient balance for transfer\");\n }\n } else {\n // Transferable if CANNOT_TRANSFER is unburned\n if (fuses & CANNOT_TRANSFER != 0) {\n revert OperationProhibited(bytes32(id));\n }\n }\n\n // delete token approval if CANNOT_APPROVE has not been burnt\n if (fuses & CANNOT_APPROVE == 0) {\n delete _tokenApprovals[id];\n }\n }\n\n function _clearOwnerAndFuses(\n address owner,\n uint32 fuses,\n uint64 expiry\n ) internal view override returns (address, uint32) {\n if (expiry < block.timestamp) {\n if (fuses & PARENT_CANNOT_CONTROL == PARENT_CANNOT_CONTROL) {\n owner = address(0);\n }\n fuses = 0;\n }\n\n return (owner, fuses);\n }\n\n function _makeNode(\n bytes32 node,\n bytes32 labelhash\n ) private pure returns (bytes32) {\n return keccak256(abi.encodePacked(node, labelhash));\n }\n\n function _addLabel(\n string memory label,\n bytes memory name\n ) internal pure returns (bytes memory ret) {\n if (bytes(label).length < 1) {\n revert LabelTooShort();\n }\n if (bytes(label).length > 255) {\n revert LabelTooLong(label);\n }\n return abi.encodePacked(uint8(bytes(label).length), label, name);\n }\n\n function _mint(\n bytes32 node,\n address owner,\n uint32 fuses,\n uint64 expiry\n ) internal override {\n _canFusesBeBurned(node, fuses);\n (address oldOwner, , ) = super.getData(uint256(node));\n if (oldOwner != address(0)) {\n // burn and unwrap old token of old owner\n _burn(uint256(node));\n emit NameUnwrapped(node, address(0));\n }\n super._mint(node, owner, fuses, expiry);\n }\n\n function _wrap(\n bytes32 node,\n bytes memory name,\n address wrappedOwner,\n uint32 fuses,\n uint64 expiry\n ) internal {\n _mint(node, wrappedOwner, fuses, expiry);\n emit NameWrapped(node, name, wrappedOwner, fuses, expiry);\n }\n\n function _storeNameAndWrap(\n bytes32 parentNode,\n bytes32 node,\n string memory label,\n address owner,\n uint32 fuses,\n uint64 expiry\n ) internal {\n bytes memory name = _addLabel(label, names[parentNode]);\n _wrap(node, name, owner, fuses, expiry);\n }\n\n function _saveLabel(\n bytes32 parentNode,\n bytes32 node,\n string memory label\n ) internal returns (bytes memory) {\n bytes memory name = _addLabel(label, names[parentNode]);\n names[node] = name;\n return name;\n }\n\n function _updateName(\n bytes32 parentNode,\n bytes32 node,\n string memory label,\n address owner,\n uint32 fuses,\n uint64 expiry\n ) internal {\n (address oldOwner, uint32 oldFuses, uint64 oldExpiry) = getData(\n uint256(node)\n );\n bytes memory name = _addLabel(label, names[parentNode]);\n if (names[node].length == 0) {\n names[node] = name;\n }\n _setFuses(node, oldOwner, oldFuses | fuses, oldExpiry, expiry);\n if (owner == address(0)) {\n _unwrap(node, address(0));\n } else {\n _transfer(oldOwner, owner, uint256(node), 1, \"\");\n }\n }\n\n // wrapper function for stack limit\n function _checkParentFusesAndExpiry(\n bytes32 parentNode,\n bytes32 node,\n uint32 fuses,\n uint64 expiry\n ) internal view returns (uint64) {\n (, , uint64 oldExpiry) = getData(uint256(node));\n (, uint32 parentFuses, uint64 maxExpiry) = getData(uint256(parentNode));\n _checkParentFuses(node, fuses, parentFuses);\n return _normaliseExpiry(expiry, oldExpiry, maxExpiry);\n }\n\n function _checkParentFuses(\n bytes32 node,\n uint32 fuses,\n uint32 parentFuses\n ) internal pure {\n bool isBurningParentControlledFuses = fuses & PARENT_CONTROLLED_FUSES !=\n 0;\n\n bool parentHasNotBurnedCU = parentFuses & CANNOT_UNWRAP == 0;\n\n if (isBurningParentControlledFuses && parentHasNotBurnedCU) {\n revert OperationProhibited(node);\n }\n }\n\n function _normaliseExpiry(\n uint64 expiry,\n uint64 oldExpiry,\n uint64 maxExpiry\n ) private pure returns (uint64) {\n // Expiry cannot be more than maximum allowed\n // .eth names will check registrar, non .eth check parent\n if (expiry > maxExpiry) {\n expiry = maxExpiry;\n }\n // Expiry cannot be less than old expiry\n if (expiry < oldExpiry) {\n expiry = oldExpiry;\n }\n\n return expiry;\n }\n\n function _wrapETH2LD(\n string memory label,\n address wrappedOwner,\n uint32 fuses,\n uint64 expiry,\n address resolver\n ) private {\n bytes32 labelhash = keccak256(bytes(label));\n bytes32 node = _makeNode(ETH_NODE, labelhash);\n // hardcode dns-encoded eth string for gas savings\n bytes memory name = _addLabel(label, \"\\x03eth\\x00\");\n names[node] = name;\n\n _wrap(\n node,\n name,\n wrappedOwner,\n fuses | PARENT_CANNOT_CONTROL | IS_DOT_ETH,\n expiry\n );\n\n if (resolver != address(0)) {\n ens.setResolver(node, resolver);\n }\n }\n\n function _unwrap(bytes32 node, address owner) private {\n if (allFusesBurned(node, CANNOT_UNWRAP)) {\n revert OperationProhibited(node);\n }\n\n // Burn token and fuse data\n _burn(uint256(node));\n ens.setOwner(node, owner);\n\n emit NameUnwrapped(node, owner);\n }\n\n function _setFuses(\n bytes32 node,\n address owner,\n uint32 fuses,\n uint64 oldExpiry,\n uint64 expiry\n ) internal {\n _setData(node, owner, fuses, expiry);\n emit FusesSet(node, fuses);\n if (expiry > oldExpiry) {\n emit ExpiryExtended(node, expiry);\n }\n }\n\n function _setData(\n bytes32 node,\n address owner,\n uint32 fuses,\n uint64 expiry\n ) internal {\n _canFusesBeBurned(node, fuses);\n super._setData(uint256(node), owner, fuses, expiry);\n }\n\n function _canFusesBeBurned(bytes32 node, uint32 fuses) internal pure {\n // If a non-parent controlled fuse is being burned, check PCC and CU are burnt\n if (\n fuses & ~PARENT_CONTROLLED_FUSES != 0 &&\n fuses & (PARENT_CANNOT_CONTROL | CANNOT_UNWRAP) !=\n (PARENT_CANNOT_CONTROL | CANNOT_UNWRAP)\n ) {\n revert OperationProhibited(node);\n }\n }\n\n function _checkFusesAreSettable(bytes32 node, uint32 fuses) internal pure {\n if (fuses | USER_SETTABLE_FUSES != USER_SETTABLE_FUSES) {\n // Cannot directly burn other non-user settable fuses\n revert OperationProhibited(node);\n }\n }\n\n function _isWrapped(bytes32 node) internal view returns (bool) {\n return\n ownerOf(uint256(node)) != address(0) &&\n ens.owner(node) == address(this);\n }\n\n function _isETH2LDInGracePeriod(\n uint32 fuses,\n uint64 expiry\n ) internal view returns (bool) {\n return\n fuses & IS_DOT_ETH == IS_DOT_ETH &&\n expiry - GRACE_PERIOD < block.timestamp;\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/wrapper/StaticMetadataService.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity ~0.8.17;\n\ncontract StaticMetadataService {\n string private _uri;\n\n constructor(string memory _metaDataUri) {\n _uri = _metaDataUri;\n }\n\n function uri(uint256) public view returns (string memory) {\n return _uri;\n }\n}\n" + }, + "@ensdomains/evm-verifier/contracts/EVMFetcher.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\nimport { IEVMVerifier } from './IEVMVerifier.sol';\nimport { EVMFetchTarget } from './EVMFetchTarget.sol';\nimport { Address } from '@openzeppelin/contracts/utils/Address.sol';\n\ninterface IEVMGateway {\n function getStorageSlots(address addr, bytes32[] memory commands, bytes[] memory constants) external pure returns(bytes memory witness);\n}\n\nuint8 constant FLAG_DYNAMIC = 0x01;\nuint8 constant OP_CONSTANT = 0x00;\nuint8 constant OP_BACKREF = 0x20;\nuint8 constant OP_END = 0xff;\n\n/**\n * @dev A library to facilitate requesting storage data proofs from contracts, possibly on a different chain.\n * See l1-verifier/test/TestL1.sol for example usage.\n */\nlibrary EVMFetcher {\n uint256 constant MAX_COMMANDS = 32;\n uint256 constant MAX_CONSTANTS = 32; // Must not be greater than 32\n\n using Address for address;\n\n error TooManyCommands(uint256 max);\n error CommandTooLong();\n error InvalidReference(uint256 value, uint256 max);\n error OffchainLookup(address sender, string[] urls, bytes callData, bytes4 callbackFunction, bytes extraData);\n\n struct EVMFetchRequest {\n IEVMVerifier verifier;\n address target;\n bytes32[] commands;\n uint256 operationIdx;\n bytes[] constants;\n }\n\n /**\n * @dev Creates a request to fetch the value of multiple storage slots from a contract via CCIP-Read, possibly from\n * another chain.\n * Supports dynamic length values and slot numbers derived from other retrieved values.\n * @param verifier An instance of a verifier contract that can provide and verify the storage slot information.\n * @param target The address of the contract to fetch storage proofs for.\n */\n function newFetchRequest(IEVMVerifier verifier, address target) internal pure returns (EVMFetchRequest memory) {\n bytes32[] memory commands = new bytes32[](MAX_COMMANDS);\n bytes[] memory constants = new bytes[](MAX_CONSTANTS);\n assembly {\n mstore(commands, 0) // Set current array length to 0\n mstore(constants, 0)\n } \n return EVMFetchRequest(verifier, target, commands, 0, constants);\n }\n\n /**\n * @dev Starts describing a new fetch request.\n * Paths specify a series of hashing operations to derive the final slot ID.\n * See https://docs.soliditylang.org/en/v0.8.17/internals/layout_in_storage.html for details on how Solidity\n * lays out storage variables.\n * @param request The request object being operated on.\n * @param baseSlot The base slot ID that forms the root of the path.\n */\n function getStatic(EVMFetchRequest memory request, uint256 baseSlot) internal pure returns (EVMFetchRequest memory) {\n bytes32[] memory commands = request.commands;\n uint256 commandIdx = commands.length;\n if(commandIdx > 0 && request.operationIdx < 32) {\n // Terminate previous command\n _addOperation(request, OP_END);\n }\n assembly {\n mstore(commands, add(commandIdx, 1)) // Increment command array length\n }\n if(request.commands.length > MAX_COMMANDS) {\n revert TooManyCommands(MAX_COMMANDS);\n }\n request.operationIdx = 0;\n _addOperation(request, 0);\n _addOperation(request, _addConstant(request, abi.encode(baseSlot)));\n return request;\n }\n\n /**\n * @dev Starts describing a new fetch request.\n * Paths specify a series of hashing operations to derive the final slot ID.\n * See https://docs.soliditylang.org/en/v0.8.17/internals/layout_in_storage.html for details on how Solidity\n * lays out storage variables.\n * @param request The request object being operated on.\n * @param baseSlot The base slot ID that forms the root of the path.\n */\n function getDynamic(EVMFetchRequest memory request, uint256 baseSlot) internal pure returns (EVMFetchRequest memory) {\n bytes32[] memory commands = request.commands;\n uint256 commandIdx = commands.length;\n if(commandIdx > 0 && request.operationIdx < 32) {\n // Terminate previous command\n _addOperation(request, OP_END);\n }\n assembly {\n mstore(commands, add(commandIdx, 1)) // Increment command array length\n }\n if(request.commands.length > MAX_COMMANDS) {\n revert TooManyCommands(MAX_COMMANDS);\n }\n request.operationIdx = 0;\n _addOperation(request, FLAG_DYNAMIC);\n _addOperation(request, _addConstant(request, abi.encode(baseSlot)));\n return request;\n }\n\n /**\n * @dev Adds a `uint256` element to the current path.\n * @param request The request object being operated on.\n * @param el The element to add.\n */\n function element(EVMFetchRequest memory request, uint256 el) internal pure returns (EVMFetchRequest memory) {\n if(request.operationIdx >= 32) {\n revert CommandTooLong();\n }\n _addOperation(request, _addConstant(request, abi.encode(el)));\n return request;\n }\n\n /**\n * @dev Adds a `bytes32` element to the current path.\n * @param request The request object being operated on.\n * @param el The element to add.\n */\n function element(EVMFetchRequest memory request, bytes32 el) internal pure returns (EVMFetchRequest memory) {\n if(request.operationIdx >= 32) {\n revert CommandTooLong();\n }\n _addOperation(request, _addConstant(request, abi.encode(el)));\n return request;\n }\n\n /**\n * @dev Adds an `address` element to the current path.\n * @param request The request object being operated on.\n * @param el The element to add.\n */\n function element(EVMFetchRequest memory request, address el) internal pure returns (EVMFetchRequest memory) {\n if(request.operationIdx >= 32) {\n revert CommandTooLong();\n }\n _addOperation(request, _addConstant(request, abi.encode(el)));\n return request;\n }\n\n /**\n * @dev Adds a `bytes` element to the current path.\n * @param request The request object being operated on.\n * @param el The element to add.\n */\n function element(EVMFetchRequest memory request, bytes memory el) internal pure returns (EVMFetchRequest memory) {\n if(request.operationIdx >= 32) {\n revert CommandTooLong();\n }\n _addOperation(request, _addConstant(request, el));\n return request;\n }\n\n /**\n * @dev Adds a `string` element to the current path.\n * @param request The request object being operated on.\n * @param el The element to add.\n */\n function element(EVMFetchRequest memory request, string memory el) internal pure returns (EVMFetchRequest memory) {\n if(request.operationIdx >= 32) {\n revert CommandTooLong();\n }\n _addOperation(request, _addConstant(request, bytes(el)));\n return request;\n }\n\n /**\n * @dev Adds a reference to a previous fetch to the current path.\n * @param request The request object being operated on.\n * @param idx The index of the previous fetch request, starting at 0.\n */\n function ref(EVMFetchRequest memory request, uint8 idx) internal pure returns (EVMFetchRequest memory) {\n if(request.operationIdx >= 32) {\n revert CommandTooLong();\n }\n if(idx > request.commands.length || idx > 31) {\n revert InvalidReference(idx, request.commands.length);\n }\n _addOperation(request, OP_BACKREF | idx);\n return request;\n }\n\n /**\n * @dev Initiates the fetch request.\n * Calling this function terminates execution; clients that implement CCIP-Read will make a callback to\n * `callback` with the results of the operation.\n * @param callbackId A callback function selector on this contract that will be invoked via CCIP-Read with the result of the lookup.\n * The function must have a signature matching `(bytes[] memory values, bytes callbackData)` with a return type matching the call in which\n * this function was invoked. Its return data will be returned as the return value of the entire CCIP-read operation.\n * @param callbackData Extra data to supply to the callback.\n */\n function fetch(EVMFetchRequest memory request, bytes4 callbackId, bytes memory callbackData) internal view {\n if(request.commands.length > 0 && request.operationIdx < 32) {\n // Terminate last command\n _addOperation(request, OP_END);\n }\n revert OffchainLookup(\n address(this),\n request.verifier.gatewayURLs(),\n abi.encodeCall(IEVMGateway.getStorageSlots, (request.target, request.commands, request.constants)),\n EVMFetchTarget.getStorageSlotsCallback.selector,\n abi.encode(request.verifier, request.target, request.commands, request.constants, callbackId, callbackData)\n );\n }\n\n function _addConstant(EVMFetchRequest memory request, bytes memory value) private pure returns(uint8 idx) {\n bytes[] memory constants = request.constants;\n idx = uint8(constants.length);\n assembly {\n mstore(constants, add(idx, 1)) // Increment constant array length\n }\n constants[idx] = value;\n }\n\n function _addOperation(EVMFetchRequest memory request, uint8 op) private pure {\n uint256 commandIdx = request.commands.length - 1;\n request.commands[commandIdx] = request.commands[commandIdx] | (bytes32(bytes1(op)) >> (8 * request.operationIdx++));\n }\n}\n" + }, + "@ensdomains/evm-verifier/contracts/EVMFetchTarget.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\nimport { IEVMVerifier } from './IEVMVerifier.sol';\nimport { Address } from '@openzeppelin/contracts/utils/Address.sol';\n\n/**\n * @dev Callback implementation for users of `EVMFetcher`. If you use `EVMFetcher`, your contract must\n * inherit from this contract in order to handle callbacks correctly.\n */\nabstract contract EVMFetchTarget {\n using Address for address;\n\n error ResponseLengthMismatch(uint256 actual, uint256 expected);\n\n /**\n * @dev Internal callback function invoked by CCIP-Read in response to a `getStorageSlots` request.\n */\n function getStorageSlotsCallback(bytes calldata response, bytes calldata extradata) external {\n bytes memory proof = abi.decode(response, (bytes));\n (IEVMVerifier verifier, address addr, bytes32[] memory commands, bytes[] memory constants, bytes4 callback, bytes memory callbackData) =\n abi.decode(extradata, (IEVMVerifier, address, bytes32[], bytes[], bytes4, bytes));\n bytes[] memory values = verifier.getStorageValues(addr, commands, constants, proof);\n if(values.length != commands.length) {\n revert ResponseLengthMismatch(values.length, commands.length);\n }\n bytes memory ret = address(this).functionCall(abi.encodeWithSelector(callback, values, callbackData));\n assembly {\n return(add(ret, 32), mload(ret))\n }\n }\n}\n" + }, + "@ensdomains/evm-verifier/contracts/EVMProofHelper.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\nimport {RLPReader} from \"@eth-optimism/contracts-bedrock/src/libraries/rlp/RLPReader.sol\";\nimport {Bytes} from \"@eth-optimism/contracts-bedrock/src/libraries/Bytes.sol\";\nimport {SecureMerkleTrie} from \"./SecureMerkleTrie.sol\";\n\nstruct StateProof {\n bytes[] stateTrieWitness; // Witness proving the `storageRoot` against a state root.\n bytes[][] storageProofs; // An array of proofs of individual storage elements \n}\n\nuint8 constant OP_CONSTANT = 0x00;\nuint8 constant OP_BACKREF = 0x20;\nuint8 constant FLAG_DYNAMIC = 0x01;\n\nlibrary EVMProofHelper {\n using Bytes for bytes;\n\n error AccountNotFound(address);\n error UnknownOpcode(uint8);\n error InvalidSlotSize(uint256 size);\n\n /**\n * @notice Get the storage root for the provided merkle proof\n * @param stateRoot The state root the witness was generated against\n * @param target The address we are fetching a storage root for\n * @param witness A witness proving the value of the storage root for `target`.\n * @return The storage root retrieved from the provided state root\n */\n function getStorageRoot(bytes32 stateRoot, address target, bytes[] memory witness) private pure returns (bytes32) {\n (bool exists, bytes memory encodedResolverAccount) = SecureMerkleTrie.get(\n abi.encodePacked(target),\n witness,\n stateRoot\n );\n if(!exists) {\n revert AccountNotFound(target);\n }\n RLPReader.RLPItem[] memory accountState = RLPReader.readList(encodedResolverAccount);\n return bytes32(RLPReader.readBytes(accountState[2]));\n }\n\n /**\n * @notice Prove whether the provided storage slot is part of the storageRoot\n * @param storageRoot the storage root for the account that contains the storage slot\n * @param slot The storage key we are fetching the value of\n * @param witness the StorageProof struct containing the necessary proof data\n * @return The retrieved storage proof value or 0x if the storage slot is empty\n */\n function getSingleStorageProof(bytes32 storageRoot, uint256 slot, bytes[] memory witness) private pure returns (bytes memory) {\n (bool exists, bytes memory retrievedValue) = SecureMerkleTrie.get(\n abi.encodePacked(slot),\n witness,\n storageRoot\n );\n if(!exists) {\n // Nonexistent values are treated as zero.\n return \"\";\n }\n return RLPReader.readBytes(retrievedValue);\n }\n\n function getFixedValue(bytes32 storageRoot, uint256 slot, bytes[] memory witness) private pure returns(bytes32) {\n bytes memory value = getSingleStorageProof(storageRoot, slot, witness);\n // RLP encoded storage slots are stored without leading 0 bytes.\n // Casting to bytes32 appends trailing 0 bytes, so we have to bit shift to get the \n // original fixed-length representation back.\n return bytes32(value) >> (256 - 8 * value.length);\n }\n\n function executeOperation(bytes1 operation, bytes[] memory constants, bytes[] memory values) private pure returns(bytes memory) {\n uint8 opcode = uint8(operation) & 0xe0;\n uint8 operand = uint8(operation) & 0x1f;\n\n if(opcode == OP_CONSTANT) {\n return constants[operand];\n } else if(opcode == OP_BACKREF) {\n return values[operand];\n } else {\n revert UnknownOpcode(opcode);\n }\n }\n\n function computeFirstSlot(bytes32 command, bytes[] memory constants, bytes[] memory values) private pure returns(bool isDynamic, uint256 slot) {\n uint8 flags = uint8(command[0]);\n isDynamic = (flags & FLAG_DYNAMIC) != 0;\n\n bytes memory slotData = executeOperation(command[1], constants, values);\n require(slotData.length == 32, \"First path element must be 32 bytes\");\n slot = uint256(bytes32(slotData));\n\n for(uint256 j = 2; j < 32 && command[j] != 0xff; j++) {\n bytes memory index = executeOperation(command[j], constants, values);\n slot = uint256(keccak256(abi.encodePacked(index, slot)));\n }\n }\n\n function getDynamicValue(bytes32 storageRoot, uint256 slot, StateProof memory proof, uint256 proofIdx) private pure returns(bytes memory value, uint256 newProofIdx) {\n uint256 firstValue = uint256(getFixedValue(storageRoot, slot, proof.storageProofs[proofIdx++]));\n if(firstValue & 0x01 == 0x01) {\n // Long value: first slot is `length * 2 + 1`, following slots are data.\n uint256 length = (firstValue - 1) / 2;\n value = \"\";\n slot = uint256(keccak256(abi.encodePacked(slot)));\n // This is horribly inefficient - O(n^2). A better approach would be to build an array of words and concatenate them\n // all at once, but we're trying to avoid writing new library code.\n while(length > 0) {\n if(length < 32) {\n value = bytes.concat(value, getSingleStorageProof(storageRoot, slot++, proof.storageProofs[proofIdx++]).slice(0, length));\n length = 0;\n } else {\n value = bytes.concat(value, getSingleStorageProof(storageRoot, slot++, proof.storageProofs[proofIdx++]));\n length -= 32;\n }\n }\n return (value, proofIdx);\n } else {\n // Short value: least significant byte is `length * 2`, other bytes are data.\n uint256 length = (firstValue & 0xFF) / 2;\n return (abi.encode(firstValue).slice(0, length), proofIdx);\n }\n }\n\n function getStorageValues(address target, bytes32[] memory commands, bytes[] memory constants, bytes32 stateRoot, StateProof memory proof) internal pure returns(bytes[] memory values) {\n bytes32 storageRoot = getStorageRoot(stateRoot, target, proof.stateTrieWitness);\n uint256 proofIdx = 0;\n values = new bytes[](commands.length);\n for(uint256 i = 0; i < commands.length; i++) {\n bytes32 command = commands[i];\n (bool isDynamic, uint256 slot) = computeFirstSlot(command, constants, values);\n if(!isDynamic) {\n values[i] = abi.encode(getFixedValue(storageRoot, slot, proof.storageProofs[proofIdx++]));\n if(values[i].length > 32) {\n revert InvalidSlotSize(values[i].length);\n }\n } else {\n (values[i], proofIdx) = getDynamicValue(storageRoot, slot, proof, proofIdx);\n }\n }\n }\n}" + }, + "@ensdomains/evm-verifier/contracts/IEVMVerifier.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\ninterface IEVMVerifier {\n function gatewayURLs() external view returns(string[] memory);\n function getStorageValues(address target, bytes32[] memory commands, bytes[] memory constants, bytes memory proof) external view returns(bytes[] memory values);\n}\n" + }, + "@ensdomains/evm-verifier/contracts/MerkleTrie.sol": { + "content": "// Pulled from https://github.com/ethereum-optimism/optimism/blob/4d13f0afe8869faf7bba45d8339998525ebc5161/packages/contracts-bedrock/contracts/libraries/trie/MerkleTrie.sol\n// as this is the last version of Optimism's Merkle Trie library that supports nonexistence proofs; support was removed\n// in the next commit for some version.\n// Copyright 2020-2021 Optimism\n// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport { Bytes } from \"@eth-optimism/contracts-bedrock/src/libraries/Bytes.sol\";\nimport { RLPReader } from \"@eth-optimism/contracts-bedrock/src/libraries/rlp/RLPReader.sol\";\n\n\n/**\n * @title MerkleTrie\n * @notice MerkleTrie is a small library for verifying standard Ethereum Merkle-Patricia trie\n * inclusion proofs. By default, this library assumes a hexary trie. One can change the\n * trie radix constant to support other trie radixes.\n */\nlibrary MerkleTrie {\n /**\n * @notice Struct representing a node in the trie.\n */\n struct TrieNode {\n bytes encoded;\n RLPReader.RLPItem[] decoded;\n }\n\n /**\n * @notice Determines the number of elements per branch node.\n */\n uint256 internal constant TREE_RADIX = 16;\n\n /**\n * @notice Branch nodes have TREE_RADIX elements and one value element.\n */\n uint256 internal constant BRANCH_NODE_LENGTH = TREE_RADIX + 1;\n\n /**\n * @notice Leaf nodes and extension nodes have two elements, a `path` and a `value`.\n */\n uint256 internal constant LEAF_OR_EXTENSION_NODE_LENGTH = 2;\n\n /**\n * @notice Prefix for even-nibbled extension node paths.\n */\n uint8 internal constant PREFIX_EXTENSION_EVEN = 0;\n\n /**\n * @notice Prefix for odd-nibbled extension node paths.\n */\n uint8 internal constant PREFIX_EXTENSION_ODD = 1;\n\n /**\n * @notice Prefix for even-nibbled leaf node paths.\n */\n uint8 internal constant PREFIX_LEAF_EVEN = 2;\n\n /**\n * @notice Prefix for odd-nibbled leaf node paths.\n */\n uint8 internal constant PREFIX_LEAF_ODD = 3;\n\n /**\n * @notice RLP representation of `NULL`.\n */\n bytes internal constant RLP_NULL = hex\"80\";\n\n /**\n * @notice Verifies a proof that a given key/value pair is present in the trie.\n *\n * @param _key Key of the node to search for, as a hex string.\n * @param _value Value of the node to search for, as a hex string.\n * @param _proof Merkle trie inclusion proof for the desired node. Unlike traditional Merkle\n * trees, this proof is executed top-down and consists of a list of RLP-encoded\n * nodes that make a path down to the target node.\n * @param _root Known root of the Merkle trie. Used to verify that the included proof is\n * correctly constructed.\n *\n * @return Whether or not the proof is valid.\n */\n function verifyInclusionProof(\n bytes memory _key,\n bytes memory _value,\n bytes[] memory _proof,\n bytes32 _root\n ) internal pure returns (bool) {\n (bool exists, bytes memory value) = get(_key, _proof, _root);\n return (exists && Bytes.equal(_value, value));\n }\n\n /**\n * @notice Retrieves the value associated with a given key.\n *\n * @param _key Key to search for, as hex bytes.\n * @param _proof Merkle trie inclusion proof for the key.\n * @param _root Known root of the Merkle trie.\n *\n * @return Whether or not the key exists.\n * @return Value of the key if it exists.\n */\n function get(\n bytes memory _key,\n bytes[] memory _proof,\n bytes32 _root\n ) internal pure returns (bool, bytes memory) {\n TrieNode[] memory proof = _parseProof(_proof);\n (uint256 pathLength, bytes memory keyRemainder, bool isFinalNode) = _walkNodePath(\n proof,\n _key,\n _root\n );\n\n bool noRemainder = keyRemainder.length == 0;\n\n require(noRemainder || isFinalNode, \"MerkleTrie: provided proof is invalid\");\n\n bytes memory value = noRemainder ? _getNodeValue(proof[pathLength - 1]) : bytes(\"\");\n\n return (value.length > 0, value);\n }\n\n /**\n * @notice Walks through a proof using a provided key.\n *\n * @param _proof Inclusion proof to walk through.\n * @param _key Key to use for the walk.\n * @param _root Known root of the trie.\n *\n * @return Length of the final path\n * @return Portion of the key remaining after the walk.\n * @return Whether or not we've hit a dead end.\n */\n // solhint-disable-next-line code-complexity\n function _walkNodePath(\n TrieNode[] memory _proof,\n bytes memory _key,\n bytes32 _root\n )\n private\n pure\n returns (\n uint256,\n bytes memory,\n bool\n )\n {\n uint256 pathLength = 0;\n bytes memory key = Bytes.toNibbles(_key);\n\n bytes memory currentNodeID = abi.encodePacked(_root);\n uint256 currentKeyIndex = 0;\n uint256 currentKeyIncrement = 0;\n TrieNode memory currentNode;\n\n // Proof is top-down, so we start at the first element (root).\n for (uint256 i = 0; i < _proof.length; i++) {\n currentNode = _proof[i];\n currentKeyIndex += currentKeyIncrement;\n\n // Keep track of the proof elements we actually need.\n // It's expensive to resize arrays, so this simply reduces gas costs.\n pathLength += 1;\n\n if (currentKeyIndex == 0) {\n // First proof element is always the root node.\n require(\n Bytes.equal(abi.encodePacked(keccak256(currentNode.encoded)), currentNodeID),\n \"MerkleTrie: invalid root hash\"\n );\n } else if (currentNode.encoded.length >= 32) {\n // Nodes 32 bytes or larger are hashed inside branch nodes.\n require(\n Bytes.equal(abi.encodePacked(keccak256(currentNode.encoded)), currentNodeID),\n \"MerkleTrie: invalid large internal hash\"\n );\n } else {\n // Nodes smaller than 32 bytes aren't hashed.\n require(\n Bytes.equal(currentNode.encoded, currentNodeID),\n \"MerkleTrie: invalid internal node hash\"\n );\n }\n\n if (currentNode.decoded.length == BRANCH_NODE_LENGTH) {\n if (currentKeyIndex == key.length) {\n // We've hit the end of the key\n // meaning the value should be within this branch node.\n break;\n } else {\n // We're not at the end of the key yet.\n // Figure out what the next node ID should be and continue.\n uint8 branchKey = uint8(key[currentKeyIndex]);\n RLPReader.RLPItem memory nextNode = currentNode.decoded[branchKey];\n currentNodeID = _getNodeID(nextNode);\n currentKeyIncrement = 1;\n continue;\n }\n } else if (currentNode.decoded.length == LEAF_OR_EXTENSION_NODE_LENGTH) {\n bytes memory path = _getNodePath(currentNode);\n uint8 prefix = uint8(path[0]);\n uint8 offset = 2 - (prefix % 2);\n bytes memory pathRemainder = Bytes.slice(path, offset);\n bytes memory keyRemainder = Bytes.slice(key, currentKeyIndex);\n uint256 sharedNibbleLength = _getSharedNibbleLength(pathRemainder, keyRemainder);\n\n require(\n keyRemainder.length >= pathRemainder.length,\n \"MerkleTrie: invalid key length for leaf or extension node\"\n );\n\n if (prefix == PREFIX_LEAF_EVEN || prefix == PREFIX_LEAF_ODD) {\n if (\n pathRemainder.length == sharedNibbleLength &&\n keyRemainder.length == sharedNibbleLength\n ) {\n // The key within this leaf matches our key exactly.\n // Increment the key index to reflect that we have no remainder.\n currentKeyIndex += sharedNibbleLength;\n }\n\n // We've hit a leaf node, so our next node should be NULL.\n currentNodeID = RLP_NULL;\n break;\n } else if (prefix == PREFIX_EXTENSION_EVEN || prefix == PREFIX_EXTENSION_ODD) {\n if (sharedNibbleLength != pathRemainder.length) {\n // Our extension node is not identical to the remainder.\n // We've hit the end of this path\n // updates will need to modify this extension.\n currentNodeID = RLP_NULL;\n break;\n } else {\n // Our extension shares some nibbles.\n // Carry on to the next node.\n currentNodeID = _getNodeID(currentNode.decoded[1]);\n currentKeyIncrement = sharedNibbleLength;\n continue;\n }\n } else {\n revert(\"MerkleTrie: received a node with an unknown prefix\");\n }\n } else {\n revert(\"MerkleTrie: received an unparseable node\");\n }\n }\n\n return (\n pathLength,\n Bytes.slice(key, currentKeyIndex),\n Bytes.equal(currentNodeID, RLP_NULL)\n );\n }\n\n /**\n * @notice Parses an array of proof elements into a new array that contains both the original\n * encoded element and the RLP-decoded element.\n *\n * @param _proof Array of proof elements to parse.\n *\n * @return Proof parsed into easily accessible structs.\n */\n function _parseProof(bytes[] memory _proof) private pure returns (TrieNode[] memory) {\n uint256 length = _proof.length;\n TrieNode[] memory proof = new TrieNode[](length);\n for (uint256 i = 0; i < length; ) {\n proof[i] = TrieNode({ encoded: _proof[i], decoded: RLPReader.readList(_proof[i]) });\n unchecked {\n ++i;\n }\n }\n return proof;\n }\n\n /**\n * @notice Picks out the ID for a node. Node ID is referred to as the \"hash\" within the\n * specification, but nodes < 32 bytes are not actually hashed.\n *\n * @param _node Node to pull an ID for.\n *\n * @return ID for the node, depending on the size of its contents.\n */\n function _getNodeID(RLPReader.RLPItem memory _node) private pure returns (bytes memory) {\n return _node.length < 32 ? RLPReader.readRawBytes(_node) : RLPReader.readBytes(_node);\n }\n\n /**\n * @notice Gets the path for a leaf or extension node.\n *\n * @param _node Node to get a path for.\n *\n * @return Node path, converted to an array of nibbles.\n */\n function _getNodePath(TrieNode memory _node) private pure returns (bytes memory) {\n return Bytes.toNibbles(RLPReader.readBytes(_node.decoded[0]));\n }\n\n /**\n * @notice Gets the value for a node.\n *\n * @param _node Node to get a value for.\n *\n * @return Node value, as hex bytes.\n */\n function _getNodeValue(TrieNode memory _node) private pure returns (bytes memory) {\n return RLPReader.readBytes(_node.decoded[_node.decoded.length - 1]);\n }\n\n /**\n * @notice Utility; determines the number of nibbles shared between two nibble arrays.\n *\n * @param _a First nibble array.\n * @param _b Second nibble array.\n *\n * @return Number of shared nibbles.\n */\n function _getSharedNibbleLength(bytes memory _a, bytes memory _b)\n private\n pure\n returns (uint256)\n {\n uint256 shared;\n uint256 max = (_a.length < _b.length) ? _a.length : _b.length;\n for (; shared < max && _a[shared] == _b[shared]; ) {\n unchecked {\n ++shared;\n }\n }\n return shared;\n }\n}" + }, + "@ensdomains/evm-verifier/contracts/SecureMerkleTrie.sol": { + "content": "// Pulled from https://github.com/ethereum-optimism/optimism/blob/4d13f0afe8869faf7bba45d8339998525ebc5161/packages/contracts-bedrock/contracts/libraries/trie/MerkleTrie.sol\n// as this is the last version of Optimism's Merkle Trie library that supports nonexistence proofs; support was removed\n// in the next commit for some version.\n// Copyright 2020-2021 Optimism\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/* Library Imports */\nimport { MerkleTrie } from \"./MerkleTrie.sol\";\n\n/**\n * @title SecureMerkleTrie\n * @notice SecureMerkleTrie is a thin wrapper around the MerkleTrie library that hashes the input\n * keys. Ethereum's state trie hashes input keys before storing them.\n */\nlibrary SecureMerkleTrie {\n /**\n * @notice Verifies a proof that a given key/value pair is present in the Merkle trie.\n *\n * @param _key Key of the node to search for, as a hex string.\n * @param _value Value of the node to search for, as a hex string.\n * @param _proof Merkle trie inclusion proof for the desired node. Unlike traditional Merkle\n * trees, this proof is executed top-down and consists of a list of RLP-encoded\n * nodes that make a path down to the target node.\n * @param _root Known root of the Merkle trie. Used to verify that the included proof is\n * correctly constructed.\n *\n * @return Whether or not the proof is valid.\n */\n function verifyInclusionProof(\n bytes memory _key,\n bytes memory _value,\n bytes[] memory _proof,\n bytes32 _root\n ) internal pure returns (bool) {\n bytes memory key = _getSecureKey(_key);\n return MerkleTrie.verifyInclusionProof(key, _value, _proof, _root);\n }\n\n /**\n * @notice Retrieves the value associated with a given key.\n *\n * @param _key Key to search for, as hex bytes.\n * @param _proof Merkle trie inclusion proof for the key.\n * @param _root Known root of the Merkle trie.\n *\n * @return Whether or not the key exists.\n * @return Value of the key if it exists.\n */\n function get(\n bytes memory _key,\n bytes[] memory _proof,\n bytes32 _root\n ) internal pure returns (bool, bytes memory) {\n bytes memory key = _getSecureKey(_key);\n return MerkleTrie.get(key, _proof, _root);\n }\n\n /**\n * @notice Computes the hashed version of the input key.\n *\n * @param _key Key to hash.\n *\n * @return Hashed version of the key.\n */\n function _getSecureKey(bytes memory _key) private pure returns (bytes memory) {\n return abi.encodePacked(keccak256(_key));\n }\n}" + }, + "@ensdomains/l1-verifier/contracts/L1Verifier.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\nimport { IEVMVerifier } from \"@ensdomains/evm-verifier/contracts/IEVMVerifier.sol\";\nimport { RLPReader } from \"@eth-optimism/contracts-bedrock/src/libraries/rlp/RLPReader.sol\";\nimport { StateProof, EVMProofHelper } from \"@ensdomains/evm-verifier/contracts/EVMProofHelper.sol\";\n\nstruct L1WitnessData {\n uint256 blockNo;\n bytes blockHeader;\n}\n\ncontract L1Verifier is IEVMVerifier {\n error BlockHeaderHashMismatch(uint256 current, uint256 number, bytes32 expected, bytes32 actual);\n\n string[] _gatewayURLs;\n\n constructor(string[] memory urls) {\n _gatewayURLs = urls;\n }\n\n function gatewayURLs() external view returns(string[] memory) {\n return _gatewayURLs;\n }\n\n function getStorageValues(address target, bytes32[] memory commands, bytes[] memory constants, bytes memory proof) external view returns(bytes[] memory values) {\n (L1WitnessData memory l1Data, StateProof memory stateProof) = abi.decode(proof, (L1WitnessData, StateProof));\n if(keccak256(l1Data.blockHeader) != blockhash(l1Data.blockNo)) {\n revert BlockHeaderHashMismatch(block.number, l1Data.blockNo, blockhash(l1Data.blockNo), keccak256(l1Data.blockHeader));\n }\n RLPReader.RLPItem[] memory headerFields = RLPReader.readList(l1Data.blockHeader);\n bytes32 stateRoot = bytes32(RLPReader.readBytes(headerFields[3]));\n return EVMProofHelper.getStorageValues(target, commands, constants, stateRoot, stateProof);\n }\n}\n" + }, + "@eth-optimism/contracts-bedrock/src/libraries/Bytes.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/// @title Bytes\n/// @notice Bytes is a library for manipulating byte arrays.\nlibrary Bytes {\n /// @custom:attribution https://github.com/GNSPS/solidity-bytes-utils\n /// @notice Slices a byte array with a given starting index and length. Returns a new byte array\n /// as opposed to a pointer to the original array. Will throw if trying to slice more\n /// bytes than exist in the array.\n /// @param _bytes Byte array to slice.\n /// @param _start Starting index of the slice.\n /// @param _length Length of the slice.\n /// @return Slice of the input byte array.\n function slice(bytes memory _bytes, uint256 _start, uint256 _length) internal pure returns (bytes memory) {\n unchecked {\n require(_length + 31 >= _length, \"slice_overflow\");\n require(_start + _length >= _start, \"slice_overflow\");\n require(_bytes.length >= _start + _length, \"slice_outOfBounds\");\n }\n\n bytes memory tempBytes;\n\n assembly {\n switch iszero(_length)\n case 0 {\n // Get a location of some free memory and store it in tempBytes as\n // Solidity does for memory variables.\n tempBytes := mload(0x40)\n\n // The first word of the slice result is potentially a partial\n // word read from the original array. To read it, we calculate\n // the length of that partial word and start copying that many\n // bytes into the array. The first word we copy will start with\n // data we don't care about, but the last `lengthmod` bytes will\n // land at the beginning of the contents of the new array. When\n // we're done copying, we overwrite the full first word with\n // the actual length of the slice.\n let lengthmod := and(_length, 31)\n\n // The multiplication in the next line is necessary\n // because when slicing multiples of 32 bytes (lengthmod == 0)\n // the following copy loop was copying the origin's length\n // and then ending prematurely not copying everything it should.\n let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod)))\n let end := add(mc, _length)\n\n for {\n // The multiplication in the next line has the same exact purpose\n // as the one above.\n let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start)\n } lt(mc, end) {\n mc := add(mc, 0x20)\n cc := add(cc, 0x20)\n } { mstore(mc, mload(cc)) }\n\n mstore(tempBytes, _length)\n\n //update free-memory pointer\n //allocating the array padded to 32 bytes like the compiler does now\n mstore(0x40, and(add(mc, 31), not(31)))\n }\n //if we want a zero-length slice let's just return a zero-length array\n default {\n tempBytes := mload(0x40)\n\n //zero out the 32 bytes slice we are about to return\n //we need to do it because Solidity does not garbage collect\n mstore(tempBytes, 0)\n\n mstore(0x40, add(tempBytes, 0x20))\n }\n }\n\n return tempBytes;\n }\n\n /// @notice Slices a byte array with a given starting index up to the end of the original byte\n /// array. Returns a new array rathern than a pointer to the original.\n /// @param _bytes Byte array to slice.\n /// @param _start Starting index of the slice.\n /// @return Slice of the input byte array.\n function slice(bytes memory _bytes, uint256 _start) internal pure returns (bytes memory) {\n if (_start >= _bytes.length) {\n return bytes(\"\");\n }\n return slice(_bytes, _start, _bytes.length - _start);\n }\n\n /// @notice Converts a byte array into a nibble array by splitting each byte into two nibbles.\n /// Resulting nibble array will be exactly twice as long as the input byte array.\n /// @param _bytes Input byte array to convert.\n /// @return Resulting nibble array.\n function toNibbles(bytes memory _bytes) internal pure returns (bytes memory) {\n bytes memory _nibbles;\n assembly {\n // Grab a free memory offset for the new array\n _nibbles := mload(0x40)\n\n // Load the length of the passed bytes array from memory\n let bytesLength := mload(_bytes)\n\n // Calculate the length of the new nibble array\n // This is the length of the input array times 2\n let nibblesLength := shl(0x01, bytesLength)\n\n // Update the free memory pointer to allocate memory for the new array.\n // To do this, we add the length of the new array + 32 bytes for the array length\n // rounded up to the nearest 32 byte boundary to the current free memory pointer.\n mstore(0x40, add(_nibbles, and(not(0x1F), add(nibblesLength, 0x3F))))\n\n // Store the length of the new array in memory\n mstore(_nibbles, nibblesLength)\n\n // Store the memory offset of the _bytes array's contents on the stack\n let bytesStart := add(_bytes, 0x20)\n\n // Store the memory offset of the nibbles array's contents on the stack\n let nibblesStart := add(_nibbles, 0x20)\n\n // Loop through each byte in the input array\n for { let i := 0x00 } lt(i, bytesLength) { i := add(i, 0x01) } {\n // Get the starting offset of the next 2 bytes in the nibbles array\n let offset := add(nibblesStart, shl(0x01, i))\n // Load the byte at the current index within the `_bytes` array\n let b := byte(0x00, mload(add(bytesStart, i)))\n\n // Pull out the first nibble and store it in the new array\n mstore8(offset, shr(0x04, b))\n // Pull out the second nibble and store it in the new array\n mstore8(add(offset, 0x01), and(b, 0x0F))\n }\n }\n return _nibbles;\n }\n\n /// @notice Compares two byte arrays by comparing their keccak256 hashes.\n /// @param _bytes First byte array to compare.\n /// @param _other Second byte array to compare.\n /// @return True if the two byte arrays are equal, false otherwise.\n function equal(bytes memory _bytes, bytes memory _other) internal pure returns (bool) {\n return keccak256(_bytes) == keccak256(_other);\n }\n}\n" + }, + "@eth-optimism/contracts-bedrock/src/libraries/rlp/RLPReader.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.8;\n\n/// @custom:attribution https://github.com/hamdiallam/Solidity-RLP\n/// @title RLPReader\n/// @notice RLPReader is a library for parsing RLP-encoded byte arrays into Solidity types. Adapted\n/// from Solidity-RLP (https://github.com/hamdiallam/Solidity-RLP) by Hamdi Allam with\n/// various tweaks to improve readability.\nlibrary RLPReader {\n /// @notice Custom pointer type to avoid confusion between pointers and uint256s.\n type MemoryPointer is uint256;\n\n /// @notice RLP item types.\n /// @custom:value DATA_ITEM Represents an RLP data item (NOT a list).\n /// @custom:value LIST_ITEM Represents an RLP list item.\n enum RLPItemType {\n DATA_ITEM,\n LIST_ITEM\n }\n\n /// @notice Struct representing an RLP item.\n /// @custom:field length Length of the RLP item.\n /// @custom:field ptr Pointer to the RLP item in memory.\n struct RLPItem {\n uint256 length;\n MemoryPointer ptr;\n }\n\n /// @notice Max list length that this library will accept.\n uint256 internal constant MAX_LIST_LENGTH = 32;\n\n /// @notice Converts bytes to a reference to memory position and length.\n /// @param _in Input bytes to convert.\n /// @return out_ Output memory reference.\n function toRLPItem(bytes memory _in) internal pure returns (RLPItem memory out_) {\n // Empty arrays are not RLP items.\n require(_in.length > 0, \"RLPReader: length of an RLP item must be greater than zero to be decodable\");\n\n MemoryPointer ptr;\n assembly {\n ptr := add(_in, 32)\n }\n\n out_ = RLPItem({ length: _in.length, ptr: ptr });\n }\n\n /// @notice Reads an RLP list value into a list of RLP items.\n /// @param _in RLP list value.\n /// @return out_ Decoded RLP list items.\n function readList(RLPItem memory _in) internal pure returns (RLPItem[] memory out_) {\n (uint256 listOffset, uint256 listLength, RLPItemType itemType) = _decodeLength(_in);\n\n require(itemType == RLPItemType.LIST_ITEM, \"RLPReader: decoded item type for list is not a list item\");\n\n require(listOffset + listLength == _in.length, \"RLPReader: list item has an invalid data remainder\");\n\n // Solidity in-memory arrays can't be increased in size, but *can* be decreased in size by\n // writing to the length. Since we can't know the number of RLP items without looping over\n // the entire input, we'd have to loop twice to accurately size this array. It's easier to\n // simply set a reasonable maximum list length and decrease the size before we finish.\n out_ = new RLPItem[](MAX_LIST_LENGTH);\n\n uint256 itemCount = 0;\n uint256 offset = listOffset;\n while (offset < _in.length) {\n (uint256 itemOffset, uint256 itemLength,) = _decodeLength(\n RLPItem({ length: _in.length - offset, ptr: MemoryPointer.wrap(MemoryPointer.unwrap(_in.ptr) + offset) })\n );\n\n // We don't need to check itemCount < out.length explicitly because Solidity already\n // handles this check on our behalf, we'd just be wasting gas.\n out_[itemCount] = RLPItem({\n length: itemLength + itemOffset,\n ptr: MemoryPointer.wrap(MemoryPointer.unwrap(_in.ptr) + offset)\n });\n\n itemCount += 1;\n offset += itemOffset + itemLength;\n }\n\n // Decrease the array size to match the actual item count.\n assembly {\n mstore(out_, itemCount)\n }\n }\n\n /// @notice Reads an RLP list value into a list of RLP items.\n /// @param _in RLP list value.\n /// @return out_ Decoded RLP list items.\n function readList(bytes memory _in) internal pure returns (RLPItem[] memory out_) {\n out_ = readList(toRLPItem(_in));\n }\n\n /// @notice Reads an RLP bytes value into bytes.\n /// @param _in RLP bytes value.\n /// @return out_ Decoded bytes.\n function readBytes(RLPItem memory _in) internal pure returns (bytes memory out_) {\n (uint256 itemOffset, uint256 itemLength, RLPItemType itemType) = _decodeLength(_in);\n\n require(itemType == RLPItemType.DATA_ITEM, \"RLPReader: decoded item type for bytes is not a data item\");\n\n require(_in.length == itemOffset + itemLength, \"RLPReader: bytes value contains an invalid remainder\");\n\n out_ = _copy(_in.ptr, itemOffset, itemLength);\n }\n\n /// @notice Reads an RLP bytes value into bytes.\n /// @param _in RLP bytes value.\n /// @return out_ Decoded bytes.\n function readBytes(bytes memory _in) internal pure returns (bytes memory out_) {\n out_ = readBytes(toRLPItem(_in));\n }\n\n /// @notice Reads the raw bytes of an RLP item.\n /// @param _in RLP item to read.\n /// @return out_ Raw RLP bytes.\n function readRawBytes(RLPItem memory _in) internal pure returns (bytes memory out_) {\n out_ = _copy(_in.ptr, 0, _in.length);\n }\n\n /// @notice Decodes the length of an RLP item.\n /// @param _in RLP item to decode.\n /// @return offset_ Offset of the encoded data.\n /// @return length_ Length of the encoded data.\n /// @return type_ RLP item type (LIST_ITEM or DATA_ITEM).\n function _decodeLength(RLPItem memory _in)\n private\n pure\n returns (uint256 offset_, uint256 length_, RLPItemType type_)\n {\n // Short-circuit if there's nothing to decode, note that we perform this check when\n // the user creates an RLP item via toRLPItem, but it's always possible for them to bypass\n // that function and create an RLP item directly. So we need to check this anyway.\n require(_in.length > 0, \"RLPReader: length of an RLP item must be greater than zero to be decodable\");\n\n MemoryPointer ptr = _in.ptr;\n uint256 prefix;\n assembly {\n prefix := byte(0, mload(ptr))\n }\n\n if (prefix <= 0x7f) {\n // Single byte.\n return (0, 1, RLPItemType.DATA_ITEM);\n } else if (prefix <= 0xb7) {\n // Short string.\n\n // slither-disable-next-line variable-scope\n uint256 strLen = prefix - 0x80;\n\n require(\n _in.length > strLen, \"RLPReader: length of content must be greater than string length (short string)\"\n );\n\n bytes1 firstByteOfContent;\n assembly {\n firstByteOfContent := and(mload(add(ptr, 1)), shl(248, 0xff))\n }\n\n require(\n strLen != 1 || firstByteOfContent >= 0x80,\n \"RLPReader: invalid prefix, single byte < 0x80 are not prefixed (short string)\"\n );\n\n return (1, strLen, RLPItemType.DATA_ITEM);\n } else if (prefix <= 0xbf) {\n // Long string.\n uint256 lenOfStrLen = prefix - 0xb7;\n\n require(\n _in.length > lenOfStrLen,\n \"RLPReader: length of content must be > than length of string length (long string)\"\n );\n\n bytes1 firstByteOfContent;\n assembly {\n firstByteOfContent := and(mload(add(ptr, 1)), shl(248, 0xff))\n }\n\n require(\n firstByteOfContent != 0x00, \"RLPReader: length of content must not have any leading zeros (long string)\"\n );\n\n uint256 strLen;\n assembly {\n strLen := shr(sub(256, mul(8, lenOfStrLen)), mload(add(ptr, 1)))\n }\n\n require(strLen > 55, \"RLPReader: length of content must be greater than 55 bytes (long string)\");\n\n require(\n _in.length > lenOfStrLen + strLen,\n \"RLPReader: length of content must be greater than total length (long string)\"\n );\n\n return (1 + lenOfStrLen, strLen, RLPItemType.DATA_ITEM);\n } else if (prefix <= 0xf7) {\n // Short list.\n // slither-disable-next-line variable-scope\n uint256 listLen = prefix - 0xc0;\n\n require(_in.length > listLen, \"RLPReader: length of content must be greater than list length (short list)\");\n\n return (1, listLen, RLPItemType.LIST_ITEM);\n } else {\n // Long list.\n uint256 lenOfListLen = prefix - 0xf7;\n\n require(\n _in.length > lenOfListLen,\n \"RLPReader: length of content must be > than length of list length (long list)\"\n );\n\n bytes1 firstByteOfContent;\n assembly {\n firstByteOfContent := and(mload(add(ptr, 1)), shl(248, 0xff))\n }\n\n require(\n firstByteOfContent != 0x00, \"RLPReader: length of content must not have any leading zeros (long list)\"\n );\n\n uint256 listLen;\n assembly {\n listLen := shr(sub(256, mul(8, lenOfListLen)), mload(add(ptr, 1)))\n }\n\n require(listLen > 55, \"RLPReader: length of content must be greater than 55 bytes (long list)\");\n\n require(\n _in.length > lenOfListLen + listLen,\n \"RLPReader: length of content must be greater than total length (long list)\"\n );\n\n return (1 + lenOfListLen, listLen, RLPItemType.LIST_ITEM);\n }\n }\n\n /// @notice Copies the bytes from a memory location.\n /// @param _src Pointer to the location to read from.\n /// @param _offset Offset to start reading from.\n /// @param _length Number of bytes to read.\n /// @return out_ Copied bytes.\n function _copy(MemoryPointer _src, uint256 _offset, uint256 _length) private pure returns (bytes memory out_) {\n out_ = new bytes(_length);\n if (_length == 0) {\n return out_;\n }\n\n // Mostly based on Solidity's copy_memory_to_memory:\n // solhint-disable max-line-length\n // https://github.com/ethereum/solidity/blob/34dd30d71b4da730488be72ff6af7083cf2a91f6/libsolidity/codegen/YulUtilFunctions.cpp#L102-L114\n uint256 src = MemoryPointer.unwrap(_src) + _offset;\n assembly {\n let dest := add(out_, 32)\n let i := 0\n for { } lt(i, _length) { i := add(i, 32) } { mstore(add(dest, i), mload(add(src, i))) }\n\n if gt(i, _length) { mstore(add(dest, _length), 0) }\n }\n }\n}\n" + }, + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor() {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby disabling any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "@openzeppelin/contracts/interfaces/IERC1271.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1271.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC1271 standard signature validation method for\n * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271].\n *\n * _Available since v4.1._\n */\ninterface IERC1271 {\n /**\n * @dev Should return whether the signature provided is valid for the provided data\n * @param hash Hash of the data to be signed\n * @param signature Signature byte array associated with _data\n */\n function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue);\n}\n" + }, + "@openzeppelin/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC1155.sol\";\n\n/**\n * @dev Interface of the optional ERC1155MetadataExtension interface, as defined\n * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].\n *\n * _Available since v3.1._\n */\ninterface IERC1155MetadataURI is IERC1155 {\n /**\n * @dev Returns the URI for token type `id`.\n *\n * If the `\\{id\\}` substring is present in the URI, it must be replaced by\n * clients with the actual token type ID.\n */\n function uri(uint256 id) external view returns (string memory);\n}\n" + }, + "@openzeppelin/contracts/token/ERC1155/IERC1155.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/IERC1155.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\n *\n * _Available since v3.1._\n */\ninterface IERC1155 is IERC165 {\n /**\n * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\n */\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\n\n /**\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\n * transfers.\n */\n event TransferBatch(\n address indexed operator,\n address indexed from,\n address indexed to,\n uint256[] ids,\n uint256[] values\n );\n\n /**\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\n * `approved`.\n */\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\n\n /**\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\n *\n * If an {URI} event was emitted for `id`, the standard\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\n * returned by {IERC1155MetadataURI-uri}.\n */\n event URI(string value, uint256 indexed id);\n\n /**\n * @dev Returns the amount of tokens of token type `id` owned by `account`.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function balanceOf(address account, uint256 id) external view returns (uint256);\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\n *\n * Requirements:\n *\n * - `accounts` and `ids` must have the same length.\n */\n function balanceOfBatch(\n address[] calldata accounts,\n uint256[] calldata ids\n ) external view returns (uint256[] memory);\n\n /**\n * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\n *\n * Emits an {ApprovalForAll} event.\n *\n * Requirements:\n *\n * - `operator` cannot be the caller.\n */\n function setApprovalForAll(address operator, bool approved) external;\n\n /**\n * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\n *\n * See {setApprovalForAll}.\n */\n function isApprovedForAll(address account, address operator) external view returns (bool);\n\n /**\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\n *\n * Emits a {TransferSingle} event.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\n * acceptance magic value.\n */\n function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external;\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\n *\n * Emits a {TransferBatch} event.\n *\n * Requirements:\n *\n * - `ids` and `amounts` must have the same length.\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\n * acceptance magic value.\n */\n function safeBatchTransferFrom(\n address from,\n address to,\n uint256[] calldata ids,\n uint256[] calldata amounts,\n bytes calldata data\n ) external;\n}\n" + }, + "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev _Available since v3.1._\n */\ninterface IERC1155Receiver is IERC165 {\n /**\n * @dev Handles the receipt of a single ERC1155 token type. This function is\n * called at the end of a `safeTransferFrom` after the balance has been updated.\n *\n * NOTE: To accept the transfer, this must return\n * `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))`\n * (i.e. 0xf23a6e61, or its own function selector).\n *\n * @param operator The address which initiated the transfer (i.e. msg.sender)\n * @param from The address which previously owned the token\n * @param id The ID of the token being transferred\n * @param value The amount of tokens being transferred\n * @param data Additional data with no specified format\n * @return `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))` if transfer is allowed\n */\n function onERC1155Received(\n address operator,\n address from,\n uint256 id,\n uint256 value,\n bytes calldata data\n ) external returns (bytes4);\n\n /**\n * @dev Handles the receipt of a multiple ERC1155 token types. This function\n * is called at the end of a `safeBatchTransferFrom` after the balances have\n * been updated.\n *\n * NOTE: To accept the transfer(s), this must return\n * `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))`\n * (i.e. 0xbc197c81, or its own function selector).\n *\n * @param operator The address which initiated the batch transfer (i.e. msg.sender)\n * @param from The address which previously owned the token\n * @param ids An array containing ids of each token being transferred (order and length must match values array)\n * @param values An array containing amounts of each token being transferred (order and length must match ids array)\n * @param data Additional data with no specified format\n * @return `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))` if transfer is allowed\n */\n function onERC1155BatchReceived(\n address operator,\n address from,\n uint256[] calldata ids,\n uint256[] calldata values,\n bytes calldata data\n ) external returns (bytes4);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `from` to `to` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/ERC721.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/ERC721.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC721.sol\";\nimport \"./IERC721Receiver.sol\";\nimport \"./extensions/IERC721Metadata.sol\";\nimport \"../../utils/Address.sol\";\nimport \"../../utils/Context.sol\";\nimport \"../../utils/Strings.sol\";\nimport \"../../utils/introspection/ERC165.sol\";\n\n/**\n * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including\n * the Metadata extension, but not including the Enumerable extension, which is available separately as\n * {ERC721Enumerable}.\n */\ncontract ERC721 is Context, ERC165, IERC721, IERC721Metadata {\n using Address for address;\n using Strings for uint256;\n\n // Token name\n string private _name;\n\n // Token symbol\n string private _symbol;\n\n // Mapping from token ID to owner address\n mapping(uint256 => address) private _owners;\n\n // Mapping owner address to token count\n mapping(address => uint256) private _balances;\n\n // Mapping from token ID to approved address\n mapping(uint256 => address) private _tokenApprovals;\n\n // Mapping from owner to operator approvals\n mapping(address => mapping(address => bool)) private _operatorApprovals;\n\n /**\n * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\n return\n interfaceId == type(IERC721).interfaceId ||\n interfaceId == type(IERC721Metadata).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev See {IERC721-balanceOf}.\n */\n function balanceOf(address owner) public view virtual override returns (uint256) {\n require(owner != address(0), \"ERC721: address zero is not a valid owner\");\n return _balances[owner];\n }\n\n /**\n * @dev See {IERC721-ownerOf}.\n */\n function ownerOf(uint256 tokenId) public view virtual override returns (address) {\n address owner = _ownerOf(tokenId);\n require(owner != address(0), \"ERC721: invalid token ID\");\n return owner;\n }\n\n /**\n * @dev See {IERC721Metadata-name}.\n */\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n /**\n * @dev See {IERC721Metadata-symbol}.\n */\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev See {IERC721Metadata-tokenURI}.\n */\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\n _requireMinted(tokenId);\n\n string memory baseURI = _baseURI();\n return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : \"\";\n }\n\n /**\n * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each\n * token will be the concatenation of the `baseURI` and the `tokenId`. Empty\n * by default, can be overridden in child contracts.\n */\n function _baseURI() internal view virtual returns (string memory) {\n return \"\";\n }\n\n /**\n * @dev See {IERC721-approve}.\n */\n function approve(address to, uint256 tokenId) public virtual override {\n address owner = ERC721.ownerOf(tokenId);\n require(to != owner, \"ERC721: approval to current owner\");\n\n require(\n _msgSender() == owner || isApprovedForAll(owner, _msgSender()),\n \"ERC721: approve caller is not token owner or approved for all\"\n );\n\n _approve(to, tokenId);\n }\n\n /**\n * @dev See {IERC721-getApproved}.\n */\n function getApproved(uint256 tokenId) public view virtual override returns (address) {\n _requireMinted(tokenId);\n\n return _tokenApprovals[tokenId];\n }\n\n /**\n * @dev See {IERC721-setApprovalForAll}.\n */\n function setApprovalForAll(address operator, bool approved) public virtual override {\n _setApprovalForAll(_msgSender(), operator, approved);\n }\n\n /**\n * @dev See {IERC721-isApprovedForAll}.\n */\n function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {\n return _operatorApprovals[owner][operator];\n }\n\n /**\n * @dev See {IERC721-transferFrom}.\n */\n function transferFrom(address from, address to, uint256 tokenId) public virtual override {\n //solhint-disable-next-line max-line-length\n require(_isApprovedOrOwner(_msgSender(), tokenId), \"ERC721: caller is not token owner or approved\");\n\n _transfer(from, to, tokenId);\n }\n\n /**\n * @dev See {IERC721-safeTransferFrom}.\n */\n function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override {\n safeTransferFrom(from, to, tokenId, \"\");\n }\n\n /**\n * @dev See {IERC721-safeTransferFrom}.\n */\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual override {\n require(_isApprovedOrOwner(_msgSender(), tokenId), \"ERC721: caller is not token owner or approved\");\n _safeTransfer(from, to, tokenId, data);\n }\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\n *\n * `data` is additional data, it has no specified format and it is sent in call to `to`.\n *\n * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.\n * implement alternative mechanisms to perform token transfer, such as signature-based.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function _safeTransfer(address from, address to, uint256 tokenId, bytes memory data) internal virtual {\n _transfer(from, to, tokenId);\n require(_checkOnERC721Received(from, to, tokenId, data), \"ERC721: transfer to non ERC721Receiver implementer\");\n }\n\n /**\n * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist\n */\n function _ownerOf(uint256 tokenId) internal view virtual returns (address) {\n return _owners[tokenId];\n }\n\n /**\n * @dev Returns whether `tokenId` exists.\n *\n * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.\n *\n * Tokens start existing when they are minted (`_mint`),\n * and stop existing when they are burned (`_burn`).\n */\n function _exists(uint256 tokenId) internal view virtual returns (bool) {\n return _ownerOf(tokenId) != address(0);\n }\n\n /**\n * @dev Returns whether `spender` is allowed to manage `tokenId`.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {\n address owner = ERC721.ownerOf(tokenId);\n return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender);\n }\n\n /**\n * @dev Safely mints `tokenId` and transfers it to `to`.\n *\n * Requirements:\n *\n * - `tokenId` must not exist.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function _safeMint(address to, uint256 tokenId) internal virtual {\n _safeMint(to, tokenId, \"\");\n }\n\n /**\n * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is\n * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.\n */\n function _safeMint(address to, uint256 tokenId, bytes memory data) internal virtual {\n _mint(to, tokenId);\n require(\n _checkOnERC721Received(address(0), to, tokenId, data),\n \"ERC721: transfer to non ERC721Receiver implementer\"\n );\n }\n\n /**\n * @dev Mints `tokenId` and transfers it to `to`.\n *\n * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible\n *\n * Requirements:\n *\n * - `tokenId` must not exist.\n * - `to` cannot be the zero address.\n *\n * Emits a {Transfer} event.\n */\n function _mint(address to, uint256 tokenId) internal virtual {\n require(to != address(0), \"ERC721: mint to the zero address\");\n require(!_exists(tokenId), \"ERC721: token already minted\");\n\n _beforeTokenTransfer(address(0), to, tokenId, 1);\n\n // Check that tokenId was not minted by `_beforeTokenTransfer` hook\n require(!_exists(tokenId), \"ERC721: token already minted\");\n\n unchecked {\n // Will not overflow unless all 2**256 token ids are minted to the same owner.\n // Given that tokens are minted one by one, it is impossible in practice that\n // this ever happens. Might change if we allow batch minting.\n // The ERC fails to describe this case.\n _balances[to] += 1;\n }\n\n _owners[tokenId] = to;\n\n emit Transfer(address(0), to, tokenId);\n\n _afterTokenTransfer(address(0), to, tokenId, 1);\n }\n\n /**\n * @dev Destroys `tokenId`.\n * The approval is cleared when the token is burned.\n * This is an internal function that does not check if the sender is authorized to operate on the token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n *\n * Emits a {Transfer} event.\n */\n function _burn(uint256 tokenId) internal virtual {\n address owner = ERC721.ownerOf(tokenId);\n\n _beforeTokenTransfer(owner, address(0), tokenId, 1);\n\n // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook\n owner = ERC721.ownerOf(tokenId);\n\n // Clear approvals\n delete _tokenApprovals[tokenId];\n\n unchecked {\n // Cannot overflow, as that would require more tokens to be burned/transferred\n // out than the owner initially received through minting and transferring in.\n _balances[owner] -= 1;\n }\n delete _owners[tokenId];\n\n emit Transfer(owner, address(0), tokenId);\n\n _afterTokenTransfer(owner, address(0), tokenId, 1);\n }\n\n /**\n * @dev Transfers `tokenId` from `from` to `to`.\n * As opposed to {transferFrom}, this imposes no restrictions on msg.sender.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - `tokenId` token must be owned by `from`.\n *\n * Emits a {Transfer} event.\n */\n function _transfer(address from, address to, uint256 tokenId) internal virtual {\n require(ERC721.ownerOf(tokenId) == from, \"ERC721: transfer from incorrect owner\");\n require(to != address(0), \"ERC721: transfer to the zero address\");\n\n _beforeTokenTransfer(from, to, tokenId, 1);\n\n // Check that tokenId was not transferred by `_beforeTokenTransfer` hook\n require(ERC721.ownerOf(tokenId) == from, \"ERC721: transfer from incorrect owner\");\n\n // Clear approvals from the previous owner\n delete _tokenApprovals[tokenId];\n\n unchecked {\n // `_balances[from]` cannot overflow for the same reason as described in `_burn`:\n // `from`'s balance is the number of token held, which is at least one before the current\n // transfer.\n // `_balances[to]` could overflow in the conditions described in `_mint`. That would require\n // all 2**256 token ids to be minted, which in practice is impossible.\n _balances[from] -= 1;\n _balances[to] += 1;\n }\n _owners[tokenId] = to;\n\n emit Transfer(from, to, tokenId);\n\n _afterTokenTransfer(from, to, tokenId, 1);\n }\n\n /**\n * @dev Approve `to` to operate on `tokenId`\n *\n * Emits an {Approval} event.\n */\n function _approve(address to, uint256 tokenId) internal virtual {\n _tokenApprovals[tokenId] = to;\n emit Approval(ERC721.ownerOf(tokenId), to, tokenId);\n }\n\n /**\n * @dev Approve `operator` to operate on all of `owner` tokens\n *\n * Emits an {ApprovalForAll} event.\n */\n function _setApprovalForAll(address owner, address operator, bool approved) internal virtual {\n require(owner != operator, \"ERC721: approve to caller\");\n _operatorApprovals[owner][operator] = approved;\n emit ApprovalForAll(owner, operator, approved);\n }\n\n /**\n * @dev Reverts if the `tokenId` has not been minted yet.\n */\n function _requireMinted(uint256 tokenId) internal view virtual {\n require(_exists(tokenId), \"ERC721: invalid token ID\");\n }\n\n /**\n * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.\n * The call is not executed if the target address is not a contract.\n *\n * @param from address representing the previous owner of the given token ID\n * @param to target address that will receive the tokens\n * @param tokenId uint256 ID of the token to be transferred\n * @param data bytes optional data to send along with the call\n * @return bool whether the call correctly returned the expected magic value\n */\n function _checkOnERC721Received(\n address from,\n address to,\n uint256 tokenId,\n bytes memory data\n ) private returns (bool) {\n if (to.isContract()) {\n try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {\n return retval == IERC721Receiver.onERC721Received.selector;\n } catch (bytes memory reason) {\n if (reason.length == 0) {\n revert(\"ERC721: transfer to non ERC721Receiver implementer\");\n } else {\n /// @solidity memory-safe-assembly\n assembly {\n revert(add(32, reason), mload(reason))\n }\n }\n }\n } else {\n return true;\n }\n }\n\n /**\n * @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is\n * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.\n *\n * Calling conditions:\n *\n * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`.\n * - When `from` is zero, the tokens will be minted for `to`.\n * - When `to` is zero, ``from``'s tokens will be burned.\n * - `from` and `to` are never both zero.\n * - `batchSize` is non-zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}\n\n /**\n * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is\n * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.\n *\n * Calling conditions:\n *\n * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`.\n * - When `from` is zero, the tokens were minted for `to`.\n * - When `to` is zero, ``from``'s tokens were burned.\n * - `from` and `to` are never both zero.\n * - `batchSize` is non-zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _afterTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}\n\n /**\n * @dev Unsafe write access to the balances, used by extensions that \"mint\" tokens using an {ownerOf} override.\n *\n * WARNING: Anyone calling this MUST ensure that the balances remain consistent with the ownership. The invariant\n * being that for any address `a` the value returned by `balanceOf(a)` must be equal to the number of tokens such\n * that `ownerOf(tokenId)` is `a`.\n */\n // solhint-disable-next-line func-name-mixedcase\n function __unsafe_increaseBalance(address account, uint256 amount) internal {\n _balances[account] += amount;\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC721.sol\";\n\n/**\n * @title ERC-721 Non-Fungible Token Standard, optional metadata extension\n * @dev See https://eips.ethereum.org/EIPS/eip-721\n */\ninterface IERC721Metadata is IERC721 {\n /**\n * @dev Returns the token collection name.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the token collection symbol.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\n */\n function tokenURI(uint256 tokenId) external view returns (string memory);\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/IERC721.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev Required interface of an ERC721 compliant contract.\n */\ninterface IERC721 is IERC165 {\n /**\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\n */\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\n\n /**\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\n */\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\n\n /**\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\n */\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\n\n /**\n * @dev Returns the number of tokens in ``owner``'s account.\n */\n function balanceOf(address owner) external view returns (uint256 balance);\n\n /**\n * @dev Returns the owner of the `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function ownerOf(uint256 tokenId) external view returns (address owner);\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(address from, address to, uint256 tokenId) external;\n\n /**\n * @dev Transfers `tokenId` token from `from` to `to`.\n *\n * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721\n * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must\n * understand this adds an external call which potentially creates a reentrancy vulnerability.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must be owned by `from`.\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address from, address to, uint256 tokenId) external;\n\n /**\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\n * The approval is cleared when the token is transferred.\n *\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\n *\n * Requirements:\n *\n * - The caller must own the token or be an approved operator.\n * - `tokenId` must exist.\n *\n * Emits an {Approval} event.\n */\n function approve(address to, uint256 tokenId) external;\n\n /**\n * @dev Approve or remove `operator` as an operator for the caller.\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\n *\n * Requirements:\n *\n * - The `operator` cannot be the caller.\n *\n * Emits an {ApprovalForAll} event.\n */\n function setApprovalForAll(address operator, bool approved) external;\n\n /**\n * @dev Returns the account approved for `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function getApproved(uint256 tokenId) external view returns (address operator);\n\n /**\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\n *\n * See {setApprovalForAll}\n */\n function isApprovedForAll(address owner, address operator) external view returns (bool);\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @title ERC721 token receiver interface\n * @dev Interface for any contract that wants to support safeTransfers\n * from ERC721 asset contracts.\n */\ninterface IERC721Receiver {\n /**\n * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}\n * by `operator` from `from`, this function is called.\n *\n * It must return its Solidity selector to confirm the token transfer.\n * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.\n *\n * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.\n */\n function onERC721Received(\n address operator,\n address from,\n uint256 tokenId,\n bytes calldata data\n ) external returns (bytes4);\n}\n" + }, + "@openzeppelin/contracts/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n *\n * Furthermore, `isContract` will also return true if the target contract within\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n * which only has an effect at the end of a transaction.\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n function _contextSuffixLength() internal view virtual returns (uint256) {\n return 0;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/cryptography/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../Strings.sol\";\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSA {\n enum RecoverError {\n NoError,\n InvalidSignature,\n InvalidSignatureLength,\n InvalidSignatureS,\n InvalidSignatureV // Deprecated in v4.8\n }\n\n function _throwError(RecoverError error) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert(\"ECDSA: invalid signature\");\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert(\"ECDSA: invalid signature length\");\n } else if (error == RecoverError.InvalidSignatureS) {\n revert(\"ECDSA: invalid signature 's' value\");\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature` or error string. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n *\n * Documentation for signature generation:\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\n if (signature.length == 65) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n /// @solidity memory-safe-assembly\n assembly {\n r := mload(add(signature, 0x20))\n s := mload(add(signature, 0x40))\n v := byte(0, mload(add(signature, 0x60)))\n }\n return tryRecover(hash, v, r, s);\n } else {\n return (address(0), RecoverError.InvalidSignatureLength);\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature`. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, signature);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n *\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) {\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n uint8 v = uint8((uint256(vs) >> 255) + 27);\n return tryRecover(hash, v, r, s);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n *\n * _Available since v4.2._\n */\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n * `r` and `s` signature fields separately.\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS);\n }\n\n // If the signature is valid (and not malleable), return the signer address\n address signer = ecrecover(hash, v, r, s);\n if (signer == address(0)) {\n return (address(0), RecoverError.InvalidSignature);\n }\n\n return (signer, RecoverError.NoError);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `v`,\n * `r` and `s` signature fields separately.\n */\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 message) {\n // 32 is the length in bytes of hash,\n // enforced by the type signature above\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x00, \"\\x19Ethereum Signed Message:\\n32\")\n mstore(0x1c, hash)\n message := keccak256(0x00, 0x3c)\n }\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from `s`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n\", Strings.toString(s.length), s));\n }\n\n /**\n * @dev Returns an Ethereum Signed Typed Data, created from a\n * `domainSeparator` and a `structHash`. This produces hash corresponding\n * to the one signed with the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\n * JSON-RPC method as part of EIP-712.\n *\n * See {recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 data) {\n /// @solidity memory-safe-assembly\n assembly {\n let ptr := mload(0x40)\n mstore(ptr, \"\\x19\\x01\")\n mstore(add(ptr, 0x02), domainSeparator)\n mstore(add(ptr, 0x22), structHash)\n data := keccak256(ptr, 0x42)\n }\n }\n\n /**\n * @dev Returns an Ethereum Signed Data with intended validator, created from a\n * `validator` and `data` according to the version 0 of EIP-191.\n *\n * See {recover}.\n */\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19\\x00\", validator, data));\n }\n}\n" + }, + "@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/SignatureChecker.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./ECDSA.sol\";\nimport \"../../interfaces/IERC1271.sol\";\n\n/**\n * @dev Signature verification helper that can be used instead of `ECDSA.recover` to seamlessly support both ECDSA\n * signatures from externally owned accounts (EOAs) as well as ERC1271 signatures from smart contract wallets like\n * Argent and Gnosis Safe.\n *\n * _Available since v4.1._\n */\nlibrary SignatureChecker {\n /**\n * @dev Checks if a signature is valid for a given signer and data hash. If the signer is a smart contract, the\n * signature is validated against that smart contract using ERC1271, otherwise it's validated using `ECDSA.recover`.\n *\n * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus\n * change through time. It could return true at block N and false at block N+1 (or the opposite).\n */\n function isValidSignatureNow(address signer, bytes32 hash, bytes memory signature) internal view returns (bool) {\n (address recovered, ECDSA.RecoverError error) = ECDSA.tryRecover(hash, signature);\n return\n (error == ECDSA.RecoverError.NoError && recovered == signer) ||\n isValidERC1271SignatureNow(signer, hash, signature);\n }\n\n /**\n * @dev Checks if a signature is valid for a given signer and data hash. The signature is validated\n * against the signer smart contract using ERC1271.\n *\n * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus\n * change through time. It could return true at block N and false at block N+1 (or the opposite).\n */\n function isValidERC1271SignatureNow(\n address signer,\n bytes32 hash,\n bytes memory signature\n ) internal view returns (bool) {\n (bool success, bytes memory result) = signer.staticcall(\n abi.encodeWithSelector(IERC1271.isValidSignature.selector, hash, signature)\n );\n return (success &&\n result.length >= 32 &&\n abi.decode(result, (bytes32)) == bytes32(IERC1271.isValidSignature.selector));\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/ERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n *\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\n */\nabstract contract ERC165 is IERC165 {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/math/Math.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n enum Rounding {\n Down, // Toward negative infinity\n Up, // Toward infinity\n Zero // Toward zero\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n }\n\n /**\n * @dev Returns the ceiling of the division of two numbers.\n *\n * This differs from standard division with `/` in that it rounds up instead\n * of rounding down.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b - 1) / b can overflow on addition, so we distribute.\n return a == 0 ? 0 : (a - 1) / b + 1;\n }\n\n /**\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\n * with further edits by Uniswap Labs also under MIT license.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\n unchecked {\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n // variables such that product = prod1 * 2^256 + prod0.\n uint256 prod0; // Least significant 256 bits of the product\n uint256 prod1; // Most significant 256 bits of the product\n assembly {\n let mm := mulmod(x, y, not(0))\n prod0 := mul(x, y)\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n }\n\n // Handle non-overflow cases, 256 by 256 division.\n if (prod1 == 0) {\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\n // The surrounding unchecked block does not change this fact.\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\n return prod0 / denominator;\n }\n\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\n require(denominator > prod1, \"Math: mulDiv overflow\");\n\n ///////////////////////////////////////////////\n // 512 by 256 division.\n ///////////////////////////////////////////////\n\n // Make division exact by subtracting the remainder from [prod1 prod0].\n uint256 remainder;\n assembly {\n // Compute remainder using mulmod.\n remainder := mulmod(x, y, denominator)\n\n // Subtract 256 bit number from 512 bit number.\n prod1 := sub(prod1, gt(remainder, prod0))\n prod0 := sub(prod0, remainder)\n }\n\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\n // See https://cs.stackexchange.com/q/138556/92363.\n\n // Does not overflow because the denominator cannot be zero at this stage in the function.\n uint256 twos = denominator & (~denominator + 1);\n assembly {\n // Divide denominator by twos.\n denominator := div(denominator, twos)\n\n // Divide [prod1 prod0] by twos.\n prod0 := div(prod0, twos)\n\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\n twos := add(div(sub(0, twos), twos), 1)\n }\n\n // Shift in bits from prod1 into prod0.\n prod0 |= prod1 * twos;\n\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\n // four bits. That is, denominator * inv = 1 mod 2^4.\n uint256 inverse = (3 * denominator) ^ 2;\n\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\n // in modular arithmetic, doubling the correct bits in each step.\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\n\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\n // is no longer required.\n result = prod0 * inverse;\n return result;\n }\n }\n\n /**\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\n uint256 result = mulDiv(x, y, denominator);\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\n result += 1;\n }\n return result;\n }\n\n /**\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 128;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 64;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 32;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 16;\n }\n if (value >> 8 > 0) {\n value >>= 8;\n result += 8;\n }\n if (value >> 4 > 0) {\n value >>= 4;\n result += 4;\n }\n if (value >> 2 > 0) {\n value >>= 2;\n result += 2;\n }\n if (value >> 1 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log2(value);\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >= 10 ** 64) {\n value /= 10 ** 64;\n result += 64;\n }\n if (value >= 10 ** 32) {\n value /= 10 ** 32;\n result += 32;\n }\n if (value >= 10 ** 16) {\n value /= 10 ** 16;\n result += 16;\n }\n if (value >= 10 ** 8) {\n value /= 10 ** 8;\n result += 8;\n }\n if (value >= 10 ** 4) {\n value /= 10 ** 4;\n result += 4;\n }\n if (value >= 10 ** 2) {\n value /= 10 ** 2;\n result += 2;\n }\n if (value >= 10 ** 1) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log10(value);\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256, rounded down, of a positive value.\n * Returns 0 if given 0.\n *\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n */\n function log256(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 16;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 8;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 4;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 2;\n }\n if (value >> 8 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log256(value);\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/math/SignedMath.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMath {\n /**\n * @dev Returns the largest of two signed numbers.\n */\n function max(int256 a, int256 b) internal pure returns (int256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two signed numbers.\n */\n function min(int256 a, int256 b) internal pure returns (int256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two signed numbers without overflow.\n * The result is rounded towards zero.\n */\n function average(int256 a, int256 b) internal pure returns (int256) {\n // Formula from the book \"Hacker's Delight\"\n int256 x = (a & b) + ((a ^ b) >> 1);\n return x + (int256(uint256(x) >> 255) & (a ^ b));\n }\n\n /**\n * @dev Returns the absolute unsigned value of a signed value.\n */\n function abs(int256 n) internal pure returns (uint256) {\n unchecked {\n // must be unchecked in order to support `n = type(int256).min`\n return uint256(n >= 0 ? n : -n);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./math/Math.sol\";\nimport \"./math/SignedMath.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant _SYMBOLS = \"0123456789abcdef\";\n uint8 private constant _ADDRESS_LENGTH = 20;\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n unchecked {\n uint256 length = Math.log10(value) + 1;\n string memory buffer = new string(length);\n uint256 ptr;\n /// @solidity memory-safe-assembly\n assembly {\n ptr := add(buffer, add(32, length))\n }\n while (true) {\n ptr--;\n /// @solidity memory-safe-assembly\n assembly {\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\n }\n value /= 10;\n if (value == 0) break;\n }\n return buffer;\n }\n }\n\n /**\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\n */\n function toString(int256 value) internal pure returns (string memory) {\n return string(abi.encodePacked(value < 0 ? \"-\" : \"\", toString(SignedMath.abs(value))));\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n unchecked {\n return toHexString(value, Math.log256(value) + 1);\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = _SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\n }\n\n /**\n * @dev Returns true if the two strings are equal.\n */\n function equal(string memory a, string memory b) internal pure returns (bool) {\n return keccak256(bytes(a)) == keccak256(bytes(b));\n }\n}\n" + }, + "clones-with-immutable-args/src/Clone.sol": { + "content": "// SPDX-License-Identifier: BSD\npragma solidity ^0.8.4;\n\n/// @title Clone\n/// @author zefram.eth\n/// @notice Provides helper functions for reading immutable args from calldata\ncontract Clone {\n /// @notice Reads an immutable arg with type address\n /// @param argOffset The offset of the arg in the packed data\n /// @return arg The arg value\n function _getArgAddress(uint256 argOffset)\n internal\n pure\n returns (address arg)\n {\n uint256 offset = _getImmutableArgsOffset();\n // solhint-disable-next-line no-inline-assembly\n assembly {\n arg := shr(0x60, calldataload(add(offset, argOffset)))\n }\n }\n\n /// @notice Reads an immutable arg with type uint256\n /// @param argOffset The offset of the arg in the packed data\n /// @return arg The arg value\n function _getArgUint256(uint256 argOffset)\n internal\n pure\n returns (uint256 arg)\n {\n uint256 offset = _getImmutableArgsOffset();\n // solhint-disable-next-line no-inline-assembly\n assembly {\n arg := calldataload(add(offset, argOffset))\n }\n }\n\n /// @notice Reads a uint256 array stored in the immutable args.\n /// @param argOffset The offset of the arg in the packed data\n /// @param arrLen Number of elements in the array\n /// @return arr The array\n function _getArgUint256Array(uint256 argOffset, uint64 arrLen)\n internal\n pure\n returns (uint256[] memory arr)\n {\n uint256 offset = _getImmutableArgsOffset();\n uint256 el;\n arr = new uint256[](arrLen);\n for (uint64 i = 0; i < arrLen; i++) {\n // solhint-disable-next-line no-inline-assembly\n assembly {\n el := calldataload(add(add(offset, argOffset), mul(i, 32)))\n }\n arr[i] = el;\n }\n return arr;\n }\n\n /// @notice Reads an immutable arg with type uint64\n /// @param argOffset The offset of the arg in the packed data\n /// @return arg The arg value\n function _getArgUint64(uint256 argOffset)\n internal\n pure\n returns (uint64 arg)\n {\n uint256 offset = _getImmutableArgsOffset();\n // solhint-disable-next-line no-inline-assembly\n assembly {\n arg := shr(0xc0, calldataload(add(offset, argOffset)))\n }\n }\n\n /// @notice Reads an immutable arg with type uint8\n /// @param argOffset The offset of the arg in the packed data\n /// @return arg The arg value\n function _getArgUint8(uint256 argOffset) internal pure returns (uint8 arg) {\n uint256 offset = _getImmutableArgsOffset();\n // solhint-disable-next-line no-inline-assembly\n assembly {\n arg := shr(0xf8, calldataload(add(offset, argOffset)))\n }\n }\n\n /// @return offset The offset of the packed immutable args in calldata\n function _getImmutableArgsOffset() internal pure returns (uint256 offset) {\n // solhint-disable-next-line no-inline-assembly\n assembly {\n offset := sub(\n calldatasize(),\n add(shr(240, calldataload(sub(calldatasize(), 2))), 2)\n )\n }\n }\n}\n" + }, + "clones-with-immutable-args/src/ClonesWithImmutableArgs.sol": { + "content": "// SPDX-License-Identifier: BSD\n\npragma solidity ^0.8.4;\n\n/// @title ClonesWithImmutableArgs\n/// @author wighawag, zefram.eth, nick.eth\n/// @notice Enables creating clone contracts with immutable args\nlibrary ClonesWithImmutableArgs {\n /// @dev The CREATE3 proxy bytecode.\n uint256 private constant _CREATE3_PROXY_BYTECODE =\n 0x67363d3d37363d34f03d5260086018f3;\n\n /// @dev Hash of the `_CREATE3_PROXY_BYTECODE`.\n /// Equivalent to `keccak256(abi.encodePacked(hex\"67363d3d37363d34f03d5260086018f3\"))`.\n bytes32 private constant _CREATE3_PROXY_BYTECODE_HASH =\n 0x21c35dbe1b344a2488cf3321d6ce542f8e9f305544ff09e4993a62319a497c1f;\n\n error CreateFail();\n error InitializeFail();\n\n enum CloneType {\n CREATE,\n CREATE2,\n PREDICT_CREATE2\n }\n\n /// @notice Creates a clone proxy of the implementation contract, with immutable args\n /// @dev data cannot exceed 65535 bytes, since 2 bytes are used to store the data length\n /// @param implementation The implementation contract to clone\n /// @param data Encoded immutable args\n /// @return instance The address of the created clone\n function clone(address implementation, bytes memory data)\n internal\n returns (address payable instance)\n {\n bytes memory creationcode = getCreationBytecode(implementation, data);\n // solhint-disable-next-line no-inline-assembly\n assembly {\n instance := create(0, add(creationcode, 0x20), mload(creationcode))\n }\n if (instance == address(0)) {\n revert CreateFail();\n }\n }\n\n /// @notice Creates a clone proxy of the implementation contract, with immutable args,\n /// using CREATE2\n /// @dev data cannot exceed 65535 bytes, since 2 bytes are used to store the data length\n /// @param implementation The implementation contract to clone\n /// @param data Encoded immutable args\n /// @return instance The address of the created clone\n function clone2(address implementation, bytes memory data)\n internal\n returns (address payable instance)\n {\n bytes memory creationcode = getCreationBytecode(implementation, data);\n // solhint-disable-next-line no-inline-assembly\n assembly {\n instance := create2(0, add(creationcode, 0x20), mload(creationcode), 0)\n }\n if (instance == address(0)) {\n revert CreateFail();\n }\n }\n\n /// @notice Computes the address of a clone created using CREATE2\n /// @dev data cannot exceed 65535 bytes, since 2 bytes are used to store the data length\n /// @param implementation The implementation contract to clone\n /// @param data Encoded immutable args\n /// @return instance The address of the clone\n function addressOfClone2(address implementation, bytes memory data)\n internal\n view\n returns (address payable instance)\n {\n bytes memory creationcode = getCreationBytecode(implementation, data);\n bytes32 bytecodeHash = keccak256(creationcode);\n instance = payable(address(uint160(uint(keccak256(abi.encodePacked(\n bytes1(0xff),\n address(this),\n bytes32(0),\n bytecodeHash\n ))))));\n }\n\n /// @notice Computes bytecode for a clone\n /// @dev data cannot exceed 65535 bytes, since 2 bytes are used to store the data length\n /// @param implementation The implementation contract to clone\n /// @param data Encoded immutable args\n /// @return ret Creation bytecode for the clone contract\n function getCreationBytecode(address implementation, bytes memory data) internal pure returns (bytes memory ret) {\n // unrealistic for memory ptr or data length to exceed 256 bits\n unchecked {\n uint256 extraLength = data.length + 2; // +2 bytes for telling how much data there is appended to the call\n uint256 creationSize = 0x41 + extraLength;\n uint256 runSize = creationSize - 10;\n uint256 dataPtr;\n uint256 ptr;\n\n // solhint-disable-next-line no-inline-assembly\n assembly {\n ret := mload(0x40)\n mstore(ret, creationSize)\n mstore(0x40, add(ret, creationSize))\n ptr := add(ret, 0x20)\n\n // -------------------------------------------------------------------------------------------------------------\n // CREATION (10 bytes)\n // -------------------------------------------------------------------------------------------------------------\n\n // 61 runtime | PUSH2 runtime (r) | r | –\n mstore(\n ptr,\n 0x6100000000000000000000000000000000000000000000000000000000000000\n )\n mstore(add(ptr, 0x01), shl(240, runSize)) // size of the contract running bytecode (16 bits)\n\n // creation size = 0a\n // 3d | RETURNDATASIZE | 0 r | –\n // 81 | DUP2 | r 0 r | –\n // 60 creation | PUSH1 creation (c) | c r 0 r | –\n // 3d | RETURNDATASIZE | 0 c r 0 r | –\n // 39 | CODECOPY | 0 r | [0-runSize): runtime code\n // f3 | RETURN | | [0-runSize): runtime code\n\n // -------------------------------------------------------------------------------------------------------------\n // RUNTIME (55 bytes + extraLength)\n // -------------------------------------------------------------------------------------------------------------\n\n // 3d | RETURNDATASIZE | 0 | –\n // 3d | RETURNDATASIZE | 0 0 | –\n // 3d | RETURNDATASIZE | 0 0 0 | –\n // 3d | RETURNDATASIZE | 0 0 0 0 | –\n // 36 | CALLDATASIZE | cds 0 0 0 0 | –\n // 3d | RETURNDATASIZE | 0 cds 0 0 0 0 | –\n // 3d | RETURNDATASIZE | 0 0 cds 0 0 0 0 | –\n // 37 | CALLDATACOPY | 0 0 0 0 | [0, cds) = calldata\n // 61 | PUSH2 extra | extra 0 0 0 0 | [0, cds) = calldata\n mstore(\n add(ptr, 0x03),\n 0x3d81600a3d39f33d3d3d3d363d3d376100000000000000000000000000000000\n )\n mstore(add(ptr, 0x13), shl(240, extraLength))\n\n // 60 0x37 | PUSH1 0x37 | 0x37 extra 0 0 0 0 | [0, cds) = calldata // 0x37 (55) is runtime size - data\n // 36 | CALLDATASIZE | cds 0x37 extra 0 0 0 0 | [0, cds) = calldata\n // 39 | CODECOPY | 0 0 0 0 | [0, cds) = calldata, [cds, cds+extra) = extraData\n // 36 | CALLDATASIZE | cds 0 0 0 0 | [0, cds) = calldata, [cds, cds+extra) = extraData\n // 61 extra | PUSH2 extra | extra cds 0 0 0 0 | [0, cds) = calldata, [cds, cds+extra) = extraData\n mstore(\n add(ptr, 0x15),\n 0x6037363936610000000000000000000000000000000000000000000000000000\n )\n mstore(add(ptr, 0x1b), shl(240, extraLength))\n\n // 01 | ADD | cds+extra 0 0 0 0 | [0, cds) = calldata, [cds, cds+extra) = extraData\n // 3d | RETURNDATASIZE | 0 cds+extra 0 0 0 0 | [0, cds) = calldata, [cds, cds+extra) = extraData\n // 73 addr | PUSH20 0x123… | addr 0 cds+extra 0 0 0 0 | [0, cds) = calldata, [cds, cds+extra) = extraData\n mstore(\n add(ptr, 0x1d),\n 0x013d730000000000000000000000000000000000000000000000000000000000\n )\n mstore(add(ptr, 0x20), shl(0x60, implementation))\n\n // 5a | GAS | gas addr 0 cds+extra 0 0 0 0 | [0, cds) = calldata, [cds, cds+extra) = extraData\n // f4 | DELEGATECALL | success 0 0 | [0, cds) = calldata, [cds, cds+extra) = extraData\n // 3d | RETURNDATASIZE | rds success 0 0 | [0, cds) = calldata, [cds, cds+extra) = extraData\n // 3d | RETURNDATASIZE | rds rds success 0 0 | [0, cds) = calldata, [cds, cds+extra) = extraData\n // 93 | SWAP4 | 0 rds success 0 rds | [0, cds) = calldata, [cds, cds+extra) = extraData\n // 80 | DUP1 | 0 0 rds success 0 rds | [0, cds) = calldata, [cds, cds+extra) = extraData\n // 3e | RETURNDATACOPY | success 0 rds | [0, rds) = return data (there might be some irrelevant leftovers in memory [rds, cds+0x37) when rds < cds+0x37)\n // 60 0x35 | PUSH1 0x35 | 0x35 sucess 0 rds | [0, rds) = return data\n // 57 | JUMPI | 0 rds | [0, rds) = return data\n // fd | REVERT | – | [0, rds) = return data\n // 5b | JUMPDEST | 0 rds | [0, rds) = return data\n // f3 | RETURN | – | [0, rds) = return data\n mstore(\n add(ptr, 0x34),\n 0x5af43d3d93803e603557fd5bf300000000000000000000000000000000000000\n )\n }\n\n // -------------------------------------------------------------------------------------------------------------\n // APPENDED DATA (Accessible from extcodecopy)\n // (but also send as appended data to the delegatecall)\n // -------------------------------------------------------------------------------------------------------------\n\n extraLength -= 2;\n uint256 counter = extraLength;\n uint256 copyPtr = ptr + 0x41;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n dataPtr := add(data, 32)\n }\n for (; counter >= 32; counter -= 32) {\n // solhint-disable-next-line no-inline-assembly\n assembly {\n mstore(copyPtr, mload(dataPtr))\n }\n\n copyPtr += 32;\n dataPtr += 32;\n }\n uint256 mask = ~(256**(32 - counter) - 1);\n // solhint-disable-next-line no-inline-assembly\n assembly {\n mstore(copyPtr, and(mload(dataPtr), mask))\n }\n copyPtr += counter;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n mstore(copyPtr, shl(240, extraLength))\n }\n }\n }\n\n /// @notice Creates a clone proxy of the implementation contract, with immutable args. Uses CREATE3\n /// to implement deterministic deployment.\n /// @dev data cannot exceed 65535 bytes, since 2 bytes are used to store the data length\n /// @param implementation The implementation contract to clone\n /// @param data Encoded immutable args\n /// @return deployed The address of the created clone\n function clone3(\n address implementation,\n bytes memory data,\n bytes32 salt\n ) internal returns (address deployed) {\n // unrealistic for memory ptr or data length to exceed 256 bits\n unchecked {\n uint256 extraLength = data.length + 2; // +2 bytes for telling how much data there is appended to the call\n uint256 creationSize = 0x43 + extraLength;\n uint256 ptr;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n ptr := mload(0x40)\n\n // -------------------------------------------------------------------------------------------------------------\n // CREATION (11 bytes)\n // -------------------------------------------------------------------------------------------------------------\n\n // 3d | RETURNDATASIZE | 0 | –\n // 61 runtime | PUSH2 runtime (r) | r 0 | –\n mstore(\n ptr,\n 0x3d61000000000000000000000000000000000000000000000000000000000000\n )\n mstore(add(ptr, 0x02), shl(240, sub(creationSize, 11))) // size of the contract running bytecode (16 bits)\n\n // creation size = 0b\n // 80 | DUP1 | r r 0 | –\n // 60 creation | PUSH1 creation (c) | c r r 0 | –\n // 3d | RETURNDATASIZE | 0 c r r 0 | –\n // 39 | CODECOPY | r 0 | [0-2d]: runtime code\n // 81 | DUP2 | 0 c 0 | [0-2d]: runtime code\n // f3 | RETURN | 0 | [0-2d]: runtime code\n mstore(\n add(ptr, 0x04),\n 0x80600b3d3981f300000000000000000000000000000000000000000000000000\n )\n\n // -------------------------------------------------------------------------------------------------------------\n // RUNTIME\n // -------------------------------------------------------------------------------------------------------------\n\n // 36 | CALLDATASIZE | cds | –\n // 3d | RETURNDATASIZE | 0 cds | –\n // 3d | RETURNDATASIZE | 0 0 cds | –\n // 37 | CALLDATACOPY | – | [0, cds] = calldata\n // 61 | PUSH2 extra | extra | [0, cds] = calldata\n mstore(\n add(ptr, 0x0b),\n 0x363d3d3761000000000000000000000000000000000000000000000000000000\n )\n mstore(add(ptr, 0x10), shl(240, extraLength))\n\n // 60 0x38 | PUSH1 0x38 | 0x38 extra | [0, cds] = calldata // 0x38 (56) is runtime size - data\n // 36 | CALLDATASIZE | cds 0x38 extra | [0, cds] = calldata\n // 39 | CODECOPY | _ | [0, cds] = calldata\n // 3d | RETURNDATASIZE | 0 | [0, cds] = calldata\n // 3d | RETURNDATASIZE | 0 0 | [0, cds] = calldata\n // 3d | RETURNDATASIZE | 0 0 0 | [0, cds] = calldata\n // 36 | CALLDATASIZE | cds 0 0 0 | [0, cds] = calldata\n // 61 extra | PUSH2 extra | extra cds 0 0 0 | [0, cds] = calldata\n mstore(\n add(ptr, 0x12),\n 0x603836393d3d3d36610000000000000000000000000000000000000000000000\n )\n mstore(add(ptr, 0x1b), shl(240, extraLength))\n\n // 01 | ADD | cds+extra 0 0 0 | [0, cds] = calldata\n // 3d | RETURNDATASIZE | 0 cds 0 0 0 | [0, cds] = calldata\n // 73 addr | PUSH20 0x123… | addr 0 cds 0 0 0 | [0, cds] = calldata\n mstore(\n add(ptr, 0x1d),\n 0x013d730000000000000000000000000000000000000000000000000000000000\n )\n mstore(add(ptr, 0x20), shl(0x60, implementation))\n\n // 5a | GAS | gas addr 0 cds 0 0 0 | [0, cds] = calldata\n // f4 | DELEGATECALL | success 0 | [0, cds] = calldata\n // 3d | RETURNDATASIZE | rds success 0 | [0, cds] = calldata\n // 82 | DUP3 | 0 rds success 0 | [0, cds] = calldata\n // 80 | DUP1 | 0 0 rds success 0 | [0, cds] = calldata\n // 3e | RETURNDATACOPY | success 0 | [0, rds] = return data (there might be some irrelevant leftovers in memory [rds, cds] when rds < cds)\n // 90 | SWAP1 | 0 success | [0, rds] = return data\n // 3d | RETURNDATASIZE | rds 0 success | [0, rds] = return data\n // 91 | SWAP2 | success 0 rds | [0, rds] = return data\n // 60 0x36 | PUSH1 0x36 | 0x36 sucess 0 rds | [0, rds] = return data\n // 57 | JUMPI | 0 rds | [0, rds] = return data\n // fd | REVERT | – | [0, rds] = return data\n // 5b | JUMPDEST | 0 rds | [0, rds] = return data\n // f3 | RETURN | – | [0, rds] = return data\n\n mstore(\n add(ptr, 0x34),\n 0x5af43d82803e903d91603657fd5bf30000000000000000000000000000000000\n )\n }\n\n // -------------------------------------------------------------------------------------------------------------\n // APPENDED DATA (Accessible from extcodecopy)\n // (but also send as appended data to the delegatecall)\n // -------------------------------------------------------------------------------------------------------------\n\n extraLength -= 2;\n uint256 counter = extraLength;\n uint256 copyPtr = ptr + 0x43;\n uint256 dataPtr;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n dataPtr := add(data, 32)\n }\n for (; counter >= 32; counter -= 32) {\n // solhint-disable-next-line no-inline-assembly\n assembly {\n mstore(copyPtr, mload(dataPtr))\n }\n\n copyPtr += 32;\n dataPtr += 32;\n }\n uint256 mask = ~(256**(32 - counter) - 1);\n // solhint-disable-next-line no-inline-assembly\n assembly {\n mstore(copyPtr, and(mload(dataPtr), mask))\n }\n copyPtr += counter;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n mstore(copyPtr, shl(240, extraLength))\n }\n\n /// @solidity memory-safe-assembly\n // solhint-disable-next-line no-inline-assembly\n assembly {\n // Store the `_PROXY_BYTECODE` into scratch space.\n mstore(0x00, _CREATE3_PROXY_BYTECODE)\n // Deploy a new contract with our pre-made bytecode via CREATE2.\n let proxy := create2(0, 0x10, 0x10, salt)\n\n // If the result of `create2` is the zero address, revert.\n if iszero(proxy) {\n // Store the function selector of `CreateFail()`.\n mstore(0x00, 0xebfef188)\n // Revert with (offset, size).\n revert(0x1c, 0x04)\n }\n\n // Store the proxy's address.\n mstore(0x14, proxy)\n // 0xd6 = 0xc0 (short RLP prefix) + 0x16 (length of: 0x94 ++ proxy ++ 0x01).\n // 0x94 = 0x80 + 0x14 (0x14 = the length of an address, 20 bytes, in hex).\n mstore(0x00, 0xd694)\n // Nonce of the proxy contract (1).\n mstore8(0x34, 0x01)\n\n deployed := keccak256(0x1e, 0x17)\n\n // If the `call` fails or the code size of `deployed` is zero, revert.\n // The second argument of the or() call is evaluated first, which is important\n // here because extcodesize(deployed) is only non-zero after the call() to the proxy\n // is made and the contract is successfully deployed.\n if or(\n iszero(extcodesize(deployed)),\n iszero(\n call(\n gas(), // Gas remaining.\n proxy, // Proxy's address.\n 0, // Ether value.\n ptr, // Pointer to the creation code\n creationSize, // Size of the creation code\n 0x00, // Offset of output.\n 0x00 // Length of output.\n )\n )\n ) {\n // Store the function selector of `InitializeFail()`.\n mstore(0x00, 0x8f86d2f1)\n // Revert with (offset, size).\n revert(0x1c, 0x04)\n }\n }\n }\n }\n\n /// @notice Returns the CREATE3 deterministic address of the contract deployed via cloneDeterministic().\n /// @dev Forked from https://github.com/Vectorized/solady/blob/main/src/utils/CREATE3.sol\n /// @param salt The salt used by the CREATE3 deployment\n function addressOfClone3(bytes32 salt)\n internal\n view\n returns (address deployed)\n {\n /// @solidity memory-safe-assembly\n // solhint-disable-next-line no-inline-assembly\n assembly {\n // Cache the free memory pointer.\n let m := mload(0x40)\n // Store `address(this)`.\n mstore(0x00, address())\n // Store the prefix.\n mstore8(0x0b, 0xff)\n // Store the salt.\n mstore(0x20, salt)\n // Store the bytecode hash.\n mstore(0x40, _CREATE3_PROXY_BYTECODE_HASH)\n\n // Store the proxy's address.\n mstore(0x14, keccak256(0x0b, 0x55))\n // Restore the free memory pointer.\n mstore(0x40, m)\n // 0xd6 = 0xc0 (short RLP prefix) + 0x16 (length of: 0x94 ++ proxy ++ 0x01).\n // 0x94 = 0x80 + 0x14 (0x14 = the length of an address, 20 bytes, in hex).\n mstore(0x00, 0xd694)\n // Nonce of the proxy contract (1).\n mstore8(0x34, 0x01)\n\n deployed := keccak256(0x1e, 0x17)\n }\n }\n}\n" + }, + "contracts/deps.sol": { + "content": "import \"@ensdomains/ens-contracts/contracts/registry/ENSRegistry.sol\";\nimport \"@ensdomains/ens-contracts/contracts/wrapper/NameWrapper.sol\";\nimport \"@ensdomains/ens-contracts/contracts/ethregistrar/BaseRegistrarImplementation.sol\";\nimport \"@ensdomains/ens-contracts/contracts/wrapper/StaticMetadataService.sol\";\nimport \"@ensdomains/l1-verifier/contracts/L1Verifier.sol\";\nimport {ReverseRegistrar} from \"@ensdomains/ens-contracts/contracts/reverseRegistrar/ReverseRegistrar.sol\";\nimport {PublicResolver} from \"@ensdomains/ens-contracts/contracts/resolvers/PublicResolver.sol\";\nimport {DelegatableResolverFactory} from \"@ensdomains/ens-contracts/contracts/resolvers/DelegatableResolverFactory.sol\";\nimport {DelegatableResolver} from \"@ensdomains/ens-contracts/contracts/resolvers/DelegatableResolver.sol\";\n// Storage slot\n// ┌────────────────────────────┬──────────────────────────────┬──────────────┬\n// │ contract │ state_variable │ storage_slot │ \n// ├────────────────────────────┼──────────────────────────────┼──────────────┼\n// │ DelegatableResolver │ recordVersions │ 0 │\n// │ DelegatableResolver │ versionable_abis │ 1 │\n// │ DelegatableResolver │ versionable_addresses │ 2 │\n// │ DelegatableResolver │ versionable_hashes │ 3 │\n// │ DelegatableResolver │ versionable_zonehashes │ 4 │\n// │ DelegatableResolver │ versionable_records │ 5 │\n// │ DelegatableResolver │ versionable_nameEntriesCount │ 6 │\n// │ DelegatableResolver │ versionable_interfaces │ 7 │\n// │ DelegatableResolver │ versionable_names │ 8 │\n// │ DelegatableResolver │ versionable_pubkeys │ 9 │\n// │ DelegatableResolver │ versionable_texts │ 10 │\n// │ DelegatableResolver │ operators │ 11 │\n// │ DelegatableResolverFactory │ implementation │ 0 │\n" + }, + "contracts/IMetadataResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\ninterface IMetadataResolver {\n /*\n * @notice Get metadata about the CCIP Resolver ENSIP 16 https://docs.ens.domains/ens-improvement-proposals/ensip-16-offchain-metadata\n * @dev This function provides metadata about the CCIP Resolver, including its name, coin type, GraphQL URL, storage type, and encoded information.\n * @param name The domain name in format (dnsEncoded)\n * @return coinType The cointype of the chain the target contract locates such as Optimism, Base, Arb, etc\n * @return graphqlUrl The GraphQL URL used by the resolver\n * @return storageType 0 = EVM, 1 = Non blockchain, 2 = Starknet\n * @return storageLocation The storage identifier. For EVM chains, this is the address of the resolver contract.\n * @return context. An identifier used by l2 graph indexer for Domain schema id (`context-namehash`) allowing multiple resolver contracts to have own namespace.\n *\n */\n function metadata(bytes calldata name) external view returns (\n uint256 coinType,\n string memory graphqlUrl,\n uint8 storageType,\n bytes memory storageLocation,\n bytes memory context\n );\n\n event MetadataChanged(\n bytes name,\n uint256 coinType,\n string graphqlUrl,\n uint8 storageType,\n bytes storageLocation,\n bytes context\n );\n}" + }, + "contracts/ITargetResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\ninterface ITargetResolver{\n function getTarget(\n bytes memory name\n ) external view returns (bytes32 node, address target);\n}\n" + }, + "contracts/L1Resolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\nimport {EVMFetcher} from '@ensdomains/evm-verifier/contracts/EVMFetcher.sol';\nimport {EVMFetchTarget} from '@ensdomains/evm-verifier/contracts/EVMFetchTarget.sol';\nimport {IEVMVerifier} from '@ensdomains/evm-verifier/contracts/IEVMVerifier.sol';\nimport \"@ensdomains/ens-contracts/contracts/registry/ENS.sol\";\nimport {INameWrapper} from \"@ensdomains/ens-contracts/contracts/wrapper/INameWrapper.sol\";\nimport {BytesUtils} from \"@ensdomains/ens-contracts/contracts/dnssec-oracle/BytesUtils.sol\";\nimport {IAddrResolver} from \"@ensdomains/ens-contracts/contracts/resolvers/profiles/IAddrResolver.sol\";\nimport {IAddressResolver} from \"@ensdomains/ens-contracts/contracts/resolvers/profiles/IAddressResolver.sol\";\nimport {ITextResolver} from \"@ensdomains/ens-contracts/contracts/resolvers/profiles/ITextResolver.sol\";\nimport {IContentHashResolver} from \"@ensdomains/ens-contracts/contracts/resolvers/profiles/IContentHashResolver.sol\";\nimport \"@ensdomains/ens-contracts/contracts/resolvers/profiles/IExtendedResolver.sol\";\nimport {ITargetResolver} from './ITargetResolver.sol';\nimport {IMetadataResolver} from './IMetadataResolver.sol';\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\n\ncontract L1Resolver is EVMFetchTarget, ITargetResolver, IMetadataResolver, IExtendedResolver, ERC165 {\n using EVMFetcher for EVMFetcher.EVMFetchRequest;\n using BytesUtils for bytes;\n IEVMVerifier public immutable verifier;\n ENS public immutable ens;\n INameWrapper public immutable nameWrapper;\n mapping(bytes32 => address) targets;\n uint256 constant COIN_TYPE_ETH = 60;\n uint256 constant RECORD_VERSIONS_SLOT = 0;\n uint256 constant VERSIONABLE_ADDRESSES_SLOT = 2;\n uint256 constant VERSIONABLE_HASHES_SLOT = 3;\n uint256 constant VERSIONABLE_TEXTS_SLOT = 10;\n string public graphqlUrl;\n uint256 public l2ResolverCoinType;\n\n event TargetSet(bytes name, address target);\n function isAuthorised(bytes32 node) internal view returns (bool) {\n // TODO: Add support for\n // trustedETHController\n // trustedReverseRegistrar\n // isApprovedForAll\n // isApprovedFor\n address owner = ens.owner(node);\n if (owner == address(nameWrapper)) {\n owner = nameWrapper.ownerOf(uint256(node));\n }\n return owner == msg.sender;\n }\n\n /**\n * @param _verifier The chain verifier address\n * @param _ens The ENS registry address\n * @param _nameWrapper The ENS name wrapper address\n * @param _graphqlUrl The offchain/l2 graphql endpoint url\n * @param _l2ResolverCoinType The chainId at which the resolver resolves data from. 0 if storageLocation is offChain\n */\n constructor(\n IEVMVerifier _verifier,\n ENS _ens,\n INameWrapper _nameWrapper,\n string memory _graphqlUrl,\n uint256 _l2ResolverCoinType\n ){\n require(address(_nameWrapper) != address(0), \"Name Wrapper address must be set\");\n require(address(_verifier) != address(0), \"Verifier address must be set\");\n require(address(_ens) != address(0), \"Registry address must be set\");\n verifier = _verifier;\n ens = _ens;\n nameWrapper = _nameWrapper;\n graphqlUrl = _graphqlUrl;\n l2ResolverCoinType = _l2ResolverCoinType;\n }\n\n /**\n * Set target address to verify aagainst\n * @param name The encoded name to query.\n * @param target The L2 resolver address to verify against.\n */\n function setTarget(bytes calldata name, address target) public {\n (bytes32 node,) = getTarget(name);\n require(isAuthorised(node));\n targets[node] = target;\n emit TargetSet(name, target);\n (\n ,,\n uint8 storageType,\n bytes memory storageLocation,\n bytes memory context\n ) = metadata(name);\n emit MetadataChanged(\n name,\n l2ResolverCoinType,\n graphqlUrl,\n storageType,\n storageLocation,\n context\n );\n }\n\n /**\n * @dev Returns the L2 target address that can answer queries for `name`.\n * @param name DNS encoded ENS name to query\n * @return node The node of the name\n * @return target The L2 resolver address to verify against.\n */\n function getTarget(\n bytes memory name\n ) public view returns (bytes32 node, address target) {\n return _getTarget(name, 0);\n }\n\n function _getTarget(\n bytes memory name,\n uint256 offset\n ) private view returns (bytes32 node, address target) {\n uint256 len = name.readUint8(offset);\n node = bytes32(0);\n if (len > 0) {\n bytes32 label = name.keccak(offset + 1, len);\n (node, target) = _getTarget(\n name,\n offset + len + 1\n );\n node = keccak256(abi.encodePacked(node, label));\n if(targets[node] != address(0)){\n return (\n node,\n targets[node]\n );\n }\n } else {\n return (\n bytes32(0),\n address(0)\n );\n }\n return (node, target);\n }\n\n /** \n * @dev Resolve and verify a record stored in l2 target address. It supports subname by fetching target recursively to the nearlest parent.\n * @param name DNS encoded ENS name to query\n * @param data The actual calldata\n * @return result result of the call\n */\n function resolve(bytes calldata name, bytes calldata data) external view returns (bytes memory result) {\n (, address target) = _getTarget(name, 0);\n bytes4 selector = bytes4(data);\n\n if (selector == IAddrResolver.addr.selector) {\n (bytes32 node) = abi.decode(data[4:], (bytes32));\n return _addr(node, target);\n }\n if (selector == IAddressResolver.addr.selector) {\n (bytes32 node, uint256 cointype) = abi.decode(data[4:], (bytes32, uint256));\n return _addr(node, cointype, target);\n }\n if (selector == ITextResolver.text.selector) {\n (bytes32 node, string memory key) = abi.decode(data[4:], (bytes32, string));\n return bytes(_text(node, key, target));\n }\n if (selector == IContentHashResolver.contenthash.selector) {\n (bytes32 node) = abi.decode(data[4:], (bytes32));\n return _contenthash(node, target);\n }\n }\n\n function _addr(bytes32 node, address target) private view returns (bytes memory) {\n EVMFetcher.newFetchRequest(verifier, target)\n .getStatic(RECORD_VERSIONS_SLOT)\n .element(node)\n .getDynamic(VERSIONABLE_ADDRESSES_SLOT)\n .ref(0)\n .element(node)\n .element(COIN_TYPE_ETH)\n .fetch(this.addrCallback.selector, ''); // recordVersions\n }\n\n function addrCallback(\n bytes[] memory values,\n bytes memory\n ) public pure returns (bytes memory) {\n return abi.encode(address(bytes20(values[1])));\n }\n\n function _addr(\n bytes32 node,\n uint256 coinType,\n address target\n ) private view returns (bytes memory) {\n EVMFetcher.newFetchRequest(verifier, target)\n .getStatic(RECORD_VERSIONS_SLOT)\n .element(node)\n .getDynamic(VERSIONABLE_ADDRESSES_SLOT)\n .ref(0)\n .element(node)\n .element(coinType)\n .fetch(this.addrCoinTypeCallback.selector, '');\n }\n\n function addrCoinTypeCallback(\n bytes[] memory values,\n bytes memory\n ) public pure returns (bytes memory) {\n return abi.encode(values[1]);\n }\n\n function _text(\n bytes32 node,\n string memory key,\n address target\n ) private view returns (bytes memory) {\n EVMFetcher.newFetchRequest(verifier, target)\n .getStatic(RECORD_VERSIONS_SLOT)\n .element(node)\n .getDynamic(VERSIONABLE_TEXTS_SLOT)\n .ref(0)\n .element(node)\n .element(key)\n .fetch(this.textCallback.selector, '');\n }\n\n function textCallback(\n bytes[] memory values,\n bytes memory\n ) public pure returns (bytes memory) {\n return abi.encode(string(values[1]));\n }\n\n function _contenthash(bytes32 node, address target) private view returns (bytes memory) {\n EVMFetcher.newFetchRequest(verifier, target)\n .getStatic(RECORD_VERSIONS_SLOT)\n .element(node)\n .getDynamic(VERSIONABLE_HASHES_SLOT)\n .ref(0)\n .element(node)\n .fetch(this.contenthashCallback.selector, '');\n }\n\n function contenthashCallback(\n bytes[] memory values,\n bytes memory\n ) public pure returns (bytes memory) {\n return abi.encode(values[1]);\n }\n\n /**\n * @notice Get metadata about the L1 Resolver\n * @dev This function provides metadata about the L1 Resolver, including its name, coin type, GraphQL URL, storage type, and encoded information.\n * @param name The domain name in format (dnsEncoded)\n * @return coinType The cointype of the chain the target contract locates such as Optimism, Base, Arb, etc\n * @return graphqlUrl The GraphQL URL used by the resolver\n * @return storageType Storage Type (0 for EVM)\n * @return storageLocation The storage identifier. For EVM chains, this is the address of the resolver contract.\n * @return context. An identifier used by l2 graph indexer for Domain schema id (`context-namehash`) allowing multiple resolver contracts to have own namespace.\n */\n function metadata(\n bytes calldata name\n ) public view returns (uint256, string memory, uint8, bytes memory, bytes memory) {\n (, address target) = getTarget(name);\n\n return (\n l2ResolverCoinType,\n graphqlUrl,\n uint8(0), // storage Type 0 => EVM\n abi.encodePacked(address(target)), // storage location => l2 resolver address\n abi.encodePacked(address(target)) // context => l2 resolver address\n );\n }\n\n function supportsInterface(\n bytes4 interfaceId\n ) public override view returns (bool) {\n return\n interfaceId == type(IExtendedResolver).interfaceId ||\n interfaceId == type(ITargetResolver).interfaceId ||\n interfaceId == type(IMetadataResolver).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 1200 + }, + "viaIR": true, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates", + "storageLayout" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/crosschain-resolver/hardhat.config.ts b/crosschain-resolver/hardhat.config.ts index 46b941ce..8c59e8a5 100644 --- a/crosschain-resolver/hardhat.config.ts +++ b/crosschain-resolver/hardhat.config.ts @@ -6,8 +6,7 @@ import 'hardhat-deploy-ethers'; const DEPLOYER_PRIVATE_KEY = process.env.DEPLOYER_PRIVATE_KEY ?? "ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"; const L1_PROVIDER_URL = process.env.L1_PROVIDER_URL || ''; const L1_ETHERSCAN_API_KEY = process.env.L1_ETHERSCAN_API_KEY || ''; -const L2_ETHERSCAN_API_KEY = process.env.L2_ETHERSCAN_API_KEY || ''; -console.log({L1_PROVIDER_URL,L1_ETHERSCAN_API_KEY,L2_ETHERSCAN_API_KEY}) +console.log({L1_PROVIDER_URL,L1_ETHERSCAN_API_KEY,DEPLOYER_PRIVATE_KEY}) const config: HardhatUserConfig = { solidity: { version: "0.8.19", @@ -23,60 +22,32 @@ const config: HardhatUserConfig = { ganache: { url: `http://localhost:${parseInt(process.env['RPC_PORT'] || '8545')}`, }, - goerli: { + sepolia: { url: L1_PROVIDER_URL, + chainId: 11155111, accounts: [DEPLOYER_PRIVATE_KEY], deploy: [ "deploy_l1/" ], }, - optimismGoerli: { - url: "https://goerli.optimism.io", - accounts: [DEPLOYER_PRIVATE_KEY], - deploy: [ "deploy_l2/" ], + optimismSepolia: { + url: 'https://sepolia.optimism.io', + chainId: 11155420, + accounts: [DEPLOYER_PRIVATE_KEY] }, - baseGoerli: { - url: "https://goerli.base.org", - accounts: [DEPLOYER_PRIVATE_KEY], - deploy: [ "deploy_l2/" ], + baseSepolia: { + url: 'https://sepolia.base.org', + chainId: 84532, + accounts: [DEPLOYER_PRIVATE_KEY] + }, + arbitrumSepolia: { + url: 'https://sepolia-rollup.arbitrum.io/rpc', + chainId: 421614, + accounts: [DEPLOYER_PRIVATE_KEY] }, - arbitrumGoerli: { - url: "https://goerli-rollup.arbitrum.io/rpc", - accounts: [DEPLOYER_PRIVATE_KEY], - deploy: [ "deploy_l2/" ], - } }, etherscan: { apiKey: { - goerli: L1_ETHERSCAN_API_KEY, - optimismGoerli: L2_ETHERSCAN_API_KEY, - baseGoerli: L2_ETHERSCAN_API_KEY, - arbitrumGoerli: L2_ETHERSCAN_API_KEY, - }, - customChains: [ - { - network: "optimismGoerli", - chainId: 420, - urls: { - apiURL: "https://api-goerli-optimism.etherscan.io/api", - browserURL: "https://goerli-optimism.etherscan.io" - } - }, - { - network: "baseGoerli", - chainId: 84531, - urls: { - browserURL: "https://goerli.basescan.org", - apiURL: "https://api-goerli.basescan.org/api", - } - }, - { - network: "arbitrumGoerli", - chainId: 421613, - urls: { - browserURL: "https://goerli.arbiscan.io", - apiURL: "https://api-goerli.arbiscan.io/api", - } - } - ] + sepolia: L1_ETHERSCAN_API_KEY, + } }, namedAccounts: { 'deployer': 0, diff --git a/crosschain-resolver/package.json b/crosschain-resolver/package.json index 4c6bef94..061f3d45 100644 --- a/crosschain-resolver/package.json +++ b/crosschain-resolver/package.json @@ -7,9 +7,9 @@ "test": "node scripts/test.js", "storage": "hardhat check", "clean": "rm -fr artifacts cache node_modules typechain-types", - "setupl1": "hardhat run scripts/setupl1.ts --network goerli", + "setupl1": "hardhat run scripts/setupl1.ts --network sepolia", "setupl2": "hardhat run scripts/setupl2.ts", - "getaddr": "hardhat run scripts/getaddr.ts --network goerli", + "getaddr": "hardhat run scripts/getaddr.ts --network sepolia", "approve": "hardhat run scripts/approve.ts", "lint": "exit 0" }, diff --git a/crosschain-resolver/scripts/approve.ts b/crosschain-resolver/scripts/approve.ts index a2a0390e..9e5abdae 100644 --- a/crosschain-resolver/scripts/approve.ts +++ b/crosschain-resolver/scripts/approve.ts @@ -25,10 +25,7 @@ export const main = async () => { const l2resolverAddress = await l2FactoryRead.predictAddress(ETH_ADDRESS) console.log(`l2 resolver address for ${ETH_ADDRESS} is ${l2resolverAddress}`) const l2Resolver = (await ethers.getContractFactory('DelegatableResolver', signer)).attach(l2resolverAddress); - const tx2 = await l2Resolver.approve(encodedName, OPERATOR_ADDRESS, true, { - gasPrice: "900000", - gasLimit: 500000, - }); + const tx2 = await l2Resolver.approve(encodedName, OPERATOR_ADDRESS, true); console.log(`Approving ${OPERATOR_ADDRESS} to update ${ENS_SUBNAME}`, (await tx2.wait()).hash) }; diff --git a/crosschain-resolver/scripts/setupl2.ts b/crosschain-resolver/scripts/setupl2.ts index 281dd277..541b7331 100644 --- a/crosschain-resolver/scripts/setupl2.ts +++ b/crosschain-resolver/scripts/setupl2.ts @@ -21,17 +21,13 @@ export const main = async () => { const l2provider = new ethers.JsonRpcProvider(L2_PROVIDER_URL); const l2FactoryRead = new ethers.Contract(L2_RESOLVER_FACTORY_ADDRESS, abi, l2provider); const l2resolverAddress = await l2FactoryRead.predictAddress(ETH_ADDRESS) - const tx1 = await l2Factory.create(ETH_ADDRESS, { - gasPrice: "900000", - gasLimit: 500000, - }) + const tx1 = await l2Factory.create(ETH_ADDRESS) console.log(`4, Creating l2 resolver ${l2resolverAddress} as a target`, (await tx1.wait()).hash) - const l2Resolver = (await ethers.getContractFactory('DelegatableResolver', signer)).attach(l2resolverAddress); - const tx2 = await l2Resolver['setAddr(bytes32,address)'](node, ETH_ADDRESS, { - gasPrice: "900000", - gasLimit: 500000, - }); + const l2Resolver = (await ethers.getContractFactory('DelegatableResolver', signer)).attach(l2resolverAddress); + const tx2 = await l2Resolver['setAddr(bytes32,address)'](node, ETH_ADDRESS); + console.log({node, ETH_ADDRESS, a:l2Resolver.interface.fragments}) console.log(`5, Setting l2 ETH address of ${ENS_NAME} to ${ETH_ADDRESS} as a target`, (await tx2.wait()).hash) + console.log(6, await l2Resolver['addr(bytes32)'](node)) }; main(); \ No newline at end of file diff --git a/crosschain-resolver/test/testResolver.ts b/crosschain-resolver/test/testResolver.ts index fd346984..46428f74 100644 --- a/crosschain-resolver/test/testResolver.ts +++ b/crosschain-resolver/test/testResolver.ts @@ -15,12 +15,12 @@ import { ethers } from 'hardhat'; import { EthereumProvider } from 'hardhat/types'; import request from 'supertest'; import packet from 'dns-packet'; -import {convertEVMChainIdToCoinType} from '@ensdomains/address-encoder' +import { L2ChainID } from '@eth-optimism/sdk'; const labelhash = (label) => ethers.keccak256(ethers.toUtf8Bytes(label)) const encodeName = (name) => '0x' + packet.name.encode(name).toString('hex') const l2graphqlUrl = 'http://graphql' -const l2ResolverCoinType = convertEVMChainIdToCoinType(420) // Optimism Goerli +const chainId = L2ChainID.OPTIMISM_SEPOLIA const name = 'foo.eth' const node = ethers.namehash(name) @@ -30,6 +30,12 @@ const EMPTY_ADDRESS = '0x0000000000000000000000000000000000000000' const EMPTY_BYTES32 = '0x0000000000000000000000000000000000000000000000000000000000000000' +// looks like there are time dependencies for verification to success, hence adding a dalay +const wait = async x => { + return new Promise(resolve => { + setTimeout(resolve, 3000, 2 * x); + }); +}; type ethersObj = typeof ethersT & Omit & { @@ -148,7 +154,7 @@ describe('Crosschain Resolver', () => { signer ); const verifierAddress = await verifier.getAddress() - target = await testL1Factory.deploy(verifierAddress, ensAddress, wrapperAddress, l2graphqlUrl, l2ResolverCoinType); + target = await testL1Factory.deploy(verifierAddress, ensAddress, wrapperAddress, l2graphqlUrl, chainId); // Mine an empty block so we have something to prove against await provider.send('evm_mine', []); @@ -217,7 +223,7 @@ describe('Crosschain Resolver', () => { const result = await l2contract['addr(bytes32)'](node) expect(ethers.getAddress(result)).to.equal(addr); await provider.send("evm_mine", []); - + await wait(1); const i = new ethers.Interface(["function addr(bytes32) returns(address)"]) const calldata = i.encodeFunctionData("addr", [node]) const result2 = await target.resolve(encodedname, calldata, { enableCcipRead: true }) @@ -233,9 +239,9 @@ describe('Crosschain Resolver', () => { const result = await l2contract['addr(bytes32)'](node) expect(ethers.getAddress(result)).to.equal(addr); await provider.send("evm_mine", []); - const i = new ethers.Interface(["function addr(bytes32) returns(address)"]) const calldata = i.encodeFunctionData("addr", [node]) + await wait(1); const result2 = await target.resolve(encodedname, calldata, { enableCcipRead: true }) const decoded = i.decodeFunctionResult("addr", result2) expect(decoded[0]).to.equal(addr); @@ -252,6 +258,7 @@ describe('Crosschain Resolver', () => { const result = await l2contract['addr(bytes32)'](subnode) expect(ethers.getAddress(result)).to.equal(addr); await provider.send("evm_mine", []); + await wait(1); const i = new ethers.Interface(["function addr(bytes32) returns(address)"]) const calldata = i.encodeFunctionData("addr", [subnode]) @@ -261,13 +268,14 @@ describe('Crosschain Resolver', () => { }) it("should resolve non ETH Address", async() => { + await target.setTarget(encodedname, resolverAddress) const addr = '0x76a91462e907b15cbf27d5425399ebf6f0fb50ebb88f1888ac' const coinType = 0 // BTC await l2contract.clearRecords(node) await l2contract['setAddr(bytes32,uint256,bytes)'](node, coinType, addr) await provider.send("evm_mine", []); - + await wait(1); const i = new ethers.Interface(["function addr(bytes32,uint256) returns(bytes)"]) const calldata = i.encodeFunctionData("addr", [node, coinType]) const result2 = await target.resolve(encodedname, calldata, { enableCcipRead: true }) @@ -282,7 +290,7 @@ describe('Crosschain Resolver', () => { await l2contract.clearRecords(node) await l2contract.setText(node, key, value) await provider.send("evm_mine", []); - + await wait(1); const i = new ethers.Interface(["function text(bytes32,string) returns(string)"]) const calldata = i.encodeFunctionData("text", [node, key]) const result2 = await target.resolve(encodedname, calldata, { enableCcipRead: true }) @@ -296,7 +304,7 @@ describe('Crosschain Resolver', () => { await l2contract.clearRecords(node) await l2contract.setContenthash(node, contenthash) await provider.send("evm_mine", []); - + await wait(1); const i = new ethers.Interface(["function contenthash(bytes32) returns(bytes)"]) const calldata = i.encodeFunctionData("contenthash", [node]) const result2 = await target.resolve(encodedname, calldata, { enableCcipRead: true }) @@ -309,31 +317,30 @@ describe('Crosschain Resolver', () => { expect(await target.supportsInterface('0x9061b923')).to.equal(true) // IExtendedResolver expect(await target.supportsInterface('0x8a596ebe')).to.equal(true) // IMetadataResolver expect(await target.supportsInterface('0x01ffc9a7')).to.equal(true) // ERC-165 support + expect(await target.supportsInterface('0xf00eebf4')).to.equal(true) // IAddrSetter support }) + describe('EIP 5559', () => { + it('throws StorageHandledByL2 error', async () => { + await target.setTarget(encodedname, resolverAddress) + await expect(target.setAddr(encodedname, EMPTY_ADDRESS)).to.be + .revertedWithCustomError(target, 'StorageHandledByL2') + .withArgs(chainId, resolverAddress) + }); + }); + describe('Metadata', () => { it('returns metadata', async () => { - await target.setTarget(encodedname, signerAddress) - - const [coinType, graphqlUrl, storageType, storageLocation, context] = await target.metadata(encodedname); - expect(coinType).to.equal(l2ResolverCoinType); - expect(graphqlUrl).to.equal(l2graphqlUrl); - expect(storageType).to.equal(storageType); - expect(ethers.getAddress(storageLocation)).to.equal(signerAddress); - expect(ethers.getAddress(context)).to.equal(signerAddress); + expect(await target.metadata(encodedname)).to.equal(l2graphqlUrl); }); it('emits a MetadataChanged event', async () => { const tx = await target.setTarget(encodedname, signerAddress) await tx.wait() const logs = await target.queryFilter("MetadataChanged") - const [name, coinType, graphqlUrl, storageType, storageLocation, context] = logs[0].args + const [name, graphqlUrl] = logs[0].args expect(name).to.equal(encodedname); - expect(coinType).to.equal(l2ResolverCoinType); expect(graphqlUrl).to.equal(l2graphqlUrl); - expect(storageType).to.equal(storageType); - expect(ethers.getAddress(storageLocation)).to.equal(signerAddress); - expect(ethers.getAddress(context)).to.equal(signerAddress); }); }); }); \ No newline at end of file diff --git a/crosschain-reverse-resolver/.gitignore b/crosschain-reverse-resolver/.gitignore index 3e41ef81..72719819 100644 --- a/crosschain-reverse-resolver/.gitignore +++ b/crosschain-reverse-resolver/.gitignore @@ -8,5 +8,4 @@ typechain-types # Hardhat files cache artifacts -deployments diff --git a/crosschain-reverse-resolver/README.md b/crosschain-reverse-resolver/README.md index 033aabf6..a37cbbfe 100644 --- a/crosschain-reverse-resolver/README.md +++ b/crosschain-reverse-resolver/README.md @@ -5,7 +5,17 @@ A reverse resolver contract that is built on top of evm-verifier. For a detailed readme and usage instructions, see the [monorepo readme](https://github.com/ensdomains/evmgateway/tree/main). -## Deploying (Goerli) +## Deploying (Sepolia) + +Before deploying l1 contracts, deploy l2 contracts on https://github.com/ensdomains/ens-contracts + +``` +git clone https://github.com/ensdomains/ens-contracts +cd ens-contracts +DEPLOYER_KEY=$DEPLOYER_KEY ETHERSCAN_API_KEY=$ETHERSCAN_API_KEY npx hardhat deploy --tags l2 --network optimismSepolia/baseSepolia/arbSepolia +``` + +Once l2 contracts are deployed, create `.env` and set the following variables Create `.env` and set the following variables @@ -16,47 +26,87 @@ Create `.env` and set the following variables - L2_ETHERSCAN_API_KEY - VERIFIER_ADDRESS - REVERSE_NAMESPACE - -NOTE: Use https://github.com/ethereum-optimism/evmgateway-starter#op-gateway-and-op-verifier-deployments for VERIFIER_ADDRESS - -``` -bun run hardhat deploy --network optimismGoerli -``` - -Followed by the L1 contract: - +- L2_REVERSE_REGISTRAR_ADDRESS +- CHAIN_NAME (Op/Base/Arb) ``` -bun run hardhat deploy --network goerli +bun run hardhat deploy --network sepolia ``` After deployment is complete, set the rersolver of $REVERSE_NAMESPACE to L1ReverseResolver contract address ## Deployments +### L1 + +- DefaultReverseResolver = [0xfD2c2598382D8876BcC70f550B22d7F70Dda30b0](https://sepolia.etherscan.io/address/0xfD2c2598382D8876BcC70f550B22d7F70Dda30b0#code +) + ### OP #### L2 -- L2ReverseRegistrar = [0x7D006EFd21eb282C8B0a425BAB546517bfEC2cc2](https://goerli-optimism.etherscan.io/address/0x7D006EFd21eb282C8B0a425BAB546517bfEC2cc2) = REVERSE_NAMESPACE is set to `op.reverse.evmgateway.eth` +- L2ReverseRegistrar = [0x83C058D2139a6eFA32E42BeB415409000C075563](https://sepolia-optimism.etherscan.io/address/0x83C058D2139a6eFA32E42BeB415409000C075563#code +) = REVERSE_NAMESPACE is set to `2158639068.reverse` #### L1 -- L1ReverseResolver = [0xeEB5832Ea8732f7EF06d468E40F562c9D7347795](https://goerli.etherscan.io/address/0xeEB5832Ea8732f7EF06d468E40F562c9D7347795) +- L1ReverseResolver = [0xF7e3a2861FfA833C39544B7bbE9D94f3219E5b70](https://sepolia.etherscan.io/address/0xF7e3a2861FfA833C39544B7bbE9D94f3219E5b70#code) ### Base #### L2 -- L2ReverseRegistrar = [0xDC317ef697b3A9903a24abcC325d9C1C80B19D87](https://goerli.basescan.org/address/0xDC317ef697b3A9903a24abcC325d9C1C80B19D87) = REVERSE_NAMESPACE is set to `base.reverse.evmgateway.eth` +- L2ReverseRegistrar = [0x913CC39C2A6aa4A1531429C079bA5f8DcF6a2FC2](https://sepolia.basescan.org/address/0x913CC39C2A6aa4A1531429C079bA5f8DcF6a2FC2#code) = REVERSE_NAMESPACE is set to `2147568180.reverse` #### L1 -- L1ReverseResolver = [0x3c332a23a6052afE947F47656d1fD0f450F4C237](https://goerli.etherscan.io/address/0x3c332a23a6052afE947F47656d1fD0f450F4C237) +- L1ReverseResolver = [0x302096e94FC120A21053f7563e2Ed554d523ba41](https://sepolia.etherscan.io/address/0x302096e94FC120A21053f7563e2Ed554d523ba41#code +) ### Arbitrum #### L2 -- L2ReverseRegistrar = [0x4166B7e70F14C48980Da362256D1Da9Cc8F95e13](https://goerli.arbiscan.io/address/0x4166B7e70F14C48980Da362256D1Da9Cc8F95e13#code) = REVERSE_NAMESPACE is set to `arb.reverse.evmgateway.eth` +- L2ReverseRegistrar = [0x60a384Cfbb088Aa8c1750A04548b1b983CDc0418](https://sepolia.arbiscan.io/address/0x60a384Cfbb088Aa8c1750A04548b1b983CDc0418#code +) = REVERSE_NAMESPACE is set to `2147905262.reverse` #### L1 -- L1ReverseResolver = [0x2fed4238EfD49d0ECCeEED943BCf4D5C3a299418](Successfully verified contract L1ReverseResolver on the block explorer. -https://goerli.etherscan.io/address/0x2fed4238EfD49d0ECCeEED943BCf4D5C3a299418#code) +- L1ReverseResolver = [0x935510B4270F69c6fa4Fadab75B4EA0A1Fb68349]https://sepolia.etherscan.io/address/0x935510B4270F69c6fa4Fadab75B4EA0A1Fb68349#code) ## Usage +### Set Default Primary name on L1 + +``` +const testSigner = new ethers.Wallet(PRIVATE_KEY); +const testAddress = testSigner.address +const name = 'myname.eth' +const reverseLabel = testAddress.substring(2).toLowerCase() +const l2ReverseName = `${reverseLabel}.${NAMESPACE}.reverse` +const l2ReverseNode = ethers.namehash(l2ReverseName) +const encodedL2ReverseName = encodeName(l2ReverseName) + +const defaultReverseName = `${reverseLabel}.default.reverse` +const defaultReverseNode = ethers.namehash(defaultReverseName) +const encodedDefaultReverseName = encodeName(defaultReverseName) + +const funcId = ethers + .id('setNameForAddrWithSignature(address,string,uint256,bytes)') + .substring(0, 10) + +const block = await provider.getBlock('latest') +const inceptionDate = block?.timestamp +const message = ethers.solidityPackedKeccak256( + ['bytes32', 'address', 'uint256', 'uint256'], + [ethers.solidityPackedKeccak256(['bytes4', 'string'], [funcId, name]), testAddress, inceptionDate, 0], +) +const signature = await testSigner.signMessage(ethers.toBeArray(message)) +await defaultReverseResolver.setNameForAddrWithSignature( + testAddress, + name, + inceptionDate, + signature, +) +``` + +or run the script +``` +DEPLOYER_PRIVATE_KEY=$DEPLOYER_PRIVATE_KEY REVERSE_NAMESPACE=$REVERSE_NAMESPACE L1_PROVIDER_URL=$L1_PROVIDER_URL DEFAULT_REVERSE_RESOLVER_ADDRESS=$DEFAULT_REVERSE_RESOLVER_ADDRESS DEFAULT_ENS_NAME=$DEFAULT_ENS_NAME yarn setdefaultname +``` + + ### Set Primary name on L2 ``` @@ -66,22 +116,23 @@ const registrar = registrar.setName(name) , try it directly from [etherscan](https://goerli.etherscan.io/address/0xeEB5832Ea8732f7EF06d468E40F562c9D7347795), or run the script ``` -DEPLOYER_PRIVATE_KEY=$DEPLOYER_PRIVATE_KEY REVERSE_NAMESPACE=REVERSE_NAMESPACE L2_PROVIDER_URL=$L2_PROVIDER_URL L2_REVERSE_REGISTRAR_ADDRESS=$L2_REVERSE_REGISTRAR_ADDRESS ENS_NAME='foo.op.evmgateway.eth' yarn setname --network optimismGoerli +DEPLOYER_PRIVATE_KEY=$DEPLOYER_PRIVATE_KEY REVERSE_NAMESPACE=$REVERSE_NAMESPACE L2_PROVIDER_URL=$L2_PROVIDER_URL L2_REVERSE_REGISTRAR_ADDRESS=$L2_REVERSE_REGISTRAR_ADDRESS ENS_NAME=$ENS_NAME yarn setname --network optimismSepolia ``` ### Query Primary name on L1 -The current goerli primary namespace is set at `op.reverse.evmgateway.eth` for Optimism Goerli. Once the ENS DAO approves it, it will be put under `${cointype}.ververse` +All primary names are registered under `${ADDRESS}.${cointype}.reverse` namespace. -- 2147484068 is the coin type of Optimism Goerli (420) -- 2147568179 is the coin type of Base Goerli (84531) +- 2158639068 is the coin type of Optimism Sepolia (11155420) +- 2147568180 is the coin type of Base Sepolia (84532) +- 2147905262 is the coin type of Arbitrum Sepolia (421614) ```js import packet from 'dns-packet'; import {ethers} from 'ethers'; const abi = ['function name(bytes32) view returns(string)']; const encodeName = (name) => '0x' + packet.name.encode(name).toString('hex') -const namespace = 'op.reverse.evmgateway.eth' // 2147484068. is the coinType of Optimism Goerli (420) +const namespace = '2158639068.reverse' // 2158639068 is the coinType of Optimism Sepolia (11155420) const name = ETH_ADDRESS.substring(2).toLowerCase() + "." + namespace const encodedname = encodeName(name); const reversenode = ethers.namehash(name); @@ -94,5 +145,5 @@ console.log(await l1resolver.name(reversenode, {enableCcipRead:true})) Using the script ``` -L1_PROVIDER_URL=$L1_PROVIDER_URL L2_REVERSE_REGISTRAR_ADDRESS=$L2_REVERSE_REGISTRAR_ADDRESS ETH_ADDRESS=$ETH_ADDRESS yarn getname +L1_PROVIDER_URL=$L1_PROVIDER_URL REVERSE_NAMESPACE=$REVERSE_NAMESPACE L2_REVERSE_REGISTRAR_ADDRESS=$L2_REVERSE_REGISTRAR_ADDRESS ETH_ADDRESS=$ETH_ADDRESS yarn getname ``` diff --git a/crosschain-reverse-resolver/contracts/DefaultReverseResolver.sol b/crosschain-reverse-resolver/contracts/DefaultReverseResolver.sol new file mode 100644 index 00000000..5f74d862 --- /dev/null +++ b/crosschain-reverse-resolver/contracts/DefaultReverseResolver.sol @@ -0,0 +1,97 @@ +pragma solidity >=0.8.4; + +import "./IDefaultReverseResolver.sol"; +import "@ensdomains/ens-contracts/contracts/reverseRegistrar/SignatureReverseResolver.sol"; +import "@ensdomains/ens-contracts/contracts/wrapper/BytesUtils.sol"; +import "@openzeppelin/contracts/access/Ownable.sol"; +import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; +import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; +import {ITextResolver} from "@ensdomains/ens-contracts/contracts/resolvers/profiles/ITextResolver.sol"; +import {INameResolver} from "@ensdomains/ens-contracts/contracts/resolvers/profiles/INameResolver.sol"; +import "@ensdomains/ens-contracts/contracts/utils/HexUtils.sol"; +import "@ensdomains/ens-contracts/contracts/resolvers/profiles/IExtendedResolver.sol"; + +/** + * A fallback reverser resolver to resolve when L2 reverse resolver has no names set. + * The contract will be set under "default.reverse" namespace + * It can only be set by EOA as contract accounts are chain dependent. + */ +contract DefaultReverseResolver is + Ownable, + IDefaultReverseResolver, + IExtendedResolver, + ERC165, + SignatureReverseResolver +{ + uint256 constant ADDRESS_LENGTH = 40; + using ECDSA for bytes32; + using BytesUtils for bytes; + // The namehash of 'default.reverse' + bytes32 private constant DEFAULT_REVERSE_NODE = + 0x53a2e7cce84726721578c676b4798972d354dd7c62c832415371716693edd312; + + /** + * @dev Constructor + */ + constructor() SignatureReverseResolver(DEFAULT_REVERSE_NODE, 0) {} + + function isAuthorised(address addr) internal view override returns (bool) { + if (addr != msg.sender) { + revert Unauthorised(); + } + } + + /* + * Returns the name associated with an address, for reverse records. + * This function is non ENSIP standard + * @param address The ENS address to query. + * @return The associated name. + */ + function name(address addr) public view returns (string memory) { + bytes32 node = _getNamehash(addr); + return versionable_names[recordVersions[node]][node]; + } + + /* + * Returns the text data associated with an address and key. + * @param address The ENS address to query. + * @param key The text data key to query. + * @return The associated text data. + */ + function text( + address addr, + string memory key + ) public view override returns (string memory) { + bytes32 node = _getNamehash(addr); + return versionable_texts[recordVersions[node]][node][key]; + } + + /* + * @dev Resolve and verify a record stored in l2 target address. It supports fallback to the default resolver + * @param name DNS encoded ENS name to query + * @param data The actual calldata + * @return result result of the call + */ + function resolve(bytes calldata _name, bytes calldata data) external view returns (bytes memory result) { + bytes4 selector = bytes4(data); + (address addr,bool valid) = HexUtils.hexToAddress(_name, 1, ADDRESS_LENGTH + 1); + require(valid, "Invalid address"); + + if (selector == INameResolver.name.selector) { + return bytes(name(addr)); + } + if (selector == ITextResolver.text.selector) { + (,string memory key) = abi.decode(data[4:], (bytes32, string)); + return bytes(text(addr, key)); + } + } + + function supportsInterface( + bytes4 interfaceID + ) public view override(ERC165, SignatureReverseResolver) returns (bool) { + return + interfaceID == type(IDefaultReverseResolver).interfaceId || + interfaceID == type(IExtendedResolver).interfaceId || + super.supportsInterface(interfaceID); + } +} diff --git a/crosschain-reverse-resolver/contracts/IDefaultReverseResolver.sol b/crosschain-reverse-resolver/contracts/IDefaultReverseResolver.sol new file mode 100644 index 00000000..a0b87cf1 --- /dev/null +++ b/crosschain-reverse-resolver/contracts/IDefaultReverseResolver.sol @@ -0,0 +1,10 @@ +pragma solidity >=0.8.4; + +interface IDefaultReverseResolver { + function name(address addr) external view returns (string memory); + + function text( + address addr, + string memory key + ) external view returns (string memory); +} diff --git a/crosschain-reverse-resolver/contracts/L1ReverseResolver.sol b/crosschain-reverse-resolver/contracts/L1ReverseResolver.sol index c5cdf910..92bce82f 100644 --- a/crosschain-reverse-resolver/contracts/L1ReverseResolver.sol +++ b/crosschain-reverse-resolver/contracts/L1ReverseResolver.sol @@ -7,53 +7,73 @@ import {IEVMVerifier} from '@ensdomains/evm-verifier/contracts/IEVMVerifier.sol' import "@ensdomains/ens-contracts/contracts/resolvers/profiles/INameResolver.sol"; import "@ensdomains/ens-contracts/contracts/resolvers/profiles/ITextResolver.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; +import "@ensdomains/ens-contracts/contracts/utils/HexUtils.sol"; +import "@ensdomains/ens-contracts/contracts/resolvers/profiles/IExtendedResolver.sol"; +import "./IDefaultReverseResolver.sol"; -contract L1ReverseResolver is EVMFetchTarget, INameResolver, ITextResolver, ERC165 { +contract L1ReverseResolver is EVMFetchTarget, IExtendedResolver, ERC165 { using EVMFetcher for EVMFetcher.EVMFetchRequest; IEVMVerifier immutable verifier; address immutable target; - uint256 constant RECORD_VERSIONS_SLOT = 1; - uint256 constant VERSIONABLE_TEXTS_SLOT = 3; - uint256 constant VERSIONABLE_NAME_SLOT = 4; + IDefaultReverseResolver immutable defaultReverseResolver; + uint256 constant VERSIONABLE_TEXTS_SLOT = 1; + uint256 constant VERSIONABLE_NAME_SLOT = 2; + uint256 constant RECORD_VERSIONS_SLOT = 3; + uint256 constant ADDRESS_LENGTH = 40; + using HexUtils for bytes; - constructor(IEVMVerifier _verifier, address _target) { + constructor(IEVMVerifier _verifier, address _target, IDefaultReverseResolver _defaultReverseResolver ) { verifier = _verifier; target = _target; + defaultReverseResolver = _defaultReverseResolver; } - /** - * Returns the address associated with an ENS node. - * @param node The ENS node to query. - * @return The associated name. + /** + * @dev Resolve and verify a record stored in l2 target address. It supports fallback to the default resolver + * @param name DNS encoded ENS name to query + * @param data The actual calldata + * @return result result of the call */ - // return versionable_names[recordVersions[node]][node]; - function name(bytes32 node) public view returns (string memory) { + function resolve(bytes calldata name, bytes calldata data) external view returns (bytes memory result) { + bytes4 selector = bytes4(data); + (address addr,) = HexUtils.hexToAddress(name, 1, ADDRESS_LENGTH + 1); + if (selector == INameResolver.name.selector) { + (bytes32 node) = abi.decode(data[4:], (bytes32)); + return bytes(_name(node, addr)); + } + if (selector == ITextResolver.text.selector) { + (bytes32 node, string memory key) = abi.decode(data[4:], (bytes32, string)); + return bytes(_text(node, key, addr)); + } + } + + function _name(bytes32 node, address addr) private view returns (string memory) { EVMFetcher.newFetchRequest(verifier, target) .getStatic(RECORD_VERSIONS_SLOT) .element(node) .getDynamic(VERSIONABLE_NAME_SLOT) .ref(0) .element(node) - .fetch(this.nameCallback.selector, ''); // recordVersions + .fetch(this.nameCallback.selector, abi.encode(addr)); } function nameCallback( bytes[] memory values, - bytes memory - ) public pure returns (string memory) { - return string(values[1]); + bytes memory callbackdata + ) public view returns (string memory) { + if (values[1].length == 0 ) { + (address addr) = abi.decode(callbackdata, (address)); + return defaultReverseResolver.name(addr); + } else { + return string(values[1]); + } } - /** - * Returns the text data associated with an ENS node and key. - * @param node The ENS node to query. - * @param key The text data key to query. - * @return The associated text data. - */ - function text( + function _text( bytes32 node, - string calldata key - ) public view returns (string memory) { + string memory key, + address addr + ) private view returns (string memory) { EVMFetcher.newFetchRequest(verifier, target) .getStatic(RECORD_VERSIONS_SLOT) .element(node) @@ -61,22 +81,26 @@ contract L1ReverseResolver is EVMFetchTarget, INameResolver, ITextResolver, ERC1 .ref(0) .element(node) .element(key) - .fetch(this.textCallback.selector, ''); + .fetch(this.textCallback.selector, abi.encode(addr, key)); } function textCallback( bytes[] memory values, - bytes memory - ) public pure returns (string memory) { - return string(values[1]); + bytes memory callbackdata + ) public view returns (string memory) { + if (values[1].length == 0 ) { + (address addr, string memory key) = abi.decode(callbackdata, (address, string)); + return defaultReverseResolver.text(addr, key); + } else { + return string(values[1]); + } } function supportsInterface( bytes4 interfaceId ) public override view returns (bool) { return - interfaceId == type(ITextResolver).interfaceId || - interfaceId == type(INameResolver).interfaceId || + interfaceId == type(IExtendedResolver).interfaceId || super.supportsInterface(interfaceId); } } diff --git a/crosschain-reverse-resolver/contracts/deps.sol b/crosschain-reverse-resolver/contracts/deps.sol index fc4d9ccf..3e5c7834 100644 --- a/crosschain-reverse-resolver/contracts/deps.sol +++ b/crosschain-reverse-resolver/contracts/deps.sol @@ -1,12 +1,11 @@ import {L1Verifier} from '@ensdomains/l1-verifier/contracts/L1Verifier.sol'; -import '@ensdomains/ens-contracts/contracts/reverseRegistrar/L2ReverseRegistrar.sol'; - +import '@ensdomains/ens-contracts/contracts/reverseRegistrar/L2ReverseResolver.sol'; +import '@ensdomains/ens-contracts/contracts/resolvers/profiles/IVersionableResolver.sol'; // Storage slot -// ┌───────────────────────┬──────────────────────────────┬──────────────┬ -// │ contract │ state_variable │ storage_slot │ -// ├───────────────────────┼──────────────────────────────┼──────────────┼ -// | L2ReverseRegistrar │ _owner │ 0 │ -// │ L2ReverseRegistrar │ recordVersions │ 1 │ -// │ L2ReverseRegistrar │ lastUpdated │ 2 │ -// │ L2ReverseRegistrar │ versionable_texts │ 3 │ -// │ L2ReverseRegistrar │ versionable_names │ 4 │ +// ┌────────────────────┬───────────────────┬──────────────┬ +// │ contract │ state_variable │ storage_slot │ +// ├────────────────────┼───────────────────┼──────────────┼ +// │ L2ReverseResolver │ lastUpdated │ 0 │ +// │ L2ReverseResolver │ versionable_texts │ 1 │ +// │ L2ReverseResolver │ versionable_names │ 2 │ +// │ L2ReverseResolver │ recordVersions │ 3 │ diff --git a/crosschain-resolver/deploy_l2/01_l2resolver.ts b/crosschain-reverse-resolver/deploy_l1/01_defaultReverseResolver.ts similarity index 64% rename from crosschain-resolver/deploy_l2/01_l2resolver.ts rename to crosschain-reverse-resolver/deploy_l1/01_defaultReverseResolver.ts index 060695e1..3d1e6251 100644 --- a/crosschain-resolver/deploy_l2/01_l2resolver.ts +++ b/crosschain-reverse-resolver/deploy_l1/01_defaultReverseResolver.ts @@ -6,13 +6,11 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const {deploy} = deployments; const {deployer} = await getNamedAccounts(); - const impl = await deploy('DelegatableResolver', { + + await deploy(`DefaultReverseResolver`, { from: deployer, - args: [], log: true, }); - const implAddress = impl.address - console.log(`DelegatableResolver is deployed at ${implAddress}`) }; export default func; -func.tags = ['DelegatableResolver']; +func.tags = ['DefaultReverseResolver']; diff --git a/crosschain-reverse-resolver/deploy_l1/10_l1resolver.ts b/crosschain-reverse-resolver/deploy_l1/10_l1resolver.ts index a0db1637..6987c026 100644 --- a/crosschain-reverse-resolver/deploy_l1/10_l1resolver.ts +++ b/crosschain-reverse-resolver/deploy_l1/10_l1resolver.ts @@ -4,20 +4,28 @@ import {DeployFunction} from 'hardhat-deploy/types'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const {deployments, getNamedAccounts} = hre; + const DefaultReverseResolver = await deployments.get('DefaultReverseResolver'); + const DEFAULT_REVERSE_RESOLVER_ADDRESS = DefaultReverseResolver.address const {deploy} = deployments; const {deployer} = await getNamedAccounts(); const VERIFIER_ADDRESS = process.env.VERIFIER_ADDRESS const L2_REVERSE_REGISTRAR_ADDRESS = process.env.L2_REVERSE_REGISTRAR_ADDRESS + const CHAIN_NAME = process.env.CHAIN_NAME if(!VERIFIER_ADDRESS) throw ('Set $VERIFIER_ADDRESS') + if(!['Op', 'Base', 'Arb'].includes(CHAIN_NAME)) throw ('Set $CHAIN_NAME to Op, Base, or Arb') if(!L2_REVERSE_REGISTRAR_ADDRESS) throw ('Set $L2_REVERSE_REGISTRAR_ADDRESS') - console.log({VERIFIER_ADDRESS, L2_REVERSE_REGISTRAR_ADDRESS}) - await deploy('L1ReverseResolver', { + console.log({VERIFIER_ADDRESS, L2_REVERSE_REGISTRAR_ADDRESS, DEFAULT_REVERSE_RESOLVER_ADDRESS}) + await deploy(`${CHAIN_NAME}L1ReverseResolver`, { from: deployer, - args: [VERIFIER_ADDRESS, L2_REVERSE_REGISTRAR_ADDRESS], + contract:'L1ReverseResolver', + args: [VERIFIER_ADDRESS, L2_REVERSE_REGISTRAR_ADDRESS, DEFAULT_REVERSE_RESOLVER_ADDRESS], log: true, }); }; export default func; +func.dependencies = [ + 'DefaultReverseResolver', +] func.tags = ['L1ReverseResolver']; diff --git a/crosschain-reverse-resolver/deploy_l2/01_l2resolver .ts b/crosschain-reverse-resolver/deploy_l2/01_l2resolver .ts deleted file mode 100644 index 6e341fa0..00000000 --- a/crosschain-reverse-resolver/deploy_l2/01_l2resolver .ts +++ /dev/null @@ -1,25 +0,0 @@ -import {HardhatRuntimeEnvironment} from 'hardhat/types'; -import {DeployFunction} from 'hardhat-deploy/types'; - -const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { - const {deployments, getNamedAccounts} = hre; - const {deploy} = deployments; - - const {deployer} = await getNamedAccounts(); - console.log({deployer}) - const REVERSE_NAMESPACE = process.env.REVERSE_NAMESPACE - if(!REVERSE_NAMESPACE) throw ('Set $REVERSE_NAMESPACE') - - // eg: `${opcointype}.reverse` - const reversenode = ethers.namehash(REVERSE_NAMESPACE) - console.log({REVERSE_NAMESPACE, reversenode}) - await deploy('L2ReverseRegistrar', { - from: deployer, - args: [reversenode], - log: true, - gasPrice:20000007, - gas:20000007 - }); -}; -export default func; -func.tags = ['L2ReverseRegistrar']; diff --git a/crosschain-reverse-resolver/deployments/sepolia/.chainId b/crosschain-reverse-resolver/deployments/sepolia/.chainId new file mode 100644 index 00000000..bd8d1cd4 --- /dev/null +++ b/crosschain-reverse-resolver/deployments/sepolia/.chainId @@ -0,0 +1 @@ +11155111 \ No newline at end of file diff --git a/crosschain-reverse-resolver/deployments/sepolia/ArbL1ReverseResolver.json b/crosschain-reverse-resolver/deployments/sepolia/ArbL1ReverseResolver.json new file mode 100644 index 00000000..e86dddb8 --- /dev/null +++ b/crosschain-reverse-resolver/deployments/sepolia/ArbL1ReverseResolver.json @@ -0,0 +1,271 @@ +{ + "address": "0x935510B4270F69c6fa4Fadab75B4EA0A1Fb68349", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IEVMVerifier", + "name": "_verifier", + "type": "address" + }, + { + "internalType": "address", + "name": "_target", + "type": "address" + }, + { + "internalType": "contract IDefaultReverseResolver", + "name": "_defaultReverseResolver", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "CommandTooLong", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "InvalidReference", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "string[]", + "name": "urls", + "type": "string[]" + }, + { + "internalType": "bytes", + "name": "callData", + "type": "bytes" + }, + { + "internalType": "bytes4", + "name": "callbackFunction", + "type": "bytes4" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "name": "OffchainLookup", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "actual", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + } + ], + "name": "ResponseLengthMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "TooManyCommands", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "response", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "extradata", + "type": "bytes" + } + ], + "name": "getStorageSlotsCallback", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes[]", + "name": "values", + "type": "bytes[]" + }, + { + "internalType": "bytes", + "name": "callbackdata", + "type": "bytes" + } + ], + "name": "nameCallback", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "name", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "resolve", + "outputs": [ + { + "internalType": "bytes", + "name": "result", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes[]", + "name": "values", + "type": "bytes[]" + }, + { + "internalType": "bytes", + "name": "callbackdata", + "type": "bytes" + } + ], + "name": "textCallback", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x98ad47ab2d0141a8c5ee84968e95d839bd93363b154a89d267468833de89eaa1", + "receipt": { + "to": null, + "from": "0xDBBC2C0fe2a1D0fB4056B35a22e543bEb715E7FC", + "contractAddress": "0x935510B4270F69c6fa4Fadab75B4EA0A1Fb68349", + "transactionIndex": 60, + "gasUsed": "2427871", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x5b1583bb0c0f185a6bb72d95187720ed05dbb20bcc72b595eeb2d22d83339dc1", + "transactionHash": "0x98ad47ab2d0141a8c5ee84968e95d839bd93363b154a89d267468833de89eaa1", + "logs": [], + "blockNumber": 5349522, + "cumulativeGasUsed": "8342287", + "status": 1, + "byzantium": true + }, + "args": [ + "0x6820E47CED34D6F275c6d26C3876D48B2c1fdf27", + "0x60a384Cfbb088Aa8c1750A04548b1b983CDc0418", + "0xfD2c2598382D8876BcC70f550B22d7F70Dda30b0" + ], + "numDeployments": 4, + "solcInputHash": "7cc7da1092d13c01f4d5f27229751af2", + "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IEVMVerifier\",\"name\":\"_verifier\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_target\",\"type\":\"address\"},{\"internalType\":\"contract IDefaultReverseResolver\",\"name\":\"_defaultReverseResolver\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"CommandTooLong\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"max\",\"type\":\"uint256\"}],\"name\":\"InvalidReference\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"string[]\",\"name\":\"urls\",\"type\":\"string[]\"},{\"internalType\":\"bytes\",\"name\":\"callData\",\"type\":\"bytes\"},{\"internalType\":\"bytes4\",\"name\":\"callbackFunction\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"OffchainLookup\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"actual\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expected\",\"type\":\"uint256\"}],\"name\":\"ResponseLengthMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"max\",\"type\":\"uint256\"}],\"name\":\"TooManyCommands\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"response\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"extradata\",\"type\":\"bytes\"}],\"name\":\"getStorageSlotsCallback\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"values\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"callbackdata\",\"type\":\"bytes\"}],\"name\":\"nameCallback\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"name\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"result\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"values\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"callbackdata\",\"type\":\"bytes\"}],\"name\":\"textCallback\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"getStorageSlotsCallback(bytes,bytes)\":{\"details\":\"Internal callback function invoked by CCIP-Read in response to a `getStorageSlots` request.\"},\"resolve(bytes,bytes)\":{\"details\":\"Resolve and verify a record stored in l2 target address. It supports fallback to the default resolver\",\"params\":{\"data\":\"The actual calldata\",\"name\":\"DNS encoded ENS name to query\"},\"returns\":{\"result\":\"result of the call\"}},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/L1ReverseResolver.sol\":\"L1ReverseResolver\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@ensdomains/ens-contracts/contracts/resolvers/profiles/IExtendedResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.4;\\n\\ninterface IExtendedResolver {\\n function resolve(\\n bytes memory name,\\n bytes memory data\\n ) external view returns (bytes memory);\\n}\\n\",\"keccak256\":\"0x5d81521cfae7d9a4475d27533cd8ed0d3475d369eb0674fd90ffbdbdf292faa3\",\"license\":\"MIT\"},\"@ensdomains/ens-contracts/contracts/resolvers/profiles/INameResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\ninterface INameResolver {\\n event NameChanged(bytes32 indexed node, string name);\\n\\n /**\\n * Returns the name associated with an ENS node, for reverse records.\\n * Defined in EIP181.\\n * @param node The ENS node to query.\\n * @return The associated name.\\n */\\n function name(bytes32 node) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x9ec392b612447b1acbdc01114f2da2837a658d3f3157f60a99c5269f0b623346\",\"license\":\"MIT\"},\"@ensdomains/ens-contracts/contracts/resolvers/profiles/ITextResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\ninterface ITextResolver {\\n event TextChanged(\\n bytes32 indexed node,\\n string indexed indexedKey,\\n string key,\\n string value\\n );\\n\\n /**\\n * Returns the text data associated with an ENS node and key.\\n * @param node The ENS node to query.\\n * @param key The text data key to query.\\n * @return The associated text data.\\n */\\n function text(\\n bytes32 node,\\n string calldata key\\n ) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x7c5debb3c42cd9f5de2274ea7aa053f238608314b62db441c40e31cea2543fd5\",\"license\":\"MIT\"},\"@ensdomains/ens-contracts/contracts/utils/HexUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.4;\\n\\nlibrary HexUtils {\\n /**\\n * @dev Attempts to parse bytes32 from a hex string\\n * @param str The string to parse\\n * @param idx The offset to start parsing at\\n * @param lastIdx The (exclusive) last index in `str` to consider. Use `str.length` to scan the whole string.\\n */\\n function hexStringToBytes32(\\n bytes memory str,\\n uint256 idx,\\n uint256 lastIdx\\n ) internal pure returns (bytes32 r, bool valid) {\\n valid = true;\\n assembly {\\n // check that the index to read to is not past the end of the string\\n if gt(lastIdx, mload(str)) {\\n revert(0, 0)\\n }\\n\\n function getHex(c) -> ascii {\\n // chars 48-57: 0-9\\n if and(gt(c, 47), lt(c, 58)) {\\n ascii := sub(c, 48)\\n leave\\n }\\n // chars 65-70: A-F\\n if and(gt(c, 64), lt(c, 71)) {\\n ascii := add(sub(c, 65), 10)\\n leave\\n }\\n // chars 97-102: a-f\\n if and(gt(c, 96), lt(c, 103)) {\\n ascii := add(sub(c, 97), 10)\\n leave\\n }\\n // invalid char\\n ascii := 0xff\\n }\\n\\n let ptr := add(str, 32)\\n for {\\n let i := idx\\n } lt(i, lastIdx) {\\n i := add(i, 2)\\n } {\\n let byte1 := getHex(byte(0, mload(add(ptr, i))))\\n let byte2 := getHex(byte(0, mload(add(ptr, add(i, 1)))))\\n // if either byte is invalid, set invalid and break loop\\n if or(eq(byte1, 0xff), eq(byte2, 0xff)) {\\n valid := false\\n break\\n }\\n let combined := or(shl(4, byte1), byte2)\\n r := or(shl(8, r), combined)\\n }\\n }\\n }\\n\\n /**\\n * @dev Attempts to parse an address from a hex string\\n * @param str The string to parse\\n * @param idx The offset to start parsing at\\n * @param lastIdx The (exclusive) last index in `str` to consider. Use `str.length` to scan the whole string.\\n */\\n function hexToAddress(\\n bytes memory str,\\n uint256 idx,\\n uint256 lastIdx\\n ) internal pure returns (address, bool) {\\n if (lastIdx - idx < 40) return (address(0x0), false);\\n (bytes32 r, bool valid) = hexStringToBytes32(str, idx, lastIdx);\\n return (address(uint160(uint256(r))), valid);\\n }\\n}\\n\",\"keccak256\":\"0xcae20ad72181f47dfe7fba7d88e8d902a01576b16e93362878e726989d6cfb4d\",\"license\":\"MIT\"},\"@ensdomains/evm-verifier/contracts/EVMFetchTarget.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.17;\\n\\nimport { IEVMVerifier } from './IEVMVerifier.sol';\\nimport { Address } from '@openzeppelin/contracts/utils/Address.sol';\\n\\n/**\\n * @dev Callback implementation for users of `EVMFetcher`. If you use `EVMFetcher`, your contract must\\n * inherit from this contract in order to handle callbacks correctly.\\n */\\nabstract contract EVMFetchTarget {\\n using Address for address;\\n\\n error ResponseLengthMismatch(uint256 actual, uint256 expected);\\n\\n /**\\n * @dev Internal callback function invoked by CCIP-Read in response to a `getStorageSlots` request.\\n */\\n function getStorageSlotsCallback(bytes calldata response, bytes calldata extradata) external {\\n bytes memory proof = abi.decode(response, (bytes));\\n (IEVMVerifier verifier, address addr, bytes32[] memory commands, bytes[] memory constants, bytes4 callback, bytes memory callbackData) =\\n abi.decode(extradata, (IEVMVerifier, address, bytes32[], bytes[], bytes4, bytes));\\n bytes[] memory values = verifier.getStorageValues(addr, commands, constants, proof);\\n if(values.length != commands.length) {\\n revert ResponseLengthMismatch(values.length, commands.length);\\n }\\n bytes memory ret = address(this).functionCall(abi.encodeWithSelector(callback, values, callbackData));\\n assembly {\\n return(add(ret, 32), mload(ret))\\n }\\n }\\n}\\n\",\"keccak256\":\"0x4653f974a897ce78b7bc3779ba0bb7767df99add49de4f0e9089399f47bb5942\",\"license\":\"MIT\"},\"@ensdomains/evm-verifier/contracts/EVMFetcher.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.17;\\n\\nimport { IEVMVerifier } from './IEVMVerifier.sol';\\nimport { EVMFetchTarget } from './EVMFetchTarget.sol';\\nimport { Address } from '@openzeppelin/contracts/utils/Address.sol';\\n\\ninterface IEVMGateway {\\n function getStorageSlots(address addr, bytes32[] memory commands, bytes[] memory constants) external pure returns(bytes memory witness);\\n}\\n\\nuint8 constant FLAG_DYNAMIC = 0x01;\\nuint8 constant OP_CONSTANT = 0x00;\\nuint8 constant OP_BACKREF = 0x20;\\nuint8 constant OP_END = 0xff;\\n\\n/**\\n * @dev A library to facilitate requesting storage data proofs from contracts, possibly on a different chain.\\n * See l1-verifier/test/TestL1.sol for example usage.\\n */\\nlibrary EVMFetcher {\\n uint256 constant MAX_COMMANDS = 32;\\n uint256 constant MAX_CONSTANTS = 32; // Must not be greater than 32\\n\\n using Address for address;\\n\\n error TooManyCommands(uint256 max);\\n error CommandTooLong();\\n error InvalidReference(uint256 value, uint256 max);\\n error OffchainLookup(address sender, string[] urls, bytes callData, bytes4 callbackFunction, bytes extraData);\\n\\n struct EVMFetchRequest {\\n IEVMVerifier verifier;\\n address target;\\n bytes32[] commands;\\n uint256 operationIdx;\\n bytes[] constants;\\n }\\n\\n /**\\n * @dev Creates a request to fetch the value of multiple storage slots from a contract via CCIP-Read, possibly from\\n * another chain.\\n * Supports dynamic length values and slot numbers derived from other retrieved values.\\n * @param verifier An instance of a verifier contract that can provide and verify the storage slot information.\\n * @param target The address of the contract to fetch storage proofs for.\\n */\\n function newFetchRequest(IEVMVerifier verifier, address target) internal pure returns (EVMFetchRequest memory) {\\n bytes32[] memory commands = new bytes32[](MAX_COMMANDS);\\n bytes[] memory constants = new bytes[](MAX_CONSTANTS);\\n assembly {\\n mstore(commands, 0) // Set current array length to 0\\n mstore(constants, 0)\\n } \\n return EVMFetchRequest(verifier, target, commands, 0, constants);\\n }\\n\\n /**\\n * @dev Starts describing a new fetch request.\\n * Paths specify a series of hashing operations to derive the final slot ID.\\n * See https://docs.soliditylang.org/en/v0.8.17/internals/layout_in_storage.html for details on how Solidity\\n * lays out storage variables.\\n * @param request The request object being operated on.\\n * @param baseSlot The base slot ID that forms the root of the path.\\n */\\n function getStatic(EVMFetchRequest memory request, uint256 baseSlot) internal pure returns (EVMFetchRequest memory) {\\n bytes32[] memory commands = request.commands;\\n uint256 commandIdx = commands.length;\\n if(commandIdx > 0 && request.operationIdx < 32) {\\n // Terminate previous command\\n _addOperation(request, OP_END);\\n }\\n assembly {\\n mstore(commands, add(commandIdx, 1)) // Increment command array length\\n }\\n if(request.commands.length > MAX_COMMANDS) {\\n revert TooManyCommands(MAX_COMMANDS);\\n }\\n request.operationIdx = 0;\\n _addOperation(request, 0);\\n _addOperation(request, _addConstant(request, abi.encode(baseSlot)));\\n return request;\\n }\\n\\n /**\\n * @dev Starts describing a new fetch request.\\n * Paths specify a series of hashing operations to derive the final slot ID.\\n * See https://docs.soliditylang.org/en/v0.8.17/internals/layout_in_storage.html for details on how Solidity\\n * lays out storage variables.\\n * @param request The request object being operated on.\\n * @param baseSlot The base slot ID that forms the root of the path.\\n */\\n function getDynamic(EVMFetchRequest memory request, uint256 baseSlot) internal pure returns (EVMFetchRequest memory) {\\n bytes32[] memory commands = request.commands;\\n uint256 commandIdx = commands.length;\\n if(commandIdx > 0 && request.operationIdx < 32) {\\n // Terminate previous command\\n _addOperation(request, OP_END);\\n }\\n assembly {\\n mstore(commands, add(commandIdx, 1)) // Increment command array length\\n }\\n if(request.commands.length > MAX_COMMANDS) {\\n revert TooManyCommands(MAX_COMMANDS);\\n }\\n request.operationIdx = 0;\\n _addOperation(request, FLAG_DYNAMIC);\\n _addOperation(request, _addConstant(request, abi.encode(baseSlot)));\\n return request;\\n }\\n\\n /**\\n * @dev Adds a `uint256` element to the current path.\\n * @param request The request object being operated on.\\n * @param el The element to add.\\n */\\n function element(EVMFetchRequest memory request, uint256 el) internal pure returns (EVMFetchRequest memory) {\\n if(request.operationIdx >= 32) {\\n revert CommandTooLong();\\n }\\n _addOperation(request, _addConstant(request, abi.encode(el)));\\n return request;\\n }\\n\\n /**\\n * @dev Adds a `bytes32` element to the current path.\\n * @param request The request object being operated on.\\n * @param el The element to add.\\n */\\n function element(EVMFetchRequest memory request, bytes32 el) internal pure returns (EVMFetchRequest memory) {\\n if(request.operationIdx >= 32) {\\n revert CommandTooLong();\\n }\\n _addOperation(request, _addConstant(request, abi.encode(el)));\\n return request;\\n }\\n\\n /**\\n * @dev Adds an `address` element to the current path.\\n * @param request The request object being operated on.\\n * @param el The element to add.\\n */\\n function element(EVMFetchRequest memory request, address el) internal pure returns (EVMFetchRequest memory) {\\n if(request.operationIdx >= 32) {\\n revert CommandTooLong();\\n }\\n _addOperation(request, _addConstant(request, abi.encode(el)));\\n return request;\\n }\\n\\n /**\\n * @dev Adds a `bytes` element to the current path.\\n * @param request The request object being operated on.\\n * @param el The element to add.\\n */\\n function element(EVMFetchRequest memory request, bytes memory el) internal pure returns (EVMFetchRequest memory) {\\n if(request.operationIdx >= 32) {\\n revert CommandTooLong();\\n }\\n _addOperation(request, _addConstant(request, el));\\n return request;\\n }\\n\\n /**\\n * @dev Adds a `string` element to the current path.\\n * @param request The request object being operated on.\\n * @param el The element to add.\\n */\\n function element(EVMFetchRequest memory request, string memory el) internal pure returns (EVMFetchRequest memory) {\\n if(request.operationIdx >= 32) {\\n revert CommandTooLong();\\n }\\n _addOperation(request, _addConstant(request, bytes(el)));\\n return request;\\n }\\n\\n /**\\n * @dev Adds a reference to a previous fetch to the current path.\\n * @param request The request object being operated on.\\n * @param idx The index of the previous fetch request, starting at 0.\\n */\\n function ref(EVMFetchRequest memory request, uint8 idx) internal pure returns (EVMFetchRequest memory) {\\n if(request.operationIdx >= 32) {\\n revert CommandTooLong();\\n }\\n if(idx > request.commands.length || idx > 31) {\\n revert InvalidReference(idx, request.commands.length);\\n }\\n _addOperation(request, OP_BACKREF | idx);\\n return request;\\n }\\n\\n /**\\n * @dev Initiates the fetch request.\\n * Calling this function terminates execution; clients that implement CCIP-Read will make a callback to\\n * `callback` with the results of the operation.\\n * @param callbackId A callback function selector on this contract that will be invoked via CCIP-Read with the result of the lookup.\\n * The function must have a signature matching `(bytes[] memory values, bytes callbackData)` with a return type matching the call in which\\n * this function was invoked. Its return data will be returned as the return value of the entire CCIP-read operation.\\n * @param callbackData Extra data to supply to the callback.\\n */\\n function fetch(EVMFetchRequest memory request, bytes4 callbackId, bytes memory callbackData) internal view {\\n if(request.commands.length > 0 && request.operationIdx < 32) {\\n // Terminate last command\\n _addOperation(request, OP_END);\\n }\\n revert OffchainLookup(\\n address(this),\\n request.verifier.gatewayURLs(),\\n abi.encodeCall(IEVMGateway.getStorageSlots, (request.target, request.commands, request.constants)),\\n EVMFetchTarget.getStorageSlotsCallback.selector,\\n abi.encode(request.verifier, request.target, request.commands, request.constants, callbackId, callbackData)\\n );\\n }\\n\\n function _addConstant(EVMFetchRequest memory request, bytes memory value) private pure returns(uint8 idx) {\\n bytes[] memory constants = request.constants;\\n idx = uint8(constants.length);\\n assembly {\\n mstore(constants, add(idx, 1)) // Increment constant array length\\n }\\n constants[idx] = value;\\n }\\n\\n function _addOperation(EVMFetchRequest memory request, uint8 op) private pure {\\n uint256 commandIdx = request.commands.length - 1;\\n request.commands[commandIdx] = request.commands[commandIdx] | (bytes32(bytes1(op)) >> (8 * request.operationIdx++));\\n }\\n}\\n\",\"keccak256\":\"0x5a6a955ebf3e6da9ce8d39e2729c35e4e800426025954a9a9777c209447ff8b4\",\"license\":\"MIT\"},\"@ensdomains/evm-verifier/contracts/IEVMVerifier.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.17;\\n\\ninterface IEVMVerifier {\\n function gatewayURLs() external view returns(string[] memory);\\n function getStorageValues(address target, bytes32[] memory commands, bytes[] memory constants, bytes memory proof) external view returns(bytes[] memory values);\\n}\\n\",\"keccak256\":\"0x30a635309aeebbde83774010eea5e975b8e73d1932140457121eefdce7792d72\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"contracts/IDefaultReverseResolver.sol\":{\"content\":\"pragma solidity >=0.8.4;\\n\\ninterface IDefaultReverseResolver {\\n function name(address addr) external view returns (string memory);\\n\\n function text(\\n address addr,\\n string memory key\\n ) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x0233c067351640bcfff8824150323e34f06abf239def880164a10eb8846479cf\"},\"contracts/L1ReverseResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.17;\\n\\nimport {EVMFetcher} from '@ensdomains/evm-verifier/contracts/EVMFetcher.sol';\\nimport {EVMFetchTarget} from '@ensdomains/evm-verifier/contracts/EVMFetchTarget.sol';\\nimport {IEVMVerifier} from '@ensdomains/evm-verifier/contracts/IEVMVerifier.sol';\\nimport \\\"@ensdomains/ens-contracts/contracts/resolvers/profiles/INameResolver.sol\\\";\\nimport \\\"@ensdomains/ens-contracts/contracts/resolvers/profiles/ITextResolver.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/introspection/ERC165.sol\\\";\\nimport \\\"@ensdomains/ens-contracts/contracts/utils/HexUtils.sol\\\";\\nimport \\\"@ensdomains/ens-contracts/contracts/resolvers/profiles/IExtendedResolver.sol\\\";\\nimport \\\"./IDefaultReverseResolver.sol\\\";\\n\\ncontract L1ReverseResolver is EVMFetchTarget, IExtendedResolver, ERC165 {\\n using EVMFetcher for EVMFetcher.EVMFetchRequest;\\n IEVMVerifier immutable verifier;\\n address immutable target;\\n IDefaultReverseResolver immutable defaultReverseResolver;\\n uint256 constant VERSIONABLE_TEXTS_SLOT = 2;\\n uint256 constant VERSIONABLE_NAME_SLOT = 3;\\n uint256 constant RECORD_VERSIONS_SLOT = 4;\\n uint256 constant ADDRESS_LENGTH = 40;\\n using HexUtils for bytes;\\n\\n constructor(IEVMVerifier _verifier, address _target, IDefaultReverseResolver _defaultReverseResolver ) {\\n verifier = _verifier;\\n target = _target;\\n defaultReverseResolver = _defaultReverseResolver;\\n }\\n\\n /** \\n * @dev Resolve and verify a record stored in l2 target address. It supports fallback to the default resolver\\n * @param name DNS encoded ENS name to query\\n * @param data The actual calldata\\n * @return result result of the call\\n */\\n function resolve(bytes calldata name, bytes calldata data) external view returns (bytes memory result) {\\n bytes4 selector = bytes4(data);\\n (address addr,) = HexUtils.hexToAddress(name, 1, ADDRESS_LENGTH + 1);\\n if (selector == INameResolver.name.selector) {\\n (bytes32 node) = abi.decode(data[4:], (bytes32));\\n return bytes(_name(node, addr));\\n }\\n if (selector == ITextResolver.text.selector) {\\n (bytes32 node, string memory key) = abi.decode(data[4:], (bytes32, string));\\n return bytes(_text(node, key, addr));\\n }\\n }\\n\\n function _name(bytes32 node, address addr) private view returns (string memory) {\\n EVMFetcher.newFetchRequest(verifier, target)\\n .getStatic(RECORD_VERSIONS_SLOT)\\n .element(node)\\n .getDynamic(VERSIONABLE_NAME_SLOT)\\n .ref(0)\\n .element(node)\\n .fetch(this.nameCallback.selector, abi.encode(addr));\\n }\\n\\n function nameCallback(\\n bytes[] memory values,\\n bytes memory callbackdata\\n ) public view returns (string memory) { \\n if(values[1].length == 0 ){\\n (address addr) = abi.decode(callbackdata, (address));\\n return defaultReverseResolver.name(addr);\\n }else{\\n return string(values[1]);\\n }\\n }\\n\\n function _text(\\n bytes32 node,\\n string memory key,\\n address addr\\n ) private view returns (string memory) {\\n EVMFetcher.newFetchRequest(verifier, target)\\n .getStatic(RECORD_VERSIONS_SLOT)\\n .element(node)\\n .getDynamic(VERSIONABLE_TEXTS_SLOT)\\n .ref(0)\\n .element(node)\\n .element(key)\\n .fetch(this.textCallback.selector, abi.encode(addr, key));\\n }\\n\\n function textCallback(\\n bytes[] memory values,\\n bytes memory callbackdata\\n ) public view returns (string memory) {\\n if(values[1].length == 0 ){\\n (address addr, string memory key) = abi.decode(callbackdata, (address, string));\\n return defaultReverseResolver.text(addr, key);\\n }else{\\n return string(values[1]);\\n }\\n }\\n\\n function supportsInterface(\\n bytes4 interfaceId\\n ) public override view returns (bool) {\\n return\\n interfaceId == type(IExtendedResolver).interfaceId ||\\n super.supportsInterface(interfaceId);\\n }\\n}\\n\",\"keccak256\":\"0xb09771bfaf5dd9a01da9efecfbc15abc43a85501d9264c23895bbbf6edf8637a\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60e06040523480156200001157600080fd5b5060405162002d5838038062002d588339818101604052810190620000379190620001d0565b8273ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250508173ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff16815250508073ffffffffffffffffffffffffffffffffffffffff1660c08173ffffffffffffffffffffffffffffffffffffffff16815250505050506200022c565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006200010e82620000e1565b9050919050565b6000620001228262000101565b9050919050565b620001348162000115565b81146200014057600080fd5b50565b600081519050620001548162000129565b92915050565b620001658162000101565b81146200017157600080fd5b50565b60008151905062000185816200015a565b92915050565b6000620001988262000101565b9050919050565b620001aa816200018b565b8114620001b657600080fd5b50565b600081519050620001ca816200019f565b92915050565b600080600060608486031215620001ec57620001eb620000dc565b5b6000620001fc8682870162000143565b93505060206200020f8682870162000174565b92505060406200022286828701620001b9565b9150509250925092565b60805160a05160c051612ae762000271600039600081816101f2015261063a015260008181610870015261095f01526000818161084f015261093e0152612ae76000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c806301ffc9a71461005c5780632682dd661461008c5780635bdaa916146100bc5780639061b923146100d8578063de9abe5e14610108575b600080fd5b6100766004803603810190610071919061142f565b610138565b6040516100839190611477565b60405180910390f35b6100a660048036038101906100a191906116be565b6101b2565b6040516100b391906117b5565b60405180910390f35b6100d660048036038101906100d19190611832565b6102bc565b005b6100f260048036038101906100ed9190611832565b61046b565b6040516100ff9190611908565b60405180910390f35b610122600480360381019061011d91906116be565b6105f7565b60405161012f91906117b5565b60405180910390f35b60007f9061b923000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806101ab57506101aa82610707565b5b9050919050565b60606000836001815181106101ca576101c961192a565b5b60200260200101515103610297576000828060200190518101906101ee91906119b7565b90507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166301984892826040518263ffffffff1660e01b81526004016102499190611a05565b600060405180830381865afa158015610266573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061028f9190611ac1565b9150506102b6565b826001815181106102ab576102aa61192a565b5b602002602001015190505b92915050565b600084848101906102cd9190611b0a565b905060008060008060008088888101906102e79190611c9f565b95509550955095509550955060008673ffffffffffffffffffffffffffffffffffffffff16633baa6d508787878c6040518563ffffffff1660e01b81526004016103349493929190611f4a565b600060405180830381865afa158015610351573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061037a91906120c9565b905084518151146103c657805185516040517f291894250000000000000000000000000000000000000000000000000000000081526004016103bd92919061212b565b60405180910390fd5b60006104618483856040516024016103df929190612154565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050503073ffffffffffffffffffffffffffffffffffffffff1661077190919063ffffffff16565b9050805160208201f35b6060600083839061047c91906121a3565b905060006104dc87878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505060018060286104d79190612231565b6107bd565b50905063691f343160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610563576000858560049080926105409392919061226f565b81019061054d91906122aa565b90506105598183610806565b93505050506105ef565b6359d1d43c60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036105ec57600080868660049080926105c59392919061226f565b8101906105d29190612347565b915091506105e18282856108ef565b9450505050506105ef565b50505b949350505050565b606060008360018151811061060f5761060e61192a565b5b602002602001015151036106e2576000808380602001905181019061063491906123a3565b915091507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663d977f6b583836040518363ffffffff1660e01b81526004016106939291906123ff565b600060405180830381865afa1580156106b0573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906106d99190611ac1565b92505050610701565b826001815181106106f6576106f561192a565b5b602002602001015190505b92915050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b60606107b5838360006040518060400160405280601e81526020017f416464726573733a206c6f772d6c6576656c2063616c6c206661696c656400008152506109ed565b905092915050565b600080602884846107ce919061242f565b10156107e057600080915091506107fe565b6000806107ee878787610aba565b915091508160001c819350935050505b935093915050565b60606108e9632682dd6660e01b836040516020016108249190611a05565b6040516020818303038152906040526108da866108cc60006108be60036108b08c6108a260046108947f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000610b9f565b610cae90919063ffffffff16565b610d8f90919063ffffffff16565b610e1090919063ffffffff16565b610ef190919063ffffffff16565b610d8f90919063ffffffff16565b610faf9092919063ffffffff16565b92915050565b60606109e663de9abe5e60e01b838560405160200161090f9291906123ff565b6040516020818303038152906040526109d7866109c9896109bb60006109ad600261099f8f61099160046109837f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000610b9f565b610cae90919063ffffffff16565b610d8f90919063ffffffff16565b610e1090919063ffffffff16565b610ef190919063ffffffff16565b610d8f90919063ffffffff16565b61113a90919063ffffffff16565b610faf9092919063ffffffff16565b9392505050565b606082471015610a32576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a29906124d5565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051610a5b9190612531565b60006040518083038185875af1925050503d8060008114610a98576040519150601f19603f3d011682016040523d82523d6000602084013e610a9d565b606091505b5091509150610aae8783838761119c565b92505050949350505050565b600080600190508451831115610acf57600080fd5b610b31565b6000603a8210602f83111615610aef57603082039050610b2c565b60478210604083111615610b0b57600a60418303019050610b2c565b60678210606083111615610b2757600a60618303019050610b2c565b60ff90505b919050565b60208501845b84811015610b9557610b4e8183015160001a610ad4565b610b606001830184015160001a610ad4565b60ff811460ff83141715610b7957600094505050610b95565b808260041b17808760081b179650505050600281019050610b37565b5050935093915050565b610ba7611368565b6000602067ffffffffffffffff811115610bc457610bc36114a8565b5b604051908082528060200260200182016040528015610bf25781602001602082028036833780820191505090505b5090506000602067ffffffffffffffff811115610c1257610c116114a8565b5b604051908082528060200260200182016040528015610c4557816020015b6060815260200190600190039081610c305790505b50905060008252600081526040518060a001604052808673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff16815260200183815260200160008152602001828152509250505092915050565b610cb6611368565b600083604001519050600081519050600081118015610cd9575060208560600151105b15610cea57610ce98560ff611211565b5b60018101825260208560400151511115610d3c5760206040517f128e7008000000000000000000000000000000000000000000000000000000008152600401610d339190612548565b60405180910390fd5b6000856060018181525050610d52856000611211565b610d8485610d7f8787604051602001610d6b9190612548565b6040516020818303038152906040526112b8565b611211565b849250505092915050565b610d97611368565b6020836060015110610dd5576040517fb00fd63800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610e0783610e028585604051602001610dee9190612572565b6040516020818303038152906040526112b8565b611211565b82905092915050565b610e18611368565b600083604001519050600081519050600081118015610e3b575060208560600151105b15610e4c57610e4b8560ff611211565b5b60018101825260208560400151511115610e9e5760206040517f128e7008000000000000000000000000000000000000000000000000000000008152600401610e959190612548565b60405180910390fd5b6000856060018181525050610eb4856001611211565b610ee685610ee18787604051602001610ecd9190612548565b6040516020818303038152906040526112b8565b611211565b849250505092915050565b610ef9611368565b6020836060015110610f37576040517fb00fd63800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8260400151518260ff161180610f505750601f8260ff16115b15610f9957818360400151516040517f101586e0000000000000000000000000000000000000000000000000000000008152600401610f909291906125d5565b60405180910390fd5b610fa68383602017611211565b82905092915050565b6000836040015151118015610fc8575060208360600151105b15610fd957610fd88360ff611211565b5b30836000015173ffffffffffffffffffffffffffffffffffffffff1663b50f2fbc6040518163ffffffff1660e01b8152600401600060405180830381865afa158015611029573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061105291906126df565b84602001518560400151866080015160405160240161107393929190612728565b60405160208183030381529060405263ea9cd3bf60e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050635bdaa91660e01b866000015187602001518860400151896080015189896040516020016110eb969594939291906127d1565b6040516020818303038152906040526040517f556f1830000000000000000000000000000000000000000000000000000000008152600401611131959493929190612953565b60405180910390fd5b611142611368565b6020836060015110611180576040517fb00fd63800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6111938361118e85856112b8565b611211565b82905092915050565b606083156111fe5760008351036111f6576111b6856112f5565b6111f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111ec90612a07565b60405180910390fd5b5b829050611209565b6112088383611318565b5b949350505050565b60006001836040015151611225919061242f565b905082606001805180919061123990612a27565b81525060086112489190612a6f565b8260f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c836040015182815181106112875761128661192a565b5b602002602001015117836040015182815181106112a7576112a661192a565b5b602002602001018181525050505050565b600080836080015190508051915060018201815282818360ff16815181106112e3576112e261192a565b5b60200260200101819052505092915050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b60008251111561132b5781518083602001fd5b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161135f91906117b5565b60405180910390fd5b6040518060a00160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff1681526020016060815260200160008152602001606081525090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61140c816113d7565b811461141757600080fd5b50565b60008135905061142981611403565b92915050565b600060208284031215611445576114446113cd565b5b60006114538482850161141a565b91505092915050565b60008115159050919050565b6114718161145c565b82525050565b600060208201905061148c6000830184611468565b92915050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6114e082611497565b810181811067ffffffffffffffff821117156114ff576114fe6114a8565b5b80604052505050565b60006115126113c3565b905061151e82826114d7565b919050565b600067ffffffffffffffff82111561153e5761153d6114a8565b5b602082029050602081019050919050565b600080fd5b600080fd5b600067ffffffffffffffff821115611574576115736114a8565b5b61157d82611497565b9050602081019050919050565b82818337600083830152505050565b60006115ac6115a784611559565b611508565b9050828152602081018484840111156115c8576115c7611554565b5b6115d384828561158a565b509392505050565b600082601f8301126115f0576115ef611492565b5b8135611600848260208601611599565b91505092915050565b600061161c61161784611523565b611508565b9050808382526020820190506020840283018581111561163f5761163e61154f565b5b835b8181101561168657803567ffffffffffffffff81111561166457611663611492565b5b80860161167189826115db565b85526020850194505050602081019050611641565b5050509392505050565b600082601f8301126116a5576116a4611492565b5b81356116b5848260208601611609565b91505092915050565b600080604083850312156116d5576116d46113cd565b5b600083013567ffffffffffffffff8111156116f3576116f26113d2565b5b6116ff85828601611690565b925050602083013567ffffffffffffffff8111156117205761171f6113d2565b5b61172c858286016115db565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b60005b83811015611770578082015181840152602081019050611755565b60008484015250505050565b600061178782611736565b6117918185611741565b93506117a1818560208601611752565b6117aa81611497565b840191505092915050565b600060208201905081810360008301526117cf818461177c565b905092915050565b600080fd5b60008083601f8401126117f2576117f1611492565b5b8235905067ffffffffffffffff81111561180f5761180e6117d7565b5b60208301915083600182028301111561182b5761182a61154f565b5b9250929050565b6000806000806040858703121561184c5761184b6113cd565b5b600085013567ffffffffffffffff81111561186a576118696113d2565b5b611876878288016117dc565b9450945050602085013567ffffffffffffffff811115611899576118986113d2565b5b6118a5878288016117dc565b925092505092959194509250565b600081519050919050565b600082825260208201905092915050565b60006118da826118b3565b6118e481856118be565b93506118f4818560208601611752565b6118fd81611497565b840191505092915050565b6000602082019050818103600083015261192281846118cf565b905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061198482611959565b9050919050565b61199481611979565b811461199f57600080fd5b50565b6000815190506119b18161198b565b92915050565b6000602082840312156119cd576119cc6113cd565b5b60006119db848285016119a2565b91505092915050565b60006119ef82611959565b9050919050565b6119ff816119e4565b82525050565b6000602082019050611a1a60008301846119f6565b92915050565b600067ffffffffffffffff821115611a3b57611a3a6114a8565b5b611a4482611497565b9050602081019050919050565b6000611a64611a5f84611a20565b611508565b905082815260208101848484011115611a8057611a7f611554565b5b611a8b848285611752565b509392505050565b600082601f830112611aa857611aa7611492565b5b8151611ab8848260208601611a51565b91505092915050565b600060208284031215611ad757611ad66113cd565b5b600082015167ffffffffffffffff811115611af557611af46113d2565b5b611b0184828501611a93565b91505092915050565b600060208284031215611b2057611b1f6113cd565b5b600082013567ffffffffffffffff811115611b3e57611b3d6113d2565b5b611b4a848285016115db565b91505092915050565b6000611b5e826119e4565b9050919050565b611b6e81611b53565b8114611b7957600080fd5b50565b600081359050611b8b81611b65565b92915050565b600081359050611ba08161198b565b92915050565b600067ffffffffffffffff821115611bc157611bc06114a8565b5b602082029050602081019050919050565b6000819050919050565b611be581611bd2565b8114611bf057600080fd5b50565b600081359050611c0281611bdc565b92915050565b6000611c1b611c1684611ba6565b611508565b90508083825260208201905060208402830185811115611c3e57611c3d61154f565b5b835b81811015611c675780611c538882611bf3565b845260208401935050602081019050611c40565b5050509392505050565b600082601f830112611c8657611c85611492565b5b8135611c96848260208601611c08565b91505092915050565b60008060008060008060c08789031215611cbc57611cbb6113cd565b5b6000611cca89828a01611b7c565b9650506020611cdb89828a01611b91565b955050604087013567ffffffffffffffff811115611cfc57611cfb6113d2565b5b611d0889828a01611c71565b945050606087013567ffffffffffffffff811115611d2957611d286113d2565b5b611d3589828a01611690565b9350506080611d4689828a0161141a565b92505060a087013567ffffffffffffffff811115611d6757611d666113d2565b5b611d7389828a016115db565b9150509295509295509295565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b611db581611bd2565b82525050565b6000611dc78383611dac565b60208301905092915050565b6000602082019050919050565b6000611deb82611d80565b611df58185611d8b565b9350611e0083611d9c565b8060005b83811015611e31578151611e188882611dbb565b9750611e2383611dd3565b925050600181019050611e04565b5085935050505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600082825260208201905092915050565b6000611e86826118b3565b611e908185611e6a565b9350611ea0818560208601611752565b611ea981611497565b840191505092915050565b6000611ec08383611e7b565b905092915050565b6000602082019050919050565b6000611ee082611e3e565b611eea8185611e49565b935083602082028501611efc85611e5a565b8060005b85811015611f385784840389528151611f198582611eb4565b9450611f2483611ec8565b925060208a01995050600181019050611f00565b50829750879550505050505092915050565b6000608082019050611f5f60008301876119f6565b8181036020830152611f718186611de0565b90508181036040830152611f858185611ed5565b90508181036060830152611f9981846118cf565b905095945050505050565b6000611fb7611fb284611559565b611508565b905082815260208101848484011115611fd357611fd2611554565b5b611fde848285611752565b509392505050565b600082601f830112611ffb57611ffa611492565b5b815161200b848260208601611fa4565b91505092915050565b600061202761202284611523565b611508565b9050808382526020820190506020840283018581111561204a5761204961154f565b5b835b8181101561209157805167ffffffffffffffff81111561206f5761206e611492565b5b80860161207c8982611fe6565b8552602085019450505060208101905061204c565b5050509392505050565b600082601f8301126120b0576120af611492565b5b81516120c0848260208601612014565b91505092915050565b6000602082840312156120df576120de6113cd565b5b600082015167ffffffffffffffff8111156120fd576120fc6113d2565b5b6121098482850161209b565b91505092915050565b6000819050919050565b61212581612112565b82525050565b6000604082019050612140600083018561211c565b61214d602083018461211c565b9392505050565b6000604082019050818103600083015261216e8185611ed5565b9050818103602083015261218281846118cf565b90509392505050565b600082905092915050565b600082821b905092915050565b60006121af838361218b565b826121ba81356113d7565b925060048210156121fa576121f57fffffffff0000000000000000000000000000000000000000000000000000000083600403600802612196565b831692505b505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061223c82612112565b915061224783612112565b925082820190508082111561225f5761225e612202565b5b92915050565b600080fd5b600080fd5b6000808585111561228357612282612265565b5b838611156122945761229361226a565b5b6001850283019150848603905094509492505050565b6000602082840312156122c0576122bf6113cd565b5b60006122ce84828501611bf3565b91505092915050565b60006122ea6122e584611a20565b611508565b90508281526020810184848401111561230657612305611554565b5b61231184828561158a565b509392505050565b600082601f83011261232e5761232d611492565b5b813561233e8482602086016122d7565b91505092915050565b6000806040838503121561235e5761235d6113cd565b5b600061236c85828601611bf3565b925050602083013567ffffffffffffffff81111561238d5761238c6113d2565b5b61239985828601612319565b9150509250929050565b600080604083850312156123ba576123b96113cd565b5b60006123c8858286016119a2565b925050602083015167ffffffffffffffff8111156123e9576123e86113d2565b5b6123f585828601611a93565b9150509250929050565b600060408201905061241460008301856119f6565b8181036020830152612426818461177c565b90509392505050565b600061243a82612112565b915061244583612112565b925082820390508181111561245d5761245c612202565b5b92915050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b60006124bf602683611741565b91506124ca82612463565b604082019050919050565b600060208201905081810360008301526124ee816124b2565b9050919050565b600081905092915050565b600061250b826118b3565b61251581856124f5565b9350612525818560208601611752565b80840191505092915050565b600061253d8284612500565b915081905092915050565b600060208201905061255d600083018461211c565b92915050565b61256c81611bd2565b82525050565b60006020820190506125876000830184612563565b92915050565b600060ff82169050919050565b6000819050919050565b60006125bf6125ba6125b58461258d565b61259a565b612112565b9050919050565b6125cf816125a4565b82525050565b60006040820190506125ea60008301856125c6565b6125f7602083018461211c565b9392505050565b600067ffffffffffffffff821115612619576126186114a8565b5b602082029050602081019050919050565b600061263d612638846125fe565b611508565b905080838252602082019050602084028301858111156126605761265f61154f565b5b835b818110156126a757805167ffffffffffffffff81111561268557612684611492565b5b8086016126928982611a93565b85526020850194505050602081019050612662565b5050509392505050565b600082601f8301126126c6576126c5611492565b5b81516126d684826020860161262a565b91505092915050565b6000602082840312156126f5576126f46113cd565b5b600082015167ffffffffffffffff811115612713576127126113d2565b5b61271f848285016126b1565b91505092915050565b600060608201905061273d60008301866119f6565b818103602083015261274f8185611de0565b905081810360408301526127638184611ed5565b9050949350505050565b600061278861278361277e84611959565b61259a565b611959565b9050919050565b600061279a8261276d565b9050919050565b60006127ac8261278f565b9050919050565b6127bc816127a1565b82525050565b6127cb816113d7565b82525050565b600060c0820190506127e660008301896127b3565b6127f360208301886119f6565b81810360408301526128058187611de0565b905081810360608301526128198186611ed5565b905061282860808301856127c2565b81810360a083015261283a81846118cf565b9050979650505050505050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600082825260208201905092915050565b600061288f82611736565b6128998185612873565b93506128a9818560208601611752565b6128b281611497565b840191505092915050565b60006128c98383612884565b905092915050565b6000602082019050919050565b60006128e982612847565b6128f38185612852565b93508360208202850161290585612863565b8060005b85811015612941578484038952815161292285826128bd565b945061292d836128d1565b925060208a01995050600181019050612909565b50829750879550505050505092915050565b600060a08201905061296860008301886119f6565b818103602083015261297a81876128de565b9050818103604083015261298e81866118cf565b905061299d60608301856127c2565b81810360808301526129af81846118cf565b90509695505050505050565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b60006129f1601d83611741565b91506129fc826129bb565b602082019050919050565b60006020820190508181036000830152612a20816129e4565b9050919050565b6000612a3282612112565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612a6457612a63612202565b5b600182019050919050565b6000612a7a82612112565b9150612a8583612112565b9250828202612a9381612112565b91508282048414831517612aaa57612aa9612202565b5b509291505056fea264697066735822122030d2d39c55db05e43cc7652a743f9fc5c103fc49663b9a67ee668dfb221e9f0c64736f6c63430008130033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100575760003560e01c806301ffc9a71461005c5780632682dd661461008c5780635bdaa916146100bc5780639061b923146100d8578063de9abe5e14610108575b600080fd5b6100766004803603810190610071919061142f565b610138565b6040516100839190611477565b60405180910390f35b6100a660048036038101906100a191906116be565b6101b2565b6040516100b391906117b5565b60405180910390f35b6100d660048036038101906100d19190611832565b6102bc565b005b6100f260048036038101906100ed9190611832565b61046b565b6040516100ff9190611908565b60405180910390f35b610122600480360381019061011d91906116be565b6105f7565b60405161012f91906117b5565b60405180910390f35b60007f9061b923000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806101ab57506101aa82610707565b5b9050919050565b60606000836001815181106101ca576101c961192a565b5b60200260200101515103610297576000828060200190518101906101ee91906119b7565b90507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166301984892826040518263ffffffff1660e01b81526004016102499190611a05565b600060405180830381865afa158015610266573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061028f9190611ac1565b9150506102b6565b826001815181106102ab576102aa61192a565b5b602002602001015190505b92915050565b600084848101906102cd9190611b0a565b905060008060008060008088888101906102e79190611c9f565b95509550955095509550955060008673ffffffffffffffffffffffffffffffffffffffff16633baa6d508787878c6040518563ffffffff1660e01b81526004016103349493929190611f4a565b600060405180830381865afa158015610351573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061037a91906120c9565b905084518151146103c657805185516040517f291894250000000000000000000000000000000000000000000000000000000081526004016103bd92919061212b565b60405180910390fd5b60006104618483856040516024016103df929190612154565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050503073ffffffffffffffffffffffffffffffffffffffff1661077190919063ffffffff16565b9050805160208201f35b6060600083839061047c91906121a3565b905060006104dc87878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505060018060286104d79190612231565b6107bd565b50905063691f343160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610563576000858560049080926105409392919061226f565b81019061054d91906122aa565b90506105598183610806565b93505050506105ef565b6359d1d43c60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036105ec57600080868660049080926105c59392919061226f565b8101906105d29190612347565b915091506105e18282856108ef565b9450505050506105ef565b50505b949350505050565b606060008360018151811061060f5761060e61192a565b5b602002602001015151036106e2576000808380602001905181019061063491906123a3565b915091507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663d977f6b583836040518363ffffffff1660e01b81526004016106939291906123ff565b600060405180830381865afa1580156106b0573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906106d99190611ac1565b92505050610701565b826001815181106106f6576106f561192a565b5b602002602001015190505b92915050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b60606107b5838360006040518060400160405280601e81526020017f416464726573733a206c6f772d6c6576656c2063616c6c206661696c656400008152506109ed565b905092915050565b600080602884846107ce919061242f565b10156107e057600080915091506107fe565b6000806107ee878787610aba565b915091508160001c819350935050505b935093915050565b60606108e9632682dd6660e01b836040516020016108249190611a05565b6040516020818303038152906040526108da866108cc60006108be60036108b08c6108a260046108947f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000610b9f565b610cae90919063ffffffff16565b610d8f90919063ffffffff16565b610e1090919063ffffffff16565b610ef190919063ffffffff16565b610d8f90919063ffffffff16565b610faf9092919063ffffffff16565b92915050565b60606109e663de9abe5e60e01b838560405160200161090f9291906123ff565b6040516020818303038152906040526109d7866109c9896109bb60006109ad600261099f8f61099160046109837f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000610b9f565b610cae90919063ffffffff16565b610d8f90919063ffffffff16565b610e1090919063ffffffff16565b610ef190919063ffffffff16565b610d8f90919063ffffffff16565b61113a90919063ffffffff16565b610faf9092919063ffffffff16565b9392505050565b606082471015610a32576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a29906124d5565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051610a5b9190612531565b60006040518083038185875af1925050503d8060008114610a98576040519150601f19603f3d011682016040523d82523d6000602084013e610a9d565b606091505b5091509150610aae8783838761119c565b92505050949350505050565b600080600190508451831115610acf57600080fd5b610b31565b6000603a8210602f83111615610aef57603082039050610b2c565b60478210604083111615610b0b57600a60418303019050610b2c565b60678210606083111615610b2757600a60618303019050610b2c565b60ff90505b919050565b60208501845b84811015610b9557610b4e8183015160001a610ad4565b610b606001830184015160001a610ad4565b60ff811460ff83141715610b7957600094505050610b95565b808260041b17808760081b179650505050600281019050610b37565b5050935093915050565b610ba7611368565b6000602067ffffffffffffffff811115610bc457610bc36114a8565b5b604051908082528060200260200182016040528015610bf25781602001602082028036833780820191505090505b5090506000602067ffffffffffffffff811115610c1257610c116114a8565b5b604051908082528060200260200182016040528015610c4557816020015b6060815260200190600190039081610c305790505b50905060008252600081526040518060a001604052808673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff16815260200183815260200160008152602001828152509250505092915050565b610cb6611368565b600083604001519050600081519050600081118015610cd9575060208560600151105b15610cea57610ce98560ff611211565b5b60018101825260208560400151511115610d3c5760206040517f128e7008000000000000000000000000000000000000000000000000000000008152600401610d339190612548565b60405180910390fd5b6000856060018181525050610d52856000611211565b610d8485610d7f8787604051602001610d6b9190612548565b6040516020818303038152906040526112b8565b611211565b849250505092915050565b610d97611368565b6020836060015110610dd5576040517fb00fd63800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610e0783610e028585604051602001610dee9190612572565b6040516020818303038152906040526112b8565b611211565b82905092915050565b610e18611368565b600083604001519050600081519050600081118015610e3b575060208560600151105b15610e4c57610e4b8560ff611211565b5b60018101825260208560400151511115610e9e5760206040517f128e7008000000000000000000000000000000000000000000000000000000008152600401610e959190612548565b60405180910390fd5b6000856060018181525050610eb4856001611211565b610ee685610ee18787604051602001610ecd9190612548565b6040516020818303038152906040526112b8565b611211565b849250505092915050565b610ef9611368565b6020836060015110610f37576040517fb00fd63800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8260400151518260ff161180610f505750601f8260ff16115b15610f9957818360400151516040517f101586e0000000000000000000000000000000000000000000000000000000008152600401610f909291906125d5565b60405180910390fd5b610fa68383602017611211565b82905092915050565b6000836040015151118015610fc8575060208360600151105b15610fd957610fd88360ff611211565b5b30836000015173ffffffffffffffffffffffffffffffffffffffff1663b50f2fbc6040518163ffffffff1660e01b8152600401600060405180830381865afa158015611029573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061105291906126df565b84602001518560400151866080015160405160240161107393929190612728565b60405160208183030381529060405263ea9cd3bf60e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050635bdaa91660e01b866000015187602001518860400151896080015189896040516020016110eb969594939291906127d1565b6040516020818303038152906040526040517f556f1830000000000000000000000000000000000000000000000000000000008152600401611131959493929190612953565b60405180910390fd5b611142611368565b6020836060015110611180576040517fb00fd63800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6111938361118e85856112b8565b611211565b82905092915050565b606083156111fe5760008351036111f6576111b6856112f5565b6111f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111ec90612a07565b60405180910390fd5b5b829050611209565b6112088383611318565b5b949350505050565b60006001836040015151611225919061242f565b905082606001805180919061123990612a27565b81525060086112489190612a6f565b8260f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c836040015182815181106112875761128661192a565b5b602002602001015117836040015182815181106112a7576112a661192a565b5b602002602001018181525050505050565b600080836080015190508051915060018201815282818360ff16815181106112e3576112e261192a565b5b60200260200101819052505092915050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b60008251111561132b5781518083602001fd5b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161135f91906117b5565b60405180910390fd5b6040518060a00160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff1681526020016060815260200160008152602001606081525090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61140c816113d7565b811461141757600080fd5b50565b60008135905061142981611403565b92915050565b600060208284031215611445576114446113cd565b5b60006114538482850161141a565b91505092915050565b60008115159050919050565b6114718161145c565b82525050565b600060208201905061148c6000830184611468565b92915050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6114e082611497565b810181811067ffffffffffffffff821117156114ff576114fe6114a8565b5b80604052505050565b60006115126113c3565b905061151e82826114d7565b919050565b600067ffffffffffffffff82111561153e5761153d6114a8565b5b602082029050602081019050919050565b600080fd5b600080fd5b600067ffffffffffffffff821115611574576115736114a8565b5b61157d82611497565b9050602081019050919050565b82818337600083830152505050565b60006115ac6115a784611559565b611508565b9050828152602081018484840111156115c8576115c7611554565b5b6115d384828561158a565b509392505050565b600082601f8301126115f0576115ef611492565b5b8135611600848260208601611599565b91505092915050565b600061161c61161784611523565b611508565b9050808382526020820190506020840283018581111561163f5761163e61154f565b5b835b8181101561168657803567ffffffffffffffff81111561166457611663611492565b5b80860161167189826115db565b85526020850194505050602081019050611641565b5050509392505050565b600082601f8301126116a5576116a4611492565b5b81356116b5848260208601611609565b91505092915050565b600080604083850312156116d5576116d46113cd565b5b600083013567ffffffffffffffff8111156116f3576116f26113d2565b5b6116ff85828601611690565b925050602083013567ffffffffffffffff8111156117205761171f6113d2565b5b61172c858286016115db565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b60005b83811015611770578082015181840152602081019050611755565b60008484015250505050565b600061178782611736565b6117918185611741565b93506117a1818560208601611752565b6117aa81611497565b840191505092915050565b600060208201905081810360008301526117cf818461177c565b905092915050565b600080fd5b60008083601f8401126117f2576117f1611492565b5b8235905067ffffffffffffffff81111561180f5761180e6117d7565b5b60208301915083600182028301111561182b5761182a61154f565b5b9250929050565b6000806000806040858703121561184c5761184b6113cd565b5b600085013567ffffffffffffffff81111561186a576118696113d2565b5b611876878288016117dc565b9450945050602085013567ffffffffffffffff811115611899576118986113d2565b5b6118a5878288016117dc565b925092505092959194509250565b600081519050919050565b600082825260208201905092915050565b60006118da826118b3565b6118e481856118be565b93506118f4818560208601611752565b6118fd81611497565b840191505092915050565b6000602082019050818103600083015261192281846118cf565b905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061198482611959565b9050919050565b61199481611979565b811461199f57600080fd5b50565b6000815190506119b18161198b565b92915050565b6000602082840312156119cd576119cc6113cd565b5b60006119db848285016119a2565b91505092915050565b60006119ef82611959565b9050919050565b6119ff816119e4565b82525050565b6000602082019050611a1a60008301846119f6565b92915050565b600067ffffffffffffffff821115611a3b57611a3a6114a8565b5b611a4482611497565b9050602081019050919050565b6000611a64611a5f84611a20565b611508565b905082815260208101848484011115611a8057611a7f611554565b5b611a8b848285611752565b509392505050565b600082601f830112611aa857611aa7611492565b5b8151611ab8848260208601611a51565b91505092915050565b600060208284031215611ad757611ad66113cd565b5b600082015167ffffffffffffffff811115611af557611af46113d2565b5b611b0184828501611a93565b91505092915050565b600060208284031215611b2057611b1f6113cd565b5b600082013567ffffffffffffffff811115611b3e57611b3d6113d2565b5b611b4a848285016115db565b91505092915050565b6000611b5e826119e4565b9050919050565b611b6e81611b53565b8114611b7957600080fd5b50565b600081359050611b8b81611b65565b92915050565b600081359050611ba08161198b565b92915050565b600067ffffffffffffffff821115611bc157611bc06114a8565b5b602082029050602081019050919050565b6000819050919050565b611be581611bd2565b8114611bf057600080fd5b50565b600081359050611c0281611bdc565b92915050565b6000611c1b611c1684611ba6565b611508565b90508083825260208201905060208402830185811115611c3e57611c3d61154f565b5b835b81811015611c675780611c538882611bf3565b845260208401935050602081019050611c40565b5050509392505050565b600082601f830112611c8657611c85611492565b5b8135611c96848260208601611c08565b91505092915050565b60008060008060008060c08789031215611cbc57611cbb6113cd565b5b6000611cca89828a01611b7c565b9650506020611cdb89828a01611b91565b955050604087013567ffffffffffffffff811115611cfc57611cfb6113d2565b5b611d0889828a01611c71565b945050606087013567ffffffffffffffff811115611d2957611d286113d2565b5b611d3589828a01611690565b9350506080611d4689828a0161141a565b92505060a087013567ffffffffffffffff811115611d6757611d666113d2565b5b611d7389828a016115db565b9150509295509295509295565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b611db581611bd2565b82525050565b6000611dc78383611dac565b60208301905092915050565b6000602082019050919050565b6000611deb82611d80565b611df58185611d8b565b9350611e0083611d9c565b8060005b83811015611e31578151611e188882611dbb565b9750611e2383611dd3565b925050600181019050611e04565b5085935050505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600082825260208201905092915050565b6000611e86826118b3565b611e908185611e6a565b9350611ea0818560208601611752565b611ea981611497565b840191505092915050565b6000611ec08383611e7b565b905092915050565b6000602082019050919050565b6000611ee082611e3e565b611eea8185611e49565b935083602082028501611efc85611e5a565b8060005b85811015611f385784840389528151611f198582611eb4565b9450611f2483611ec8565b925060208a01995050600181019050611f00565b50829750879550505050505092915050565b6000608082019050611f5f60008301876119f6565b8181036020830152611f718186611de0565b90508181036040830152611f858185611ed5565b90508181036060830152611f9981846118cf565b905095945050505050565b6000611fb7611fb284611559565b611508565b905082815260208101848484011115611fd357611fd2611554565b5b611fde848285611752565b509392505050565b600082601f830112611ffb57611ffa611492565b5b815161200b848260208601611fa4565b91505092915050565b600061202761202284611523565b611508565b9050808382526020820190506020840283018581111561204a5761204961154f565b5b835b8181101561209157805167ffffffffffffffff81111561206f5761206e611492565b5b80860161207c8982611fe6565b8552602085019450505060208101905061204c565b5050509392505050565b600082601f8301126120b0576120af611492565b5b81516120c0848260208601612014565b91505092915050565b6000602082840312156120df576120de6113cd565b5b600082015167ffffffffffffffff8111156120fd576120fc6113d2565b5b6121098482850161209b565b91505092915050565b6000819050919050565b61212581612112565b82525050565b6000604082019050612140600083018561211c565b61214d602083018461211c565b9392505050565b6000604082019050818103600083015261216e8185611ed5565b9050818103602083015261218281846118cf565b90509392505050565b600082905092915050565b600082821b905092915050565b60006121af838361218b565b826121ba81356113d7565b925060048210156121fa576121f57fffffffff0000000000000000000000000000000000000000000000000000000083600403600802612196565b831692505b505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061223c82612112565b915061224783612112565b925082820190508082111561225f5761225e612202565b5b92915050565b600080fd5b600080fd5b6000808585111561228357612282612265565b5b838611156122945761229361226a565b5b6001850283019150848603905094509492505050565b6000602082840312156122c0576122bf6113cd565b5b60006122ce84828501611bf3565b91505092915050565b60006122ea6122e584611a20565b611508565b90508281526020810184848401111561230657612305611554565b5b61231184828561158a565b509392505050565b600082601f83011261232e5761232d611492565b5b813561233e8482602086016122d7565b91505092915050565b6000806040838503121561235e5761235d6113cd565b5b600061236c85828601611bf3565b925050602083013567ffffffffffffffff81111561238d5761238c6113d2565b5b61239985828601612319565b9150509250929050565b600080604083850312156123ba576123b96113cd565b5b60006123c8858286016119a2565b925050602083015167ffffffffffffffff8111156123e9576123e86113d2565b5b6123f585828601611a93565b9150509250929050565b600060408201905061241460008301856119f6565b8181036020830152612426818461177c565b90509392505050565b600061243a82612112565b915061244583612112565b925082820390508181111561245d5761245c612202565b5b92915050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b60006124bf602683611741565b91506124ca82612463565b604082019050919050565b600060208201905081810360008301526124ee816124b2565b9050919050565b600081905092915050565b600061250b826118b3565b61251581856124f5565b9350612525818560208601611752565b80840191505092915050565b600061253d8284612500565b915081905092915050565b600060208201905061255d600083018461211c565b92915050565b61256c81611bd2565b82525050565b60006020820190506125876000830184612563565b92915050565b600060ff82169050919050565b6000819050919050565b60006125bf6125ba6125b58461258d565b61259a565b612112565b9050919050565b6125cf816125a4565b82525050565b60006040820190506125ea60008301856125c6565b6125f7602083018461211c565b9392505050565b600067ffffffffffffffff821115612619576126186114a8565b5b602082029050602081019050919050565b600061263d612638846125fe565b611508565b905080838252602082019050602084028301858111156126605761265f61154f565b5b835b818110156126a757805167ffffffffffffffff81111561268557612684611492565b5b8086016126928982611a93565b85526020850194505050602081019050612662565b5050509392505050565b600082601f8301126126c6576126c5611492565b5b81516126d684826020860161262a565b91505092915050565b6000602082840312156126f5576126f46113cd565b5b600082015167ffffffffffffffff811115612713576127126113d2565b5b61271f848285016126b1565b91505092915050565b600060608201905061273d60008301866119f6565b818103602083015261274f8185611de0565b905081810360408301526127638184611ed5565b9050949350505050565b600061278861278361277e84611959565b61259a565b611959565b9050919050565b600061279a8261276d565b9050919050565b60006127ac8261278f565b9050919050565b6127bc816127a1565b82525050565b6127cb816113d7565b82525050565b600060c0820190506127e660008301896127b3565b6127f360208301886119f6565b81810360408301526128058187611de0565b905081810360608301526128198186611ed5565b905061282860808301856127c2565b81810360a083015261283a81846118cf565b9050979650505050505050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600082825260208201905092915050565b600061288f82611736565b6128998185612873565b93506128a9818560208601611752565b6128b281611497565b840191505092915050565b60006128c98383612884565b905092915050565b6000602082019050919050565b60006128e982612847565b6128f38185612852565b93508360208202850161290585612863565b8060005b85811015612941578484038952815161292285826128bd565b945061292d836128d1565b925060208a01995050600181019050612909565b50829750879550505050505092915050565b600060a08201905061296860008301886119f6565b818103602083015261297a81876128de565b9050818103604083015261298e81866118cf565b905061299d60608301856127c2565b81810360808301526129af81846118cf565b90509695505050505050565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b60006129f1601d83611741565b91506129fc826129bb565b602082019050919050565b60006020820190508181036000830152612a20816129e4565b9050919050565b6000612a3282612112565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612a6457612a63612202565b5b600182019050919050565b6000612a7a82612112565b9150612a8583612112565b9250828202612a9381612112565b91508282048414831517612aaa57612aa9612202565b5b509291505056fea264697066735822122030d2d39c55db05e43cc7652a743f9fc5c103fc49663b9a67ee668dfb221e9f0c64736f6c63430008130033", + "devdoc": { + "kind": "dev", + "methods": { + "getStorageSlotsCallback(bytes,bytes)": { + "details": "Internal callback function invoked by CCIP-Read in response to a `getStorageSlots` request." + }, + "resolve(bytes,bytes)": { + "details": "Resolve and verify a record stored in l2 target address. It supports fallback to the default resolver", + "params": { + "data": "The actual calldata", + "name": "DNS encoded ENS name to query" + }, + "returns": { + "result": "result of the call" + } + }, + "supportsInterface(bytes4)": { + "details": "See {IERC165-supportsInterface}." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/crosschain-reverse-resolver/deployments/sepolia/BaseL1ReverseResolver.json b/crosschain-reverse-resolver/deployments/sepolia/BaseL1ReverseResolver.json new file mode 100644 index 00000000..efbe36c6 --- /dev/null +++ b/crosschain-reverse-resolver/deployments/sepolia/BaseL1ReverseResolver.json @@ -0,0 +1,271 @@ +{ + "address": "0x302096e94FC120A21053f7563e2Ed554d523ba41", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IEVMVerifier", + "name": "_verifier", + "type": "address" + }, + { + "internalType": "address", + "name": "_target", + "type": "address" + }, + { + "internalType": "contract IDefaultReverseResolver", + "name": "_defaultReverseResolver", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "CommandTooLong", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "InvalidReference", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "string[]", + "name": "urls", + "type": "string[]" + }, + { + "internalType": "bytes", + "name": "callData", + "type": "bytes" + }, + { + "internalType": "bytes4", + "name": "callbackFunction", + "type": "bytes4" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "name": "OffchainLookup", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "actual", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + } + ], + "name": "ResponseLengthMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "TooManyCommands", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "response", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "extradata", + "type": "bytes" + } + ], + "name": "getStorageSlotsCallback", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes[]", + "name": "values", + "type": "bytes[]" + }, + { + "internalType": "bytes", + "name": "callbackdata", + "type": "bytes" + } + ], + "name": "nameCallback", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "name", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "resolve", + "outputs": [ + { + "internalType": "bytes", + "name": "result", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes[]", + "name": "values", + "type": "bytes[]" + }, + { + "internalType": "bytes", + "name": "callbackdata", + "type": "bytes" + } + ], + "name": "textCallback", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x60cad5b48803cc71a0588b4059d40b60bfd5a81a1fdf26a8734a05814d82d797", + "receipt": { + "to": null, + "from": "0xDBBC2C0fe2a1D0fB4056B35a22e543bEb715E7FC", + "contractAddress": "0x302096e94FC120A21053f7563e2Ed554d523ba41", + "transactionIndex": 42, + "gasUsed": "2427871", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x65dd1dd6b3a969bc04d15d760f862dd91779f2bf5254e517c16d33db7de6e7e8", + "transactionHash": "0x60cad5b48803cc71a0588b4059d40b60bfd5a81a1fdf26a8734a05814d82d797", + "logs": [], + "blockNumber": 5347538, + "cumulativeGasUsed": "8072240", + "status": 1, + "byzantium": true + }, + "args": [ + "0xAdef74372444e716C0473dEe1F9Cb3108EFa3818", + "0x913CC39C2A6aa4A1531429C079bA5f8DcF6a2FC2", + "0xfD2c2598382D8876BcC70f550B22d7F70Dda30b0" + ], + "numDeployments": 4, + "solcInputHash": "7cc7da1092d13c01f4d5f27229751af2", + "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IEVMVerifier\",\"name\":\"_verifier\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_target\",\"type\":\"address\"},{\"internalType\":\"contract IDefaultReverseResolver\",\"name\":\"_defaultReverseResolver\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"CommandTooLong\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"max\",\"type\":\"uint256\"}],\"name\":\"InvalidReference\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"string[]\",\"name\":\"urls\",\"type\":\"string[]\"},{\"internalType\":\"bytes\",\"name\":\"callData\",\"type\":\"bytes\"},{\"internalType\":\"bytes4\",\"name\":\"callbackFunction\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"OffchainLookup\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"actual\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expected\",\"type\":\"uint256\"}],\"name\":\"ResponseLengthMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"max\",\"type\":\"uint256\"}],\"name\":\"TooManyCommands\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"response\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"extradata\",\"type\":\"bytes\"}],\"name\":\"getStorageSlotsCallback\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"values\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"callbackdata\",\"type\":\"bytes\"}],\"name\":\"nameCallback\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"name\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"result\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"values\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"callbackdata\",\"type\":\"bytes\"}],\"name\":\"textCallback\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"getStorageSlotsCallback(bytes,bytes)\":{\"details\":\"Internal callback function invoked by CCIP-Read in response to a `getStorageSlots` request.\"},\"resolve(bytes,bytes)\":{\"details\":\"Resolve and verify a record stored in l2 target address. It supports fallback to the default resolver\",\"params\":{\"data\":\"The actual calldata\",\"name\":\"DNS encoded ENS name to query\"},\"returns\":{\"result\":\"result of the call\"}},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/L1ReverseResolver.sol\":\"L1ReverseResolver\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@ensdomains/ens-contracts/contracts/resolvers/profiles/IExtendedResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.4;\\n\\ninterface IExtendedResolver {\\n function resolve(\\n bytes memory name,\\n bytes memory data\\n ) external view returns (bytes memory);\\n}\\n\",\"keccak256\":\"0x5d81521cfae7d9a4475d27533cd8ed0d3475d369eb0674fd90ffbdbdf292faa3\",\"license\":\"MIT\"},\"@ensdomains/ens-contracts/contracts/resolvers/profiles/INameResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\ninterface INameResolver {\\n event NameChanged(bytes32 indexed node, string name);\\n\\n /**\\n * Returns the name associated with an ENS node, for reverse records.\\n * Defined in EIP181.\\n * @param node The ENS node to query.\\n * @return The associated name.\\n */\\n function name(bytes32 node) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x9ec392b612447b1acbdc01114f2da2837a658d3f3157f60a99c5269f0b623346\",\"license\":\"MIT\"},\"@ensdomains/ens-contracts/contracts/resolvers/profiles/ITextResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\ninterface ITextResolver {\\n event TextChanged(\\n bytes32 indexed node,\\n string indexed indexedKey,\\n string key,\\n string value\\n );\\n\\n /**\\n * Returns the text data associated with an ENS node and key.\\n * @param node The ENS node to query.\\n * @param key The text data key to query.\\n * @return The associated text data.\\n */\\n function text(\\n bytes32 node,\\n string calldata key\\n ) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x7c5debb3c42cd9f5de2274ea7aa053f238608314b62db441c40e31cea2543fd5\",\"license\":\"MIT\"},\"@ensdomains/ens-contracts/contracts/utils/HexUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.4;\\n\\nlibrary HexUtils {\\n /**\\n * @dev Attempts to parse bytes32 from a hex string\\n * @param str The string to parse\\n * @param idx The offset to start parsing at\\n * @param lastIdx The (exclusive) last index in `str` to consider. Use `str.length` to scan the whole string.\\n */\\n function hexStringToBytes32(\\n bytes memory str,\\n uint256 idx,\\n uint256 lastIdx\\n ) internal pure returns (bytes32 r, bool valid) {\\n valid = true;\\n assembly {\\n // check that the index to read to is not past the end of the string\\n if gt(lastIdx, mload(str)) {\\n revert(0, 0)\\n }\\n\\n function getHex(c) -> ascii {\\n // chars 48-57: 0-9\\n if and(gt(c, 47), lt(c, 58)) {\\n ascii := sub(c, 48)\\n leave\\n }\\n // chars 65-70: A-F\\n if and(gt(c, 64), lt(c, 71)) {\\n ascii := add(sub(c, 65), 10)\\n leave\\n }\\n // chars 97-102: a-f\\n if and(gt(c, 96), lt(c, 103)) {\\n ascii := add(sub(c, 97), 10)\\n leave\\n }\\n // invalid char\\n ascii := 0xff\\n }\\n\\n let ptr := add(str, 32)\\n for {\\n let i := idx\\n } lt(i, lastIdx) {\\n i := add(i, 2)\\n } {\\n let byte1 := getHex(byte(0, mload(add(ptr, i))))\\n let byte2 := getHex(byte(0, mload(add(ptr, add(i, 1)))))\\n // if either byte is invalid, set invalid and break loop\\n if or(eq(byte1, 0xff), eq(byte2, 0xff)) {\\n valid := false\\n break\\n }\\n let combined := or(shl(4, byte1), byte2)\\n r := or(shl(8, r), combined)\\n }\\n }\\n }\\n\\n /**\\n * @dev Attempts to parse an address from a hex string\\n * @param str The string to parse\\n * @param idx The offset to start parsing at\\n * @param lastIdx The (exclusive) last index in `str` to consider. Use `str.length` to scan the whole string.\\n */\\n function hexToAddress(\\n bytes memory str,\\n uint256 idx,\\n uint256 lastIdx\\n ) internal pure returns (address, bool) {\\n if (lastIdx - idx < 40) return (address(0x0), false);\\n (bytes32 r, bool valid) = hexStringToBytes32(str, idx, lastIdx);\\n return (address(uint160(uint256(r))), valid);\\n }\\n}\\n\",\"keccak256\":\"0xcae20ad72181f47dfe7fba7d88e8d902a01576b16e93362878e726989d6cfb4d\",\"license\":\"MIT\"},\"@ensdomains/evm-verifier/contracts/EVMFetchTarget.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.17;\\n\\nimport { IEVMVerifier } from './IEVMVerifier.sol';\\nimport { Address } from '@openzeppelin/contracts/utils/Address.sol';\\n\\n/**\\n * @dev Callback implementation for users of `EVMFetcher`. If you use `EVMFetcher`, your contract must\\n * inherit from this contract in order to handle callbacks correctly.\\n */\\nabstract contract EVMFetchTarget {\\n using Address for address;\\n\\n error ResponseLengthMismatch(uint256 actual, uint256 expected);\\n\\n /**\\n * @dev Internal callback function invoked by CCIP-Read in response to a `getStorageSlots` request.\\n */\\n function getStorageSlotsCallback(bytes calldata response, bytes calldata extradata) external {\\n bytes memory proof = abi.decode(response, (bytes));\\n (IEVMVerifier verifier, address addr, bytes32[] memory commands, bytes[] memory constants, bytes4 callback, bytes memory callbackData) =\\n abi.decode(extradata, (IEVMVerifier, address, bytes32[], bytes[], bytes4, bytes));\\n bytes[] memory values = verifier.getStorageValues(addr, commands, constants, proof);\\n if(values.length != commands.length) {\\n revert ResponseLengthMismatch(values.length, commands.length);\\n }\\n bytes memory ret = address(this).functionCall(abi.encodeWithSelector(callback, values, callbackData));\\n assembly {\\n return(add(ret, 32), mload(ret))\\n }\\n }\\n}\\n\",\"keccak256\":\"0x4653f974a897ce78b7bc3779ba0bb7767df99add49de4f0e9089399f47bb5942\",\"license\":\"MIT\"},\"@ensdomains/evm-verifier/contracts/EVMFetcher.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.17;\\n\\nimport { IEVMVerifier } from './IEVMVerifier.sol';\\nimport { EVMFetchTarget } from './EVMFetchTarget.sol';\\nimport { Address } from '@openzeppelin/contracts/utils/Address.sol';\\n\\ninterface IEVMGateway {\\n function getStorageSlots(address addr, bytes32[] memory commands, bytes[] memory constants) external pure returns(bytes memory witness);\\n}\\n\\nuint8 constant FLAG_DYNAMIC = 0x01;\\nuint8 constant OP_CONSTANT = 0x00;\\nuint8 constant OP_BACKREF = 0x20;\\nuint8 constant OP_END = 0xff;\\n\\n/**\\n * @dev A library to facilitate requesting storage data proofs from contracts, possibly on a different chain.\\n * See l1-verifier/test/TestL1.sol for example usage.\\n */\\nlibrary EVMFetcher {\\n uint256 constant MAX_COMMANDS = 32;\\n uint256 constant MAX_CONSTANTS = 32; // Must not be greater than 32\\n\\n using Address for address;\\n\\n error TooManyCommands(uint256 max);\\n error CommandTooLong();\\n error InvalidReference(uint256 value, uint256 max);\\n error OffchainLookup(address sender, string[] urls, bytes callData, bytes4 callbackFunction, bytes extraData);\\n\\n struct EVMFetchRequest {\\n IEVMVerifier verifier;\\n address target;\\n bytes32[] commands;\\n uint256 operationIdx;\\n bytes[] constants;\\n }\\n\\n /**\\n * @dev Creates a request to fetch the value of multiple storage slots from a contract via CCIP-Read, possibly from\\n * another chain.\\n * Supports dynamic length values and slot numbers derived from other retrieved values.\\n * @param verifier An instance of a verifier contract that can provide and verify the storage slot information.\\n * @param target The address of the contract to fetch storage proofs for.\\n */\\n function newFetchRequest(IEVMVerifier verifier, address target) internal pure returns (EVMFetchRequest memory) {\\n bytes32[] memory commands = new bytes32[](MAX_COMMANDS);\\n bytes[] memory constants = new bytes[](MAX_CONSTANTS);\\n assembly {\\n mstore(commands, 0) // Set current array length to 0\\n mstore(constants, 0)\\n } \\n return EVMFetchRequest(verifier, target, commands, 0, constants);\\n }\\n\\n /**\\n * @dev Starts describing a new fetch request.\\n * Paths specify a series of hashing operations to derive the final slot ID.\\n * See https://docs.soliditylang.org/en/v0.8.17/internals/layout_in_storage.html for details on how Solidity\\n * lays out storage variables.\\n * @param request The request object being operated on.\\n * @param baseSlot The base slot ID that forms the root of the path.\\n */\\n function getStatic(EVMFetchRequest memory request, uint256 baseSlot) internal pure returns (EVMFetchRequest memory) {\\n bytes32[] memory commands = request.commands;\\n uint256 commandIdx = commands.length;\\n if(commandIdx > 0 && request.operationIdx < 32) {\\n // Terminate previous command\\n _addOperation(request, OP_END);\\n }\\n assembly {\\n mstore(commands, add(commandIdx, 1)) // Increment command array length\\n }\\n if(request.commands.length > MAX_COMMANDS) {\\n revert TooManyCommands(MAX_COMMANDS);\\n }\\n request.operationIdx = 0;\\n _addOperation(request, 0);\\n _addOperation(request, _addConstant(request, abi.encode(baseSlot)));\\n return request;\\n }\\n\\n /**\\n * @dev Starts describing a new fetch request.\\n * Paths specify a series of hashing operations to derive the final slot ID.\\n * See https://docs.soliditylang.org/en/v0.8.17/internals/layout_in_storage.html for details on how Solidity\\n * lays out storage variables.\\n * @param request The request object being operated on.\\n * @param baseSlot The base slot ID that forms the root of the path.\\n */\\n function getDynamic(EVMFetchRequest memory request, uint256 baseSlot) internal pure returns (EVMFetchRequest memory) {\\n bytes32[] memory commands = request.commands;\\n uint256 commandIdx = commands.length;\\n if(commandIdx > 0 && request.operationIdx < 32) {\\n // Terminate previous command\\n _addOperation(request, OP_END);\\n }\\n assembly {\\n mstore(commands, add(commandIdx, 1)) // Increment command array length\\n }\\n if(request.commands.length > MAX_COMMANDS) {\\n revert TooManyCommands(MAX_COMMANDS);\\n }\\n request.operationIdx = 0;\\n _addOperation(request, FLAG_DYNAMIC);\\n _addOperation(request, _addConstant(request, abi.encode(baseSlot)));\\n return request;\\n }\\n\\n /**\\n * @dev Adds a `uint256` element to the current path.\\n * @param request The request object being operated on.\\n * @param el The element to add.\\n */\\n function element(EVMFetchRequest memory request, uint256 el) internal pure returns (EVMFetchRequest memory) {\\n if(request.operationIdx >= 32) {\\n revert CommandTooLong();\\n }\\n _addOperation(request, _addConstant(request, abi.encode(el)));\\n return request;\\n }\\n\\n /**\\n * @dev Adds a `bytes32` element to the current path.\\n * @param request The request object being operated on.\\n * @param el The element to add.\\n */\\n function element(EVMFetchRequest memory request, bytes32 el) internal pure returns (EVMFetchRequest memory) {\\n if(request.operationIdx >= 32) {\\n revert CommandTooLong();\\n }\\n _addOperation(request, _addConstant(request, abi.encode(el)));\\n return request;\\n }\\n\\n /**\\n * @dev Adds an `address` element to the current path.\\n * @param request The request object being operated on.\\n * @param el The element to add.\\n */\\n function element(EVMFetchRequest memory request, address el) internal pure returns (EVMFetchRequest memory) {\\n if(request.operationIdx >= 32) {\\n revert CommandTooLong();\\n }\\n _addOperation(request, _addConstant(request, abi.encode(el)));\\n return request;\\n }\\n\\n /**\\n * @dev Adds a `bytes` element to the current path.\\n * @param request The request object being operated on.\\n * @param el The element to add.\\n */\\n function element(EVMFetchRequest memory request, bytes memory el) internal pure returns (EVMFetchRequest memory) {\\n if(request.operationIdx >= 32) {\\n revert CommandTooLong();\\n }\\n _addOperation(request, _addConstant(request, el));\\n return request;\\n }\\n\\n /**\\n * @dev Adds a `string` element to the current path.\\n * @param request The request object being operated on.\\n * @param el The element to add.\\n */\\n function element(EVMFetchRequest memory request, string memory el) internal pure returns (EVMFetchRequest memory) {\\n if(request.operationIdx >= 32) {\\n revert CommandTooLong();\\n }\\n _addOperation(request, _addConstant(request, bytes(el)));\\n return request;\\n }\\n\\n /**\\n * @dev Adds a reference to a previous fetch to the current path.\\n * @param request The request object being operated on.\\n * @param idx The index of the previous fetch request, starting at 0.\\n */\\n function ref(EVMFetchRequest memory request, uint8 idx) internal pure returns (EVMFetchRequest memory) {\\n if(request.operationIdx >= 32) {\\n revert CommandTooLong();\\n }\\n if(idx > request.commands.length || idx > 31) {\\n revert InvalidReference(idx, request.commands.length);\\n }\\n _addOperation(request, OP_BACKREF | idx);\\n return request;\\n }\\n\\n /**\\n * @dev Initiates the fetch request.\\n * Calling this function terminates execution; clients that implement CCIP-Read will make a callback to\\n * `callback` with the results of the operation.\\n * @param callbackId A callback function selector on this contract that will be invoked via CCIP-Read with the result of the lookup.\\n * The function must have a signature matching `(bytes[] memory values, bytes callbackData)` with a return type matching the call in which\\n * this function was invoked. Its return data will be returned as the return value of the entire CCIP-read operation.\\n * @param callbackData Extra data to supply to the callback.\\n */\\n function fetch(EVMFetchRequest memory request, bytes4 callbackId, bytes memory callbackData) internal view {\\n if(request.commands.length > 0 && request.operationIdx < 32) {\\n // Terminate last command\\n _addOperation(request, OP_END);\\n }\\n revert OffchainLookup(\\n address(this),\\n request.verifier.gatewayURLs(),\\n abi.encodeCall(IEVMGateway.getStorageSlots, (request.target, request.commands, request.constants)),\\n EVMFetchTarget.getStorageSlotsCallback.selector,\\n abi.encode(request.verifier, request.target, request.commands, request.constants, callbackId, callbackData)\\n );\\n }\\n\\n function _addConstant(EVMFetchRequest memory request, bytes memory value) private pure returns(uint8 idx) {\\n bytes[] memory constants = request.constants;\\n idx = uint8(constants.length);\\n assembly {\\n mstore(constants, add(idx, 1)) // Increment constant array length\\n }\\n constants[idx] = value;\\n }\\n\\n function _addOperation(EVMFetchRequest memory request, uint8 op) private pure {\\n uint256 commandIdx = request.commands.length - 1;\\n request.commands[commandIdx] = request.commands[commandIdx] | (bytes32(bytes1(op)) >> (8 * request.operationIdx++));\\n }\\n}\\n\",\"keccak256\":\"0x5a6a955ebf3e6da9ce8d39e2729c35e4e800426025954a9a9777c209447ff8b4\",\"license\":\"MIT\"},\"@ensdomains/evm-verifier/contracts/IEVMVerifier.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.17;\\n\\ninterface IEVMVerifier {\\n function gatewayURLs() external view returns(string[] memory);\\n function getStorageValues(address target, bytes32[] memory commands, bytes[] memory constants, bytes memory proof) external view returns(bytes[] memory values);\\n}\\n\",\"keccak256\":\"0x30a635309aeebbde83774010eea5e975b8e73d1932140457121eefdce7792d72\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"contracts/IDefaultReverseResolver.sol\":{\"content\":\"pragma solidity >=0.8.4;\\n\\ninterface IDefaultReverseResolver {\\n function name(address addr) external view returns (string memory);\\n\\n function text(\\n address addr,\\n string memory key\\n ) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x0233c067351640bcfff8824150323e34f06abf239def880164a10eb8846479cf\"},\"contracts/L1ReverseResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.17;\\n\\nimport {EVMFetcher} from '@ensdomains/evm-verifier/contracts/EVMFetcher.sol';\\nimport {EVMFetchTarget} from '@ensdomains/evm-verifier/contracts/EVMFetchTarget.sol';\\nimport {IEVMVerifier} from '@ensdomains/evm-verifier/contracts/IEVMVerifier.sol';\\nimport \\\"@ensdomains/ens-contracts/contracts/resolvers/profiles/INameResolver.sol\\\";\\nimport \\\"@ensdomains/ens-contracts/contracts/resolvers/profiles/ITextResolver.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/introspection/ERC165.sol\\\";\\nimport \\\"@ensdomains/ens-contracts/contracts/utils/HexUtils.sol\\\";\\nimport \\\"@ensdomains/ens-contracts/contracts/resolvers/profiles/IExtendedResolver.sol\\\";\\nimport \\\"./IDefaultReverseResolver.sol\\\";\\n\\ncontract L1ReverseResolver is EVMFetchTarget, IExtendedResolver, ERC165 {\\n using EVMFetcher for EVMFetcher.EVMFetchRequest;\\n IEVMVerifier immutable verifier;\\n address immutable target;\\n IDefaultReverseResolver immutable defaultReverseResolver;\\n uint256 constant VERSIONABLE_TEXTS_SLOT = 2;\\n uint256 constant VERSIONABLE_NAME_SLOT = 3;\\n uint256 constant RECORD_VERSIONS_SLOT = 4;\\n uint256 constant ADDRESS_LENGTH = 40;\\n using HexUtils for bytes;\\n\\n constructor(IEVMVerifier _verifier, address _target, IDefaultReverseResolver _defaultReverseResolver ) {\\n verifier = _verifier;\\n target = _target;\\n defaultReverseResolver = _defaultReverseResolver;\\n }\\n\\n /** \\n * @dev Resolve and verify a record stored in l2 target address. It supports fallback to the default resolver\\n * @param name DNS encoded ENS name to query\\n * @param data The actual calldata\\n * @return result result of the call\\n */\\n function resolve(bytes calldata name, bytes calldata data) external view returns (bytes memory result) {\\n bytes4 selector = bytes4(data);\\n (address addr,) = HexUtils.hexToAddress(name, 1, ADDRESS_LENGTH + 1);\\n if (selector == INameResolver.name.selector) {\\n (bytes32 node) = abi.decode(data[4:], (bytes32));\\n return bytes(_name(node, addr));\\n }\\n if (selector == ITextResolver.text.selector) {\\n (bytes32 node, string memory key) = abi.decode(data[4:], (bytes32, string));\\n return bytes(_text(node, key, addr));\\n }\\n }\\n\\n function _name(bytes32 node, address addr) private view returns (string memory) {\\n EVMFetcher.newFetchRequest(verifier, target)\\n .getStatic(RECORD_VERSIONS_SLOT)\\n .element(node)\\n .getDynamic(VERSIONABLE_NAME_SLOT)\\n .ref(0)\\n .element(node)\\n .fetch(this.nameCallback.selector, abi.encode(addr));\\n }\\n\\n function nameCallback(\\n bytes[] memory values,\\n bytes memory callbackdata\\n ) public view returns (string memory) { \\n if(values[1].length == 0 ){\\n (address addr) = abi.decode(callbackdata, (address));\\n return defaultReverseResolver.name(addr);\\n }else{\\n return string(values[1]);\\n }\\n }\\n\\n function _text(\\n bytes32 node,\\n string memory key,\\n address addr\\n ) private view returns (string memory) {\\n EVMFetcher.newFetchRequest(verifier, target)\\n .getStatic(RECORD_VERSIONS_SLOT)\\n .element(node)\\n .getDynamic(VERSIONABLE_TEXTS_SLOT)\\n .ref(0)\\n .element(node)\\n .element(key)\\n .fetch(this.textCallback.selector, abi.encode(addr, key));\\n }\\n\\n function textCallback(\\n bytes[] memory values,\\n bytes memory callbackdata\\n ) public view returns (string memory) {\\n if(values[1].length == 0 ){\\n (address addr, string memory key) = abi.decode(callbackdata, (address, string));\\n return defaultReverseResolver.text(addr, key);\\n }else{\\n return string(values[1]);\\n }\\n }\\n\\n function supportsInterface(\\n bytes4 interfaceId\\n ) public override view returns (bool) {\\n return\\n interfaceId == type(IExtendedResolver).interfaceId ||\\n super.supportsInterface(interfaceId);\\n }\\n}\\n\",\"keccak256\":\"0xb09771bfaf5dd9a01da9efecfbc15abc43a85501d9264c23895bbbf6edf8637a\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60e06040523480156200001157600080fd5b5060405162002d5838038062002d588339818101604052810190620000379190620001d0565b8273ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250508173ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff16815250508073ffffffffffffffffffffffffffffffffffffffff1660c08173ffffffffffffffffffffffffffffffffffffffff16815250505050506200022c565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006200010e82620000e1565b9050919050565b6000620001228262000101565b9050919050565b620001348162000115565b81146200014057600080fd5b50565b600081519050620001548162000129565b92915050565b620001658162000101565b81146200017157600080fd5b50565b60008151905062000185816200015a565b92915050565b6000620001988262000101565b9050919050565b620001aa816200018b565b8114620001b657600080fd5b50565b600081519050620001ca816200019f565b92915050565b600080600060608486031215620001ec57620001eb620000dc565b5b6000620001fc8682870162000143565b93505060206200020f8682870162000174565b92505060406200022286828701620001b9565b9150509250925092565b60805160a05160c051612ae762000271600039600081816101f2015261063a015260008181610870015261095f01526000818161084f015261093e0152612ae76000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c806301ffc9a71461005c5780632682dd661461008c5780635bdaa916146100bc5780639061b923146100d8578063de9abe5e14610108575b600080fd5b6100766004803603810190610071919061142f565b610138565b6040516100839190611477565b60405180910390f35b6100a660048036038101906100a191906116be565b6101b2565b6040516100b391906117b5565b60405180910390f35b6100d660048036038101906100d19190611832565b6102bc565b005b6100f260048036038101906100ed9190611832565b61046b565b6040516100ff9190611908565b60405180910390f35b610122600480360381019061011d91906116be565b6105f7565b60405161012f91906117b5565b60405180910390f35b60007f9061b923000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806101ab57506101aa82610707565b5b9050919050565b60606000836001815181106101ca576101c961192a565b5b60200260200101515103610297576000828060200190518101906101ee91906119b7565b90507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166301984892826040518263ffffffff1660e01b81526004016102499190611a05565b600060405180830381865afa158015610266573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061028f9190611ac1565b9150506102b6565b826001815181106102ab576102aa61192a565b5b602002602001015190505b92915050565b600084848101906102cd9190611b0a565b905060008060008060008088888101906102e79190611c9f565b95509550955095509550955060008673ffffffffffffffffffffffffffffffffffffffff16633baa6d508787878c6040518563ffffffff1660e01b81526004016103349493929190611f4a565b600060405180830381865afa158015610351573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061037a91906120c9565b905084518151146103c657805185516040517f291894250000000000000000000000000000000000000000000000000000000081526004016103bd92919061212b565b60405180910390fd5b60006104618483856040516024016103df929190612154565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050503073ffffffffffffffffffffffffffffffffffffffff1661077190919063ffffffff16565b9050805160208201f35b6060600083839061047c91906121a3565b905060006104dc87878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505060018060286104d79190612231565b6107bd565b50905063691f343160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610563576000858560049080926105409392919061226f565b81019061054d91906122aa565b90506105598183610806565b93505050506105ef565b6359d1d43c60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036105ec57600080868660049080926105c59392919061226f565b8101906105d29190612347565b915091506105e18282856108ef565b9450505050506105ef565b50505b949350505050565b606060008360018151811061060f5761060e61192a565b5b602002602001015151036106e2576000808380602001905181019061063491906123a3565b915091507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663d977f6b583836040518363ffffffff1660e01b81526004016106939291906123ff565b600060405180830381865afa1580156106b0573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906106d99190611ac1565b92505050610701565b826001815181106106f6576106f561192a565b5b602002602001015190505b92915050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b60606107b5838360006040518060400160405280601e81526020017f416464726573733a206c6f772d6c6576656c2063616c6c206661696c656400008152506109ed565b905092915050565b600080602884846107ce919061242f565b10156107e057600080915091506107fe565b6000806107ee878787610aba565b915091508160001c819350935050505b935093915050565b60606108e9632682dd6660e01b836040516020016108249190611a05565b6040516020818303038152906040526108da866108cc60006108be60036108b08c6108a260046108947f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000610b9f565b610cae90919063ffffffff16565b610d8f90919063ffffffff16565b610e1090919063ffffffff16565b610ef190919063ffffffff16565b610d8f90919063ffffffff16565b610faf9092919063ffffffff16565b92915050565b60606109e663de9abe5e60e01b838560405160200161090f9291906123ff565b6040516020818303038152906040526109d7866109c9896109bb60006109ad600261099f8f61099160046109837f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000610b9f565b610cae90919063ffffffff16565b610d8f90919063ffffffff16565b610e1090919063ffffffff16565b610ef190919063ffffffff16565b610d8f90919063ffffffff16565b61113a90919063ffffffff16565b610faf9092919063ffffffff16565b9392505050565b606082471015610a32576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a29906124d5565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051610a5b9190612531565b60006040518083038185875af1925050503d8060008114610a98576040519150601f19603f3d011682016040523d82523d6000602084013e610a9d565b606091505b5091509150610aae8783838761119c565b92505050949350505050565b600080600190508451831115610acf57600080fd5b610b31565b6000603a8210602f83111615610aef57603082039050610b2c565b60478210604083111615610b0b57600a60418303019050610b2c565b60678210606083111615610b2757600a60618303019050610b2c565b60ff90505b919050565b60208501845b84811015610b9557610b4e8183015160001a610ad4565b610b606001830184015160001a610ad4565b60ff811460ff83141715610b7957600094505050610b95565b808260041b17808760081b179650505050600281019050610b37565b5050935093915050565b610ba7611368565b6000602067ffffffffffffffff811115610bc457610bc36114a8565b5b604051908082528060200260200182016040528015610bf25781602001602082028036833780820191505090505b5090506000602067ffffffffffffffff811115610c1257610c116114a8565b5b604051908082528060200260200182016040528015610c4557816020015b6060815260200190600190039081610c305790505b50905060008252600081526040518060a001604052808673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff16815260200183815260200160008152602001828152509250505092915050565b610cb6611368565b600083604001519050600081519050600081118015610cd9575060208560600151105b15610cea57610ce98560ff611211565b5b60018101825260208560400151511115610d3c5760206040517f128e7008000000000000000000000000000000000000000000000000000000008152600401610d339190612548565b60405180910390fd5b6000856060018181525050610d52856000611211565b610d8485610d7f8787604051602001610d6b9190612548565b6040516020818303038152906040526112b8565b611211565b849250505092915050565b610d97611368565b6020836060015110610dd5576040517fb00fd63800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610e0783610e028585604051602001610dee9190612572565b6040516020818303038152906040526112b8565b611211565b82905092915050565b610e18611368565b600083604001519050600081519050600081118015610e3b575060208560600151105b15610e4c57610e4b8560ff611211565b5b60018101825260208560400151511115610e9e5760206040517f128e7008000000000000000000000000000000000000000000000000000000008152600401610e959190612548565b60405180910390fd5b6000856060018181525050610eb4856001611211565b610ee685610ee18787604051602001610ecd9190612548565b6040516020818303038152906040526112b8565b611211565b849250505092915050565b610ef9611368565b6020836060015110610f37576040517fb00fd63800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8260400151518260ff161180610f505750601f8260ff16115b15610f9957818360400151516040517f101586e0000000000000000000000000000000000000000000000000000000008152600401610f909291906125d5565b60405180910390fd5b610fa68383602017611211565b82905092915050565b6000836040015151118015610fc8575060208360600151105b15610fd957610fd88360ff611211565b5b30836000015173ffffffffffffffffffffffffffffffffffffffff1663b50f2fbc6040518163ffffffff1660e01b8152600401600060405180830381865afa158015611029573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061105291906126df565b84602001518560400151866080015160405160240161107393929190612728565b60405160208183030381529060405263ea9cd3bf60e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050635bdaa91660e01b866000015187602001518860400151896080015189896040516020016110eb969594939291906127d1565b6040516020818303038152906040526040517f556f1830000000000000000000000000000000000000000000000000000000008152600401611131959493929190612953565b60405180910390fd5b611142611368565b6020836060015110611180576040517fb00fd63800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6111938361118e85856112b8565b611211565b82905092915050565b606083156111fe5760008351036111f6576111b6856112f5565b6111f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111ec90612a07565b60405180910390fd5b5b829050611209565b6112088383611318565b5b949350505050565b60006001836040015151611225919061242f565b905082606001805180919061123990612a27565b81525060086112489190612a6f565b8260f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c836040015182815181106112875761128661192a565b5b602002602001015117836040015182815181106112a7576112a661192a565b5b602002602001018181525050505050565b600080836080015190508051915060018201815282818360ff16815181106112e3576112e261192a565b5b60200260200101819052505092915050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b60008251111561132b5781518083602001fd5b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161135f91906117b5565b60405180910390fd5b6040518060a00160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff1681526020016060815260200160008152602001606081525090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61140c816113d7565b811461141757600080fd5b50565b60008135905061142981611403565b92915050565b600060208284031215611445576114446113cd565b5b60006114538482850161141a565b91505092915050565b60008115159050919050565b6114718161145c565b82525050565b600060208201905061148c6000830184611468565b92915050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6114e082611497565b810181811067ffffffffffffffff821117156114ff576114fe6114a8565b5b80604052505050565b60006115126113c3565b905061151e82826114d7565b919050565b600067ffffffffffffffff82111561153e5761153d6114a8565b5b602082029050602081019050919050565b600080fd5b600080fd5b600067ffffffffffffffff821115611574576115736114a8565b5b61157d82611497565b9050602081019050919050565b82818337600083830152505050565b60006115ac6115a784611559565b611508565b9050828152602081018484840111156115c8576115c7611554565b5b6115d384828561158a565b509392505050565b600082601f8301126115f0576115ef611492565b5b8135611600848260208601611599565b91505092915050565b600061161c61161784611523565b611508565b9050808382526020820190506020840283018581111561163f5761163e61154f565b5b835b8181101561168657803567ffffffffffffffff81111561166457611663611492565b5b80860161167189826115db565b85526020850194505050602081019050611641565b5050509392505050565b600082601f8301126116a5576116a4611492565b5b81356116b5848260208601611609565b91505092915050565b600080604083850312156116d5576116d46113cd565b5b600083013567ffffffffffffffff8111156116f3576116f26113d2565b5b6116ff85828601611690565b925050602083013567ffffffffffffffff8111156117205761171f6113d2565b5b61172c858286016115db565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b60005b83811015611770578082015181840152602081019050611755565b60008484015250505050565b600061178782611736565b6117918185611741565b93506117a1818560208601611752565b6117aa81611497565b840191505092915050565b600060208201905081810360008301526117cf818461177c565b905092915050565b600080fd5b60008083601f8401126117f2576117f1611492565b5b8235905067ffffffffffffffff81111561180f5761180e6117d7565b5b60208301915083600182028301111561182b5761182a61154f565b5b9250929050565b6000806000806040858703121561184c5761184b6113cd565b5b600085013567ffffffffffffffff81111561186a576118696113d2565b5b611876878288016117dc565b9450945050602085013567ffffffffffffffff811115611899576118986113d2565b5b6118a5878288016117dc565b925092505092959194509250565b600081519050919050565b600082825260208201905092915050565b60006118da826118b3565b6118e481856118be565b93506118f4818560208601611752565b6118fd81611497565b840191505092915050565b6000602082019050818103600083015261192281846118cf565b905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061198482611959565b9050919050565b61199481611979565b811461199f57600080fd5b50565b6000815190506119b18161198b565b92915050565b6000602082840312156119cd576119cc6113cd565b5b60006119db848285016119a2565b91505092915050565b60006119ef82611959565b9050919050565b6119ff816119e4565b82525050565b6000602082019050611a1a60008301846119f6565b92915050565b600067ffffffffffffffff821115611a3b57611a3a6114a8565b5b611a4482611497565b9050602081019050919050565b6000611a64611a5f84611a20565b611508565b905082815260208101848484011115611a8057611a7f611554565b5b611a8b848285611752565b509392505050565b600082601f830112611aa857611aa7611492565b5b8151611ab8848260208601611a51565b91505092915050565b600060208284031215611ad757611ad66113cd565b5b600082015167ffffffffffffffff811115611af557611af46113d2565b5b611b0184828501611a93565b91505092915050565b600060208284031215611b2057611b1f6113cd565b5b600082013567ffffffffffffffff811115611b3e57611b3d6113d2565b5b611b4a848285016115db565b91505092915050565b6000611b5e826119e4565b9050919050565b611b6e81611b53565b8114611b7957600080fd5b50565b600081359050611b8b81611b65565b92915050565b600081359050611ba08161198b565b92915050565b600067ffffffffffffffff821115611bc157611bc06114a8565b5b602082029050602081019050919050565b6000819050919050565b611be581611bd2565b8114611bf057600080fd5b50565b600081359050611c0281611bdc565b92915050565b6000611c1b611c1684611ba6565b611508565b90508083825260208201905060208402830185811115611c3e57611c3d61154f565b5b835b81811015611c675780611c538882611bf3565b845260208401935050602081019050611c40565b5050509392505050565b600082601f830112611c8657611c85611492565b5b8135611c96848260208601611c08565b91505092915050565b60008060008060008060c08789031215611cbc57611cbb6113cd565b5b6000611cca89828a01611b7c565b9650506020611cdb89828a01611b91565b955050604087013567ffffffffffffffff811115611cfc57611cfb6113d2565b5b611d0889828a01611c71565b945050606087013567ffffffffffffffff811115611d2957611d286113d2565b5b611d3589828a01611690565b9350506080611d4689828a0161141a565b92505060a087013567ffffffffffffffff811115611d6757611d666113d2565b5b611d7389828a016115db565b9150509295509295509295565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b611db581611bd2565b82525050565b6000611dc78383611dac565b60208301905092915050565b6000602082019050919050565b6000611deb82611d80565b611df58185611d8b565b9350611e0083611d9c565b8060005b83811015611e31578151611e188882611dbb565b9750611e2383611dd3565b925050600181019050611e04565b5085935050505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600082825260208201905092915050565b6000611e86826118b3565b611e908185611e6a565b9350611ea0818560208601611752565b611ea981611497565b840191505092915050565b6000611ec08383611e7b565b905092915050565b6000602082019050919050565b6000611ee082611e3e565b611eea8185611e49565b935083602082028501611efc85611e5a565b8060005b85811015611f385784840389528151611f198582611eb4565b9450611f2483611ec8565b925060208a01995050600181019050611f00565b50829750879550505050505092915050565b6000608082019050611f5f60008301876119f6565b8181036020830152611f718186611de0565b90508181036040830152611f858185611ed5565b90508181036060830152611f9981846118cf565b905095945050505050565b6000611fb7611fb284611559565b611508565b905082815260208101848484011115611fd357611fd2611554565b5b611fde848285611752565b509392505050565b600082601f830112611ffb57611ffa611492565b5b815161200b848260208601611fa4565b91505092915050565b600061202761202284611523565b611508565b9050808382526020820190506020840283018581111561204a5761204961154f565b5b835b8181101561209157805167ffffffffffffffff81111561206f5761206e611492565b5b80860161207c8982611fe6565b8552602085019450505060208101905061204c565b5050509392505050565b600082601f8301126120b0576120af611492565b5b81516120c0848260208601612014565b91505092915050565b6000602082840312156120df576120de6113cd565b5b600082015167ffffffffffffffff8111156120fd576120fc6113d2565b5b6121098482850161209b565b91505092915050565b6000819050919050565b61212581612112565b82525050565b6000604082019050612140600083018561211c565b61214d602083018461211c565b9392505050565b6000604082019050818103600083015261216e8185611ed5565b9050818103602083015261218281846118cf565b90509392505050565b600082905092915050565b600082821b905092915050565b60006121af838361218b565b826121ba81356113d7565b925060048210156121fa576121f57fffffffff0000000000000000000000000000000000000000000000000000000083600403600802612196565b831692505b505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061223c82612112565b915061224783612112565b925082820190508082111561225f5761225e612202565b5b92915050565b600080fd5b600080fd5b6000808585111561228357612282612265565b5b838611156122945761229361226a565b5b6001850283019150848603905094509492505050565b6000602082840312156122c0576122bf6113cd565b5b60006122ce84828501611bf3565b91505092915050565b60006122ea6122e584611a20565b611508565b90508281526020810184848401111561230657612305611554565b5b61231184828561158a565b509392505050565b600082601f83011261232e5761232d611492565b5b813561233e8482602086016122d7565b91505092915050565b6000806040838503121561235e5761235d6113cd565b5b600061236c85828601611bf3565b925050602083013567ffffffffffffffff81111561238d5761238c6113d2565b5b61239985828601612319565b9150509250929050565b600080604083850312156123ba576123b96113cd565b5b60006123c8858286016119a2565b925050602083015167ffffffffffffffff8111156123e9576123e86113d2565b5b6123f585828601611a93565b9150509250929050565b600060408201905061241460008301856119f6565b8181036020830152612426818461177c565b90509392505050565b600061243a82612112565b915061244583612112565b925082820390508181111561245d5761245c612202565b5b92915050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b60006124bf602683611741565b91506124ca82612463565b604082019050919050565b600060208201905081810360008301526124ee816124b2565b9050919050565b600081905092915050565b600061250b826118b3565b61251581856124f5565b9350612525818560208601611752565b80840191505092915050565b600061253d8284612500565b915081905092915050565b600060208201905061255d600083018461211c565b92915050565b61256c81611bd2565b82525050565b60006020820190506125876000830184612563565b92915050565b600060ff82169050919050565b6000819050919050565b60006125bf6125ba6125b58461258d565b61259a565b612112565b9050919050565b6125cf816125a4565b82525050565b60006040820190506125ea60008301856125c6565b6125f7602083018461211c565b9392505050565b600067ffffffffffffffff821115612619576126186114a8565b5b602082029050602081019050919050565b600061263d612638846125fe565b611508565b905080838252602082019050602084028301858111156126605761265f61154f565b5b835b818110156126a757805167ffffffffffffffff81111561268557612684611492565b5b8086016126928982611a93565b85526020850194505050602081019050612662565b5050509392505050565b600082601f8301126126c6576126c5611492565b5b81516126d684826020860161262a565b91505092915050565b6000602082840312156126f5576126f46113cd565b5b600082015167ffffffffffffffff811115612713576127126113d2565b5b61271f848285016126b1565b91505092915050565b600060608201905061273d60008301866119f6565b818103602083015261274f8185611de0565b905081810360408301526127638184611ed5565b9050949350505050565b600061278861278361277e84611959565b61259a565b611959565b9050919050565b600061279a8261276d565b9050919050565b60006127ac8261278f565b9050919050565b6127bc816127a1565b82525050565b6127cb816113d7565b82525050565b600060c0820190506127e660008301896127b3565b6127f360208301886119f6565b81810360408301526128058187611de0565b905081810360608301526128198186611ed5565b905061282860808301856127c2565b81810360a083015261283a81846118cf565b9050979650505050505050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600082825260208201905092915050565b600061288f82611736565b6128998185612873565b93506128a9818560208601611752565b6128b281611497565b840191505092915050565b60006128c98383612884565b905092915050565b6000602082019050919050565b60006128e982612847565b6128f38185612852565b93508360208202850161290585612863565b8060005b85811015612941578484038952815161292285826128bd565b945061292d836128d1565b925060208a01995050600181019050612909565b50829750879550505050505092915050565b600060a08201905061296860008301886119f6565b818103602083015261297a81876128de565b9050818103604083015261298e81866118cf565b905061299d60608301856127c2565b81810360808301526129af81846118cf565b90509695505050505050565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b60006129f1601d83611741565b91506129fc826129bb565b602082019050919050565b60006020820190508181036000830152612a20816129e4565b9050919050565b6000612a3282612112565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612a6457612a63612202565b5b600182019050919050565b6000612a7a82612112565b9150612a8583612112565b9250828202612a9381612112565b91508282048414831517612aaa57612aa9612202565b5b509291505056fea264697066735822122030d2d39c55db05e43cc7652a743f9fc5c103fc49663b9a67ee668dfb221e9f0c64736f6c63430008130033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100575760003560e01c806301ffc9a71461005c5780632682dd661461008c5780635bdaa916146100bc5780639061b923146100d8578063de9abe5e14610108575b600080fd5b6100766004803603810190610071919061142f565b610138565b6040516100839190611477565b60405180910390f35b6100a660048036038101906100a191906116be565b6101b2565b6040516100b391906117b5565b60405180910390f35b6100d660048036038101906100d19190611832565b6102bc565b005b6100f260048036038101906100ed9190611832565b61046b565b6040516100ff9190611908565b60405180910390f35b610122600480360381019061011d91906116be565b6105f7565b60405161012f91906117b5565b60405180910390f35b60007f9061b923000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806101ab57506101aa82610707565b5b9050919050565b60606000836001815181106101ca576101c961192a565b5b60200260200101515103610297576000828060200190518101906101ee91906119b7565b90507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166301984892826040518263ffffffff1660e01b81526004016102499190611a05565b600060405180830381865afa158015610266573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061028f9190611ac1565b9150506102b6565b826001815181106102ab576102aa61192a565b5b602002602001015190505b92915050565b600084848101906102cd9190611b0a565b905060008060008060008088888101906102e79190611c9f565b95509550955095509550955060008673ffffffffffffffffffffffffffffffffffffffff16633baa6d508787878c6040518563ffffffff1660e01b81526004016103349493929190611f4a565b600060405180830381865afa158015610351573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061037a91906120c9565b905084518151146103c657805185516040517f291894250000000000000000000000000000000000000000000000000000000081526004016103bd92919061212b565b60405180910390fd5b60006104618483856040516024016103df929190612154565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050503073ffffffffffffffffffffffffffffffffffffffff1661077190919063ffffffff16565b9050805160208201f35b6060600083839061047c91906121a3565b905060006104dc87878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505060018060286104d79190612231565b6107bd565b50905063691f343160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610563576000858560049080926105409392919061226f565b81019061054d91906122aa565b90506105598183610806565b93505050506105ef565b6359d1d43c60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036105ec57600080868660049080926105c59392919061226f565b8101906105d29190612347565b915091506105e18282856108ef565b9450505050506105ef565b50505b949350505050565b606060008360018151811061060f5761060e61192a565b5b602002602001015151036106e2576000808380602001905181019061063491906123a3565b915091507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663d977f6b583836040518363ffffffff1660e01b81526004016106939291906123ff565b600060405180830381865afa1580156106b0573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906106d99190611ac1565b92505050610701565b826001815181106106f6576106f561192a565b5b602002602001015190505b92915050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b60606107b5838360006040518060400160405280601e81526020017f416464726573733a206c6f772d6c6576656c2063616c6c206661696c656400008152506109ed565b905092915050565b600080602884846107ce919061242f565b10156107e057600080915091506107fe565b6000806107ee878787610aba565b915091508160001c819350935050505b935093915050565b60606108e9632682dd6660e01b836040516020016108249190611a05565b6040516020818303038152906040526108da866108cc60006108be60036108b08c6108a260046108947f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000610b9f565b610cae90919063ffffffff16565b610d8f90919063ffffffff16565b610e1090919063ffffffff16565b610ef190919063ffffffff16565b610d8f90919063ffffffff16565b610faf9092919063ffffffff16565b92915050565b60606109e663de9abe5e60e01b838560405160200161090f9291906123ff565b6040516020818303038152906040526109d7866109c9896109bb60006109ad600261099f8f61099160046109837f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000610b9f565b610cae90919063ffffffff16565b610d8f90919063ffffffff16565b610e1090919063ffffffff16565b610ef190919063ffffffff16565b610d8f90919063ffffffff16565b61113a90919063ffffffff16565b610faf9092919063ffffffff16565b9392505050565b606082471015610a32576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a29906124d5565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051610a5b9190612531565b60006040518083038185875af1925050503d8060008114610a98576040519150601f19603f3d011682016040523d82523d6000602084013e610a9d565b606091505b5091509150610aae8783838761119c565b92505050949350505050565b600080600190508451831115610acf57600080fd5b610b31565b6000603a8210602f83111615610aef57603082039050610b2c565b60478210604083111615610b0b57600a60418303019050610b2c565b60678210606083111615610b2757600a60618303019050610b2c565b60ff90505b919050565b60208501845b84811015610b9557610b4e8183015160001a610ad4565b610b606001830184015160001a610ad4565b60ff811460ff83141715610b7957600094505050610b95565b808260041b17808760081b179650505050600281019050610b37565b5050935093915050565b610ba7611368565b6000602067ffffffffffffffff811115610bc457610bc36114a8565b5b604051908082528060200260200182016040528015610bf25781602001602082028036833780820191505090505b5090506000602067ffffffffffffffff811115610c1257610c116114a8565b5b604051908082528060200260200182016040528015610c4557816020015b6060815260200190600190039081610c305790505b50905060008252600081526040518060a001604052808673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff16815260200183815260200160008152602001828152509250505092915050565b610cb6611368565b600083604001519050600081519050600081118015610cd9575060208560600151105b15610cea57610ce98560ff611211565b5b60018101825260208560400151511115610d3c5760206040517f128e7008000000000000000000000000000000000000000000000000000000008152600401610d339190612548565b60405180910390fd5b6000856060018181525050610d52856000611211565b610d8485610d7f8787604051602001610d6b9190612548565b6040516020818303038152906040526112b8565b611211565b849250505092915050565b610d97611368565b6020836060015110610dd5576040517fb00fd63800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610e0783610e028585604051602001610dee9190612572565b6040516020818303038152906040526112b8565b611211565b82905092915050565b610e18611368565b600083604001519050600081519050600081118015610e3b575060208560600151105b15610e4c57610e4b8560ff611211565b5b60018101825260208560400151511115610e9e5760206040517f128e7008000000000000000000000000000000000000000000000000000000008152600401610e959190612548565b60405180910390fd5b6000856060018181525050610eb4856001611211565b610ee685610ee18787604051602001610ecd9190612548565b6040516020818303038152906040526112b8565b611211565b849250505092915050565b610ef9611368565b6020836060015110610f37576040517fb00fd63800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8260400151518260ff161180610f505750601f8260ff16115b15610f9957818360400151516040517f101586e0000000000000000000000000000000000000000000000000000000008152600401610f909291906125d5565b60405180910390fd5b610fa68383602017611211565b82905092915050565b6000836040015151118015610fc8575060208360600151105b15610fd957610fd88360ff611211565b5b30836000015173ffffffffffffffffffffffffffffffffffffffff1663b50f2fbc6040518163ffffffff1660e01b8152600401600060405180830381865afa158015611029573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061105291906126df565b84602001518560400151866080015160405160240161107393929190612728565b60405160208183030381529060405263ea9cd3bf60e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050635bdaa91660e01b866000015187602001518860400151896080015189896040516020016110eb969594939291906127d1565b6040516020818303038152906040526040517f556f1830000000000000000000000000000000000000000000000000000000008152600401611131959493929190612953565b60405180910390fd5b611142611368565b6020836060015110611180576040517fb00fd63800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6111938361118e85856112b8565b611211565b82905092915050565b606083156111fe5760008351036111f6576111b6856112f5565b6111f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111ec90612a07565b60405180910390fd5b5b829050611209565b6112088383611318565b5b949350505050565b60006001836040015151611225919061242f565b905082606001805180919061123990612a27565b81525060086112489190612a6f565b8260f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c836040015182815181106112875761128661192a565b5b602002602001015117836040015182815181106112a7576112a661192a565b5b602002602001018181525050505050565b600080836080015190508051915060018201815282818360ff16815181106112e3576112e261192a565b5b60200260200101819052505092915050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b60008251111561132b5781518083602001fd5b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161135f91906117b5565b60405180910390fd5b6040518060a00160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff1681526020016060815260200160008152602001606081525090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61140c816113d7565b811461141757600080fd5b50565b60008135905061142981611403565b92915050565b600060208284031215611445576114446113cd565b5b60006114538482850161141a565b91505092915050565b60008115159050919050565b6114718161145c565b82525050565b600060208201905061148c6000830184611468565b92915050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6114e082611497565b810181811067ffffffffffffffff821117156114ff576114fe6114a8565b5b80604052505050565b60006115126113c3565b905061151e82826114d7565b919050565b600067ffffffffffffffff82111561153e5761153d6114a8565b5b602082029050602081019050919050565b600080fd5b600080fd5b600067ffffffffffffffff821115611574576115736114a8565b5b61157d82611497565b9050602081019050919050565b82818337600083830152505050565b60006115ac6115a784611559565b611508565b9050828152602081018484840111156115c8576115c7611554565b5b6115d384828561158a565b509392505050565b600082601f8301126115f0576115ef611492565b5b8135611600848260208601611599565b91505092915050565b600061161c61161784611523565b611508565b9050808382526020820190506020840283018581111561163f5761163e61154f565b5b835b8181101561168657803567ffffffffffffffff81111561166457611663611492565b5b80860161167189826115db565b85526020850194505050602081019050611641565b5050509392505050565b600082601f8301126116a5576116a4611492565b5b81356116b5848260208601611609565b91505092915050565b600080604083850312156116d5576116d46113cd565b5b600083013567ffffffffffffffff8111156116f3576116f26113d2565b5b6116ff85828601611690565b925050602083013567ffffffffffffffff8111156117205761171f6113d2565b5b61172c858286016115db565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b60005b83811015611770578082015181840152602081019050611755565b60008484015250505050565b600061178782611736565b6117918185611741565b93506117a1818560208601611752565b6117aa81611497565b840191505092915050565b600060208201905081810360008301526117cf818461177c565b905092915050565b600080fd5b60008083601f8401126117f2576117f1611492565b5b8235905067ffffffffffffffff81111561180f5761180e6117d7565b5b60208301915083600182028301111561182b5761182a61154f565b5b9250929050565b6000806000806040858703121561184c5761184b6113cd565b5b600085013567ffffffffffffffff81111561186a576118696113d2565b5b611876878288016117dc565b9450945050602085013567ffffffffffffffff811115611899576118986113d2565b5b6118a5878288016117dc565b925092505092959194509250565b600081519050919050565b600082825260208201905092915050565b60006118da826118b3565b6118e481856118be565b93506118f4818560208601611752565b6118fd81611497565b840191505092915050565b6000602082019050818103600083015261192281846118cf565b905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061198482611959565b9050919050565b61199481611979565b811461199f57600080fd5b50565b6000815190506119b18161198b565b92915050565b6000602082840312156119cd576119cc6113cd565b5b60006119db848285016119a2565b91505092915050565b60006119ef82611959565b9050919050565b6119ff816119e4565b82525050565b6000602082019050611a1a60008301846119f6565b92915050565b600067ffffffffffffffff821115611a3b57611a3a6114a8565b5b611a4482611497565b9050602081019050919050565b6000611a64611a5f84611a20565b611508565b905082815260208101848484011115611a8057611a7f611554565b5b611a8b848285611752565b509392505050565b600082601f830112611aa857611aa7611492565b5b8151611ab8848260208601611a51565b91505092915050565b600060208284031215611ad757611ad66113cd565b5b600082015167ffffffffffffffff811115611af557611af46113d2565b5b611b0184828501611a93565b91505092915050565b600060208284031215611b2057611b1f6113cd565b5b600082013567ffffffffffffffff811115611b3e57611b3d6113d2565b5b611b4a848285016115db565b91505092915050565b6000611b5e826119e4565b9050919050565b611b6e81611b53565b8114611b7957600080fd5b50565b600081359050611b8b81611b65565b92915050565b600081359050611ba08161198b565b92915050565b600067ffffffffffffffff821115611bc157611bc06114a8565b5b602082029050602081019050919050565b6000819050919050565b611be581611bd2565b8114611bf057600080fd5b50565b600081359050611c0281611bdc565b92915050565b6000611c1b611c1684611ba6565b611508565b90508083825260208201905060208402830185811115611c3e57611c3d61154f565b5b835b81811015611c675780611c538882611bf3565b845260208401935050602081019050611c40565b5050509392505050565b600082601f830112611c8657611c85611492565b5b8135611c96848260208601611c08565b91505092915050565b60008060008060008060c08789031215611cbc57611cbb6113cd565b5b6000611cca89828a01611b7c565b9650506020611cdb89828a01611b91565b955050604087013567ffffffffffffffff811115611cfc57611cfb6113d2565b5b611d0889828a01611c71565b945050606087013567ffffffffffffffff811115611d2957611d286113d2565b5b611d3589828a01611690565b9350506080611d4689828a0161141a565b92505060a087013567ffffffffffffffff811115611d6757611d666113d2565b5b611d7389828a016115db565b9150509295509295509295565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b611db581611bd2565b82525050565b6000611dc78383611dac565b60208301905092915050565b6000602082019050919050565b6000611deb82611d80565b611df58185611d8b565b9350611e0083611d9c565b8060005b83811015611e31578151611e188882611dbb565b9750611e2383611dd3565b925050600181019050611e04565b5085935050505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600082825260208201905092915050565b6000611e86826118b3565b611e908185611e6a565b9350611ea0818560208601611752565b611ea981611497565b840191505092915050565b6000611ec08383611e7b565b905092915050565b6000602082019050919050565b6000611ee082611e3e565b611eea8185611e49565b935083602082028501611efc85611e5a565b8060005b85811015611f385784840389528151611f198582611eb4565b9450611f2483611ec8565b925060208a01995050600181019050611f00565b50829750879550505050505092915050565b6000608082019050611f5f60008301876119f6565b8181036020830152611f718186611de0565b90508181036040830152611f858185611ed5565b90508181036060830152611f9981846118cf565b905095945050505050565b6000611fb7611fb284611559565b611508565b905082815260208101848484011115611fd357611fd2611554565b5b611fde848285611752565b509392505050565b600082601f830112611ffb57611ffa611492565b5b815161200b848260208601611fa4565b91505092915050565b600061202761202284611523565b611508565b9050808382526020820190506020840283018581111561204a5761204961154f565b5b835b8181101561209157805167ffffffffffffffff81111561206f5761206e611492565b5b80860161207c8982611fe6565b8552602085019450505060208101905061204c565b5050509392505050565b600082601f8301126120b0576120af611492565b5b81516120c0848260208601612014565b91505092915050565b6000602082840312156120df576120de6113cd565b5b600082015167ffffffffffffffff8111156120fd576120fc6113d2565b5b6121098482850161209b565b91505092915050565b6000819050919050565b61212581612112565b82525050565b6000604082019050612140600083018561211c565b61214d602083018461211c565b9392505050565b6000604082019050818103600083015261216e8185611ed5565b9050818103602083015261218281846118cf565b90509392505050565b600082905092915050565b600082821b905092915050565b60006121af838361218b565b826121ba81356113d7565b925060048210156121fa576121f57fffffffff0000000000000000000000000000000000000000000000000000000083600403600802612196565b831692505b505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061223c82612112565b915061224783612112565b925082820190508082111561225f5761225e612202565b5b92915050565b600080fd5b600080fd5b6000808585111561228357612282612265565b5b838611156122945761229361226a565b5b6001850283019150848603905094509492505050565b6000602082840312156122c0576122bf6113cd565b5b60006122ce84828501611bf3565b91505092915050565b60006122ea6122e584611a20565b611508565b90508281526020810184848401111561230657612305611554565b5b61231184828561158a565b509392505050565b600082601f83011261232e5761232d611492565b5b813561233e8482602086016122d7565b91505092915050565b6000806040838503121561235e5761235d6113cd565b5b600061236c85828601611bf3565b925050602083013567ffffffffffffffff81111561238d5761238c6113d2565b5b61239985828601612319565b9150509250929050565b600080604083850312156123ba576123b96113cd565b5b60006123c8858286016119a2565b925050602083015167ffffffffffffffff8111156123e9576123e86113d2565b5b6123f585828601611a93565b9150509250929050565b600060408201905061241460008301856119f6565b8181036020830152612426818461177c565b90509392505050565b600061243a82612112565b915061244583612112565b925082820390508181111561245d5761245c612202565b5b92915050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b60006124bf602683611741565b91506124ca82612463565b604082019050919050565b600060208201905081810360008301526124ee816124b2565b9050919050565b600081905092915050565b600061250b826118b3565b61251581856124f5565b9350612525818560208601611752565b80840191505092915050565b600061253d8284612500565b915081905092915050565b600060208201905061255d600083018461211c565b92915050565b61256c81611bd2565b82525050565b60006020820190506125876000830184612563565b92915050565b600060ff82169050919050565b6000819050919050565b60006125bf6125ba6125b58461258d565b61259a565b612112565b9050919050565b6125cf816125a4565b82525050565b60006040820190506125ea60008301856125c6565b6125f7602083018461211c565b9392505050565b600067ffffffffffffffff821115612619576126186114a8565b5b602082029050602081019050919050565b600061263d612638846125fe565b611508565b905080838252602082019050602084028301858111156126605761265f61154f565b5b835b818110156126a757805167ffffffffffffffff81111561268557612684611492565b5b8086016126928982611a93565b85526020850194505050602081019050612662565b5050509392505050565b600082601f8301126126c6576126c5611492565b5b81516126d684826020860161262a565b91505092915050565b6000602082840312156126f5576126f46113cd565b5b600082015167ffffffffffffffff811115612713576127126113d2565b5b61271f848285016126b1565b91505092915050565b600060608201905061273d60008301866119f6565b818103602083015261274f8185611de0565b905081810360408301526127638184611ed5565b9050949350505050565b600061278861278361277e84611959565b61259a565b611959565b9050919050565b600061279a8261276d565b9050919050565b60006127ac8261278f565b9050919050565b6127bc816127a1565b82525050565b6127cb816113d7565b82525050565b600060c0820190506127e660008301896127b3565b6127f360208301886119f6565b81810360408301526128058187611de0565b905081810360608301526128198186611ed5565b905061282860808301856127c2565b81810360a083015261283a81846118cf565b9050979650505050505050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600082825260208201905092915050565b600061288f82611736565b6128998185612873565b93506128a9818560208601611752565b6128b281611497565b840191505092915050565b60006128c98383612884565b905092915050565b6000602082019050919050565b60006128e982612847565b6128f38185612852565b93508360208202850161290585612863565b8060005b85811015612941578484038952815161292285826128bd565b945061292d836128d1565b925060208a01995050600181019050612909565b50829750879550505050505092915050565b600060a08201905061296860008301886119f6565b818103602083015261297a81876128de565b9050818103604083015261298e81866118cf565b905061299d60608301856127c2565b81810360808301526129af81846118cf565b90509695505050505050565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b60006129f1601d83611741565b91506129fc826129bb565b602082019050919050565b60006020820190508181036000830152612a20816129e4565b9050919050565b6000612a3282612112565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612a6457612a63612202565b5b600182019050919050565b6000612a7a82612112565b9150612a8583612112565b9250828202612a9381612112565b91508282048414831517612aaa57612aa9612202565b5b509291505056fea264697066735822122030d2d39c55db05e43cc7652a743f9fc5c103fc49663b9a67ee668dfb221e9f0c64736f6c63430008130033", + "devdoc": { + "kind": "dev", + "methods": { + "getStorageSlotsCallback(bytes,bytes)": { + "details": "Internal callback function invoked by CCIP-Read in response to a `getStorageSlots` request." + }, + "resolve(bytes,bytes)": { + "details": "Resolve and verify a record stored in l2 target address. It supports fallback to the default resolver", + "params": { + "data": "The actual calldata", + "name": "DNS encoded ENS name to query" + }, + "returns": { + "result": "result of the call" + } + }, + "supportsInterface(bytes4)": { + "details": "See {IERC165-supportsInterface}." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/crosschain-reverse-resolver/deployments/sepolia/DefaultReverseResolver.json b/crosschain-reverse-resolver/deployments/sepolia/DefaultReverseResolver.json new file mode 100644 index 00000000..c60c0c76 --- /dev/null +++ b/crosschain-reverse-resolver/deployments/sepolia/DefaultReverseResolver.json @@ -0,0 +1,636 @@ +{ + "address": "0xfD2c2598382D8876BcC70f550B22d7F70Dda30b0", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "InvalidSignature", + "type": "error" + }, + { + "inputs": [], + "name": "SignatureOutOfDate", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "string", + "name": "name", + "type": "string" + } + ], + "name": "NameChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + } + ], + "name": "ReverseClaimed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "string", + "name": "indexedKey", + "type": "string" + }, + { + "indexed": false, + "internalType": "string", + "name": "key", + "type": "string" + }, + { + "indexed": false, + "internalType": "string", + "name": "value", + "type": "string" + } + ], + "name": "TextChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "newVersion", + "type": "uint64" + } + ], + "name": "VersionChanged", + "type": "event" + }, + { + "inputs": [], + "name": "ParentNode", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "internalType": "uint256", + "name": "inceptionDate", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "clearRecordsWithSignature", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "coinType", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "lastUpdated", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "node", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "_name", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "resolve", + "outputs": [ + { + "internalType": "bytes", + "name": "result", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "uint256", + "name": "inceptionDate", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "setNameForAddrWithSignature", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "internalType": "string", + "name": "key", + "type": "string" + }, + { + "internalType": "string", + "name": "value", + "type": "string" + }, + { + "internalType": "uint256", + "name": "inceptionDate", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "setTextForAddrWithSignature", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceID", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "internalType": "string", + "name": "key", + "type": "string" + } + ], + "name": "text", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x2bfbc046dddcc1c7b76b87d9d5cdb94337b907303d484d7e66d0d843f6a229f6", + "receipt": { + "to": null, + "from": "0xDBBC2C0fe2a1D0fB4056B35a22e543bEb715E7FC", + "contractAddress": "0xfD2c2598382D8876BcC70f550B22d7F70Dda30b0", + "transactionIndex": 63, + "gasUsed": "2371577", + "logsBloom": "0x00000000000000000000000000000000000000200000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000004000000000000000000000000030000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000020000000000000000000000000000000000000000000000000", + "blockHash": "0xebb9184c7909f018f7ac00a1ea0da22b9044e71d97b2c14939c2d83ef3fab7e1", + "transactionHash": "0x2bfbc046dddcc1c7b76b87d9d5cdb94337b907303d484d7e66d0d843f6a229f6", + "logs": [ + { + "transactionIndex": 63, + "blockNumber": 5347089, + "transactionHash": "0x2bfbc046dddcc1c7b76b87d9d5cdb94337b907303d484d7e66d0d843f6a229f6", + "address": "0xfD2c2598382D8876BcC70f550B22d7F70Dda30b0", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000dbbc2c0fe2a1d0fb4056b35a22e543beb715e7fc" + ], + "data": "0x", + "logIndex": 60, + "blockHash": "0xebb9184c7909f018f7ac00a1ea0da22b9044e71d97b2c14939c2d83ef3fab7e1" + } + ], + "blockNumber": 5347089, + "cumulativeGasUsed": "7199924", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 2, + "solcInputHash": "776c7519acf1eee16c4cde4c93293488", + "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"InvalidSignature\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SignatureOutOfDate\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"NameChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"}],\"name\":\"ReverseClaimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"indexedKey\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"value\",\"type\":\"string\"}],\"name\":\"TextChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"newVersion\",\"type\":\"uint64\"}],\"name\":\"VersionChanged\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ParentNode\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"inceptionDate\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"clearRecordsWithSignature\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"coinType\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"lastUpdated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"node\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_name\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"result\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"inceptionDate\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"setNameForAddrWithSignature\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"value\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"inceptionDate\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"setTextForAddrWithSignature\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceID\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"}],\"name\":\"text\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"clearRecordsWithSignature(address,uint256,bytes)\":{\"params\":{\"addr\":\"The node to update.\",\"signature\":\"A signature proving ownership of the node.\"}},\"constructor\":{\"details\":\"Constructor\"},\"node(address)\":{\"details\":\"Returns the node hash for a given account's reverse records.\",\"params\":{\"addr\":\"The address to hash\"},\"returns\":{\"_0\":\"The ENS node hash.\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"setNameForAddrWithSignature(address,string,uint256,bytes)\":{\"details\":\"Sets the name for an addr using a signature that can be verified with ERC1271.\",\"params\":{\"addr\":\"The reverse record to set\",\"inceptionDate\":\"Date from when this signature is valid from\",\"name\":\"The name of the reverse record\",\"signature\":\"The resolver of the reverse node\"},\"returns\":{\"_0\":\"The ENS node hash of the reverse record.\"}},\"setTextForAddrWithSignature(address,string,string,uint256,bytes)\":{\"details\":\"Sets the name for an addr using a signature that can be verified with ERC1271.\",\"params\":{\"addr\":\"The reverse record to set\",\"inceptionDate\":\"Date from when this signature is valid from\",\"key\":\"The key of the text record\",\"signature\":\"The resolver of the reverse node\",\"value\":\"The value of the text record\"},\"returns\":{\"_0\":\"The ENS node hash of the reverse record.\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"clearRecordsWithSignature(address,uint256,bytes)\":{\"notice\":\"Increments the record version associated with an ENS node. May only be called by the owner of that node in the ENS registry.\"}},\"notice\":\"A fallback reverser resolver to resolve when L2 reverse resolver has no names set. The contract will be set under \\\"default.reverse\\\" namespace It can only be set by EOA as contract accounts are chain dependent.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/DefaultReverseResolver.sol\":\"DefaultReverseResolver\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@ensdomains/ens-contracts/contracts/registry/ENS.sol\":{\"content\":\"pragma solidity >=0.8.4;\\n\\ninterface ENS {\\n // Logged when the owner of a node assigns a new owner to a subnode.\\n event NewOwner(bytes32 indexed node, bytes32 indexed label, address owner);\\n\\n // Logged when the owner of a node transfers ownership to a new account.\\n event Transfer(bytes32 indexed node, address owner);\\n\\n // Logged when the resolver for a node changes.\\n event NewResolver(bytes32 indexed node, address resolver);\\n\\n // Logged when the TTL of a node changes\\n event NewTTL(bytes32 indexed node, uint64 ttl);\\n\\n // Logged when an operator is added or removed.\\n event ApprovalForAll(\\n address indexed owner,\\n address indexed operator,\\n bool approved\\n );\\n\\n function setRecord(\\n bytes32 node,\\n address owner,\\n address resolver,\\n uint64 ttl\\n ) external;\\n\\n function setSubnodeRecord(\\n bytes32 node,\\n bytes32 label,\\n address owner,\\n address resolver,\\n uint64 ttl\\n ) external;\\n\\n function setSubnodeOwner(\\n bytes32 node,\\n bytes32 label,\\n address owner\\n ) external returns (bytes32);\\n\\n function setResolver(bytes32 node, address resolver) external;\\n\\n function setOwner(bytes32 node, address owner) external;\\n\\n function setTTL(bytes32 node, uint64 ttl) external;\\n\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n function owner(bytes32 node) external view returns (address);\\n\\n function resolver(bytes32 node) external view returns (address);\\n\\n function ttl(bytes32 node) external view returns (uint64);\\n\\n function recordExists(bytes32 node) external view returns (bool);\\n\\n function isApprovedForAll(\\n address owner,\\n address operator\\n ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x7cb1158c7d268b63de1468e28e2711b28d686e2628ddb22da2149cd93ddeafda\"},\"@ensdomains/ens-contracts/contracts/resolvers/profiles/IExtendedResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.4;\\n\\ninterface IExtendedResolver {\\n function resolve(\\n bytes memory name,\\n bytes memory data\\n ) external view returns (bytes memory);\\n}\\n\",\"keccak256\":\"0x5d81521cfae7d9a4475d27533cd8ed0d3475d369eb0674fd90ffbdbdf292faa3\",\"license\":\"MIT\"},\"@ensdomains/ens-contracts/contracts/resolvers/profiles/INameResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\ninterface INameResolver {\\n event NameChanged(bytes32 indexed node, string name);\\n\\n /**\\n * Returns the name associated with an ENS node, for reverse records.\\n * Defined in EIP181.\\n * @param node The ENS node to query.\\n * @return The associated name.\\n */\\n function name(bytes32 node) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x9ec392b612447b1acbdc01114f2da2837a658d3f3157f60a99c5269f0b623346\",\"license\":\"MIT\"},\"@ensdomains/ens-contracts/contracts/resolvers/profiles/ITextResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\ninterface ITextResolver {\\n event TextChanged(\\n bytes32 indexed node,\\n string indexed indexedKey,\\n string key,\\n string value\\n );\\n\\n /**\\n * Returns the text data associated with an ENS node and key.\\n * @param node The ENS node to query.\\n * @param key The text data key to query.\\n * @return The associated text data.\\n */\\n function text(\\n bytes32 node,\\n string calldata key\\n ) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x7c5debb3c42cd9f5de2274ea7aa053f238608314b62db441c40e31cea2543fd5\",\"license\":\"MIT\"},\"@ensdomains/ens-contracts/contracts/reverseRegistrar/ISignatureReverseResolver.sol\":{\"content\":\"pragma solidity >=0.8.4;\\n\\ninterface ISignatureReverseResolver {\\n event VersionChanged(bytes32 indexed node, uint64 newVersion);\\n event ReverseClaimed(address indexed addr, bytes32 indexed node);\\n event NameChanged(bytes32 indexed node, string name);\\n event TextChanged(\\n bytes32 indexed node,\\n string indexed indexedKey,\\n string key,\\n string value\\n );\\n\\n function setNameForAddrWithSignature(\\n address addr,\\n string memory name,\\n uint256 inceptionDate,\\n bytes memory signature\\n ) external returns (bytes32);\\n\\n function setTextForAddrWithSignature(\\n address addr,\\n string calldata key,\\n string calldata value,\\n uint256 inceptionDate,\\n bytes memory signature\\n ) external returns (bytes32);\\n\\n function clearRecordsWithSignature(\\n address addr,\\n uint256 inceptionDate,\\n bytes memory signature\\n ) external;\\n\\n function node(address addr) external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xb5b94ce60b22a90ba943b5c2e642c3460ade7f93a9e794e58fbf6d525cfc467d\"},\"@ensdomains/ens-contracts/contracts/reverseRegistrar/SignatureReverseResolver.sol\":{\"content\":\"pragma solidity >=0.8.4;\\n\\nimport \\\"../registry/ENS.sol\\\";\\nimport \\\"./ISignatureReverseResolver.sol\\\";\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport \\\"../root/Controllable.sol\\\";\\nimport \\\"../utils/LowLevelCallUtils.sol\\\";\\n\\nerror InvalidSignature();\\nerror SignatureOutOfDate();\\nerror Unauthorised();\\n\\ncontract SignatureReverseResolver is Ownable, ISignatureReverseResolver {\\n using ECDSA for bytes32;\\n mapping(bytes32 => uint256) public lastUpdated;\\n mapping(uint64 => mapping(bytes32 => mapping(string => string))) versionable_texts;\\n mapping(uint64 => mapping(bytes32 => string)) versionable_names;\\n mapping(bytes32 => uint64) internal recordVersions;\\n\\n bytes32 public immutable ParentNode;\\n uint256 public immutable coinType;\\n\\n /*\\n * @dev Constructor\\n * @param ParentNode The namespace to set.\\n * @param _coinType The cointype converted from the chainId of the chain this contract is deployed to.\\n */\\n constructor(bytes32 _ParentNode, uint256 _coinType) {\\n ParentNode = _ParentNode;\\n coinType = _coinType;\\n }\\n\\n modifier authorised(address addr) {\\n isAuthorised(addr);\\n _;\\n }\\n\\n modifier authorisedSignature(\\n bytes32 hash,\\n address addr,\\n uint256 inceptionDate,\\n bytes memory signature\\n ) {\\n isAuthorisedWithSignature(hash, addr, inceptionDate, signature);\\n _;\\n }\\n\\n function getLastUpdated(\\n bytes32 node\\n ) internal view virtual returns (uint256) {\\n return lastUpdated[node];\\n }\\n\\n function isAuthorised(address addr) internal view virtual returns (bool) {}\\n\\n function isAuthorisedWithSignature(\\n bytes32 hash,\\n address addr,\\n uint256 inceptionDate,\\n bytes memory signature\\n ) internal view returns (bool) {\\n bytes32 message = keccak256(\\n abi.encodePacked(hash, addr, inceptionDate, coinType)\\n ).toEthSignedMessageHash();\\n bytes32 node = _getNamehash(addr);\\n\\n if (!SignatureChecker.isValidSignatureNow(addr, message, signature)) {\\n revert InvalidSignature();\\n }\\n\\n if (\\n inceptionDate <= lastUpdated[node] || // must be newer than current record\\n inceptionDate / 1000 >= block.timestamp // must be in the past\\n ) {\\n revert SignatureOutOfDate();\\n }\\n }\\n\\n /**\\n * @dev Sets the name for an addr using a signature that can be verified with ERC1271.\\n * @param addr The reverse record to set\\n * @param name The name of the reverse record\\n * @param inceptionDate Date from when this signature is valid from\\n * @param signature The resolver of the reverse node\\n * @return The ENS node hash of the reverse record.\\n */\\n function setNameForAddrWithSignature(\\n address addr,\\n string memory name,\\n uint256 inceptionDate,\\n bytes memory signature\\n )\\n public\\n authorisedSignature(\\n keccak256(\\n abi.encodePacked(\\n ISignatureReverseResolver\\n .setNameForAddrWithSignature\\n .selector,\\n name\\n )\\n ),\\n addr,\\n inceptionDate,\\n signature\\n )\\n returns (bytes32)\\n {\\n bytes32 node = _getNamehash(addr);\\n _setName(node, name, inceptionDate);\\n emit ReverseClaimed(addr, node);\\n return node;\\n }\\n\\n /**\\n * @dev Sets the name for an addr using a signature that can be verified with ERC1271.\\n * @param addr The reverse record to set\\n * @param key The key of the text record\\n * @param value The value of the text record\\n * @param inceptionDate Date from when this signature is valid from\\n * @param signature The resolver of the reverse node\\n * @return The ENS node hash of the reverse record.\\n */\\n function setTextForAddrWithSignature(\\n address addr,\\n string calldata key,\\n string calldata value,\\n uint256 inceptionDate,\\n bytes memory signature\\n )\\n public\\n authorisedSignature(\\n keccak256(\\n abi.encodePacked(\\n ISignatureReverseResolver\\n .setTextForAddrWithSignature\\n .selector,\\n key,\\n value\\n )\\n ),\\n addr,\\n inceptionDate,\\n signature\\n )\\n returns (bytes32)\\n {\\n bytes32 node = _getNamehash(addr);\\n _setText(node, key, value, inceptionDate);\\n return node;\\n }\\n\\n function _setText(\\n bytes32 node,\\n string calldata key,\\n string calldata value,\\n uint256 inceptionDate\\n ) internal {\\n versionable_texts[recordVersions[node]][node][key] = value;\\n _setLastUpdated(node, inceptionDate);\\n emit TextChanged(node, key, key, value);\\n }\\n\\n /**\\n * Returns the text data associated with an ENS node and key.\\n * @param node The ENS node to query.\\n * @param key The text data key to query.\\n * @return The associated text data.\\n */\\n function _text(\\n bytes32 node,\\n string calldata key\\n ) internal view returns (string memory) {\\n return versionable_texts[recordVersions[node]][node][key];\\n }\\n\\n function _setName(\\n bytes32 node,\\n string memory newName,\\n uint256 inceptionDate\\n ) internal virtual {\\n versionable_names[recordVersions[node]][node] = newName;\\n _setLastUpdated(node, inceptionDate);\\n emit NameChanged(node, newName);\\n }\\n\\n function _name(bytes32 node) internal view returns (string memory) {\\n return versionable_names[recordVersions[node]][node];\\n }\\n\\n /**\\n * Increments the record version associated with an ENS node.\\n * May only be called by the owner of that node in the ENS registry.\\n * @param addr The node to update.\\n */\\n function _clearRecords(address addr) internal {\\n bytes32 labelHash = LowLevelCallUtils.sha3HexAddress(addr);\\n bytes32 reverseNode = keccak256(\\n abi.encodePacked(ParentNode, labelHash)\\n );\\n recordVersions[reverseNode]++;\\n emit VersionChanged(reverseNode, recordVersions[reverseNode]);\\n }\\n\\n /**\\n * Increments the record version associated with an ENS node.\\n * May only be called by the owner of that node in the ENS registry.\\n * @param addr The node to update.\\n * @param signature A signature proving ownership of the node.\\n */\\n function clearRecordsWithSignature(\\n address addr,\\n uint256 inceptionDate,\\n bytes memory signature\\n )\\n public\\n authorisedSignature(\\n keccak256(\\n abi.encodePacked(\\n ISignatureReverseResolver.clearRecordsWithSignature.selector\\n )\\n ),\\n addr,\\n inceptionDate,\\n signature\\n )\\n {\\n _clearRecords(addr);\\n }\\n\\n /**\\n * @dev Returns the node hash for a given account's reverse records.\\n * @param addr The address to hash\\n * @return The ENS node hash.\\n */\\n function node(address addr) public view returns (bytes32) {\\n return\\n keccak256(\\n abi.encodePacked(\\n ParentNode,\\n LowLevelCallUtils.sha3HexAddress(addr)\\n )\\n );\\n }\\n\\n function _getNamehash(address addr) internal view returns (bytes32) {\\n bytes32 labelHash = LowLevelCallUtils.sha3HexAddress(addr);\\n return keccak256(abi.encodePacked(ParentNode, labelHash));\\n }\\n\\n function _setLastUpdated(bytes32 node, uint256 inceptionDate) internal {\\n lastUpdated[node] = inceptionDate;\\n }\\n\\n function supportsInterface(\\n bytes4 interfaceID\\n ) public view virtual returns (bool) {\\n return interfaceID == type(ISignatureReverseResolver).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0x744b95377116387834e4361b374818cf3968229237250cdb24b8da1809a74432\"},\"@ensdomains/ens-contracts/contracts/root/Controllable.sol\":{\"content\":\"pragma solidity ^0.8.4;\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\ncontract Controllable is Ownable {\\n mapping(address => bool) public controllers;\\n\\n event ControllerChanged(address indexed controller, bool enabled);\\n\\n modifier onlyController() {\\n require(\\n controllers[msg.sender],\\n \\\"Controllable: Caller is not a controller\\\"\\n );\\n _;\\n }\\n\\n function setController(address controller, bool enabled) public onlyOwner {\\n controllers[controller] = enabled;\\n emit ControllerChanged(controller, enabled);\\n }\\n}\\n\",\"keccak256\":\"0xb19b8c0fafe9ca2b4bf8aaafee486fa31437672e1e1977bdf84bfe03464969db\"},\"@ensdomains/ens-contracts/contracts/utils/HexUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.4;\\n\\nlibrary HexUtils {\\n /**\\n * @dev Attempts to parse bytes32 from a hex string\\n * @param str The string to parse\\n * @param idx The offset to start parsing at\\n * @param lastIdx The (exclusive) last index in `str` to consider. Use `str.length` to scan the whole string.\\n */\\n function hexStringToBytes32(\\n bytes memory str,\\n uint256 idx,\\n uint256 lastIdx\\n ) internal pure returns (bytes32 r, bool valid) {\\n valid = true;\\n assembly {\\n // check that the index to read to is not past the end of the string\\n if gt(lastIdx, mload(str)) {\\n revert(0, 0)\\n }\\n\\n function getHex(c) -> ascii {\\n // chars 48-57: 0-9\\n if and(gt(c, 47), lt(c, 58)) {\\n ascii := sub(c, 48)\\n leave\\n }\\n // chars 65-70: A-F\\n if and(gt(c, 64), lt(c, 71)) {\\n ascii := add(sub(c, 65), 10)\\n leave\\n }\\n // chars 97-102: a-f\\n if and(gt(c, 96), lt(c, 103)) {\\n ascii := add(sub(c, 97), 10)\\n leave\\n }\\n // invalid char\\n ascii := 0xff\\n }\\n\\n let ptr := add(str, 32)\\n for {\\n let i := idx\\n } lt(i, lastIdx) {\\n i := add(i, 2)\\n } {\\n let byte1 := getHex(byte(0, mload(add(ptr, i))))\\n let byte2 := getHex(byte(0, mload(add(ptr, add(i, 1)))))\\n // if either byte is invalid, set invalid and break loop\\n if or(eq(byte1, 0xff), eq(byte2, 0xff)) {\\n valid := false\\n break\\n }\\n let combined := or(shl(4, byte1), byte2)\\n r := or(shl(8, r), combined)\\n }\\n }\\n }\\n\\n /**\\n * @dev Attempts to parse an address from a hex string\\n * @param str The string to parse\\n * @param idx The offset to start parsing at\\n * @param lastIdx The (exclusive) last index in `str` to consider. Use `str.length` to scan the whole string.\\n */\\n function hexToAddress(\\n bytes memory str,\\n uint256 idx,\\n uint256 lastIdx\\n ) internal pure returns (address, bool) {\\n if (lastIdx - idx < 40) return (address(0x0), false);\\n (bytes32 r, bool valid) = hexStringToBytes32(str, idx, lastIdx);\\n return (address(uint160(uint256(r))), valid);\\n }\\n}\\n\",\"keccak256\":\"0xcae20ad72181f47dfe7fba7d88e8d902a01576b16e93362878e726989d6cfb4d\",\"license\":\"MIT\"},\"@ensdomains/ens-contracts/contracts/utils/LowLevelCallUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.13;\\n\\nimport {Address} from \\\"@openzeppelin/contracts/utils/Address.sol\\\";\\n\\nlibrary LowLevelCallUtils {\\n // This is the hex encoding of the string 'abcdefghijklmnopqrstuvwxyz'\\n // It is used as a constant to lookup the characters of the hex address\\n bytes32 constant lookup =\\n 0x3031323334353637383961626364656600000000000000000000000000000000;\\n using Address for address;\\n\\n /**\\n * @dev Makes a static call to the specified `target` with `data`. Return data can be fetched with\\n * `returnDataSize` and `readReturnData`.\\n * @param target The address to staticcall.\\n * @param data The data to pass to the call.\\n * @return success True if the call succeeded, or false if it reverts.\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data\\n ) internal view returns (bool success) {\\n require(\\n target.isContract(),\\n \\\"LowLevelCallUtils: static call to non-contract\\\"\\n );\\n assembly {\\n success := staticcall(\\n gas(),\\n target,\\n add(data, 32),\\n mload(data),\\n 0,\\n 0\\n )\\n }\\n }\\n\\n /**\\n * @dev Returns the size of the return data of the most recent external call.\\n */\\n function returnDataSize() internal pure returns (uint256 len) {\\n assembly {\\n len := returndatasize()\\n }\\n }\\n\\n /**\\n * @dev Reads return data from the most recent external call.\\n * @param offset Offset into the return data.\\n * @param length Number of bytes to return.\\n */\\n function readReturnData(\\n uint256 offset,\\n uint256 length\\n ) internal pure returns (bytes memory data) {\\n data = new bytes(length);\\n assembly {\\n returndatacopy(add(data, 32), offset, length)\\n }\\n }\\n\\n /**\\n * @dev Reverts with the return data from the most recent external call.\\n */\\n function propagateRevert() internal pure {\\n assembly {\\n returndatacopy(0, 0, returndatasize())\\n revert(0, returndatasize())\\n }\\n }\\n\\n /**\\n * @dev An optimised function to compute the sha3 of the lower-case\\n * hexadecimal representation of an Ethereum address.\\n * @param addr The address to hash\\n * @return ret The SHA3 hash of the lower-case hexadecimal encoding of the\\n * input address.\\n */\\n function sha3HexAddress(address addr) internal pure returns (bytes32 ret) {\\n assembly {\\n for {\\n let i := 40\\n } gt(i, 0) {\\n\\n } {\\n i := sub(i, 1)\\n mstore8(i, byte(and(addr, 0xf), lookup))\\n addr := div(addr, 0x10)\\n i := sub(i, 1)\\n mstore8(i, byte(and(addr, 0xf), lookup))\\n addr := div(addr, 0x10)\\n }\\n\\n ret := keccak256(0, 40)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc7cb7b5ffa76e35a8d7f481ba8263a2904ee638546d0334df856f4e2e43fe8b3\",\"license\":\"MIT\"},\"@ensdomains/ens-contracts/contracts/wrapper/BytesUtils.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ~0.8.17;\\n\\nlibrary BytesUtils {\\n /*\\n * @dev Returns the keccak-256 hash of a byte range.\\n * @param self The byte string to hash.\\n * @param offset The position to start hashing at.\\n * @param len The number of bytes to hash.\\n * @return The hash of the byte range.\\n */\\n function keccak(\\n bytes memory self,\\n uint256 offset,\\n uint256 len\\n ) internal pure returns (bytes32 ret) {\\n require(offset + len <= self.length);\\n assembly {\\n ret := keccak256(add(add(self, 32), offset), len)\\n }\\n }\\n\\n /**\\n * @dev Returns the ENS namehash of a DNS-encoded name.\\n * @param self The DNS-encoded name to hash.\\n * @param offset The offset at which to start hashing.\\n * @return The namehash of the name.\\n */\\n function namehash(\\n bytes memory self,\\n uint256 offset\\n ) internal pure returns (bytes32) {\\n (bytes32 labelhash, uint256 newOffset) = readLabel(self, offset);\\n if (labelhash == bytes32(0)) {\\n require(offset == self.length - 1, \\\"namehash: Junk at end of name\\\");\\n return bytes32(0);\\n }\\n return\\n keccak256(abi.encodePacked(namehash(self, newOffset), labelhash));\\n }\\n\\n /**\\n * @dev Returns the keccak-256 hash of a DNS-encoded label, and the offset to the start of the next label.\\n * @param self The byte string to read a label from.\\n * @param idx The index to read a label at.\\n * @return labelhash The hash of the label at the specified index, or 0 if it is the last label.\\n * @return newIdx The index of the start of the next label.\\n */\\n function readLabel(\\n bytes memory self,\\n uint256 idx\\n ) internal pure returns (bytes32 labelhash, uint256 newIdx) {\\n require(idx < self.length, \\\"readLabel: Index out of bounds\\\");\\n uint256 len = uint256(uint8(self[idx]));\\n if (len > 0) {\\n labelhash = keccak(self, idx + 1, len);\\n } else {\\n labelhash = bytes32(0);\\n }\\n newIdx = idx + len + 1;\\n }\\n}\\n\",\"keccak256\":\"0xf862cd86d749158a554e3cb517efa9097331ec0cf7225117f21e96fb50c67edb\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC1271.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1271.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC1271 standard signature validation method for\\n * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271].\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC1271 {\\n /**\\n * @dev Should return whether the signature provided is valid for the provided data\\n * @param hash Hash of the data to be signed\\n * @param signature Signature byte array associated with _data\\n */\\n function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue);\\n}\\n\",\"keccak256\":\"0x0705a4b1b86d7b0bd8432118f226ba139c44b9dcaba0a6eafba2dd7d0639c544\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n function _contextSuffixLength() internal view virtual returns (uint256) {\\n return 0;\\n }\\n}\\n\",\"keccak256\":\"0xa92e4fa126feb6907daa0513ddd816b2eb91f30a808de54f63c17d0e162c3439\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/Math.sol\\\";\\nimport \\\"./math/SignedMath.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n uint256 length = Math.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\\n */\\n function toString(int256 value) internal pure returns (string memory) {\\n return string(abi.encodePacked(value < 0 ? \\\"-\\\" : \\\"\\\", toString(SignedMath.abs(value))));\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n return toHexString(value, Math.log256(value) + 1);\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n\\n /**\\n * @dev Returns true if the two strings are equal.\\n */\\n function equal(string memory a, string memory b) internal pure returns (bool) {\\n return keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0x3088eb2868e8d13d89d16670b5f8612c4ab9ff8956272837d8e90106c59c14a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSA {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV // Deprecated in v4.8\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 message) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0x00, \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\")\\n mstore(0x1c, hash)\\n message := keccak256(0x00, 0x3c)\\n }\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", Strings.toString(s.length), s));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 data) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, \\\"\\\\x19\\\\x01\\\")\\n mstore(add(ptr, 0x02), domainSeparator)\\n mstore(add(ptr, 0x22), structHash)\\n data := keccak256(ptr, 0x42)\\n }\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Data with intended validator, created from a\\n * `validator` and `data` according to the version 0 of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x00\\\", validator, data));\\n }\\n}\\n\",\"keccak256\":\"0x809bc3edb4bcbef8263fa616c1b60ee0004b50a8a1bfa164d8f57fd31f520c58\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/SignatureChecker.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./ECDSA.sol\\\";\\nimport \\\"../../interfaces/IERC1271.sol\\\";\\n\\n/**\\n * @dev Signature verification helper that can be used instead of `ECDSA.recover` to seamlessly support both ECDSA\\n * signatures from externally owned accounts (EOAs) as well as ERC1271 signatures from smart contract wallets like\\n * Argent and Gnosis Safe.\\n *\\n * _Available since v4.1._\\n */\\nlibrary SignatureChecker {\\n /**\\n * @dev Checks if a signature is valid for a given signer and data hash. If the signer is a smart contract, the\\n * signature is validated against that smart contract using ERC1271, otherwise it's validated using `ECDSA.recover`.\\n *\\n * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus\\n * change through time. It could return true at block N and false at block N+1 (or the opposite).\\n */\\n function isValidSignatureNow(address signer, bytes32 hash, bytes memory signature) internal view returns (bool) {\\n (address recovered, ECDSA.RecoverError error) = ECDSA.tryRecover(hash, signature);\\n return\\n (error == ECDSA.RecoverError.NoError && recovered == signer) ||\\n isValidERC1271SignatureNow(signer, hash, signature);\\n }\\n\\n /**\\n * @dev Checks if a signature is valid for a given signer and data hash. The signature is validated\\n * against the signer smart contract using ERC1271.\\n *\\n * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus\\n * change through time. It could return true at block N and false at block N+1 (or the opposite).\\n */\\n function isValidERC1271SignatureNow(\\n address signer,\\n bytes32 hash,\\n bytes memory signature\\n ) internal view returns (bool) {\\n (bool success, bytes memory result) = signer.staticcall(\\n abi.encodeWithSelector(IERC1271.isValidSignature.selector, hash, signature)\\n );\\n return (success &&\\n result.length >= 32 &&\\n abi.decode(result, (bytes32)) == bytes32(IERC1271.isValidSignature.selector));\\n }\\n}\\n\",\"keccak256\":\"0x3af3ca86df39aac39a0514c84459d691434a108d2151c8ce9d69f32e315cab80\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard signed math utilities missing in the Solidity language.\\n */\\nlibrary SignedMath {\\n /**\\n * @dev Returns the largest of two signed numbers.\\n */\\n function max(int256 a, int256 b) internal pure returns (int256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two signed numbers.\\n */\\n function min(int256 a, int256 b) internal pure returns (int256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two signed numbers without overflow.\\n * The result is rounded towards zero.\\n */\\n function average(int256 a, int256 b) internal pure returns (int256) {\\n // Formula from the book \\\"Hacker's Delight\\\"\\n int256 x = (a & b) + ((a ^ b) >> 1);\\n return x + (int256(uint256(x) >> 255) & (a ^ b));\\n }\\n\\n /**\\n * @dev Returns the absolute unsigned value of a signed value.\\n */\\n function abs(int256 n) internal pure returns (uint256) {\\n unchecked {\\n // must be unchecked in order to support `n = type(int256).min`\\n return uint256(n >= 0 ? n : -n);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf92515413956f529d95977adc9b0567d583c6203fc31ab1c23824c35187e3ddc\",\"license\":\"MIT\"},\"contracts/DefaultReverseResolver.sol\":{\"content\":\"pragma solidity >=0.8.4;\\n\\nimport \\\"./IDefaultReverseResolver.sol\\\";\\nimport \\\"@ensdomains/ens-contracts/contracts/reverseRegistrar/SignatureReverseResolver.sol\\\";\\nimport \\\"@ensdomains/ens-contracts/contracts/wrapper/BytesUtils.sol\\\";\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/introspection/ERC165.sol\\\";\\nimport {ITextResolver} from \\\"@ensdomains/ens-contracts/contracts/resolvers/profiles/ITextResolver.sol\\\";\\nimport {INameResolver} from \\\"@ensdomains/ens-contracts/contracts/resolvers/profiles/INameResolver.sol\\\";\\nimport \\\"@ensdomains/ens-contracts/contracts/utils/HexUtils.sol\\\";\\nimport \\\"@ensdomains/ens-contracts/contracts/resolvers/profiles/IExtendedResolver.sol\\\";\\n\\n/**\\n * A fallback reverser resolver to resolve when L2 reverse resolver has no names set.\\n * The contract will be set under \\\"default.reverse\\\" namespace\\n * It can only be set by EOA as contract accounts are chain dependent.\\n */\\ncontract DefaultReverseResolver is\\n Ownable,\\n IDefaultReverseResolver,\\n IExtendedResolver,\\n ERC165,\\n SignatureReverseResolver\\n{\\n uint256 constant ADDRESS_LENGTH = 40;\\n using ECDSA for bytes32;\\n using BytesUtils for bytes;\\n // The namehash of 'default.reverse'\\n bytes32 private constant DEFAULT_REVERSE_NODE =\\n 0x53a2e7cce84726721578c676b4798972d354dd7c62c832415371716693edd312;\\n\\n /**\\n * @dev Constructor\\n */\\n constructor() SignatureReverseResolver(DEFAULT_REVERSE_NODE, 0) {}\\n\\n function isAuthorised(address addr) internal view override returns (bool) {\\n if (addr != msg.sender) {\\n revert Unauthorised();\\n }\\n }\\n\\n /*\\n * Returns the name associated with an address, for reverse records.\\n * This function is non ENSIP standard\\n * @param address The ENS address to query.\\n * @return The associated name.\\n */\\n function name(address addr) public view returns (string memory) {\\n bytes32 node = _getNamehash(addr);\\n return versionable_names[recordVersions[node]][node];\\n }\\n\\n /*\\n * Returns the text data associated with an address and key.\\n * @param address The ENS address to query.\\n * @param key The text data key to query.\\n * @return The associated text data.\\n */\\n function text(\\n address addr,\\n string memory key\\n ) public view returns (string memory) {\\n bytes32 node = _getNamehash(addr);\\n return versionable_texts[recordVersions[node]][node][key];\\n }\\n\\n /*\\n * @dev Resolve and verify a record stored in l2 target address. It supports fallback to the default resolver\\n * @param name DNS encoded ENS name to query\\n * @param data The actual calldata\\n * @return result result of the call\\n */\\n function resolve(bytes calldata _name, bytes calldata data) external view returns (bytes memory result) {\\n bytes4 selector = bytes4(data);\\n (address addr,) = HexUtils.hexToAddress(_name, 1, ADDRESS_LENGTH + 1);\\n if (selector == INameResolver.name.selector) {\\n return bytes(name(addr));\\n }\\n if (selector == ITextResolver.text.selector) {\\n (,string memory key) = abi.decode(data[4:], (bytes32, string));\\n return bytes(text(addr, key));\\n }\\n }\\n\\n function supportsInterface(\\n bytes4 interfaceID\\n ) public view override(ERC165, SignatureReverseResolver) returns (bool) {\\n return\\n interfaceID == type(IDefaultReverseResolver).interfaceId ||\\n interfaceID == type(IExtendedResolver).interfaceId ||\\n super.supportsInterface(interfaceID);\\n }\\n}\\n\",\"keccak256\":\"0x8d2dc615019cc6b26215f0de766c4ceb18d45a41b2daeb0bcff421bfe6197f48\"},\"contracts/IDefaultReverseResolver.sol\":{\"content\":\"pragma solidity >=0.8.4;\\n\\ninterface IDefaultReverseResolver {\\n function name(address addr) external view returns (string memory);\\n\\n function text(\\n address addr,\\n string memory key\\n ) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x0233c067351640bcfff8824150323e34f06abf239def880164a10eb8846479cf\"}},\"version\":1}", + "bytecode": "0x60c06040523480156200001157600080fd5b507f53a2e7cce84726721578c676b4798972d354dd7c62c832415371716693edd31260001b6000620000586200004c6200007060201b60201c565b6200007860201b60201c565b81608081815250508060a0818152505050506200013c565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60805160a05161298b6200017e600039600081816105060152610c6e01526000818161052a0152818161079d01528181610a680152611006015261298b6000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c80638da5cb5b1161008c578063c01f93d311610066578063c01f93d314610273578063c7ee930c146102a3578063d977f6b5146102bf578063f2fde38b146102ef576100ea565b80638da5cb5b146101f55780639061b92314610213578063bffbe61c14610243576100ea565b80631fe93ea8116100c85780631fe93ea81461017f57806324d79eab1461019d578063715018a6146101bb5780637f87032e146101c5576100ea565b806301984892146100ef57806301ffc9a71461011f578063060eb2f51461014f575b600080fd5b610109600480360381019061010491906115c8565b61030b565b6040516101169190611685565b60405180910390f35b610139600480360381019061013491906116ff565b61040a565b6040516101469190611747565b60405180910390f35b61016960048036038101906101649190611798565b6104ec565b60405161017691906117de565b60405180910390f35b610187610504565b60405161019491906117de565b60405180910390f35b6101a5610528565b6040516101b29190611808565b60405180910390f35b6101c361054c565b005b6101df60048036038101906101da9190611a25565b610560565b6040516101ec9190611808565b60405180910390f35b6101fd61060e565b60405161020a9190611ad3565b60405180910390f35b61022d60048036038101906102289190611b4e565b610637565b60405161023a9190611c24565b60405180910390f35b61025d600480360381019061025891906115c8565b610799565b60405161026a9190611808565b60405180910390f35b61028d60048036038101906102889190611c9c565b6107f3565b60405161029a9190611808565b60405180910390f35b6102bd60048036038101906102b89190611d74565b610869565b005b6102d960048036038101906102d49190611de3565b6108b9565b6040516102e69190611685565b60405180910390f35b610309600480360381019061030491906115c8565b6109d5565b005b6060600061031883610a58565b9050600360006004600084815260200190815260200160002060009054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020019081526020016000206000828152602001908152602001600020805461038490611e6e565b80601f01602080910402602001604051908101604052809291908181526020018280546103b090611e6e565b80156103fd5780601f106103d2576101008083540402835291602001916103fd565b820191906000526020600020905b8154815290600101906020018083116103e057829003601f168201915b5050505050915050919050565b60007fd8efbe27000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806104d557507f9061b923000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806104e557506104e482610ab7565b5b9050919050565b60016020528060005260406000206000915090505481565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b610554610b21565b61055e6000610b9f565b565b6000637f87032e60e01b8460405160200161057c929190611efc565b604051602081830303815290604052805190602001208584846105a184848484610c63565b5060006105ad8a610a58565b90506105ba818a8a610d7b565b808a73ffffffffffffffffffffffffffffffffffffffff167f6ada868dd3058cf77a48a74489fd7963688e5464b2b0fa957ace976243270e9260405160405180910390a38095505050505050949350505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060008383906106489190611f3c565b905060006106a887878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505060018060286106a39190611fca565b610e2f565b50905063691f343160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610709576107008161030b565b92505050610791565b6359d1d43c60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361078e5760008585600490809261076a93929190612008565b8101906107779190612043565b91505061078482826108b9565b9350505050610791565b50505b949350505050565b60007f00000000000000000000000000000000000000000000000000000000000000006107c583610e78565b6040516020016107d69291906120c0565b604051602081830303815290604052805190602001209050919050565b600063c01f93d360e01b87878787604051602001610815959493929190612111565b6040516020818303038152906040528051906020012088848461083a84848484610c63565b5060006108468d610a58565b9050610856818d8d8d8d8d610f00565b8095505050505050979650505050505050565b63c7ee930c60e01b604051602001610881919061214a565b604051602081830303815290604052805190602001208383836108a684848484610c63565b506108b087610ff5565b50505050505050565b606060006108c684610a58565b9050600260006004600084815260200190815260200160002060009054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020019081526020016000206000828152602001908152602001600020836040516109359190612165565b9081526020016040518091039020805461094e90611e6e565b80601f016020809104026020016040519081016040528092919081815260200182805461097a90611e6e565b80156109c75780601f1061099c576101008083540402835291602001916109c7565b820191906000526020600020905b8154815290600101906020018083116109aa57829003601f168201915b505050505091505092915050565b6109dd610b21565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610a4c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a43906121ee565b60405180910390fd5b610a5581610b9f565b50565b600080610a6483610e78565b90507f000000000000000000000000000000000000000000000000000000000000000081604051602001610a999291906120c0565b60405160208183030381529060405280519060200120915050919050565b60007fc78de5ed000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b610b29611111565b73ffffffffffffffffffffffffffffffffffffffff16610b4761060e565b73ffffffffffffffffffffffffffffffffffffffff1614610b9d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b949061225a565b60405180910390fd5b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600080610cbb8686867f0000000000000000000000000000000000000000000000000000000000000000604051602001610ca094939291906122e3565b60405160208183030381529060405280519060200120611119565b90506000610cc886610a58565b9050610cd586838661114f565b610d0b576040517f8baa579f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160008281526020019081526020016000205485111580610d3a5750426103e886610d379190612360565b10155b15610d71576040517f50c8f2ec00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050949350505050565b81600360006004600087815260200190815260200160002060009054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060008581526020019081526020016000209081610de79190612530565b50610df283826111de565b827fb7d29e911041e8d9b843369e890bcb72c9388692ba48b65ac54e7214c4c348f783604051610e229190611685565b60405180910390a2505050565b60008060288484610e409190612602565b1015610e525760008091509150610e70565b600080610e608787876111fa565b915091508160001c819350935050505b935093915050565b600060285b6000811115610ef3576001810390507f3031323334353637383961626364656600000000000000000000000000000000600f84161a81536010830492506001810390507f3031323334353637383961626364656600000000000000000000000000000000600f84161a8153601083049250610e7d565b5060286000209050919050565b828260026000600460008b815260200190815260200160002060009054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060008981526020019081526020016000208787604051610f71929190612636565b90815260200160405180910390209182610f8c92919061265a565b50610f9786826111de565b8484604051610fa7929190612636565b6040518091039020867f448bc014f1536726cf8d54ff3d6481ed3cbc683c2591ca204274009afa09b1a187878787604051610fe59493929190612757565b60405180910390a3505050505050565b600061100082610e78565b905060007f0000000000000000000000000000000000000000000000000000000000000000826040516020016110379291906120c0565b60405160208183030381529060405280519060200120905060046000828152602001908152602001600020600081819054906101000a900467ffffffffffffffff1680929190611086906127a6565b91906101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555050807fc6621ccb8f3f5a04bb6502154b2caf6adf5983fe76dfef1cfc9c42e3579db4446004600084815260200190815260200160002060009054906101000a900467ffffffffffffffff1660405161110491906127e5565b60405180910390a2505050565b600033905090565b60007f19457468657265756d205369676e6564204d6573736167653a0a33320000000060005281601c52603c6000209050919050565b600080600061115e85856112df565b915091506000600481111561117657611175612800565b5b81600481111561118957611188612800565b5b1480156111c157508573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b806111d357506111d2868686611330565b5b925050509392505050565b8060016000848152602001908152602001600020819055505050565b60008060019050845183111561120f57600080fd5b611271565b6000603a8210602f8311161561122f5760308203905061126c565b6047821060408311161561124b57600a6041830301905061126c565b6067821060608311161561126757600a6061830301905061126c565b60ff90505b919050565b60208501845b848110156112d55761128e8183015160001a611214565b6112a06001830184015160001a611214565b60ff811460ff831417156112b9576000945050506112d5565b808260041b17808760081b179650505050600281019050611277565b5050935093915050565b60008060418351036113205760008060006020860151925060408601519150606086015160001a905061131487828585611474565b94509450505050611329565b60006002915091505b9250929050565b60008060008573ffffffffffffffffffffffffffffffffffffffff16631626ba7e60e01b868660405160240161136792919061282f565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040516113d1919061289b565b600060405180830381855afa9150503d806000811461140c576040519150601f19603f3d011682016040523d82523d6000602084013e611411565b606091505b509150915081801561142557506020815110155b80156114695750631626ba7e60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168180602001905181019061146791906128c7565b145b925050509392505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08360001c11156114af57600060039150915061154d565b6000600187878787604051600081526020016040526040516114d49493929190612910565b6020604051602081039080840390855afa1580156114f6573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036115445760006001925092505061154d565b80600092509250505b94509492505050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006115958261156a565b9050919050565b6115a58161158a565b81146115b057600080fd5b50565b6000813590506115c28161159c565b92915050565b6000602082840312156115de576115dd611560565b5b60006115ec848285016115b3565b91505092915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561162f578082015181840152602081019050611614565b60008484015250505050565b6000601f19601f8301169050919050565b6000611657826115f5565b6116618185611600565b9350611671818560208601611611565b61167a8161163b565b840191505092915050565b6000602082019050818103600083015261169f818461164c565b905092915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6116dc816116a7565b81146116e757600080fd5b50565b6000813590506116f9816116d3565b92915050565b60006020828403121561171557611714611560565b5b6000611723848285016116ea565b91505092915050565b60008115159050919050565b6117418161172c565b82525050565b600060208201905061175c6000830184611738565b92915050565b6000819050919050565b61177581611762565b811461178057600080fd5b50565b6000813590506117928161176c565b92915050565b6000602082840312156117ae576117ad611560565b5b60006117bc84828501611783565b91505092915050565b6000819050919050565b6117d8816117c5565b82525050565b60006020820190506117f360008301846117cf565b92915050565b61180281611762565b82525050565b600060208201905061181d60008301846117f9565b92915050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6118658261163b565b810181811067ffffffffffffffff821117156118845761188361182d565b5b80604052505050565b6000611897611556565b90506118a3828261185c565b919050565b600067ffffffffffffffff8211156118c3576118c261182d565b5b6118cc8261163b565b9050602081019050919050565b82818337600083830152505050565b60006118fb6118f6846118a8565b61188d565b90508281526020810184848401111561191757611916611828565b5b6119228482856118d9565b509392505050565b600082601f83011261193f5761193e611823565b5b813561194f8482602086016118e8565b91505092915050565b611961816117c5565b811461196c57600080fd5b50565b60008135905061197e81611958565b92915050565b600067ffffffffffffffff82111561199f5761199e61182d565b5b6119a88261163b565b9050602081019050919050565b60006119c86119c384611984565b61188d565b9050828152602081018484840111156119e4576119e3611828565b5b6119ef8482856118d9565b509392505050565b600082601f830112611a0c57611a0b611823565b5b8135611a1c8482602086016119b5565b91505092915050565b60008060008060808587031215611a3f57611a3e611560565b5b6000611a4d878288016115b3565b945050602085013567ffffffffffffffff811115611a6e57611a6d611565565b5b611a7a8782880161192a565b9350506040611a8b8782880161196f565b925050606085013567ffffffffffffffff811115611aac57611aab611565565b5b611ab8878288016119f7565b91505092959194509250565b611acd8161158a565b82525050565b6000602082019050611ae86000830184611ac4565b92915050565b600080fd5b600080fd5b60008083601f840112611b0e57611b0d611823565b5b8235905067ffffffffffffffff811115611b2b57611b2a611aee565b5b602083019150836001820283011115611b4757611b46611af3565b5b9250929050565b60008060008060408587031215611b6857611b67611560565b5b600085013567ffffffffffffffff811115611b8657611b85611565565b5b611b9287828801611af8565b9450945050602085013567ffffffffffffffff811115611bb557611bb4611565565b5b611bc187828801611af8565b925092505092959194509250565b600081519050919050565b600082825260208201905092915050565b6000611bf682611bcf565b611c008185611bda565b9350611c10818560208601611611565b611c198161163b565b840191505092915050565b60006020820190508181036000830152611c3e8184611beb565b905092915050565b60008083601f840112611c5c57611c5b611823565b5b8235905067ffffffffffffffff811115611c7957611c78611aee565b5b602083019150836001820283011115611c9557611c94611af3565b5b9250929050565b600080600080600080600060a0888a031215611cbb57611cba611560565b5b6000611cc98a828b016115b3565b975050602088013567ffffffffffffffff811115611cea57611ce9611565565b5b611cf68a828b01611c46565b9650965050604088013567ffffffffffffffff811115611d1957611d18611565565b5b611d258a828b01611c46565b94509450506060611d388a828b0161196f565b925050608088013567ffffffffffffffff811115611d5957611d58611565565b5b611d658a828b016119f7565b91505092959891949750929550565b600080600060608486031215611d8d57611d8c611560565b5b6000611d9b868287016115b3565b9350506020611dac8682870161196f565b925050604084013567ffffffffffffffff811115611dcd57611dcc611565565b5b611dd9868287016119f7565b9150509250925092565b60008060408385031215611dfa57611df9611560565b5b6000611e08858286016115b3565b925050602083013567ffffffffffffffff811115611e2957611e28611565565b5b611e358582860161192a565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680611e8657607f821691505b602082108103611e9957611e98611e3f565b5b50919050565b6000819050919050565b611eba611eb5826116a7565b611e9f565b82525050565b600081905092915050565b6000611ed6826115f5565b611ee08185611ec0565b9350611ef0818560208601611611565b80840191505092915050565b6000611f088285611ea9565b600482019150611f188284611ecb565b91508190509392505050565b600082905092915050565b600082821b905092915050565b6000611f488383611f24565b82611f5381356116a7565b92506004821015611f9357611f8e7fffffffff0000000000000000000000000000000000000000000000000000000083600403600802611f2f565b831692505b505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000611fd5826117c5565b9150611fe0836117c5565b9250828201905080821115611ff857611ff7611f9b565b5b92915050565b600080fd5b600080fd5b6000808585111561201c5761201b611ffe565b5b8386111561202d5761202c612003565b5b6001850283019150848603905094509492505050565b6000806040838503121561205a57612059611560565b5b600061206885828601611783565b925050602083013567ffffffffffffffff81111561208957612088611565565b5b6120958582860161192a565b9150509250929050565b6000819050919050565b6120ba6120b582611762565b61209f565b82525050565b60006120cc82856120a9565b6020820191506120dc82846120a9565b6020820191508190509392505050565b60006120f88385611ec0565b93506121058385846118d9565b82840190509392505050565b600061211d8288611ea9565b60048201915061212e8286886120ec565b915061213b8284866120ec565b91508190509695505050505050565b60006121568284611ea9565b60048201915081905092915050565b60006121718284611ecb565b915081905092915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006121d8602683611600565b91506121e38261217c565b604082019050919050565b60006020820190508181036000830152612207816121cb565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000612244602083611600565b915061224f8261220e565b602082019050919050565b6000602082019050818103600083015261227381612237565b9050919050565b60008160601b9050919050565b60006122928261227a565b9050919050565b60006122a482612287565b9050919050565b6122bc6122b78261158a565b612299565b82525050565b6000819050919050565b6122dd6122d8826117c5565b6122c2565b82525050565b60006122ef82876120a9565b6020820191506122ff82866122ab565b60148201915061230f82856122cc565b60208201915061231f82846122cc565b60208201915081905095945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061236b826117c5565b9150612376836117c5565b92508261238657612385612331565b5b828204905092915050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b6000600883026123e67fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82611f2f565b6123f08683611f2f565b95508019841693508086168417925050509392505050565b6000819050919050565b600061242d612428612423846117c5565b612408565b6117c5565b9050919050565b6000819050919050565b61244783612412565b61245b61245382612434565b8484546123b6565b825550505050565b600090565b612470612463565b61247b81848461243e565b505050565b5b8181101561249f57612494600082612468565b600181019050612481565b5050565b601f8211156124e4576124b581612391565b6124be846123a6565b810160208510156124cd578190505b6124e16124d9856123a6565b830182612480565b50505b505050565b600082821c905092915050565b6000612507600019846008026124e9565b1980831691505092915050565b600061252083836124f6565b9150826002028217905092915050565b612539826115f5565b67ffffffffffffffff8111156125525761255161182d565b5b61255c8254611e6e565b6125678282856124a3565b600060209050601f83116001811461259a5760008415612588578287015190505b6125928582612514565b8655506125fa565b601f1984166125a886612391565b60005b828110156125d0578489015182556001820191506020850194506020810190506125ab565b868310156125ed57848901516125e9601f8916826124f6565b8355505b6001600288020188555050505b505050505050565b600061260d826117c5565b9150612618836117c5565b92508282039050818111156126305761262f611f9b565b5b92915050565b60006126438284866120ec565b91508190509392505050565b600082905092915050565b612664838361264f565b67ffffffffffffffff81111561267d5761267c61182d565b5b6126878254611e6e565b6126928282856124a3565b6000601f8311600181146126c157600084156126af578287013590505b6126b98582612514565b865550612721565b601f1984166126cf86612391565b60005b828110156126f7578489013582556001820191506020850194506020810190506126d2565b868310156127145784890135612710601f8916826124f6565b8355505b6001600288020188555050505b50505050505050565b60006127368385611600565b93506127438385846118d9565b61274c8361163b565b840190509392505050565b6000604082019050818103600083015261277281868861272a565b9050818103602083015261278781848661272a565b905095945050505050565b600067ffffffffffffffff82169050919050565b60006127b182612792565b915067ffffffffffffffff82036127cb576127ca611f9b565b5b600182019050919050565b6127df81612792565b82525050565b60006020820190506127fa60008301846127d6565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600060408201905061284460008301856117f9565b81810360208301526128568184611beb565b90509392505050565b600081905092915050565b600061287582611bcf565b61287f818561285f565b935061288f818560208601611611565b80840191505092915050565b60006128a7828461286a565b915081905092915050565b6000815190506128c18161176c565b92915050565b6000602082840312156128dd576128dc611560565b5b60006128eb848285016128b2565b91505092915050565b600060ff82169050919050565b61290a816128f4565b82525050565b600060808201905061292560008301876117f9565b6129326020830186612901565b61293f60408301856117f9565b61294c60608301846117f9565b9594505050505056fea264697066735822122064d056b576c53f15f918ab0cbc8cd9058c15fddb5e164956c854c85d5141f05664736f6c63430008130033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c80638da5cb5b1161008c578063c01f93d311610066578063c01f93d314610273578063c7ee930c146102a3578063d977f6b5146102bf578063f2fde38b146102ef576100ea565b80638da5cb5b146101f55780639061b92314610213578063bffbe61c14610243576100ea565b80631fe93ea8116100c85780631fe93ea81461017f57806324d79eab1461019d578063715018a6146101bb5780637f87032e146101c5576100ea565b806301984892146100ef57806301ffc9a71461011f578063060eb2f51461014f575b600080fd5b610109600480360381019061010491906115c8565b61030b565b6040516101169190611685565b60405180910390f35b610139600480360381019061013491906116ff565b61040a565b6040516101469190611747565b60405180910390f35b61016960048036038101906101649190611798565b6104ec565b60405161017691906117de565b60405180910390f35b610187610504565b60405161019491906117de565b60405180910390f35b6101a5610528565b6040516101b29190611808565b60405180910390f35b6101c361054c565b005b6101df60048036038101906101da9190611a25565b610560565b6040516101ec9190611808565b60405180910390f35b6101fd61060e565b60405161020a9190611ad3565b60405180910390f35b61022d60048036038101906102289190611b4e565b610637565b60405161023a9190611c24565b60405180910390f35b61025d600480360381019061025891906115c8565b610799565b60405161026a9190611808565b60405180910390f35b61028d60048036038101906102889190611c9c565b6107f3565b60405161029a9190611808565b60405180910390f35b6102bd60048036038101906102b89190611d74565b610869565b005b6102d960048036038101906102d49190611de3565b6108b9565b6040516102e69190611685565b60405180910390f35b610309600480360381019061030491906115c8565b6109d5565b005b6060600061031883610a58565b9050600360006004600084815260200190815260200160002060009054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020019081526020016000206000828152602001908152602001600020805461038490611e6e565b80601f01602080910402602001604051908101604052809291908181526020018280546103b090611e6e565b80156103fd5780601f106103d2576101008083540402835291602001916103fd565b820191906000526020600020905b8154815290600101906020018083116103e057829003601f168201915b5050505050915050919050565b60007fd8efbe27000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806104d557507f9061b923000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806104e557506104e482610ab7565b5b9050919050565b60016020528060005260406000206000915090505481565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b610554610b21565b61055e6000610b9f565b565b6000637f87032e60e01b8460405160200161057c929190611efc565b604051602081830303815290604052805190602001208584846105a184848484610c63565b5060006105ad8a610a58565b90506105ba818a8a610d7b565b808a73ffffffffffffffffffffffffffffffffffffffff167f6ada868dd3058cf77a48a74489fd7963688e5464b2b0fa957ace976243270e9260405160405180910390a38095505050505050949350505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060008383906106489190611f3c565b905060006106a887878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505060018060286106a39190611fca565b610e2f565b50905063691f343160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610709576107008161030b565b92505050610791565b6359d1d43c60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361078e5760008585600490809261076a93929190612008565b8101906107779190612043565b91505061078482826108b9565b9350505050610791565b50505b949350505050565b60007f00000000000000000000000000000000000000000000000000000000000000006107c583610e78565b6040516020016107d69291906120c0565b604051602081830303815290604052805190602001209050919050565b600063c01f93d360e01b87878787604051602001610815959493929190612111565b6040516020818303038152906040528051906020012088848461083a84848484610c63565b5060006108468d610a58565b9050610856818d8d8d8d8d610f00565b8095505050505050979650505050505050565b63c7ee930c60e01b604051602001610881919061214a565b604051602081830303815290604052805190602001208383836108a684848484610c63565b506108b087610ff5565b50505050505050565b606060006108c684610a58565b9050600260006004600084815260200190815260200160002060009054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020019081526020016000206000828152602001908152602001600020836040516109359190612165565b9081526020016040518091039020805461094e90611e6e565b80601f016020809104026020016040519081016040528092919081815260200182805461097a90611e6e565b80156109c75780601f1061099c576101008083540402835291602001916109c7565b820191906000526020600020905b8154815290600101906020018083116109aa57829003601f168201915b505050505091505092915050565b6109dd610b21565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610a4c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a43906121ee565b60405180910390fd5b610a5581610b9f565b50565b600080610a6483610e78565b90507f000000000000000000000000000000000000000000000000000000000000000081604051602001610a999291906120c0565b60405160208183030381529060405280519060200120915050919050565b60007fc78de5ed000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b610b29611111565b73ffffffffffffffffffffffffffffffffffffffff16610b4761060e565b73ffffffffffffffffffffffffffffffffffffffff1614610b9d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b949061225a565b60405180910390fd5b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600080610cbb8686867f0000000000000000000000000000000000000000000000000000000000000000604051602001610ca094939291906122e3565b60405160208183030381529060405280519060200120611119565b90506000610cc886610a58565b9050610cd586838661114f565b610d0b576040517f8baa579f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160008281526020019081526020016000205485111580610d3a5750426103e886610d379190612360565b10155b15610d71576040517f50c8f2ec00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050949350505050565b81600360006004600087815260200190815260200160002060009054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060008581526020019081526020016000209081610de79190612530565b50610df283826111de565b827fb7d29e911041e8d9b843369e890bcb72c9388692ba48b65ac54e7214c4c348f783604051610e229190611685565b60405180910390a2505050565b60008060288484610e409190612602565b1015610e525760008091509150610e70565b600080610e608787876111fa565b915091508160001c819350935050505b935093915050565b600060285b6000811115610ef3576001810390507f3031323334353637383961626364656600000000000000000000000000000000600f84161a81536010830492506001810390507f3031323334353637383961626364656600000000000000000000000000000000600f84161a8153601083049250610e7d565b5060286000209050919050565b828260026000600460008b815260200190815260200160002060009054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060008981526020019081526020016000208787604051610f71929190612636565b90815260200160405180910390209182610f8c92919061265a565b50610f9786826111de565b8484604051610fa7929190612636565b6040518091039020867f448bc014f1536726cf8d54ff3d6481ed3cbc683c2591ca204274009afa09b1a187878787604051610fe59493929190612757565b60405180910390a3505050505050565b600061100082610e78565b905060007f0000000000000000000000000000000000000000000000000000000000000000826040516020016110379291906120c0565b60405160208183030381529060405280519060200120905060046000828152602001908152602001600020600081819054906101000a900467ffffffffffffffff1680929190611086906127a6565b91906101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555050807fc6621ccb8f3f5a04bb6502154b2caf6adf5983fe76dfef1cfc9c42e3579db4446004600084815260200190815260200160002060009054906101000a900467ffffffffffffffff1660405161110491906127e5565b60405180910390a2505050565b600033905090565b60007f19457468657265756d205369676e6564204d6573736167653a0a33320000000060005281601c52603c6000209050919050565b600080600061115e85856112df565b915091506000600481111561117657611175612800565b5b81600481111561118957611188612800565b5b1480156111c157508573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b806111d357506111d2868686611330565b5b925050509392505050565b8060016000848152602001908152602001600020819055505050565b60008060019050845183111561120f57600080fd5b611271565b6000603a8210602f8311161561122f5760308203905061126c565b6047821060408311161561124b57600a6041830301905061126c565b6067821060608311161561126757600a6061830301905061126c565b60ff90505b919050565b60208501845b848110156112d55761128e8183015160001a611214565b6112a06001830184015160001a611214565b60ff811460ff831417156112b9576000945050506112d5565b808260041b17808760081b179650505050600281019050611277565b5050935093915050565b60008060418351036113205760008060006020860151925060408601519150606086015160001a905061131487828585611474565b94509450505050611329565b60006002915091505b9250929050565b60008060008573ffffffffffffffffffffffffffffffffffffffff16631626ba7e60e01b868660405160240161136792919061282f565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040516113d1919061289b565b600060405180830381855afa9150503d806000811461140c576040519150601f19603f3d011682016040523d82523d6000602084013e611411565b606091505b509150915081801561142557506020815110155b80156114695750631626ba7e60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168180602001905181019061146791906128c7565b145b925050509392505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08360001c11156114af57600060039150915061154d565b6000600187878787604051600081526020016040526040516114d49493929190612910565b6020604051602081039080840390855afa1580156114f6573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036115445760006001925092505061154d565b80600092509250505b94509492505050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006115958261156a565b9050919050565b6115a58161158a565b81146115b057600080fd5b50565b6000813590506115c28161159c565b92915050565b6000602082840312156115de576115dd611560565b5b60006115ec848285016115b3565b91505092915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561162f578082015181840152602081019050611614565b60008484015250505050565b6000601f19601f8301169050919050565b6000611657826115f5565b6116618185611600565b9350611671818560208601611611565b61167a8161163b565b840191505092915050565b6000602082019050818103600083015261169f818461164c565b905092915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6116dc816116a7565b81146116e757600080fd5b50565b6000813590506116f9816116d3565b92915050565b60006020828403121561171557611714611560565b5b6000611723848285016116ea565b91505092915050565b60008115159050919050565b6117418161172c565b82525050565b600060208201905061175c6000830184611738565b92915050565b6000819050919050565b61177581611762565b811461178057600080fd5b50565b6000813590506117928161176c565b92915050565b6000602082840312156117ae576117ad611560565b5b60006117bc84828501611783565b91505092915050565b6000819050919050565b6117d8816117c5565b82525050565b60006020820190506117f360008301846117cf565b92915050565b61180281611762565b82525050565b600060208201905061181d60008301846117f9565b92915050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6118658261163b565b810181811067ffffffffffffffff821117156118845761188361182d565b5b80604052505050565b6000611897611556565b90506118a3828261185c565b919050565b600067ffffffffffffffff8211156118c3576118c261182d565b5b6118cc8261163b565b9050602081019050919050565b82818337600083830152505050565b60006118fb6118f6846118a8565b61188d565b90508281526020810184848401111561191757611916611828565b5b6119228482856118d9565b509392505050565b600082601f83011261193f5761193e611823565b5b813561194f8482602086016118e8565b91505092915050565b611961816117c5565b811461196c57600080fd5b50565b60008135905061197e81611958565b92915050565b600067ffffffffffffffff82111561199f5761199e61182d565b5b6119a88261163b565b9050602081019050919050565b60006119c86119c384611984565b61188d565b9050828152602081018484840111156119e4576119e3611828565b5b6119ef8482856118d9565b509392505050565b600082601f830112611a0c57611a0b611823565b5b8135611a1c8482602086016119b5565b91505092915050565b60008060008060808587031215611a3f57611a3e611560565b5b6000611a4d878288016115b3565b945050602085013567ffffffffffffffff811115611a6e57611a6d611565565b5b611a7a8782880161192a565b9350506040611a8b8782880161196f565b925050606085013567ffffffffffffffff811115611aac57611aab611565565b5b611ab8878288016119f7565b91505092959194509250565b611acd8161158a565b82525050565b6000602082019050611ae86000830184611ac4565b92915050565b600080fd5b600080fd5b60008083601f840112611b0e57611b0d611823565b5b8235905067ffffffffffffffff811115611b2b57611b2a611aee565b5b602083019150836001820283011115611b4757611b46611af3565b5b9250929050565b60008060008060408587031215611b6857611b67611560565b5b600085013567ffffffffffffffff811115611b8657611b85611565565b5b611b9287828801611af8565b9450945050602085013567ffffffffffffffff811115611bb557611bb4611565565b5b611bc187828801611af8565b925092505092959194509250565b600081519050919050565b600082825260208201905092915050565b6000611bf682611bcf565b611c008185611bda565b9350611c10818560208601611611565b611c198161163b565b840191505092915050565b60006020820190508181036000830152611c3e8184611beb565b905092915050565b60008083601f840112611c5c57611c5b611823565b5b8235905067ffffffffffffffff811115611c7957611c78611aee565b5b602083019150836001820283011115611c9557611c94611af3565b5b9250929050565b600080600080600080600060a0888a031215611cbb57611cba611560565b5b6000611cc98a828b016115b3565b975050602088013567ffffffffffffffff811115611cea57611ce9611565565b5b611cf68a828b01611c46565b9650965050604088013567ffffffffffffffff811115611d1957611d18611565565b5b611d258a828b01611c46565b94509450506060611d388a828b0161196f565b925050608088013567ffffffffffffffff811115611d5957611d58611565565b5b611d658a828b016119f7565b91505092959891949750929550565b600080600060608486031215611d8d57611d8c611560565b5b6000611d9b868287016115b3565b9350506020611dac8682870161196f565b925050604084013567ffffffffffffffff811115611dcd57611dcc611565565b5b611dd9868287016119f7565b9150509250925092565b60008060408385031215611dfa57611df9611560565b5b6000611e08858286016115b3565b925050602083013567ffffffffffffffff811115611e2957611e28611565565b5b611e358582860161192a565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680611e8657607f821691505b602082108103611e9957611e98611e3f565b5b50919050565b6000819050919050565b611eba611eb5826116a7565b611e9f565b82525050565b600081905092915050565b6000611ed6826115f5565b611ee08185611ec0565b9350611ef0818560208601611611565b80840191505092915050565b6000611f088285611ea9565b600482019150611f188284611ecb565b91508190509392505050565b600082905092915050565b600082821b905092915050565b6000611f488383611f24565b82611f5381356116a7565b92506004821015611f9357611f8e7fffffffff0000000000000000000000000000000000000000000000000000000083600403600802611f2f565b831692505b505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000611fd5826117c5565b9150611fe0836117c5565b9250828201905080821115611ff857611ff7611f9b565b5b92915050565b600080fd5b600080fd5b6000808585111561201c5761201b611ffe565b5b8386111561202d5761202c612003565b5b6001850283019150848603905094509492505050565b6000806040838503121561205a57612059611560565b5b600061206885828601611783565b925050602083013567ffffffffffffffff81111561208957612088611565565b5b6120958582860161192a565b9150509250929050565b6000819050919050565b6120ba6120b582611762565b61209f565b82525050565b60006120cc82856120a9565b6020820191506120dc82846120a9565b6020820191508190509392505050565b60006120f88385611ec0565b93506121058385846118d9565b82840190509392505050565b600061211d8288611ea9565b60048201915061212e8286886120ec565b915061213b8284866120ec565b91508190509695505050505050565b60006121568284611ea9565b60048201915081905092915050565b60006121718284611ecb565b915081905092915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006121d8602683611600565b91506121e38261217c565b604082019050919050565b60006020820190508181036000830152612207816121cb565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000612244602083611600565b915061224f8261220e565b602082019050919050565b6000602082019050818103600083015261227381612237565b9050919050565b60008160601b9050919050565b60006122928261227a565b9050919050565b60006122a482612287565b9050919050565b6122bc6122b78261158a565b612299565b82525050565b6000819050919050565b6122dd6122d8826117c5565b6122c2565b82525050565b60006122ef82876120a9565b6020820191506122ff82866122ab565b60148201915061230f82856122cc565b60208201915061231f82846122cc565b60208201915081905095945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061236b826117c5565b9150612376836117c5565b92508261238657612385612331565b5b828204905092915050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b6000600883026123e67fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82611f2f565b6123f08683611f2f565b95508019841693508086168417925050509392505050565b6000819050919050565b600061242d612428612423846117c5565b612408565b6117c5565b9050919050565b6000819050919050565b61244783612412565b61245b61245382612434565b8484546123b6565b825550505050565b600090565b612470612463565b61247b81848461243e565b505050565b5b8181101561249f57612494600082612468565b600181019050612481565b5050565b601f8211156124e4576124b581612391565b6124be846123a6565b810160208510156124cd578190505b6124e16124d9856123a6565b830182612480565b50505b505050565b600082821c905092915050565b6000612507600019846008026124e9565b1980831691505092915050565b600061252083836124f6565b9150826002028217905092915050565b612539826115f5565b67ffffffffffffffff8111156125525761255161182d565b5b61255c8254611e6e565b6125678282856124a3565b600060209050601f83116001811461259a5760008415612588578287015190505b6125928582612514565b8655506125fa565b601f1984166125a886612391565b60005b828110156125d0578489015182556001820191506020850194506020810190506125ab565b868310156125ed57848901516125e9601f8916826124f6565b8355505b6001600288020188555050505b505050505050565b600061260d826117c5565b9150612618836117c5565b92508282039050818111156126305761262f611f9b565b5b92915050565b60006126438284866120ec565b91508190509392505050565b600082905092915050565b612664838361264f565b67ffffffffffffffff81111561267d5761267c61182d565b5b6126878254611e6e565b6126928282856124a3565b6000601f8311600181146126c157600084156126af578287013590505b6126b98582612514565b865550612721565b601f1984166126cf86612391565b60005b828110156126f7578489013582556001820191506020850194506020810190506126d2565b868310156127145784890135612710601f8916826124f6565b8355505b6001600288020188555050505b50505050505050565b60006127368385611600565b93506127438385846118d9565b61274c8361163b565b840190509392505050565b6000604082019050818103600083015261277281868861272a565b9050818103602083015261278781848661272a565b905095945050505050565b600067ffffffffffffffff82169050919050565b60006127b182612792565b915067ffffffffffffffff82036127cb576127ca611f9b565b5b600182019050919050565b6127df81612792565b82525050565b60006020820190506127fa60008301846127d6565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600060408201905061284460008301856117f9565b81810360208301526128568184611beb565b90509392505050565b600081905092915050565b600061287582611bcf565b61287f818561285f565b935061288f818560208601611611565b80840191505092915050565b60006128a7828461286a565b915081905092915050565b6000815190506128c18161176c565b92915050565b6000602082840312156128dd576128dc611560565b5b60006128eb848285016128b2565b91505092915050565b600060ff82169050919050565b61290a816128f4565b82525050565b600060808201905061292560008301876117f9565b6129326020830186612901565b61293f60408301856117f9565b61294c60608301846117f9565b9594505050505056fea264697066735822122064d056b576c53f15f918ab0cbc8cd9058c15fddb5e164956c854c85d5141f05664736f6c63430008130033", + "devdoc": { + "kind": "dev", + "methods": { + "clearRecordsWithSignature(address,uint256,bytes)": { + "params": { + "addr": "The node to update.", + "signature": "A signature proving ownership of the node." + } + }, + "constructor": { + "details": "Constructor" + }, + "node(address)": { + "details": "Returns the node hash for a given account's reverse records.", + "params": { + "addr": "The address to hash" + }, + "returns": { + "_0": "The ENS node hash." + } + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner." + }, + "setNameForAddrWithSignature(address,string,uint256,bytes)": { + "details": "Sets the name for an addr using a signature that can be verified with ERC1271.", + "params": { + "addr": "The reverse record to set", + "inceptionDate": "Date from when this signature is valid from", + "name": "The name of the reverse record", + "signature": "The resolver of the reverse node" + }, + "returns": { + "_0": "The ENS node hash of the reverse record." + } + }, + "setTextForAddrWithSignature(address,string,string,uint256,bytes)": { + "details": "Sets the name for an addr using a signature that can be verified with ERC1271.", + "params": { + "addr": "The reverse record to set", + "inceptionDate": "Date from when this signature is valid from", + "key": "The key of the text record", + "signature": "The resolver of the reverse node", + "value": "The value of the text record" + }, + "returns": { + "_0": "The ENS node hash of the reverse record." + } + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "clearRecordsWithSignature(address,uint256,bytes)": { + "notice": "Increments the record version associated with an ENS node. May only be called by the owner of that node in the ENS registry." + } + }, + "notice": "A fallback reverser resolver to resolve when L2 reverse resolver has no names set. The contract will be set under \"default.reverse\" namespace It can only be set by EOA as contract accounts are chain dependent.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 1121, + "contract": "contracts/DefaultReverseResolver.sol:DefaultReverseResolver", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 289, + "contract": "contracts/DefaultReverseResolver.sol:DefaultReverseResolver", + "label": "lastUpdated", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + }, + { + "astId": 297, + "contract": "contracts/DefaultReverseResolver.sol:DefaultReverseResolver", + "label": "versionable_texts", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_uint64,t_mapping(t_bytes32,t_mapping(t_string_memory_ptr,t_string_storage)))" + }, + { + "astId": 303, + "contract": "contracts/DefaultReverseResolver.sol:DefaultReverseResolver", + "label": "versionable_names", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_uint64,t_mapping(t_bytes32,t_string_storage))" + }, + { + "astId": 307, + "contract": "contracts/DefaultReverseResolver.sol:DefaultReverseResolver", + "label": "recordVersions", + "offset": 0, + "slot": "4", + "type": "t_mapping(t_bytes32,t_uint64)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_mapping(t_string_memory_ptr,t_string_storage))": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => mapping(string => string))", + "numberOfBytes": "32", + "value": "t_mapping(t_string_memory_ptr,t_string_storage)" + }, + "t_mapping(t_bytes32,t_string_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => string)", + "numberOfBytes": "32", + "value": "t_string_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_bytes32,t_uint64)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint64)", + "numberOfBytes": "32", + "value": "t_uint64" + }, + "t_mapping(t_string_memory_ptr,t_string_storage)": { + "encoding": "mapping", + "key": "t_string_memory_ptr", + "label": "mapping(string => string)", + "numberOfBytes": "32", + "value": "t_string_storage" + }, + "t_mapping(t_uint64,t_mapping(t_bytes32,t_mapping(t_string_memory_ptr,t_string_storage)))": { + "encoding": "mapping", + "key": "t_uint64", + "label": "mapping(uint64 => mapping(bytes32 => mapping(string => string)))", + "numberOfBytes": "32", + "value": "t_mapping(t_bytes32,t_mapping(t_string_memory_ptr,t_string_storage))" + }, + "t_mapping(t_uint64,t_mapping(t_bytes32,t_string_storage))": { + "encoding": "mapping", + "key": "t_uint64", + "label": "mapping(uint64 => mapping(bytes32 => string))", + "numberOfBytes": "32", + "value": "t_mapping(t_bytes32,t_string_storage)" + }, + "t_string_memory_ptr": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint64": { + "encoding": "inplace", + "label": "uint64", + "numberOfBytes": "8" + } + } + } +} \ No newline at end of file diff --git a/crosschain-reverse-resolver/deployments/sepolia/OpL1ReverseResolver.json b/crosschain-reverse-resolver/deployments/sepolia/OpL1ReverseResolver.json new file mode 100644 index 00000000..95b42dec --- /dev/null +++ b/crosschain-reverse-resolver/deployments/sepolia/OpL1ReverseResolver.json @@ -0,0 +1,271 @@ +{ + "address": "0xF7e3a2861FfA833C39544B7bbE9D94f3219E5b70", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IEVMVerifier", + "name": "_verifier", + "type": "address" + }, + { + "internalType": "address", + "name": "_target", + "type": "address" + }, + { + "internalType": "contract IDefaultReverseResolver", + "name": "_defaultReverseResolver", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "CommandTooLong", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "InvalidReference", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "string[]", + "name": "urls", + "type": "string[]" + }, + { + "internalType": "bytes", + "name": "callData", + "type": "bytes" + }, + { + "internalType": "bytes4", + "name": "callbackFunction", + "type": "bytes4" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "name": "OffchainLookup", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "actual", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + } + ], + "name": "ResponseLengthMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "TooManyCommands", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "response", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "extradata", + "type": "bytes" + } + ], + "name": "getStorageSlotsCallback", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes[]", + "name": "values", + "type": "bytes[]" + }, + { + "internalType": "bytes", + "name": "callbackdata", + "type": "bytes" + } + ], + "name": "nameCallback", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "name", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "resolve", + "outputs": [ + { + "internalType": "bytes", + "name": "result", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes[]", + "name": "values", + "type": "bytes[]" + }, + { + "internalType": "bytes", + "name": "callbackdata", + "type": "bytes" + } + ], + "name": "textCallback", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x9eac452321494e39dd3b63fcddb8c5644ac235916c8bda64712e06d77d8d317b", + "receipt": { + "to": null, + "from": "0xDBBC2C0fe2a1D0fB4056B35a22e543bEb715E7FC", + "contractAddress": "0xF7e3a2861FfA833C39544B7bbE9D94f3219E5b70", + "transactionIndex": 96, + "gasUsed": "2427859", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x4fef4f8be6b37ce03c137f32111da27ea3bf4f176958d0cdac6554132cc3910e", + "transactionHash": "0x9eac452321494e39dd3b63fcddb8c5644ac235916c8bda64712e06d77d8d317b", + "logs": [], + "blockNumber": 5347090, + "cumulativeGasUsed": "10054565", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0e8DA38565915B7e74e2d78F80ba1BF815F34116", + "0x83C058D2139a6eFA32E42BeB415409000C075563", + "0xfD2c2598382D8876BcC70f550B22d7F70Dda30b0" + ], + "numDeployments": 5, + "solcInputHash": "7cc7da1092d13c01f4d5f27229751af2", + "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IEVMVerifier\",\"name\":\"_verifier\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_target\",\"type\":\"address\"},{\"internalType\":\"contract IDefaultReverseResolver\",\"name\":\"_defaultReverseResolver\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"CommandTooLong\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"max\",\"type\":\"uint256\"}],\"name\":\"InvalidReference\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"string[]\",\"name\":\"urls\",\"type\":\"string[]\"},{\"internalType\":\"bytes\",\"name\":\"callData\",\"type\":\"bytes\"},{\"internalType\":\"bytes4\",\"name\":\"callbackFunction\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"OffchainLookup\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"actual\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expected\",\"type\":\"uint256\"}],\"name\":\"ResponseLengthMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"max\",\"type\":\"uint256\"}],\"name\":\"TooManyCommands\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"response\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"extradata\",\"type\":\"bytes\"}],\"name\":\"getStorageSlotsCallback\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"values\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"callbackdata\",\"type\":\"bytes\"}],\"name\":\"nameCallback\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"name\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"result\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"values\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"callbackdata\",\"type\":\"bytes\"}],\"name\":\"textCallback\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"getStorageSlotsCallback(bytes,bytes)\":{\"details\":\"Internal callback function invoked by CCIP-Read in response to a `getStorageSlots` request.\"},\"resolve(bytes,bytes)\":{\"details\":\"Resolve and verify a record stored in l2 target address. It supports fallback to the default resolver\",\"params\":{\"data\":\"The actual calldata\",\"name\":\"DNS encoded ENS name to query\"},\"returns\":{\"result\":\"result of the call\"}},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/L1ReverseResolver.sol\":\"L1ReverseResolver\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@ensdomains/ens-contracts/contracts/resolvers/profiles/IExtendedResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.4;\\n\\ninterface IExtendedResolver {\\n function resolve(\\n bytes memory name,\\n bytes memory data\\n ) external view returns (bytes memory);\\n}\\n\",\"keccak256\":\"0x5d81521cfae7d9a4475d27533cd8ed0d3475d369eb0674fd90ffbdbdf292faa3\",\"license\":\"MIT\"},\"@ensdomains/ens-contracts/contracts/resolvers/profiles/INameResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\ninterface INameResolver {\\n event NameChanged(bytes32 indexed node, string name);\\n\\n /**\\n * Returns the name associated with an ENS node, for reverse records.\\n * Defined in EIP181.\\n * @param node The ENS node to query.\\n * @return The associated name.\\n */\\n function name(bytes32 node) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x9ec392b612447b1acbdc01114f2da2837a658d3f3157f60a99c5269f0b623346\",\"license\":\"MIT\"},\"@ensdomains/ens-contracts/contracts/resolvers/profiles/ITextResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\ninterface ITextResolver {\\n event TextChanged(\\n bytes32 indexed node,\\n string indexed indexedKey,\\n string key,\\n string value\\n );\\n\\n /**\\n * Returns the text data associated with an ENS node and key.\\n * @param node The ENS node to query.\\n * @param key The text data key to query.\\n * @return The associated text data.\\n */\\n function text(\\n bytes32 node,\\n string calldata key\\n ) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x7c5debb3c42cd9f5de2274ea7aa053f238608314b62db441c40e31cea2543fd5\",\"license\":\"MIT\"},\"@ensdomains/ens-contracts/contracts/utils/HexUtils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.4;\\n\\nlibrary HexUtils {\\n /**\\n * @dev Attempts to parse bytes32 from a hex string\\n * @param str The string to parse\\n * @param idx The offset to start parsing at\\n * @param lastIdx The (exclusive) last index in `str` to consider. Use `str.length` to scan the whole string.\\n */\\n function hexStringToBytes32(\\n bytes memory str,\\n uint256 idx,\\n uint256 lastIdx\\n ) internal pure returns (bytes32 r, bool valid) {\\n valid = true;\\n assembly {\\n // check that the index to read to is not past the end of the string\\n if gt(lastIdx, mload(str)) {\\n revert(0, 0)\\n }\\n\\n function getHex(c) -> ascii {\\n // chars 48-57: 0-9\\n if and(gt(c, 47), lt(c, 58)) {\\n ascii := sub(c, 48)\\n leave\\n }\\n // chars 65-70: A-F\\n if and(gt(c, 64), lt(c, 71)) {\\n ascii := add(sub(c, 65), 10)\\n leave\\n }\\n // chars 97-102: a-f\\n if and(gt(c, 96), lt(c, 103)) {\\n ascii := add(sub(c, 97), 10)\\n leave\\n }\\n // invalid char\\n ascii := 0xff\\n }\\n\\n let ptr := add(str, 32)\\n for {\\n let i := idx\\n } lt(i, lastIdx) {\\n i := add(i, 2)\\n } {\\n let byte1 := getHex(byte(0, mload(add(ptr, i))))\\n let byte2 := getHex(byte(0, mload(add(ptr, add(i, 1)))))\\n // if either byte is invalid, set invalid and break loop\\n if or(eq(byte1, 0xff), eq(byte2, 0xff)) {\\n valid := false\\n break\\n }\\n let combined := or(shl(4, byte1), byte2)\\n r := or(shl(8, r), combined)\\n }\\n }\\n }\\n\\n /**\\n * @dev Attempts to parse an address from a hex string\\n * @param str The string to parse\\n * @param idx The offset to start parsing at\\n * @param lastIdx The (exclusive) last index in `str` to consider. Use `str.length` to scan the whole string.\\n */\\n function hexToAddress(\\n bytes memory str,\\n uint256 idx,\\n uint256 lastIdx\\n ) internal pure returns (address, bool) {\\n if (lastIdx - idx < 40) return (address(0x0), false);\\n (bytes32 r, bool valid) = hexStringToBytes32(str, idx, lastIdx);\\n return (address(uint160(uint256(r))), valid);\\n }\\n}\\n\",\"keccak256\":\"0xcae20ad72181f47dfe7fba7d88e8d902a01576b16e93362878e726989d6cfb4d\",\"license\":\"MIT\"},\"@ensdomains/evm-verifier/contracts/EVMFetchTarget.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.17;\\n\\nimport { IEVMVerifier } from './IEVMVerifier.sol';\\nimport { Address } from '@openzeppelin/contracts/utils/Address.sol';\\n\\n/**\\n * @dev Callback implementation for users of `EVMFetcher`. If you use `EVMFetcher`, your contract must\\n * inherit from this contract in order to handle callbacks correctly.\\n */\\nabstract contract EVMFetchTarget {\\n using Address for address;\\n\\n error ResponseLengthMismatch(uint256 actual, uint256 expected);\\n\\n /**\\n * @dev Internal callback function invoked by CCIP-Read in response to a `getStorageSlots` request.\\n */\\n function getStorageSlotsCallback(bytes calldata response, bytes calldata extradata) external {\\n bytes memory proof = abi.decode(response, (bytes));\\n (IEVMVerifier verifier, address addr, bytes32[] memory commands, bytes[] memory constants, bytes4 callback, bytes memory callbackData) =\\n abi.decode(extradata, (IEVMVerifier, address, bytes32[], bytes[], bytes4, bytes));\\n bytes[] memory values = verifier.getStorageValues(addr, commands, constants, proof);\\n if(values.length != commands.length) {\\n revert ResponseLengthMismatch(values.length, commands.length);\\n }\\n bytes memory ret = address(this).functionCall(abi.encodeWithSelector(callback, values, callbackData));\\n assembly {\\n return(add(ret, 32), mload(ret))\\n }\\n }\\n}\\n\",\"keccak256\":\"0x4653f974a897ce78b7bc3779ba0bb7767df99add49de4f0e9089399f47bb5942\",\"license\":\"MIT\"},\"@ensdomains/evm-verifier/contracts/EVMFetcher.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.17;\\n\\nimport { IEVMVerifier } from './IEVMVerifier.sol';\\nimport { EVMFetchTarget } from './EVMFetchTarget.sol';\\nimport { Address } from '@openzeppelin/contracts/utils/Address.sol';\\n\\ninterface IEVMGateway {\\n function getStorageSlots(address addr, bytes32[] memory commands, bytes[] memory constants) external pure returns(bytes memory witness);\\n}\\n\\nuint8 constant FLAG_DYNAMIC = 0x01;\\nuint8 constant OP_CONSTANT = 0x00;\\nuint8 constant OP_BACKREF = 0x20;\\nuint8 constant OP_END = 0xff;\\n\\n/**\\n * @dev A library to facilitate requesting storage data proofs from contracts, possibly on a different chain.\\n * See l1-verifier/test/TestL1.sol for example usage.\\n */\\nlibrary EVMFetcher {\\n uint256 constant MAX_COMMANDS = 32;\\n uint256 constant MAX_CONSTANTS = 32; // Must not be greater than 32\\n\\n using Address for address;\\n\\n error TooManyCommands(uint256 max);\\n error CommandTooLong();\\n error InvalidReference(uint256 value, uint256 max);\\n error OffchainLookup(address sender, string[] urls, bytes callData, bytes4 callbackFunction, bytes extraData);\\n\\n struct EVMFetchRequest {\\n IEVMVerifier verifier;\\n address target;\\n bytes32[] commands;\\n uint256 operationIdx;\\n bytes[] constants;\\n }\\n\\n /**\\n * @dev Creates a request to fetch the value of multiple storage slots from a contract via CCIP-Read, possibly from\\n * another chain.\\n * Supports dynamic length values and slot numbers derived from other retrieved values.\\n * @param verifier An instance of a verifier contract that can provide and verify the storage slot information.\\n * @param target The address of the contract to fetch storage proofs for.\\n */\\n function newFetchRequest(IEVMVerifier verifier, address target) internal pure returns (EVMFetchRequest memory) {\\n bytes32[] memory commands = new bytes32[](MAX_COMMANDS);\\n bytes[] memory constants = new bytes[](MAX_CONSTANTS);\\n assembly {\\n mstore(commands, 0) // Set current array length to 0\\n mstore(constants, 0)\\n } \\n return EVMFetchRequest(verifier, target, commands, 0, constants);\\n }\\n\\n /**\\n * @dev Starts describing a new fetch request.\\n * Paths specify a series of hashing operations to derive the final slot ID.\\n * See https://docs.soliditylang.org/en/v0.8.17/internals/layout_in_storage.html for details on how Solidity\\n * lays out storage variables.\\n * @param request The request object being operated on.\\n * @param baseSlot The base slot ID that forms the root of the path.\\n */\\n function getStatic(EVMFetchRequest memory request, uint256 baseSlot) internal pure returns (EVMFetchRequest memory) {\\n bytes32[] memory commands = request.commands;\\n uint256 commandIdx = commands.length;\\n if(commandIdx > 0 && request.operationIdx < 32) {\\n // Terminate previous command\\n _addOperation(request, OP_END);\\n }\\n assembly {\\n mstore(commands, add(commandIdx, 1)) // Increment command array length\\n }\\n if(request.commands.length > MAX_COMMANDS) {\\n revert TooManyCommands(MAX_COMMANDS);\\n }\\n request.operationIdx = 0;\\n _addOperation(request, 0);\\n _addOperation(request, _addConstant(request, abi.encode(baseSlot)));\\n return request;\\n }\\n\\n /**\\n * @dev Starts describing a new fetch request.\\n * Paths specify a series of hashing operations to derive the final slot ID.\\n * See https://docs.soliditylang.org/en/v0.8.17/internals/layout_in_storage.html for details on how Solidity\\n * lays out storage variables.\\n * @param request The request object being operated on.\\n * @param baseSlot The base slot ID that forms the root of the path.\\n */\\n function getDynamic(EVMFetchRequest memory request, uint256 baseSlot) internal pure returns (EVMFetchRequest memory) {\\n bytes32[] memory commands = request.commands;\\n uint256 commandIdx = commands.length;\\n if(commandIdx > 0 && request.operationIdx < 32) {\\n // Terminate previous command\\n _addOperation(request, OP_END);\\n }\\n assembly {\\n mstore(commands, add(commandIdx, 1)) // Increment command array length\\n }\\n if(request.commands.length > MAX_COMMANDS) {\\n revert TooManyCommands(MAX_COMMANDS);\\n }\\n request.operationIdx = 0;\\n _addOperation(request, FLAG_DYNAMIC);\\n _addOperation(request, _addConstant(request, abi.encode(baseSlot)));\\n return request;\\n }\\n\\n /**\\n * @dev Adds a `uint256` element to the current path.\\n * @param request The request object being operated on.\\n * @param el The element to add.\\n */\\n function element(EVMFetchRequest memory request, uint256 el) internal pure returns (EVMFetchRequest memory) {\\n if(request.operationIdx >= 32) {\\n revert CommandTooLong();\\n }\\n _addOperation(request, _addConstant(request, abi.encode(el)));\\n return request;\\n }\\n\\n /**\\n * @dev Adds a `bytes32` element to the current path.\\n * @param request The request object being operated on.\\n * @param el The element to add.\\n */\\n function element(EVMFetchRequest memory request, bytes32 el) internal pure returns (EVMFetchRequest memory) {\\n if(request.operationIdx >= 32) {\\n revert CommandTooLong();\\n }\\n _addOperation(request, _addConstant(request, abi.encode(el)));\\n return request;\\n }\\n\\n /**\\n * @dev Adds an `address` element to the current path.\\n * @param request The request object being operated on.\\n * @param el The element to add.\\n */\\n function element(EVMFetchRequest memory request, address el) internal pure returns (EVMFetchRequest memory) {\\n if(request.operationIdx >= 32) {\\n revert CommandTooLong();\\n }\\n _addOperation(request, _addConstant(request, abi.encode(el)));\\n return request;\\n }\\n\\n /**\\n * @dev Adds a `bytes` element to the current path.\\n * @param request The request object being operated on.\\n * @param el The element to add.\\n */\\n function element(EVMFetchRequest memory request, bytes memory el) internal pure returns (EVMFetchRequest memory) {\\n if(request.operationIdx >= 32) {\\n revert CommandTooLong();\\n }\\n _addOperation(request, _addConstant(request, el));\\n return request;\\n }\\n\\n /**\\n * @dev Adds a `string` element to the current path.\\n * @param request The request object being operated on.\\n * @param el The element to add.\\n */\\n function element(EVMFetchRequest memory request, string memory el) internal pure returns (EVMFetchRequest memory) {\\n if(request.operationIdx >= 32) {\\n revert CommandTooLong();\\n }\\n _addOperation(request, _addConstant(request, bytes(el)));\\n return request;\\n }\\n\\n /**\\n * @dev Adds a reference to a previous fetch to the current path.\\n * @param request The request object being operated on.\\n * @param idx The index of the previous fetch request, starting at 0.\\n */\\n function ref(EVMFetchRequest memory request, uint8 idx) internal pure returns (EVMFetchRequest memory) {\\n if(request.operationIdx >= 32) {\\n revert CommandTooLong();\\n }\\n if(idx > request.commands.length || idx > 31) {\\n revert InvalidReference(idx, request.commands.length);\\n }\\n _addOperation(request, OP_BACKREF | idx);\\n return request;\\n }\\n\\n /**\\n * @dev Initiates the fetch request.\\n * Calling this function terminates execution; clients that implement CCIP-Read will make a callback to\\n * `callback` with the results of the operation.\\n * @param callbackId A callback function selector on this contract that will be invoked via CCIP-Read with the result of the lookup.\\n * The function must have a signature matching `(bytes[] memory values, bytes callbackData)` with a return type matching the call in which\\n * this function was invoked. Its return data will be returned as the return value of the entire CCIP-read operation.\\n * @param callbackData Extra data to supply to the callback.\\n */\\n function fetch(EVMFetchRequest memory request, bytes4 callbackId, bytes memory callbackData) internal view {\\n if(request.commands.length > 0 && request.operationIdx < 32) {\\n // Terminate last command\\n _addOperation(request, OP_END);\\n }\\n revert OffchainLookup(\\n address(this),\\n request.verifier.gatewayURLs(),\\n abi.encodeCall(IEVMGateway.getStorageSlots, (request.target, request.commands, request.constants)),\\n EVMFetchTarget.getStorageSlotsCallback.selector,\\n abi.encode(request.verifier, request.target, request.commands, request.constants, callbackId, callbackData)\\n );\\n }\\n\\n function _addConstant(EVMFetchRequest memory request, bytes memory value) private pure returns(uint8 idx) {\\n bytes[] memory constants = request.constants;\\n idx = uint8(constants.length);\\n assembly {\\n mstore(constants, add(idx, 1)) // Increment constant array length\\n }\\n constants[idx] = value;\\n }\\n\\n function _addOperation(EVMFetchRequest memory request, uint8 op) private pure {\\n uint256 commandIdx = request.commands.length - 1;\\n request.commands[commandIdx] = request.commands[commandIdx] | (bytes32(bytes1(op)) >> (8 * request.operationIdx++));\\n }\\n}\\n\",\"keccak256\":\"0x5a6a955ebf3e6da9ce8d39e2729c35e4e800426025954a9a9777c209447ff8b4\",\"license\":\"MIT\"},\"@ensdomains/evm-verifier/contracts/IEVMVerifier.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.17;\\n\\ninterface IEVMVerifier {\\n function gatewayURLs() external view returns(string[] memory);\\n function getStorageValues(address target, bytes32[] memory commands, bytes[] memory constants, bytes memory proof) external view returns(bytes[] memory values);\\n}\\n\",\"keccak256\":\"0x30a635309aeebbde83774010eea5e975b8e73d1932140457121eefdce7792d72\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"contracts/IDefaultReverseResolver.sol\":{\"content\":\"pragma solidity >=0.8.4;\\n\\ninterface IDefaultReverseResolver {\\n function name(address addr) external view returns (string memory);\\n\\n function text(\\n address addr,\\n string memory key\\n ) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x0233c067351640bcfff8824150323e34f06abf239def880164a10eb8846479cf\"},\"contracts/L1ReverseResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.17;\\n\\nimport {EVMFetcher} from '@ensdomains/evm-verifier/contracts/EVMFetcher.sol';\\nimport {EVMFetchTarget} from '@ensdomains/evm-verifier/contracts/EVMFetchTarget.sol';\\nimport {IEVMVerifier} from '@ensdomains/evm-verifier/contracts/IEVMVerifier.sol';\\nimport \\\"@ensdomains/ens-contracts/contracts/resolvers/profiles/INameResolver.sol\\\";\\nimport \\\"@ensdomains/ens-contracts/contracts/resolvers/profiles/ITextResolver.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/introspection/ERC165.sol\\\";\\nimport \\\"@ensdomains/ens-contracts/contracts/utils/HexUtils.sol\\\";\\nimport \\\"@ensdomains/ens-contracts/contracts/resolvers/profiles/IExtendedResolver.sol\\\";\\nimport \\\"./IDefaultReverseResolver.sol\\\";\\n\\ncontract L1ReverseResolver is EVMFetchTarget, IExtendedResolver, ERC165 {\\n using EVMFetcher for EVMFetcher.EVMFetchRequest;\\n IEVMVerifier immutable verifier;\\n address immutable target;\\n IDefaultReverseResolver immutable defaultReverseResolver;\\n uint256 constant VERSIONABLE_TEXTS_SLOT = 2;\\n uint256 constant VERSIONABLE_NAME_SLOT = 3;\\n uint256 constant RECORD_VERSIONS_SLOT = 4;\\n uint256 constant ADDRESS_LENGTH = 40;\\n using HexUtils for bytes;\\n\\n constructor(IEVMVerifier _verifier, address _target, IDefaultReverseResolver _defaultReverseResolver ) {\\n verifier = _verifier;\\n target = _target;\\n defaultReverseResolver = _defaultReverseResolver;\\n }\\n\\n /** \\n * @dev Resolve and verify a record stored in l2 target address. It supports fallback to the default resolver\\n * @param name DNS encoded ENS name to query\\n * @param data The actual calldata\\n * @return result result of the call\\n */\\n function resolve(bytes calldata name, bytes calldata data) external view returns (bytes memory result) {\\n bytes4 selector = bytes4(data);\\n (address addr,) = HexUtils.hexToAddress(name, 1, ADDRESS_LENGTH + 1);\\n if (selector == INameResolver.name.selector) {\\n (bytes32 node) = abi.decode(data[4:], (bytes32));\\n return bytes(_name(node, addr));\\n }\\n if (selector == ITextResolver.text.selector) {\\n (bytes32 node, string memory key) = abi.decode(data[4:], (bytes32, string));\\n return bytes(_text(node, key, addr));\\n }\\n }\\n\\n function _name(bytes32 node, address addr) private view returns (string memory) {\\n EVMFetcher.newFetchRequest(verifier, target)\\n .getStatic(RECORD_VERSIONS_SLOT)\\n .element(node)\\n .getDynamic(VERSIONABLE_NAME_SLOT)\\n .ref(0)\\n .element(node)\\n .fetch(this.nameCallback.selector, abi.encode(addr));\\n }\\n\\n function nameCallback(\\n bytes[] memory values,\\n bytes memory callbackdata\\n ) public view returns (string memory) { \\n if(values[1].length == 0 ){\\n (address addr) = abi.decode(callbackdata, (address));\\n return defaultReverseResolver.name(addr);\\n }else{\\n return string(values[1]);\\n }\\n }\\n\\n function _text(\\n bytes32 node,\\n string memory key,\\n address addr\\n ) private view returns (string memory) {\\n EVMFetcher.newFetchRequest(verifier, target)\\n .getStatic(RECORD_VERSIONS_SLOT)\\n .element(node)\\n .getDynamic(VERSIONABLE_TEXTS_SLOT)\\n .ref(0)\\n .element(node)\\n .element(key)\\n .fetch(this.textCallback.selector, abi.encode(addr, key));\\n }\\n\\n function textCallback(\\n bytes[] memory values,\\n bytes memory callbackdata\\n ) public view returns (string memory) {\\n if(values[1].length == 0 ){\\n (address addr, string memory key) = abi.decode(callbackdata, (address, string));\\n return defaultReverseResolver.text(addr, key);\\n }else{\\n return string(values[1]);\\n }\\n }\\n\\n function supportsInterface(\\n bytes4 interfaceId\\n ) public override view returns (bool) {\\n return\\n interfaceId == type(IExtendedResolver).interfaceId ||\\n super.supportsInterface(interfaceId);\\n }\\n}\\n\",\"keccak256\":\"0xb09771bfaf5dd9a01da9efecfbc15abc43a85501d9264c23895bbbf6edf8637a\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60e06040523480156200001157600080fd5b5060405162002d5838038062002d588339818101604052810190620000379190620001d0565b8273ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250508173ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff16815250508073ffffffffffffffffffffffffffffffffffffffff1660c08173ffffffffffffffffffffffffffffffffffffffff16815250505050506200022c565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006200010e82620000e1565b9050919050565b6000620001228262000101565b9050919050565b620001348162000115565b81146200014057600080fd5b50565b600081519050620001548162000129565b92915050565b620001658162000101565b81146200017157600080fd5b50565b60008151905062000185816200015a565b92915050565b6000620001988262000101565b9050919050565b620001aa816200018b565b8114620001b657600080fd5b50565b600081519050620001ca816200019f565b92915050565b600080600060608486031215620001ec57620001eb620000dc565b5b6000620001fc8682870162000143565b93505060206200020f8682870162000174565b92505060406200022286828701620001b9565b9150509250925092565b60805160a05160c051612ae762000271600039600081816101f2015261063a015260008181610870015261095f01526000818161084f015261093e0152612ae76000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c806301ffc9a71461005c5780632682dd661461008c5780635bdaa916146100bc5780639061b923146100d8578063de9abe5e14610108575b600080fd5b6100766004803603810190610071919061142f565b610138565b6040516100839190611477565b60405180910390f35b6100a660048036038101906100a191906116be565b6101b2565b6040516100b391906117b5565b60405180910390f35b6100d660048036038101906100d19190611832565b6102bc565b005b6100f260048036038101906100ed9190611832565b61046b565b6040516100ff9190611908565b60405180910390f35b610122600480360381019061011d91906116be565b6105f7565b60405161012f91906117b5565b60405180910390f35b60007f9061b923000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806101ab57506101aa82610707565b5b9050919050565b60606000836001815181106101ca576101c961192a565b5b60200260200101515103610297576000828060200190518101906101ee91906119b7565b90507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166301984892826040518263ffffffff1660e01b81526004016102499190611a05565b600060405180830381865afa158015610266573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061028f9190611ac1565b9150506102b6565b826001815181106102ab576102aa61192a565b5b602002602001015190505b92915050565b600084848101906102cd9190611b0a565b905060008060008060008088888101906102e79190611c9f565b95509550955095509550955060008673ffffffffffffffffffffffffffffffffffffffff16633baa6d508787878c6040518563ffffffff1660e01b81526004016103349493929190611f4a565b600060405180830381865afa158015610351573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061037a91906120c9565b905084518151146103c657805185516040517f291894250000000000000000000000000000000000000000000000000000000081526004016103bd92919061212b565b60405180910390fd5b60006104618483856040516024016103df929190612154565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050503073ffffffffffffffffffffffffffffffffffffffff1661077190919063ffffffff16565b9050805160208201f35b6060600083839061047c91906121a3565b905060006104dc87878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505060018060286104d79190612231565b6107bd565b50905063691f343160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610563576000858560049080926105409392919061226f565b81019061054d91906122aa565b90506105598183610806565b93505050506105ef565b6359d1d43c60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036105ec57600080868660049080926105c59392919061226f565b8101906105d29190612347565b915091506105e18282856108ef565b9450505050506105ef565b50505b949350505050565b606060008360018151811061060f5761060e61192a565b5b602002602001015151036106e2576000808380602001905181019061063491906123a3565b915091507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663d977f6b583836040518363ffffffff1660e01b81526004016106939291906123ff565b600060405180830381865afa1580156106b0573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906106d99190611ac1565b92505050610701565b826001815181106106f6576106f561192a565b5b602002602001015190505b92915050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b60606107b5838360006040518060400160405280601e81526020017f416464726573733a206c6f772d6c6576656c2063616c6c206661696c656400008152506109ed565b905092915050565b600080602884846107ce919061242f565b10156107e057600080915091506107fe565b6000806107ee878787610aba565b915091508160001c819350935050505b935093915050565b60606108e9632682dd6660e01b836040516020016108249190611a05565b6040516020818303038152906040526108da866108cc60006108be60036108b08c6108a260046108947f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000610b9f565b610cae90919063ffffffff16565b610d8f90919063ffffffff16565b610e1090919063ffffffff16565b610ef190919063ffffffff16565b610d8f90919063ffffffff16565b610faf9092919063ffffffff16565b92915050565b60606109e663de9abe5e60e01b838560405160200161090f9291906123ff565b6040516020818303038152906040526109d7866109c9896109bb60006109ad600261099f8f61099160046109837f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000610b9f565b610cae90919063ffffffff16565b610d8f90919063ffffffff16565b610e1090919063ffffffff16565b610ef190919063ffffffff16565b610d8f90919063ffffffff16565b61113a90919063ffffffff16565b610faf9092919063ffffffff16565b9392505050565b606082471015610a32576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a29906124d5565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051610a5b9190612531565b60006040518083038185875af1925050503d8060008114610a98576040519150601f19603f3d011682016040523d82523d6000602084013e610a9d565b606091505b5091509150610aae8783838761119c565b92505050949350505050565b600080600190508451831115610acf57600080fd5b610b31565b6000603a8210602f83111615610aef57603082039050610b2c565b60478210604083111615610b0b57600a60418303019050610b2c565b60678210606083111615610b2757600a60618303019050610b2c565b60ff90505b919050565b60208501845b84811015610b9557610b4e8183015160001a610ad4565b610b606001830184015160001a610ad4565b60ff811460ff83141715610b7957600094505050610b95565b808260041b17808760081b179650505050600281019050610b37565b5050935093915050565b610ba7611368565b6000602067ffffffffffffffff811115610bc457610bc36114a8565b5b604051908082528060200260200182016040528015610bf25781602001602082028036833780820191505090505b5090506000602067ffffffffffffffff811115610c1257610c116114a8565b5b604051908082528060200260200182016040528015610c4557816020015b6060815260200190600190039081610c305790505b50905060008252600081526040518060a001604052808673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff16815260200183815260200160008152602001828152509250505092915050565b610cb6611368565b600083604001519050600081519050600081118015610cd9575060208560600151105b15610cea57610ce98560ff611211565b5b60018101825260208560400151511115610d3c5760206040517f128e7008000000000000000000000000000000000000000000000000000000008152600401610d339190612548565b60405180910390fd5b6000856060018181525050610d52856000611211565b610d8485610d7f8787604051602001610d6b9190612548565b6040516020818303038152906040526112b8565b611211565b849250505092915050565b610d97611368565b6020836060015110610dd5576040517fb00fd63800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610e0783610e028585604051602001610dee9190612572565b6040516020818303038152906040526112b8565b611211565b82905092915050565b610e18611368565b600083604001519050600081519050600081118015610e3b575060208560600151105b15610e4c57610e4b8560ff611211565b5b60018101825260208560400151511115610e9e5760206040517f128e7008000000000000000000000000000000000000000000000000000000008152600401610e959190612548565b60405180910390fd5b6000856060018181525050610eb4856001611211565b610ee685610ee18787604051602001610ecd9190612548565b6040516020818303038152906040526112b8565b611211565b849250505092915050565b610ef9611368565b6020836060015110610f37576040517fb00fd63800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8260400151518260ff161180610f505750601f8260ff16115b15610f9957818360400151516040517f101586e0000000000000000000000000000000000000000000000000000000008152600401610f909291906125d5565b60405180910390fd5b610fa68383602017611211565b82905092915050565b6000836040015151118015610fc8575060208360600151105b15610fd957610fd88360ff611211565b5b30836000015173ffffffffffffffffffffffffffffffffffffffff1663b50f2fbc6040518163ffffffff1660e01b8152600401600060405180830381865afa158015611029573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061105291906126df565b84602001518560400151866080015160405160240161107393929190612728565b60405160208183030381529060405263ea9cd3bf60e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050635bdaa91660e01b866000015187602001518860400151896080015189896040516020016110eb969594939291906127d1565b6040516020818303038152906040526040517f556f1830000000000000000000000000000000000000000000000000000000008152600401611131959493929190612953565b60405180910390fd5b611142611368565b6020836060015110611180576040517fb00fd63800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6111938361118e85856112b8565b611211565b82905092915050565b606083156111fe5760008351036111f6576111b6856112f5565b6111f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111ec90612a07565b60405180910390fd5b5b829050611209565b6112088383611318565b5b949350505050565b60006001836040015151611225919061242f565b905082606001805180919061123990612a27565b81525060086112489190612a6f565b8260f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c836040015182815181106112875761128661192a565b5b602002602001015117836040015182815181106112a7576112a661192a565b5b602002602001018181525050505050565b600080836080015190508051915060018201815282818360ff16815181106112e3576112e261192a565b5b60200260200101819052505092915050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b60008251111561132b5781518083602001fd5b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161135f91906117b5565b60405180910390fd5b6040518060a00160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff1681526020016060815260200160008152602001606081525090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61140c816113d7565b811461141757600080fd5b50565b60008135905061142981611403565b92915050565b600060208284031215611445576114446113cd565b5b60006114538482850161141a565b91505092915050565b60008115159050919050565b6114718161145c565b82525050565b600060208201905061148c6000830184611468565b92915050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6114e082611497565b810181811067ffffffffffffffff821117156114ff576114fe6114a8565b5b80604052505050565b60006115126113c3565b905061151e82826114d7565b919050565b600067ffffffffffffffff82111561153e5761153d6114a8565b5b602082029050602081019050919050565b600080fd5b600080fd5b600067ffffffffffffffff821115611574576115736114a8565b5b61157d82611497565b9050602081019050919050565b82818337600083830152505050565b60006115ac6115a784611559565b611508565b9050828152602081018484840111156115c8576115c7611554565b5b6115d384828561158a565b509392505050565b600082601f8301126115f0576115ef611492565b5b8135611600848260208601611599565b91505092915050565b600061161c61161784611523565b611508565b9050808382526020820190506020840283018581111561163f5761163e61154f565b5b835b8181101561168657803567ffffffffffffffff81111561166457611663611492565b5b80860161167189826115db565b85526020850194505050602081019050611641565b5050509392505050565b600082601f8301126116a5576116a4611492565b5b81356116b5848260208601611609565b91505092915050565b600080604083850312156116d5576116d46113cd565b5b600083013567ffffffffffffffff8111156116f3576116f26113d2565b5b6116ff85828601611690565b925050602083013567ffffffffffffffff8111156117205761171f6113d2565b5b61172c858286016115db565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b60005b83811015611770578082015181840152602081019050611755565b60008484015250505050565b600061178782611736565b6117918185611741565b93506117a1818560208601611752565b6117aa81611497565b840191505092915050565b600060208201905081810360008301526117cf818461177c565b905092915050565b600080fd5b60008083601f8401126117f2576117f1611492565b5b8235905067ffffffffffffffff81111561180f5761180e6117d7565b5b60208301915083600182028301111561182b5761182a61154f565b5b9250929050565b6000806000806040858703121561184c5761184b6113cd565b5b600085013567ffffffffffffffff81111561186a576118696113d2565b5b611876878288016117dc565b9450945050602085013567ffffffffffffffff811115611899576118986113d2565b5b6118a5878288016117dc565b925092505092959194509250565b600081519050919050565b600082825260208201905092915050565b60006118da826118b3565b6118e481856118be565b93506118f4818560208601611752565b6118fd81611497565b840191505092915050565b6000602082019050818103600083015261192281846118cf565b905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061198482611959565b9050919050565b61199481611979565b811461199f57600080fd5b50565b6000815190506119b18161198b565b92915050565b6000602082840312156119cd576119cc6113cd565b5b60006119db848285016119a2565b91505092915050565b60006119ef82611959565b9050919050565b6119ff816119e4565b82525050565b6000602082019050611a1a60008301846119f6565b92915050565b600067ffffffffffffffff821115611a3b57611a3a6114a8565b5b611a4482611497565b9050602081019050919050565b6000611a64611a5f84611a20565b611508565b905082815260208101848484011115611a8057611a7f611554565b5b611a8b848285611752565b509392505050565b600082601f830112611aa857611aa7611492565b5b8151611ab8848260208601611a51565b91505092915050565b600060208284031215611ad757611ad66113cd565b5b600082015167ffffffffffffffff811115611af557611af46113d2565b5b611b0184828501611a93565b91505092915050565b600060208284031215611b2057611b1f6113cd565b5b600082013567ffffffffffffffff811115611b3e57611b3d6113d2565b5b611b4a848285016115db565b91505092915050565b6000611b5e826119e4565b9050919050565b611b6e81611b53565b8114611b7957600080fd5b50565b600081359050611b8b81611b65565b92915050565b600081359050611ba08161198b565b92915050565b600067ffffffffffffffff821115611bc157611bc06114a8565b5b602082029050602081019050919050565b6000819050919050565b611be581611bd2565b8114611bf057600080fd5b50565b600081359050611c0281611bdc565b92915050565b6000611c1b611c1684611ba6565b611508565b90508083825260208201905060208402830185811115611c3e57611c3d61154f565b5b835b81811015611c675780611c538882611bf3565b845260208401935050602081019050611c40565b5050509392505050565b600082601f830112611c8657611c85611492565b5b8135611c96848260208601611c08565b91505092915050565b60008060008060008060c08789031215611cbc57611cbb6113cd565b5b6000611cca89828a01611b7c565b9650506020611cdb89828a01611b91565b955050604087013567ffffffffffffffff811115611cfc57611cfb6113d2565b5b611d0889828a01611c71565b945050606087013567ffffffffffffffff811115611d2957611d286113d2565b5b611d3589828a01611690565b9350506080611d4689828a0161141a565b92505060a087013567ffffffffffffffff811115611d6757611d666113d2565b5b611d7389828a016115db565b9150509295509295509295565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b611db581611bd2565b82525050565b6000611dc78383611dac565b60208301905092915050565b6000602082019050919050565b6000611deb82611d80565b611df58185611d8b565b9350611e0083611d9c565b8060005b83811015611e31578151611e188882611dbb565b9750611e2383611dd3565b925050600181019050611e04565b5085935050505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600082825260208201905092915050565b6000611e86826118b3565b611e908185611e6a565b9350611ea0818560208601611752565b611ea981611497565b840191505092915050565b6000611ec08383611e7b565b905092915050565b6000602082019050919050565b6000611ee082611e3e565b611eea8185611e49565b935083602082028501611efc85611e5a565b8060005b85811015611f385784840389528151611f198582611eb4565b9450611f2483611ec8565b925060208a01995050600181019050611f00565b50829750879550505050505092915050565b6000608082019050611f5f60008301876119f6565b8181036020830152611f718186611de0565b90508181036040830152611f858185611ed5565b90508181036060830152611f9981846118cf565b905095945050505050565b6000611fb7611fb284611559565b611508565b905082815260208101848484011115611fd357611fd2611554565b5b611fde848285611752565b509392505050565b600082601f830112611ffb57611ffa611492565b5b815161200b848260208601611fa4565b91505092915050565b600061202761202284611523565b611508565b9050808382526020820190506020840283018581111561204a5761204961154f565b5b835b8181101561209157805167ffffffffffffffff81111561206f5761206e611492565b5b80860161207c8982611fe6565b8552602085019450505060208101905061204c565b5050509392505050565b600082601f8301126120b0576120af611492565b5b81516120c0848260208601612014565b91505092915050565b6000602082840312156120df576120de6113cd565b5b600082015167ffffffffffffffff8111156120fd576120fc6113d2565b5b6121098482850161209b565b91505092915050565b6000819050919050565b61212581612112565b82525050565b6000604082019050612140600083018561211c565b61214d602083018461211c565b9392505050565b6000604082019050818103600083015261216e8185611ed5565b9050818103602083015261218281846118cf565b90509392505050565b600082905092915050565b600082821b905092915050565b60006121af838361218b565b826121ba81356113d7565b925060048210156121fa576121f57fffffffff0000000000000000000000000000000000000000000000000000000083600403600802612196565b831692505b505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061223c82612112565b915061224783612112565b925082820190508082111561225f5761225e612202565b5b92915050565b600080fd5b600080fd5b6000808585111561228357612282612265565b5b838611156122945761229361226a565b5b6001850283019150848603905094509492505050565b6000602082840312156122c0576122bf6113cd565b5b60006122ce84828501611bf3565b91505092915050565b60006122ea6122e584611a20565b611508565b90508281526020810184848401111561230657612305611554565b5b61231184828561158a565b509392505050565b600082601f83011261232e5761232d611492565b5b813561233e8482602086016122d7565b91505092915050565b6000806040838503121561235e5761235d6113cd565b5b600061236c85828601611bf3565b925050602083013567ffffffffffffffff81111561238d5761238c6113d2565b5b61239985828601612319565b9150509250929050565b600080604083850312156123ba576123b96113cd565b5b60006123c8858286016119a2565b925050602083015167ffffffffffffffff8111156123e9576123e86113d2565b5b6123f585828601611a93565b9150509250929050565b600060408201905061241460008301856119f6565b8181036020830152612426818461177c565b90509392505050565b600061243a82612112565b915061244583612112565b925082820390508181111561245d5761245c612202565b5b92915050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b60006124bf602683611741565b91506124ca82612463565b604082019050919050565b600060208201905081810360008301526124ee816124b2565b9050919050565b600081905092915050565b600061250b826118b3565b61251581856124f5565b9350612525818560208601611752565b80840191505092915050565b600061253d8284612500565b915081905092915050565b600060208201905061255d600083018461211c565b92915050565b61256c81611bd2565b82525050565b60006020820190506125876000830184612563565b92915050565b600060ff82169050919050565b6000819050919050565b60006125bf6125ba6125b58461258d565b61259a565b612112565b9050919050565b6125cf816125a4565b82525050565b60006040820190506125ea60008301856125c6565b6125f7602083018461211c565b9392505050565b600067ffffffffffffffff821115612619576126186114a8565b5b602082029050602081019050919050565b600061263d612638846125fe565b611508565b905080838252602082019050602084028301858111156126605761265f61154f565b5b835b818110156126a757805167ffffffffffffffff81111561268557612684611492565b5b8086016126928982611a93565b85526020850194505050602081019050612662565b5050509392505050565b600082601f8301126126c6576126c5611492565b5b81516126d684826020860161262a565b91505092915050565b6000602082840312156126f5576126f46113cd565b5b600082015167ffffffffffffffff811115612713576127126113d2565b5b61271f848285016126b1565b91505092915050565b600060608201905061273d60008301866119f6565b818103602083015261274f8185611de0565b905081810360408301526127638184611ed5565b9050949350505050565b600061278861278361277e84611959565b61259a565b611959565b9050919050565b600061279a8261276d565b9050919050565b60006127ac8261278f565b9050919050565b6127bc816127a1565b82525050565b6127cb816113d7565b82525050565b600060c0820190506127e660008301896127b3565b6127f360208301886119f6565b81810360408301526128058187611de0565b905081810360608301526128198186611ed5565b905061282860808301856127c2565b81810360a083015261283a81846118cf565b9050979650505050505050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600082825260208201905092915050565b600061288f82611736565b6128998185612873565b93506128a9818560208601611752565b6128b281611497565b840191505092915050565b60006128c98383612884565b905092915050565b6000602082019050919050565b60006128e982612847565b6128f38185612852565b93508360208202850161290585612863565b8060005b85811015612941578484038952815161292285826128bd565b945061292d836128d1565b925060208a01995050600181019050612909565b50829750879550505050505092915050565b600060a08201905061296860008301886119f6565b818103602083015261297a81876128de565b9050818103604083015261298e81866118cf565b905061299d60608301856127c2565b81810360808301526129af81846118cf565b90509695505050505050565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b60006129f1601d83611741565b91506129fc826129bb565b602082019050919050565b60006020820190508181036000830152612a20816129e4565b9050919050565b6000612a3282612112565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612a6457612a63612202565b5b600182019050919050565b6000612a7a82612112565b9150612a8583612112565b9250828202612a9381612112565b91508282048414831517612aaa57612aa9612202565b5b509291505056fea264697066735822122030d2d39c55db05e43cc7652a743f9fc5c103fc49663b9a67ee668dfb221e9f0c64736f6c63430008130033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100575760003560e01c806301ffc9a71461005c5780632682dd661461008c5780635bdaa916146100bc5780639061b923146100d8578063de9abe5e14610108575b600080fd5b6100766004803603810190610071919061142f565b610138565b6040516100839190611477565b60405180910390f35b6100a660048036038101906100a191906116be565b6101b2565b6040516100b391906117b5565b60405180910390f35b6100d660048036038101906100d19190611832565b6102bc565b005b6100f260048036038101906100ed9190611832565b61046b565b6040516100ff9190611908565b60405180910390f35b610122600480360381019061011d91906116be565b6105f7565b60405161012f91906117b5565b60405180910390f35b60007f9061b923000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806101ab57506101aa82610707565b5b9050919050565b60606000836001815181106101ca576101c961192a565b5b60200260200101515103610297576000828060200190518101906101ee91906119b7565b90507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166301984892826040518263ffffffff1660e01b81526004016102499190611a05565b600060405180830381865afa158015610266573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061028f9190611ac1565b9150506102b6565b826001815181106102ab576102aa61192a565b5b602002602001015190505b92915050565b600084848101906102cd9190611b0a565b905060008060008060008088888101906102e79190611c9f565b95509550955095509550955060008673ffffffffffffffffffffffffffffffffffffffff16633baa6d508787878c6040518563ffffffff1660e01b81526004016103349493929190611f4a565b600060405180830381865afa158015610351573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061037a91906120c9565b905084518151146103c657805185516040517f291894250000000000000000000000000000000000000000000000000000000081526004016103bd92919061212b565b60405180910390fd5b60006104618483856040516024016103df929190612154565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050503073ffffffffffffffffffffffffffffffffffffffff1661077190919063ffffffff16565b9050805160208201f35b6060600083839061047c91906121a3565b905060006104dc87878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505060018060286104d79190612231565b6107bd565b50905063691f343160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610563576000858560049080926105409392919061226f565b81019061054d91906122aa565b90506105598183610806565b93505050506105ef565b6359d1d43c60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036105ec57600080868660049080926105c59392919061226f565b8101906105d29190612347565b915091506105e18282856108ef565b9450505050506105ef565b50505b949350505050565b606060008360018151811061060f5761060e61192a565b5b602002602001015151036106e2576000808380602001905181019061063491906123a3565b915091507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663d977f6b583836040518363ffffffff1660e01b81526004016106939291906123ff565b600060405180830381865afa1580156106b0573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906106d99190611ac1565b92505050610701565b826001815181106106f6576106f561192a565b5b602002602001015190505b92915050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b60606107b5838360006040518060400160405280601e81526020017f416464726573733a206c6f772d6c6576656c2063616c6c206661696c656400008152506109ed565b905092915050565b600080602884846107ce919061242f565b10156107e057600080915091506107fe565b6000806107ee878787610aba565b915091508160001c819350935050505b935093915050565b60606108e9632682dd6660e01b836040516020016108249190611a05565b6040516020818303038152906040526108da866108cc60006108be60036108b08c6108a260046108947f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000610b9f565b610cae90919063ffffffff16565b610d8f90919063ffffffff16565b610e1090919063ffffffff16565b610ef190919063ffffffff16565b610d8f90919063ffffffff16565b610faf9092919063ffffffff16565b92915050565b60606109e663de9abe5e60e01b838560405160200161090f9291906123ff565b6040516020818303038152906040526109d7866109c9896109bb60006109ad600261099f8f61099160046109837f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000610b9f565b610cae90919063ffffffff16565b610d8f90919063ffffffff16565b610e1090919063ffffffff16565b610ef190919063ffffffff16565b610d8f90919063ffffffff16565b61113a90919063ffffffff16565b610faf9092919063ffffffff16565b9392505050565b606082471015610a32576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a29906124d5565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051610a5b9190612531565b60006040518083038185875af1925050503d8060008114610a98576040519150601f19603f3d011682016040523d82523d6000602084013e610a9d565b606091505b5091509150610aae8783838761119c565b92505050949350505050565b600080600190508451831115610acf57600080fd5b610b31565b6000603a8210602f83111615610aef57603082039050610b2c565b60478210604083111615610b0b57600a60418303019050610b2c565b60678210606083111615610b2757600a60618303019050610b2c565b60ff90505b919050565b60208501845b84811015610b9557610b4e8183015160001a610ad4565b610b606001830184015160001a610ad4565b60ff811460ff83141715610b7957600094505050610b95565b808260041b17808760081b179650505050600281019050610b37565b5050935093915050565b610ba7611368565b6000602067ffffffffffffffff811115610bc457610bc36114a8565b5b604051908082528060200260200182016040528015610bf25781602001602082028036833780820191505090505b5090506000602067ffffffffffffffff811115610c1257610c116114a8565b5b604051908082528060200260200182016040528015610c4557816020015b6060815260200190600190039081610c305790505b50905060008252600081526040518060a001604052808673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff16815260200183815260200160008152602001828152509250505092915050565b610cb6611368565b600083604001519050600081519050600081118015610cd9575060208560600151105b15610cea57610ce98560ff611211565b5b60018101825260208560400151511115610d3c5760206040517f128e7008000000000000000000000000000000000000000000000000000000008152600401610d339190612548565b60405180910390fd5b6000856060018181525050610d52856000611211565b610d8485610d7f8787604051602001610d6b9190612548565b6040516020818303038152906040526112b8565b611211565b849250505092915050565b610d97611368565b6020836060015110610dd5576040517fb00fd63800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610e0783610e028585604051602001610dee9190612572565b6040516020818303038152906040526112b8565b611211565b82905092915050565b610e18611368565b600083604001519050600081519050600081118015610e3b575060208560600151105b15610e4c57610e4b8560ff611211565b5b60018101825260208560400151511115610e9e5760206040517f128e7008000000000000000000000000000000000000000000000000000000008152600401610e959190612548565b60405180910390fd5b6000856060018181525050610eb4856001611211565b610ee685610ee18787604051602001610ecd9190612548565b6040516020818303038152906040526112b8565b611211565b849250505092915050565b610ef9611368565b6020836060015110610f37576040517fb00fd63800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8260400151518260ff161180610f505750601f8260ff16115b15610f9957818360400151516040517f101586e0000000000000000000000000000000000000000000000000000000008152600401610f909291906125d5565b60405180910390fd5b610fa68383602017611211565b82905092915050565b6000836040015151118015610fc8575060208360600151105b15610fd957610fd88360ff611211565b5b30836000015173ffffffffffffffffffffffffffffffffffffffff1663b50f2fbc6040518163ffffffff1660e01b8152600401600060405180830381865afa158015611029573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061105291906126df565b84602001518560400151866080015160405160240161107393929190612728565b60405160208183030381529060405263ea9cd3bf60e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050635bdaa91660e01b866000015187602001518860400151896080015189896040516020016110eb969594939291906127d1565b6040516020818303038152906040526040517f556f1830000000000000000000000000000000000000000000000000000000008152600401611131959493929190612953565b60405180910390fd5b611142611368565b6020836060015110611180576040517fb00fd63800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6111938361118e85856112b8565b611211565b82905092915050565b606083156111fe5760008351036111f6576111b6856112f5565b6111f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111ec90612a07565b60405180910390fd5b5b829050611209565b6112088383611318565b5b949350505050565b60006001836040015151611225919061242f565b905082606001805180919061123990612a27565b81525060086112489190612a6f565b8260f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c836040015182815181106112875761128661192a565b5b602002602001015117836040015182815181106112a7576112a661192a565b5b602002602001018181525050505050565b600080836080015190508051915060018201815282818360ff16815181106112e3576112e261192a565b5b60200260200101819052505092915050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b60008251111561132b5781518083602001fd5b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161135f91906117b5565b60405180910390fd5b6040518060a00160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff1681526020016060815260200160008152602001606081525090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61140c816113d7565b811461141757600080fd5b50565b60008135905061142981611403565b92915050565b600060208284031215611445576114446113cd565b5b60006114538482850161141a565b91505092915050565b60008115159050919050565b6114718161145c565b82525050565b600060208201905061148c6000830184611468565b92915050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6114e082611497565b810181811067ffffffffffffffff821117156114ff576114fe6114a8565b5b80604052505050565b60006115126113c3565b905061151e82826114d7565b919050565b600067ffffffffffffffff82111561153e5761153d6114a8565b5b602082029050602081019050919050565b600080fd5b600080fd5b600067ffffffffffffffff821115611574576115736114a8565b5b61157d82611497565b9050602081019050919050565b82818337600083830152505050565b60006115ac6115a784611559565b611508565b9050828152602081018484840111156115c8576115c7611554565b5b6115d384828561158a565b509392505050565b600082601f8301126115f0576115ef611492565b5b8135611600848260208601611599565b91505092915050565b600061161c61161784611523565b611508565b9050808382526020820190506020840283018581111561163f5761163e61154f565b5b835b8181101561168657803567ffffffffffffffff81111561166457611663611492565b5b80860161167189826115db565b85526020850194505050602081019050611641565b5050509392505050565b600082601f8301126116a5576116a4611492565b5b81356116b5848260208601611609565b91505092915050565b600080604083850312156116d5576116d46113cd565b5b600083013567ffffffffffffffff8111156116f3576116f26113d2565b5b6116ff85828601611690565b925050602083013567ffffffffffffffff8111156117205761171f6113d2565b5b61172c858286016115db565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b60005b83811015611770578082015181840152602081019050611755565b60008484015250505050565b600061178782611736565b6117918185611741565b93506117a1818560208601611752565b6117aa81611497565b840191505092915050565b600060208201905081810360008301526117cf818461177c565b905092915050565b600080fd5b60008083601f8401126117f2576117f1611492565b5b8235905067ffffffffffffffff81111561180f5761180e6117d7565b5b60208301915083600182028301111561182b5761182a61154f565b5b9250929050565b6000806000806040858703121561184c5761184b6113cd565b5b600085013567ffffffffffffffff81111561186a576118696113d2565b5b611876878288016117dc565b9450945050602085013567ffffffffffffffff811115611899576118986113d2565b5b6118a5878288016117dc565b925092505092959194509250565b600081519050919050565b600082825260208201905092915050565b60006118da826118b3565b6118e481856118be565b93506118f4818560208601611752565b6118fd81611497565b840191505092915050565b6000602082019050818103600083015261192281846118cf565b905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061198482611959565b9050919050565b61199481611979565b811461199f57600080fd5b50565b6000815190506119b18161198b565b92915050565b6000602082840312156119cd576119cc6113cd565b5b60006119db848285016119a2565b91505092915050565b60006119ef82611959565b9050919050565b6119ff816119e4565b82525050565b6000602082019050611a1a60008301846119f6565b92915050565b600067ffffffffffffffff821115611a3b57611a3a6114a8565b5b611a4482611497565b9050602081019050919050565b6000611a64611a5f84611a20565b611508565b905082815260208101848484011115611a8057611a7f611554565b5b611a8b848285611752565b509392505050565b600082601f830112611aa857611aa7611492565b5b8151611ab8848260208601611a51565b91505092915050565b600060208284031215611ad757611ad66113cd565b5b600082015167ffffffffffffffff811115611af557611af46113d2565b5b611b0184828501611a93565b91505092915050565b600060208284031215611b2057611b1f6113cd565b5b600082013567ffffffffffffffff811115611b3e57611b3d6113d2565b5b611b4a848285016115db565b91505092915050565b6000611b5e826119e4565b9050919050565b611b6e81611b53565b8114611b7957600080fd5b50565b600081359050611b8b81611b65565b92915050565b600081359050611ba08161198b565b92915050565b600067ffffffffffffffff821115611bc157611bc06114a8565b5b602082029050602081019050919050565b6000819050919050565b611be581611bd2565b8114611bf057600080fd5b50565b600081359050611c0281611bdc565b92915050565b6000611c1b611c1684611ba6565b611508565b90508083825260208201905060208402830185811115611c3e57611c3d61154f565b5b835b81811015611c675780611c538882611bf3565b845260208401935050602081019050611c40565b5050509392505050565b600082601f830112611c8657611c85611492565b5b8135611c96848260208601611c08565b91505092915050565b60008060008060008060c08789031215611cbc57611cbb6113cd565b5b6000611cca89828a01611b7c565b9650506020611cdb89828a01611b91565b955050604087013567ffffffffffffffff811115611cfc57611cfb6113d2565b5b611d0889828a01611c71565b945050606087013567ffffffffffffffff811115611d2957611d286113d2565b5b611d3589828a01611690565b9350506080611d4689828a0161141a565b92505060a087013567ffffffffffffffff811115611d6757611d666113d2565b5b611d7389828a016115db565b9150509295509295509295565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b611db581611bd2565b82525050565b6000611dc78383611dac565b60208301905092915050565b6000602082019050919050565b6000611deb82611d80565b611df58185611d8b565b9350611e0083611d9c565b8060005b83811015611e31578151611e188882611dbb565b9750611e2383611dd3565b925050600181019050611e04565b5085935050505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600082825260208201905092915050565b6000611e86826118b3565b611e908185611e6a565b9350611ea0818560208601611752565b611ea981611497565b840191505092915050565b6000611ec08383611e7b565b905092915050565b6000602082019050919050565b6000611ee082611e3e565b611eea8185611e49565b935083602082028501611efc85611e5a565b8060005b85811015611f385784840389528151611f198582611eb4565b9450611f2483611ec8565b925060208a01995050600181019050611f00565b50829750879550505050505092915050565b6000608082019050611f5f60008301876119f6565b8181036020830152611f718186611de0565b90508181036040830152611f858185611ed5565b90508181036060830152611f9981846118cf565b905095945050505050565b6000611fb7611fb284611559565b611508565b905082815260208101848484011115611fd357611fd2611554565b5b611fde848285611752565b509392505050565b600082601f830112611ffb57611ffa611492565b5b815161200b848260208601611fa4565b91505092915050565b600061202761202284611523565b611508565b9050808382526020820190506020840283018581111561204a5761204961154f565b5b835b8181101561209157805167ffffffffffffffff81111561206f5761206e611492565b5b80860161207c8982611fe6565b8552602085019450505060208101905061204c565b5050509392505050565b600082601f8301126120b0576120af611492565b5b81516120c0848260208601612014565b91505092915050565b6000602082840312156120df576120de6113cd565b5b600082015167ffffffffffffffff8111156120fd576120fc6113d2565b5b6121098482850161209b565b91505092915050565b6000819050919050565b61212581612112565b82525050565b6000604082019050612140600083018561211c565b61214d602083018461211c565b9392505050565b6000604082019050818103600083015261216e8185611ed5565b9050818103602083015261218281846118cf565b90509392505050565b600082905092915050565b600082821b905092915050565b60006121af838361218b565b826121ba81356113d7565b925060048210156121fa576121f57fffffffff0000000000000000000000000000000000000000000000000000000083600403600802612196565b831692505b505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061223c82612112565b915061224783612112565b925082820190508082111561225f5761225e612202565b5b92915050565b600080fd5b600080fd5b6000808585111561228357612282612265565b5b838611156122945761229361226a565b5b6001850283019150848603905094509492505050565b6000602082840312156122c0576122bf6113cd565b5b60006122ce84828501611bf3565b91505092915050565b60006122ea6122e584611a20565b611508565b90508281526020810184848401111561230657612305611554565b5b61231184828561158a565b509392505050565b600082601f83011261232e5761232d611492565b5b813561233e8482602086016122d7565b91505092915050565b6000806040838503121561235e5761235d6113cd565b5b600061236c85828601611bf3565b925050602083013567ffffffffffffffff81111561238d5761238c6113d2565b5b61239985828601612319565b9150509250929050565b600080604083850312156123ba576123b96113cd565b5b60006123c8858286016119a2565b925050602083015167ffffffffffffffff8111156123e9576123e86113d2565b5b6123f585828601611a93565b9150509250929050565b600060408201905061241460008301856119f6565b8181036020830152612426818461177c565b90509392505050565b600061243a82612112565b915061244583612112565b925082820390508181111561245d5761245c612202565b5b92915050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b60006124bf602683611741565b91506124ca82612463565b604082019050919050565b600060208201905081810360008301526124ee816124b2565b9050919050565b600081905092915050565b600061250b826118b3565b61251581856124f5565b9350612525818560208601611752565b80840191505092915050565b600061253d8284612500565b915081905092915050565b600060208201905061255d600083018461211c565b92915050565b61256c81611bd2565b82525050565b60006020820190506125876000830184612563565b92915050565b600060ff82169050919050565b6000819050919050565b60006125bf6125ba6125b58461258d565b61259a565b612112565b9050919050565b6125cf816125a4565b82525050565b60006040820190506125ea60008301856125c6565b6125f7602083018461211c565b9392505050565b600067ffffffffffffffff821115612619576126186114a8565b5b602082029050602081019050919050565b600061263d612638846125fe565b611508565b905080838252602082019050602084028301858111156126605761265f61154f565b5b835b818110156126a757805167ffffffffffffffff81111561268557612684611492565b5b8086016126928982611a93565b85526020850194505050602081019050612662565b5050509392505050565b600082601f8301126126c6576126c5611492565b5b81516126d684826020860161262a565b91505092915050565b6000602082840312156126f5576126f46113cd565b5b600082015167ffffffffffffffff811115612713576127126113d2565b5b61271f848285016126b1565b91505092915050565b600060608201905061273d60008301866119f6565b818103602083015261274f8185611de0565b905081810360408301526127638184611ed5565b9050949350505050565b600061278861278361277e84611959565b61259a565b611959565b9050919050565b600061279a8261276d565b9050919050565b60006127ac8261278f565b9050919050565b6127bc816127a1565b82525050565b6127cb816113d7565b82525050565b600060c0820190506127e660008301896127b3565b6127f360208301886119f6565b81810360408301526128058187611de0565b905081810360608301526128198186611ed5565b905061282860808301856127c2565b81810360a083015261283a81846118cf565b9050979650505050505050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600082825260208201905092915050565b600061288f82611736565b6128998185612873565b93506128a9818560208601611752565b6128b281611497565b840191505092915050565b60006128c98383612884565b905092915050565b6000602082019050919050565b60006128e982612847565b6128f38185612852565b93508360208202850161290585612863565b8060005b85811015612941578484038952815161292285826128bd565b945061292d836128d1565b925060208a01995050600181019050612909565b50829750879550505050505092915050565b600060a08201905061296860008301886119f6565b818103602083015261297a81876128de565b9050818103604083015261298e81866118cf565b905061299d60608301856127c2565b81810360808301526129af81846118cf565b90509695505050505050565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b60006129f1601d83611741565b91506129fc826129bb565b602082019050919050565b60006020820190508181036000830152612a20816129e4565b9050919050565b6000612a3282612112565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612a6457612a63612202565b5b600182019050919050565b6000612a7a82612112565b9150612a8583612112565b9250828202612a9381612112565b91508282048414831517612aaa57612aa9612202565b5b509291505056fea264697066735822122030d2d39c55db05e43cc7652a743f9fc5c103fc49663b9a67ee668dfb221e9f0c64736f6c63430008130033", + "devdoc": { + "kind": "dev", + "methods": { + "getStorageSlotsCallback(bytes,bytes)": { + "details": "Internal callback function invoked by CCIP-Read in response to a `getStorageSlots` request." + }, + "resolve(bytes,bytes)": { + "details": "Resolve and verify a record stored in l2 target address. It supports fallback to the default resolver", + "params": { + "data": "The actual calldata", + "name": "DNS encoded ENS name to query" + }, + "returns": { + "result": "result of the call" + } + }, + "supportsInterface(bytes4)": { + "details": "See {IERC165-supportsInterface}." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/crosschain-reverse-resolver/deployments/sepolia/solcInputs/1051d0da171e6c4c0eb815a27588fee5.json b/crosschain-reverse-resolver/deployments/sepolia/solcInputs/1051d0da171e6c4c0eb815a27588fee5.json new file mode 100644 index 00000000..ceac9ffe --- /dev/null +++ b/crosschain-reverse-resolver/deployments/sepolia/solcInputs/1051d0da171e6c4c0eb815a27588fee5.json @@ -0,0 +1,135 @@ +{ + "language": "Solidity", + "sources": { + "@ensdomains/ens-contracts/contracts/registry/ENS.sol": { + "content": "pragma solidity >=0.8.4;\n\ninterface ENS {\n // Logged when the owner of a node assigns a new owner to a subnode.\n event NewOwner(bytes32 indexed node, bytes32 indexed label, address owner);\n\n // Logged when the owner of a node transfers ownership to a new account.\n event Transfer(bytes32 indexed node, address owner);\n\n // Logged when the resolver for a node changes.\n event NewResolver(bytes32 indexed node, address resolver);\n\n // Logged when the TTL of a node changes\n event NewTTL(bytes32 indexed node, uint64 ttl);\n\n // Logged when an operator is added or removed.\n event ApprovalForAll(\n address indexed owner,\n address indexed operator,\n bool approved\n );\n\n function setRecord(\n bytes32 node,\n address owner,\n address resolver,\n uint64 ttl\n ) external;\n\n function setSubnodeRecord(\n bytes32 node,\n bytes32 label,\n address owner,\n address resolver,\n uint64 ttl\n ) external;\n\n function setSubnodeOwner(\n bytes32 node,\n bytes32 label,\n address owner\n ) external returns (bytes32);\n\n function setResolver(bytes32 node, address resolver) external;\n\n function setOwner(bytes32 node, address owner) external;\n\n function setTTL(bytes32 node, uint64 ttl) external;\n\n function setApprovalForAll(address operator, bool approved) external;\n\n function owner(bytes32 node) external view returns (address);\n\n function resolver(bytes32 node) external view returns (address);\n\n function ttl(bytes32 node) external view returns (uint64);\n\n function recordExists(bytes32 node) external view returns (bool);\n\n function isApprovedForAll(\n address owner,\n address operator\n ) external view returns (bool);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/IMulticallable.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\ninterface IMulticallable {\n function multicall(\n bytes[] calldata data\n ) external returns (bytes[] memory results);\n\n function multicallWithNodeCheck(\n bytes32,\n bytes[] calldata data\n ) external returns (bytes[] memory results);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/Multicallable.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\nimport \"./IMulticallable.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\n\nabstract contract Multicallable is IMulticallable, ERC165 {\n function _multicall(\n bytes32 nodehash,\n bytes[] calldata data\n ) internal returns (bytes[] memory results) {\n results = new bytes[](data.length);\n for (uint256 i = 0; i < data.length; i++) {\n if (nodehash != bytes32(0)) {\n bytes32 txNamehash = bytes32(data[i][4:36]);\n require(\n txNamehash == nodehash,\n \"multicall: All records must have a matching namehash\"\n );\n }\n (bool success, bytes memory result) = address(this).delegatecall(\n data[i]\n );\n require(success);\n results[i] = result;\n }\n return results;\n }\n\n // This function provides an extra security check when called\n // from priviledged contracts (such as EthRegistrarController)\n // that can set records on behalf of the node owners\n function multicallWithNodeCheck(\n bytes32 nodehash,\n bytes[] calldata data\n ) external returns (bytes[] memory results) {\n return _multicall(nodehash, data);\n }\n\n function multicall(\n bytes[] calldata data\n ) public override returns (bytes[] memory results) {\n return _multicall(bytes32(0), data);\n }\n\n function supportsInterface(\n bytes4 interfaceID\n ) public view virtual override returns (bool) {\n return\n interfaceID == type(IMulticallable).interfaceId ||\n super.supportsInterface(interfaceID);\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/INameResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface INameResolver {\n event NameChanged(bytes32 indexed node, string name);\n\n /**\n * Returns the name associated with an ENS node, for reverse records.\n * Defined in EIP181.\n * @param node The ENS node to query.\n * @return The associated name.\n */\n function name(bytes32 node) external view returns (string memory);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/ITextResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface ITextResolver {\n event TextChanged(\n bytes32 indexed node,\n string indexed indexedKey,\n string key,\n string value\n );\n\n /**\n * Returns the text data associated with an ENS node and key.\n * @param node The ENS node to query.\n * @param key The text data key to query.\n * @return The associated text data.\n */\n function text(\n bytes32 node,\n string calldata key\n ) external view returns (string memory);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/IVersionableResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface IVersionableResolver {\n event VersionChanged(bytes32 indexed node, uint64 newVersion);\n\n function recordVersions(bytes32 node) external view returns (uint64);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/reverseRegistrar/IL2ReverseRegistrar.sol": { + "content": "pragma solidity >=0.8.4;\n\ninterface IL2ReverseRegistrar {\n function setName(string memory name) external returns (bytes32);\n\n function setNameForAddr(\n address addr,\n string memory name\n ) external returns (bytes32);\n\n function setNameForAddrWithSignatureAndOwnable(\n address contractAddr,\n address owner,\n string memory name,\n uint256 inceptionDate,\n bytes memory signature\n ) external returns (bytes32);\n\n function setText(\n string calldata key,\n string calldata value\n ) external returns (bytes32);\n\n function setTextForAddr(\n address addr,\n string calldata key,\n string calldata value\n ) external returns (bytes32);\n\n function setTextForAddrWithSignatureAndOwnable(\n address contractAddr,\n address owner,\n string calldata key,\n string calldata value,\n uint256 inceptionDate,\n bytes memory signature\n ) external returns (bytes32);\n\n function clearRecords(address addr) external;\n\n function name(bytes32 node) external view returns (string memory);\n\n function text(\n bytes32 node,\n string calldata key\n ) external view returns (string memory);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/reverseRegistrar/ISignatureReverseResolver.sol": { + "content": "pragma solidity >=0.8.4;\n\ninterface ISignatureReverseResolver {\n event VersionChanged(bytes32 indexed node, uint64 newVersion);\n event ReverseClaimed(address indexed addr, bytes32 indexed node);\n event NameChanged(bytes32 indexed node, string name);\n event TextChanged(\n bytes32 indexed node,\n string indexed indexedKey,\n string key,\n string value\n );\n\n function setNameForAddrWithSignature(\n address addr,\n string memory name,\n uint256 inceptionDate,\n bytes memory signature\n ) external returns (bytes32);\n\n function setTextForAddrWithSignature(\n address addr,\n string calldata key,\n string calldata value,\n uint256 inceptionDate,\n bytes memory signature\n ) external returns (bytes32);\n\n function clearRecordsWithSignature(\n address addr,\n uint256 inceptionDate,\n bytes memory signature\n ) external;\n\n function node(address addr) external view returns (bytes32);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/reverseRegistrar/L2ReverseRegistrar.sol": { + "content": "pragma solidity >=0.8.4;\n\nimport \"../registry/ENS.sol\";\nimport \"./IL2ReverseRegistrar.sol\";\nimport \"./SignatureReverseResolver.sol\";\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\";\nimport \"../resolvers/profiles/ITextResolver.sol\";\nimport \"../resolvers/profiles/INameResolver.sol\";\nimport \"../root/Controllable.sol\";\nimport \"../resolvers/Multicallable.sol\";\nimport \"../utils/LowLevelCallUtils.sol\";\n\nerror NotOwnerOfContract();\n\n/**\n * A L2 reverser registrar. Deployed to each L2 chain.\n * The contract will be verified on L1 Reverse Resolver under the namespace specified at constructor\n */\ncontract L2ReverseRegistrar is\n Multicallable,\n Ownable,\n IL2ReverseRegistrar,\n SignatureReverseResolver\n{\n using ECDSA for bytes32;\n\n bytes32 public immutable L2ReverseNode;\n\n /*\n * @dev Constructor\n * @param _L2ReverseNode The namespace to set. The converntion is '${cointype}.reverse'\n * @param _coinType The cointype converted from the chainId of the chain this contract is deployed to.\n */\n constructor(\n bytes32 _L2ReverseNode,\n uint256 _coinType\n ) SignatureReverseResolver(_L2ReverseNode, _coinType) {\n L2ReverseNode = _L2ReverseNode;\n }\n\n modifier ownerAndAuthorisedWithSignature(\n bytes32 hash,\n address addr,\n address owner,\n uint256 inceptionDate,\n bytes memory signature\n ) {\n isOwnerAndAuthorisedWithSignature(\n hash,\n addr,\n owner,\n inceptionDate,\n signature\n );\n _;\n }\n\n function isAuthorised(address addr) internal view override returns (bool) {\n if (addr != msg.sender && !ownsContract(addr, msg.sender)) {\n revert Unauthorised();\n }\n }\n\n function isOwnerAndAuthorisedWithSignature(\n bytes32 hash,\n address addr,\n address owner,\n uint256 inceptionDate,\n bytes memory signature\n ) internal view returns (bool) {\n bytes32 message = keccak256(\n abi.encodePacked(hash, addr, owner, inceptionDate, coinType)\n ).toEthSignedMessageHash();\n bytes32 node = _getNamehash(addr);\n\n if (!ownsContract(addr, owner)) {\n revert NotOwnerOfContract();\n }\n\n if (\n !SignatureChecker.isValidERC1271SignatureNow(\n owner,\n message,\n signature\n )\n ) {\n revert InvalidSignature();\n }\n\n if (\n inceptionDate <= lastUpdated[node] || // must be newer than current record\n inceptionDate / 1000 >= block.timestamp // must be in the past\n ) {\n revert SignatureOutOfDate();\n }\n }\n\n /**\n * @dev Sets the name for a contract that is owned by a SCW using a signature\n * @param contractAddr The reverse node to set\n * @param owner The owner of the contract (via Ownable)\n * @param name The name of the reverse record\n * @param inceptionDate Date from when this signature is valid from\n * @param signature The signature of an address that will return true on isValidSignature for the owner\n * @return The ENS node hash of the reverse record.\n */\n function setNameForAddrWithSignatureAndOwnable(\n address contractAddr,\n address owner,\n string memory name,\n uint256 inceptionDate,\n bytes memory signature\n )\n public\n ownerAndAuthorisedWithSignature(\n keccak256(\n abi.encodePacked(\n IL2ReverseRegistrar\n .setNameForAddrWithSignatureAndOwnable\n .selector,\n name\n )\n ),\n contractAddr,\n owner,\n inceptionDate,\n signature\n )\n returns (bytes32)\n {\n bytes32 node = _getNamehash(contractAddr);\n _setName(node, name, inceptionDate);\n emit NameChanged(node, name);\n emit ReverseClaimed(contractAddr, node);\n }\n\n /**\n * @dev Sets the `name()` record for the reverse ENS record associated with\n * the calling account.\n * @param name The name to set for this address.\n * @return The ENS node hash of the reverse record.\n */\n function setName(string memory name) public override returns (bytes32) {\n return setNameForAddr(msg.sender, name);\n }\n\n /**\n * @dev Sets the `name()` record for the reverse ENS record associated with\n * the addr provided account.\n * Can be used if the addr is a contract that is owned by a SCW.\n * @param name The name to set for this address.\n * @return The ENS node hash of the reverse record.\n */\n\n function setNameForAddr(\n address addr,\n string memory name\n ) public authorised(addr) returns (bytes32) {\n bytes32 node = _getNamehash(addr);\n _setName(node, name, block.timestamp);\n emit ReverseClaimed(addr, node);\n return node;\n }\n\n /**\n * @dev Sets the name for a contract that is owned by a SCW using a signature\n * @param contractAddr The reverse node to set\n * @param owner The owner of the contract (via Ownable)\n * @param key The name of the reverse record\n * @param value The name of the reverse record\n * @param inceptionDate Date from when this signature is valid from\n * @param signature The signature of an address that will return true on isValidSignature for the owner\n * @return The ENS node hash of the reverse record.\n */\n function setTextForAddrWithSignatureAndOwnable(\n address contractAddr,\n address owner,\n string calldata key,\n string calldata value,\n uint256 inceptionDate,\n bytes memory signature\n )\n public\n ownerAndAuthorisedWithSignature(\n keccak256(\n abi.encodePacked(\n IL2ReverseRegistrar\n .setTextForAddrWithSignatureAndOwnable\n .selector,\n key,\n value\n )\n ),\n contractAddr,\n owner,\n inceptionDate,\n signature\n )\n returns (bytes32)\n {\n bytes32 node = _getNamehash(contractAddr);\n _setText(node, key, value, inceptionDate);\n }\n\n /**\n * @dev Sets the `name()` record for the reverse ENS record associated with\n * the calling account.\n * @param key The key for this text record.\n * @param value The value to set for this text record.\n * @return The ENS node hash of the reverse record.\n */\n function setText(\n string calldata key,\n string calldata value\n ) public override returns (bytes32) {\n return setTextForAddr(msg.sender, key, value);\n }\n\n /**\n * @dev Sets the `text(key)` record for the reverse ENS record associated with\n * the addr provided account.\n * @param key The key for this text record.\n * @param value The value to set for this text record.\n * @return The ENS node hash of the reverse record.\n */\n\n function setTextForAddr(\n address addr,\n string calldata key,\n string calldata value\n ) public override authorised(addr) returns (bytes32) {\n bytes32 node = _getNamehash(addr);\n _setText(node, key, value, block.timestamp);\n return node;\n }\n\n /**\n * Returns the text data associated with an ENS node and key.\n * @param node The ENS node to query.\n * @param key The text data key to query.\n * @return The associated text data.\n */\n function text(\n bytes32 node,\n string calldata key\n ) external view virtual override returns (string memory) {\n return _text(node, key);\n }\n\n /**\n * Returns the name associated with an ENS node, for reverse records.\n * Defined in EIP181.\n * @param node The ENS node to query.\n * @return The associated name.\n */\n function name(\n bytes32 node\n ) external view virtual override returns (string memory) {\n return _name(node);\n }\n\n /**\n * Increments the record version associated with an ENS node.\n * May only be called by the owner of that node in the ENS registry.\n * @param addr The node to update.\n */\n function clearRecords(address addr) public virtual authorised(addr) {\n _clearRecords(addr);\n }\n\n function ownsContract(\n address contractAddr,\n address addr\n ) internal view returns (bool) {\n try Ownable(contractAddr).owner() returns (address owner) {\n return owner == addr;\n } catch {\n return false;\n }\n }\n\n function supportsInterface(\n bytes4 interfaceID\n )\n public\n view\n override(Multicallable, SignatureReverseResolver)\n returns (bool)\n {\n return\n interfaceID == type(IL2ReverseRegistrar).interfaceId ||\n super.supportsInterface(interfaceID);\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/reverseRegistrar/SignatureReverseResolver.sol": { + "content": "pragma solidity >=0.8.4;\n\nimport \"../registry/ENS.sol\";\nimport \"./ISignatureReverseResolver.sol\";\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\";\nimport \"../root/Controllable.sol\";\nimport \"../utils/LowLevelCallUtils.sol\";\n\nerror InvalidSignature();\nerror SignatureOutOfDate();\nerror Unauthorised();\n\ncontract SignatureReverseResolver is Ownable, ISignatureReverseResolver {\n using ECDSA for bytes32;\n mapping(bytes32 => uint256) public lastUpdated;\n mapping(uint64 => mapping(bytes32 => mapping(string => string))) versionable_texts;\n mapping(uint64 => mapping(bytes32 => string)) versionable_names;\n mapping(bytes32 => uint64) internal recordVersions;\n\n bytes32 public immutable ParentNode;\n uint256 public immutable coinType;\n\n /*\n * @dev Constructor\n * @param ParentNode The namespace to set.\n * @param _coinType The cointype converted from the chainId of the chain this contract is deployed to.\n */\n constructor(bytes32 _ParentNode, uint256 _coinType) {\n ParentNode = _ParentNode;\n coinType = _coinType;\n }\n\n modifier authorised(address addr) {\n isAuthorised(addr);\n _;\n }\n\n modifier authorisedSignature(\n bytes32 hash,\n address addr,\n uint256 inceptionDate,\n bytes memory signature\n ) {\n isAuthorisedWithSignature(hash, addr, inceptionDate, signature);\n _;\n }\n\n function getLastUpdated(\n bytes32 node\n ) internal view virtual returns (uint256) {\n return lastUpdated[node];\n }\n\n function isAuthorised(address addr) internal view virtual returns (bool) {}\n\n function isAuthorisedWithSignature(\n bytes32 hash,\n address addr,\n uint256 inceptionDate,\n bytes memory signature\n ) internal view returns (bool) {\n bytes32 message = keccak256(\n abi.encodePacked(hash, addr, inceptionDate, coinType)\n ).toEthSignedMessageHash();\n bytes32 node = _getNamehash(addr);\n\n if (!SignatureChecker.isValidSignatureNow(addr, message, signature)) {\n revert InvalidSignature();\n }\n\n if (\n inceptionDate <= lastUpdated[node] || // must be newer than current record\n inceptionDate / 1000 >= block.timestamp // must be in the past\n ) {\n revert SignatureOutOfDate();\n }\n }\n\n /**\n * @dev Sets the name for an addr using a signature that can be verified with ERC1271.\n * @param addr The reverse record to set\n * @param name The name of the reverse record\n * @param inceptionDate Date from when this signature is valid from\n * @param signature The resolver of the reverse node\n * @return The ENS node hash of the reverse record.\n */\n function setNameForAddrWithSignature(\n address addr,\n string memory name,\n uint256 inceptionDate,\n bytes memory signature\n )\n public\n authorisedSignature(\n keccak256(\n abi.encodePacked(\n ISignatureReverseResolver\n .setNameForAddrWithSignature\n .selector,\n name\n )\n ),\n addr,\n inceptionDate,\n signature\n )\n returns (bytes32)\n {\n bytes32 node = _getNamehash(addr);\n _setName(node, name, inceptionDate);\n emit ReverseClaimed(addr, node);\n return node;\n }\n\n /**\n * @dev Sets the name for an addr using a signature that can be verified with ERC1271.\n * @param addr The reverse record to set\n * @param key The key of the text record\n * @param value The value of the text record\n * @param inceptionDate Date from when this signature is valid from\n * @param signature The resolver of the reverse node\n * @return The ENS node hash of the reverse record.\n */\n function setTextForAddrWithSignature(\n address addr,\n string calldata key,\n string calldata value,\n uint256 inceptionDate,\n bytes memory signature\n )\n public\n authorisedSignature(\n keccak256(\n abi.encodePacked(\n ISignatureReverseResolver\n .setTextForAddrWithSignature\n .selector,\n key,\n value\n )\n ),\n addr,\n inceptionDate,\n signature\n )\n returns (bytes32)\n {\n bytes32 node = _getNamehash(addr);\n _setText(node, key, value, inceptionDate);\n return node;\n }\n\n function _setText(\n bytes32 node,\n string calldata key,\n string calldata value,\n uint256 inceptionDate\n ) internal {\n versionable_texts[recordVersions[node]][node][key] = value;\n _setLastUpdated(node, inceptionDate);\n emit TextChanged(node, key, key, value);\n }\n\n /**\n * Returns the text data associated with an ENS node and key.\n * @param node The ENS node to query.\n * @param key The text data key to query.\n * @return The associated text data.\n */\n function _text(\n bytes32 node,\n string calldata key\n ) internal view returns (string memory) {\n return versionable_texts[recordVersions[node]][node][key];\n }\n\n function _setName(\n bytes32 node,\n string memory newName,\n uint256 inceptionDate\n ) internal virtual {\n versionable_names[recordVersions[node]][node] = newName;\n _setLastUpdated(node, inceptionDate);\n emit NameChanged(node, newName);\n }\n\n function _name(bytes32 node) internal view returns (string memory) {\n return versionable_names[recordVersions[node]][node];\n }\n\n /**\n * Increments the record version associated with an ENS node.\n * May only be called by the owner of that node in the ENS registry.\n * @param addr The node to update.\n */\n function _clearRecords(address addr) internal {\n bytes32 labelHash = LowLevelCallUtils.sha3HexAddress(addr);\n bytes32 reverseNode = keccak256(\n abi.encodePacked(ParentNode, labelHash)\n );\n recordVersions[reverseNode]++;\n emit VersionChanged(reverseNode, recordVersions[reverseNode]);\n }\n\n /**\n * Increments the record version associated with an ENS node.\n * May only be called by the owner of that node in the ENS registry.\n * @param addr The node to update.\n * @param signature A signature proving ownership of the node.\n */\n function clearRecordsWithSignature(\n address addr,\n uint256 inceptionDate,\n bytes memory signature\n )\n public\n authorisedSignature(\n keccak256(\n abi.encodePacked(\n ISignatureReverseResolver.clearRecordsWithSignature.selector\n )\n ),\n addr,\n inceptionDate,\n signature\n )\n {\n _clearRecords(addr);\n }\n\n /**\n * @dev Returns the node hash for a given account's reverse records.\n * @param addr The address to hash\n * @return The ENS node hash.\n */\n function node(address addr) public view returns (bytes32) {\n return\n keccak256(\n abi.encodePacked(\n ParentNode,\n LowLevelCallUtils.sha3HexAddress(addr)\n )\n );\n }\n\n function _getNamehash(address addr) internal view returns (bytes32) {\n bytes32 labelHash = LowLevelCallUtils.sha3HexAddress(addr);\n return keccak256(abi.encodePacked(ParentNode, labelHash));\n }\n\n function _setLastUpdated(bytes32 node, uint256 inceptionDate) internal {\n lastUpdated[node] = inceptionDate;\n }\n\n function supportsInterface(\n bytes4 interfaceID\n ) public view virtual returns (bool) {\n return interfaceID == type(ISignatureReverseResolver).interfaceId;\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/root/Controllable.sol": { + "content": "pragma solidity ^0.8.4;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\n\ncontract Controllable is Ownable {\n mapping(address => bool) public controllers;\n\n event ControllerChanged(address indexed controller, bool enabled);\n\n modifier onlyController() {\n require(\n controllers[msg.sender],\n \"Controllable: Caller is not a controller\"\n );\n _;\n }\n\n function setController(address controller, bool enabled) public onlyOwner {\n controllers[controller] = enabled;\n emit ControllerChanged(controller, enabled);\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/utils/LowLevelCallUtils.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.13;\n\nimport {Address} from \"@openzeppelin/contracts/utils/Address.sol\";\n\nlibrary LowLevelCallUtils {\n // This is the hex encoding of the string 'abcdefghijklmnopqrstuvwxyz'\n // It is used as a constant to lookup the characters of the hex address\n bytes32 constant lookup =\n 0x3031323334353637383961626364656600000000000000000000000000000000;\n using Address for address;\n\n /**\n * @dev Makes a static call to the specified `target` with `data`. Return data can be fetched with\n * `returnDataSize` and `readReturnData`.\n * @param target The address to staticcall.\n * @param data The data to pass to the call.\n * @return success True if the call succeeded, or false if it reverts.\n */\n function functionStaticCall(\n address target,\n bytes memory data\n ) internal view returns (bool success) {\n require(\n target.isContract(),\n \"LowLevelCallUtils: static call to non-contract\"\n );\n assembly {\n success := staticcall(\n gas(),\n target,\n add(data, 32),\n mload(data),\n 0,\n 0\n )\n }\n }\n\n /**\n * @dev Returns the size of the return data of the most recent external call.\n */\n function returnDataSize() internal pure returns (uint256 len) {\n assembly {\n len := returndatasize()\n }\n }\n\n /**\n * @dev Reads return data from the most recent external call.\n * @param offset Offset into the return data.\n * @param length Number of bytes to return.\n */\n function readReturnData(\n uint256 offset,\n uint256 length\n ) internal pure returns (bytes memory data) {\n data = new bytes(length);\n assembly {\n returndatacopy(add(data, 32), offset, length)\n }\n }\n\n /**\n * @dev Reverts with the return data from the most recent external call.\n */\n function propagateRevert() internal pure {\n assembly {\n returndatacopy(0, 0, returndatasize())\n revert(0, returndatasize())\n }\n }\n\n /**\n * @dev An optimised function to compute the sha3 of the lower-case\n * hexadecimal representation of an Ethereum address.\n * @param addr The address to hash\n * @return ret The SHA3 hash of the lower-case hexadecimal encoding of the\n * input address.\n */\n function sha3HexAddress(address addr) internal pure returns (bytes32 ret) {\n assembly {\n for {\n let i := 40\n } gt(i, 0) {\n\n } {\n i := sub(i, 1)\n mstore8(i, byte(and(addr, 0xf), lookup))\n addr := div(addr, 0x10)\n i := sub(i, 1)\n mstore8(i, byte(and(addr, 0xf), lookup))\n addr := div(addr, 0x10)\n }\n\n ret := keccak256(0, 40)\n }\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/wrapper/BytesUtils.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity ~0.8.17;\n\nlibrary BytesUtils {\n /*\n * @dev Returns the keccak-256 hash of a byte range.\n * @param self The byte string to hash.\n * @param offset The position to start hashing at.\n * @param len The number of bytes to hash.\n * @return The hash of the byte range.\n */\n function keccak(\n bytes memory self,\n uint256 offset,\n uint256 len\n ) internal pure returns (bytes32 ret) {\n require(offset + len <= self.length);\n assembly {\n ret := keccak256(add(add(self, 32), offset), len)\n }\n }\n\n /**\n * @dev Returns the ENS namehash of a DNS-encoded name.\n * @param self The DNS-encoded name to hash.\n * @param offset The offset at which to start hashing.\n * @return The namehash of the name.\n */\n function namehash(\n bytes memory self,\n uint256 offset\n ) internal pure returns (bytes32) {\n (bytes32 labelhash, uint256 newOffset) = readLabel(self, offset);\n if (labelhash == bytes32(0)) {\n require(offset == self.length - 1, \"namehash: Junk at end of name\");\n return bytes32(0);\n }\n return\n keccak256(abi.encodePacked(namehash(self, newOffset), labelhash));\n }\n\n /**\n * @dev Returns the keccak-256 hash of a DNS-encoded label, and the offset to the start of the next label.\n * @param self The byte string to read a label from.\n * @param idx The index to read a label at.\n * @return labelhash The hash of the label at the specified index, or 0 if it is the last label.\n * @return newIdx The index of the start of the next label.\n */\n function readLabel(\n bytes memory self,\n uint256 idx\n ) internal pure returns (bytes32 labelhash, uint256 newIdx) {\n require(idx < self.length, \"readLabel: Index out of bounds\");\n uint256 len = uint256(uint8(self[idx]));\n if (len > 0) {\n labelhash = keccak(self, idx + 1, len);\n } else {\n labelhash = bytes32(0);\n }\n newIdx = idx + len + 1;\n }\n}\n" + }, + "@ensdomains/evm-verifier/contracts/EVMProofHelper.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\nimport {RLPReader} from \"@eth-optimism/contracts-bedrock/src/libraries/rlp/RLPReader.sol\";\nimport {Bytes} from \"@eth-optimism/contracts-bedrock/src/libraries/Bytes.sol\";\nimport {SecureMerkleTrie} from \"./SecureMerkleTrie.sol\";\n\nstruct StateProof {\n bytes[] stateTrieWitness; // Witness proving the `storageRoot` against a state root.\n bytes[][] storageProofs; // An array of proofs of individual storage elements \n}\n\nuint8 constant OP_CONSTANT = 0x00;\nuint8 constant OP_BACKREF = 0x20;\nuint8 constant FLAG_DYNAMIC = 0x01;\n\nlibrary EVMProofHelper {\n using Bytes for bytes;\n\n error AccountNotFound(address);\n error UnknownOpcode(uint8);\n error InvalidSlotSize(uint256 size);\n\n /**\n * @notice Get the storage root for the provided merkle proof\n * @param stateRoot The state root the witness was generated against\n * @param target The address we are fetching a storage root for\n * @param witness A witness proving the value of the storage root for `target`.\n * @return The storage root retrieved from the provided state root\n */\n function getStorageRoot(bytes32 stateRoot, address target, bytes[] memory witness) private pure returns (bytes32) {\n (bool exists, bytes memory encodedResolverAccount) = SecureMerkleTrie.get(\n abi.encodePacked(target),\n witness,\n stateRoot\n );\n if(!exists) {\n revert AccountNotFound(target);\n }\n RLPReader.RLPItem[] memory accountState = RLPReader.readList(encodedResolverAccount);\n return bytes32(RLPReader.readBytes(accountState[2]));\n }\n\n /**\n * @notice Prove whether the provided storage slot is part of the storageRoot\n * @param storageRoot the storage root for the account that contains the storage slot\n * @param slot The storage key we are fetching the value of\n * @param witness the StorageProof struct containing the necessary proof data\n * @return The retrieved storage proof value or 0x if the storage slot is empty\n */\n function getSingleStorageProof(bytes32 storageRoot, uint256 slot, bytes[] memory witness) private pure returns (bytes memory) {\n (bool exists, bytes memory retrievedValue) = SecureMerkleTrie.get(\n abi.encodePacked(slot),\n witness,\n storageRoot\n );\n if(!exists) {\n // Nonexistent values are treated as zero.\n return \"\";\n }\n return RLPReader.readBytes(retrievedValue);\n }\n\n function getFixedValue(bytes32 storageRoot, uint256 slot, bytes[] memory witness) private pure returns(bytes32) {\n bytes memory value = getSingleStorageProof(storageRoot, slot, witness);\n // RLP encoded storage slots are stored without leading 0 bytes.\n // Casting to bytes32 appends trailing 0 bytes, so we have to bit shift to get the \n // original fixed-length representation back.\n return bytes32(value) >> (256 - 8 * value.length);\n }\n\n function executeOperation(bytes1 operation, bytes[] memory constants, bytes[] memory values) private pure returns(bytes memory) {\n uint8 opcode = uint8(operation) & 0xe0;\n uint8 operand = uint8(operation) & 0x1f;\n\n if(opcode == OP_CONSTANT) {\n return constants[operand];\n } else if(opcode == OP_BACKREF) {\n return values[operand];\n } else {\n revert UnknownOpcode(opcode);\n }\n }\n\n function computeFirstSlot(bytes32 command, bytes[] memory constants, bytes[] memory values) private pure returns(bool isDynamic, uint256 slot) {\n uint8 flags = uint8(command[0]);\n isDynamic = (flags & FLAG_DYNAMIC) != 0;\n\n bytes memory slotData = executeOperation(command[1], constants, values);\n require(slotData.length == 32, \"First path element must be 32 bytes\");\n slot = uint256(bytes32(slotData));\n\n for(uint256 j = 2; j < 32 && command[j] != 0xff; j++) {\n bytes memory index = executeOperation(command[j], constants, values);\n slot = uint256(keccak256(abi.encodePacked(index, slot)));\n }\n }\n\n function getDynamicValue(bytes32 storageRoot, uint256 slot, StateProof memory proof, uint256 proofIdx) private pure returns(bytes memory value, uint256 newProofIdx) {\n uint256 firstValue = uint256(getFixedValue(storageRoot, slot, proof.storageProofs[proofIdx++]));\n if(firstValue & 0x01 == 0x01) {\n // Long value: first slot is `length * 2 + 1`, following slots are data.\n uint256 length = (firstValue - 1) / 2;\n value = \"\";\n slot = uint256(keccak256(abi.encodePacked(slot)));\n // This is horribly inefficient - O(n^2). A better approach would be to build an array of words and concatenate them\n // all at once, but we're trying to avoid writing new library code.\n while(length > 0) {\n if(length < 32) {\n value = bytes.concat(value, getSingleStorageProof(storageRoot, slot++, proof.storageProofs[proofIdx++]).slice(0, length));\n length = 0;\n } else {\n value = bytes.concat(value, getSingleStorageProof(storageRoot, slot++, proof.storageProofs[proofIdx++]));\n length -= 32;\n }\n }\n return (value, proofIdx);\n } else {\n // Short value: least significant byte is `length * 2`, other bytes are data.\n uint256 length = (firstValue & 0xFF) / 2;\n return (abi.encode(firstValue).slice(0, length), proofIdx);\n }\n }\n\n function getStorageValues(address target, bytes32[] memory commands, bytes[] memory constants, bytes32 stateRoot, StateProof memory proof) internal pure returns(bytes[] memory values) {\n bytes32 storageRoot = getStorageRoot(stateRoot, target, proof.stateTrieWitness);\n uint256 proofIdx = 0;\n values = new bytes[](commands.length);\n for(uint256 i = 0; i < commands.length; i++) {\n bytes32 command = commands[i];\n (bool isDynamic, uint256 slot) = computeFirstSlot(command, constants, values);\n if(!isDynamic) {\n values[i] = abi.encode(getFixedValue(storageRoot, slot, proof.storageProofs[proofIdx++]));\n if(values[i].length > 32) {\n revert InvalidSlotSize(values[i].length);\n }\n } else {\n (values[i], proofIdx) = getDynamicValue(storageRoot, slot, proof, proofIdx);\n }\n }\n }\n}" + }, + "@ensdomains/evm-verifier/contracts/IEVMVerifier.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\ninterface IEVMVerifier {\n function gatewayURLs() external view returns(string[] memory);\n function getStorageValues(address target, bytes32[] memory commands, bytes[] memory constants, bytes memory proof) external view returns(bytes[] memory values);\n}\n" + }, + "@ensdomains/evm-verifier/contracts/MerkleTrie.sol": { + "content": "// Pulled from https://github.com/ethereum-optimism/optimism/blob/4d13f0afe8869faf7bba45d8339998525ebc5161/packages/contracts-bedrock/contracts/libraries/trie/MerkleTrie.sol\n// as this is the last version of Optimism's Merkle Trie library that supports nonexistence proofs; support was removed\n// in the next commit for some version.\n// Copyright 2020-2021 Optimism\n// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport { Bytes } from \"@eth-optimism/contracts-bedrock/src/libraries/Bytes.sol\";\nimport { RLPReader } from \"@eth-optimism/contracts-bedrock/src/libraries/rlp/RLPReader.sol\";\n\n\n/**\n * @title MerkleTrie\n * @notice MerkleTrie is a small library for verifying standard Ethereum Merkle-Patricia trie\n * inclusion proofs. By default, this library assumes a hexary trie. One can change the\n * trie radix constant to support other trie radixes.\n */\nlibrary MerkleTrie {\n /**\n * @notice Struct representing a node in the trie.\n */\n struct TrieNode {\n bytes encoded;\n RLPReader.RLPItem[] decoded;\n }\n\n /**\n * @notice Determines the number of elements per branch node.\n */\n uint256 internal constant TREE_RADIX = 16;\n\n /**\n * @notice Branch nodes have TREE_RADIX elements and one value element.\n */\n uint256 internal constant BRANCH_NODE_LENGTH = TREE_RADIX + 1;\n\n /**\n * @notice Leaf nodes and extension nodes have two elements, a `path` and a `value`.\n */\n uint256 internal constant LEAF_OR_EXTENSION_NODE_LENGTH = 2;\n\n /**\n * @notice Prefix for even-nibbled extension node paths.\n */\n uint8 internal constant PREFIX_EXTENSION_EVEN = 0;\n\n /**\n * @notice Prefix for odd-nibbled extension node paths.\n */\n uint8 internal constant PREFIX_EXTENSION_ODD = 1;\n\n /**\n * @notice Prefix for even-nibbled leaf node paths.\n */\n uint8 internal constant PREFIX_LEAF_EVEN = 2;\n\n /**\n * @notice Prefix for odd-nibbled leaf node paths.\n */\n uint8 internal constant PREFIX_LEAF_ODD = 3;\n\n /**\n * @notice RLP representation of `NULL`.\n */\n bytes internal constant RLP_NULL = hex\"80\";\n\n /**\n * @notice Verifies a proof that a given key/value pair is present in the trie.\n *\n * @param _key Key of the node to search for, as a hex string.\n * @param _value Value of the node to search for, as a hex string.\n * @param _proof Merkle trie inclusion proof for the desired node. Unlike traditional Merkle\n * trees, this proof is executed top-down and consists of a list of RLP-encoded\n * nodes that make a path down to the target node.\n * @param _root Known root of the Merkle trie. Used to verify that the included proof is\n * correctly constructed.\n *\n * @return Whether or not the proof is valid.\n */\n function verifyInclusionProof(\n bytes memory _key,\n bytes memory _value,\n bytes[] memory _proof,\n bytes32 _root\n ) internal pure returns (bool) {\n (bool exists, bytes memory value) = get(_key, _proof, _root);\n return (exists && Bytes.equal(_value, value));\n }\n\n /**\n * @notice Retrieves the value associated with a given key.\n *\n * @param _key Key to search for, as hex bytes.\n * @param _proof Merkle trie inclusion proof for the key.\n * @param _root Known root of the Merkle trie.\n *\n * @return Whether or not the key exists.\n * @return Value of the key if it exists.\n */\n function get(\n bytes memory _key,\n bytes[] memory _proof,\n bytes32 _root\n ) internal pure returns (bool, bytes memory) {\n TrieNode[] memory proof = _parseProof(_proof);\n (uint256 pathLength, bytes memory keyRemainder, bool isFinalNode) = _walkNodePath(\n proof,\n _key,\n _root\n );\n\n bool noRemainder = keyRemainder.length == 0;\n\n require(noRemainder || isFinalNode, \"MerkleTrie: provided proof is invalid\");\n\n bytes memory value = noRemainder ? _getNodeValue(proof[pathLength - 1]) : bytes(\"\");\n\n return (value.length > 0, value);\n }\n\n /**\n * @notice Walks through a proof using a provided key.\n *\n * @param _proof Inclusion proof to walk through.\n * @param _key Key to use for the walk.\n * @param _root Known root of the trie.\n *\n * @return Length of the final path\n * @return Portion of the key remaining after the walk.\n * @return Whether or not we've hit a dead end.\n */\n // solhint-disable-next-line code-complexity\n function _walkNodePath(\n TrieNode[] memory _proof,\n bytes memory _key,\n bytes32 _root\n )\n private\n pure\n returns (\n uint256,\n bytes memory,\n bool\n )\n {\n uint256 pathLength = 0;\n bytes memory key = Bytes.toNibbles(_key);\n\n bytes memory currentNodeID = abi.encodePacked(_root);\n uint256 currentKeyIndex = 0;\n uint256 currentKeyIncrement = 0;\n TrieNode memory currentNode;\n\n // Proof is top-down, so we start at the first element (root).\n for (uint256 i = 0; i < _proof.length; i++) {\n currentNode = _proof[i];\n currentKeyIndex += currentKeyIncrement;\n\n // Keep track of the proof elements we actually need.\n // It's expensive to resize arrays, so this simply reduces gas costs.\n pathLength += 1;\n\n if (currentKeyIndex == 0) {\n // First proof element is always the root node.\n require(\n Bytes.equal(abi.encodePacked(keccak256(currentNode.encoded)), currentNodeID),\n \"MerkleTrie: invalid root hash\"\n );\n } else if (currentNode.encoded.length >= 32) {\n // Nodes 32 bytes or larger are hashed inside branch nodes.\n require(\n Bytes.equal(abi.encodePacked(keccak256(currentNode.encoded)), currentNodeID),\n \"MerkleTrie: invalid large internal hash\"\n );\n } else {\n // Nodes smaller than 32 bytes aren't hashed.\n require(\n Bytes.equal(currentNode.encoded, currentNodeID),\n \"MerkleTrie: invalid internal node hash\"\n );\n }\n\n if (currentNode.decoded.length == BRANCH_NODE_LENGTH) {\n if (currentKeyIndex == key.length) {\n // We've hit the end of the key\n // meaning the value should be within this branch node.\n break;\n } else {\n // We're not at the end of the key yet.\n // Figure out what the next node ID should be and continue.\n uint8 branchKey = uint8(key[currentKeyIndex]);\n RLPReader.RLPItem memory nextNode = currentNode.decoded[branchKey];\n currentNodeID = _getNodeID(nextNode);\n currentKeyIncrement = 1;\n continue;\n }\n } else if (currentNode.decoded.length == LEAF_OR_EXTENSION_NODE_LENGTH) {\n bytes memory path = _getNodePath(currentNode);\n uint8 prefix = uint8(path[0]);\n uint8 offset = 2 - (prefix % 2);\n bytes memory pathRemainder = Bytes.slice(path, offset);\n bytes memory keyRemainder = Bytes.slice(key, currentKeyIndex);\n uint256 sharedNibbleLength = _getSharedNibbleLength(pathRemainder, keyRemainder);\n\n require(\n keyRemainder.length >= pathRemainder.length,\n \"MerkleTrie: invalid key length for leaf or extension node\"\n );\n\n if (prefix == PREFIX_LEAF_EVEN || prefix == PREFIX_LEAF_ODD) {\n if (\n pathRemainder.length == sharedNibbleLength &&\n keyRemainder.length == sharedNibbleLength\n ) {\n // The key within this leaf matches our key exactly.\n // Increment the key index to reflect that we have no remainder.\n currentKeyIndex += sharedNibbleLength;\n }\n\n // We've hit a leaf node, so our next node should be NULL.\n currentNodeID = RLP_NULL;\n break;\n } else if (prefix == PREFIX_EXTENSION_EVEN || prefix == PREFIX_EXTENSION_ODD) {\n if (sharedNibbleLength != pathRemainder.length) {\n // Our extension node is not identical to the remainder.\n // We've hit the end of this path\n // updates will need to modify this extension.\n currentNodeID = RLP_NULL;\n break;\n } else {\n // Our extension shares some nibbles.\n // Carry on to the next node.\n currentNodeID = _getNodeID(currentNode.decoded[1]);\n currentKeyIncrement = sharedNibbleLength;\n continue;\n }\n } else {\n revert(\"MerkleTrie: received a node with an unknown prefix\");\n }\n } else {\n revert(\"MerkleTrie: received an unparseable node\");\n }\n }\n\n return (\n pathLength,\n Bytes.slice(key, currentKeyIndex),\n Bytes.equal(currentNodeID, RLP_NULL)\n );\n }\n\n /**\n * @notice Parses an array of proof elements into a new array that contains both the original\n * encoded element and the RLP-decoded element.\n *\n * @param _proof Array of proof elements to parse.\n *\n * @return Proof parsed into easily accessible structs.\n */\n function _parseProof(bytes[] memory _proof) private pure returns (TrieNode[] memory) {\n uint256 length = _proof.length;\n TrieNode[] memory proof = new TrieNode[](length);\n for (uint256 i = 0; i < length; ) {\n proof[i] = TrieNode({ encoded: _proof[i], decoded: RLPReader.readList(_proof[i]) });\n unchecked {\n ++i;\n }\n }\n return proof;\n }\n\n /**\n * @notice Picks out the ID for a node. Node ID is referred to as the \"hash\" within the\n * specification, but nodes < 32 bytes are not actually hashed.\n *\n * @param _node Node to pull an ID for.\n *\n * @return ID for the node, depending on the size of its contents.\n */\n function _getNodeID(RLPReader.RLPItem memory _node) private pure returns (bytes memory) {\n return _node.length < 32 ? RLPReader.readRawBytes(_node) : RLPReader.readBytes(_node);\n }\n\n /**\n * @notice Gets the path for a leaf or extension node.\n *\n * @param _node Node to get a path for.\n *\n * @return Node path, converted to an array of nibbles.\n */\n function _getNodePath(TrieNode memory _node) private pure returns (bytes memory) {\n return Bytes.toNibbles(RLPReader.readBytes(_node.decoded[0]));\n }\n\n /**\n * @notice Gets the value for a node.\n *\n * @param _node Node to get a value for.\n *\n * @return Node value, as hex bytes.\n */\n function _getNodeValue(TrieNode memory _node) private pure returns (bytes memory) {\n return RLPReader.readBytes(_node.decoded[_node.decoded.length - 1]);\n }\n\n /**\n * @notice Utility; determines the number of nibbles shared between two nibble arrays.\n *\n * @param _a First nibble array.\n * @param _b Second nibble array.\n *\n * @return Number of shared nibbles.\n */\n function _getSharedNibbleLength(bytes memory _a, bytes memory _b)\n private\n pure\n returns (uint256)\n {\n uint256 shared;\n uint256 max = (_a.length < _b.length) ? _a.length : _b.length;\n for (; shared < max && _a[shared] == _b[shared]; ) {\n unchecked {\n ++shared;\n }\n }\n return shared;\n }\n}" + }, + "@ensdomains/evm-verifier/contracts/SecureMerkleTrie.sol": { + "content": "// Pulled from https://github.com/ethereum-optimism/optimism/blob/4d13f0afe8869faf7bba45d8339998525ebc5161/packages/contracts-bedrock/contracts/libraries/trie/MerkleTrie.sol\n// as this is the last version of Optimism's Merkle Trie library that supports nonexistence proofs; support was removed\n// in the next commit for some version.\n// Copyright 2020-2021 Optimism\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/* Library Imports */\nimport { MerkleTrie } from \"./MerkleTrie.sol\";\n\n/**\n * @title SecureMerkleTrie\n * @notice SecureMerkleTrie is a thin wrapper around the MerkleTrie library that hashes the input\n * keys. Ethereum's state trie hashes input keys before storing them.\n */\nlibrary SecureMerkleTrie {\n /**\n * @notice Verifies a proof that a given key/value pair is present in the Merkle trie.\n *\n * @param _key Key of the node to search for, as a hex string.\n * @param _value Value of the node to search for, as a hex string.\n * @param _proof Merkle trie inclusion proof for the desired node. Unlike traditional Merkle\n * trees, this proof is executed top-down and consists of a list of RLP-encoded\n * nodes that make a path down to the target node.\n * @param _root Known root of the Merkle trie. Used to verify that the included proof is\n * correctly constructed.\n *\n * @return Whether or not the proof is valid.\n */\n function verifyInclusionProof(\n bytes memory _key,\n bytes memory _value,\n bytes[] memory _proof,\n bytes32 _root\n ) internal pure returns (bool) {\n bytes memory key = _getSecureKey(_key);\n return MerkleTrie.verifyInclusionProof(key, _value, _proof, _root);\n }\n\n /**\n * @notice Retrieves the value associated with a given key.\n *\n * @param _key Key to search for, as hex bytes.\n * @param _proof Merkle trie inclusion proof for the key.\n * @param _root Known root of the Merkle trie.\n *\n * @return Whether or not the key exists.\n * @return Value of the key if it exists.\n */\n function get(\n bytes memory _key,\n bytes[] memory _proof,\n bytes32 _root\n ) internal pure returns (bool, bytes memory) {\n bytes memory key = _getSecureKey(_key);\n return MerkleTrie.get(key, _proof, _root);\n }\n\n /**\n * @notice Computes the hashed version of the input key.\n *\n * @param _key Key to hash.\n *\n * @return Hashed version of the key.\n */\n function _getSecureKey(bytes memory _key) private pure returns (bytes memory) {\n return abi.encodePacked(keccak256(_key));\n }\n}" + }, + "@ensdomains/l1-verifier/contracts/L1Verifier.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\nimport { IEVMVerifier } from \"@ensdomains/evm-verifier/contracts/IEVMVerifier.sol\";\nimport { RLPReader } from \"@eth-optimism/contracts-bedrock/src/libraries/rlp/RLPReader.sol\";\nimport { StateProof, EVMProofHelper } from \"@ensdomains/evm-verifier/contracts/EVMProofHelper.sol\";\n\nstruct L1WitnessData {\n uint256 blockNo;\n bytes blockHeader;\n}\n\ncontract L1Verifier is IEVMVerifier {\n error BlockHeaderHashMismatch(uint256 current, uint256 number, bytes32 expected, bytes32 actual);\n\n string[] _gatewayURLs;\n\n constructor(string[] memory urls) {\n _gatewayURLs = urls;\n }\n\n function gatewayURLs() external view returns(string[] memory) {\n return _gatewayURLs;\n }\n\n function getStorageValues(address target, bytes32[] memory commands, bytes[] memory constants, bytes memory proof) external view returns(bytes[] memory values) {\n (L1WitnessData memory l1Data, StateProof memory stateProof) = abi.decode(proof, (L1WitnessData, StateProof));\n if(keccak256(l1Data.blockHeader) != blockhash(l1Data.blockNo)) {\n revert BlockHeaderHashMismatch(block.number, l1Data.blockNo, blockhash(l1Data.blockNo), keccak256(l1Data.blockHeader));\n }\n RLPReader.RLPItem[] memory headerFields = RLPReader.readList(l1Data.blockHeader);\n bytes32 stateRoot = bytes32(RLPReader.readBytes(headerFields[3]));\n return EVMProofHelper.getStorageValues(target, commands, constants, stateRoot, stateProof);\n }\n}\n" + }, + "@eth-optimism/contracts-bedrock/src/libraries/Bytes.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/// @title Bytes\n/// @notice Bytes is a library for manipulating byte arrays.\nlibrary Bytes {\n /// @custom:attribution https://github.com/GNSPS/solidity-bytes-utils\n /// @notice Slices a byte array with a given starting index and length. Returns a new byte array\n /// as opposed to a pointer to the original array. Will throw if trying to slice more\n /// bytes than exist in the array.\n /// @param _bytes Byte array to slice.\n /// @param _start Starting index of the slice.\n /// @param _length Length of the slice.\n /// @return Slice of the input byte array.\n function slice(bytes memory _bytes, uint256 _start, uint256 _length) internal pure returns (bytes memory) {\n unchecked {\n require(_length + 31 >= _length, \"slice_overflow\");\n require(_start + _length >= _start, \"slice_overflow\");\n require(_bytes.length >= _start + _length, \"slice_outOfBounds\");\n }\n\n bytes memory tempBytes;\n\n assembly {\n switch iszero(_length)\n case 0 {\n // Get a location of some free memory and store it in tempBytes as\n // Solidity does for memory variables.\n tempBytes := mload(0x40)\n\n // The first word of the slice result is potentially a partial\n // word read from the original array. To read it, we calculate\n // the length of that partial word and start copying that many\n // bytes into the array. The first word we copy will start with\n // data we don't care about, but the last `lengthmod` bytes will\n // land at the beginning of the contents of the new array. When\n // we're done copying, we overwrite the full first word with\n // the actual length of the slice.\n let lengthmod := and(_length, 31)\n\n // The multiplication in the next line is necessary\n // because when slicing multiples of 32 bytes (lengthmod == 0)\n // the following copy loop was copying the origin's length\n // and then ending prematurely not copying everything it should.\n let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod)))\n let end := add(mc, _length)\n\n for {\n // The multiplication in the next line has the same exact purpose\n // as the one above.\n let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start)\n } lt(mc, end) {\n mc := add(mc, 0x20)\n cc := add(cc, 0x20)\n } { mstore(mc, mload(cc)) }\n\n mstore(tempBytes, _length)\n\n //update free-memory pointer\n //allocating the array padded to 32 bytes like the compiler does now\n mstore(0x40, and(add(mc, 31), not(31)))\n }\n //if we want a zero-length slice let's just return a zero-length array\n default {\n tempBytes := mload(0x40)\n\n //zero out the 32 bytes slice we are about to return\n //we need to do it because Solidity does not garbage collect\n mstore(tempBytes, 0)\n\n mstore(0x40, add(tempBytes, 0x20))\n }\n }\n\n return tempBytes;\n }\n\n /// @notice Slices a byte array with a given starting index up to the end of the original byte\n /// array. Returns a new array rathern than a pointer to the original.\n /// @param _bytes Byte array to slice.\n /// @param _start Starting index of the slice.\n /// @return Slice of the input byte array.\n function slice(bytes memory _bytes, uint256 _start) internal pure returns (bytes memory) {\n if (_start >= _bytes.length) {\n return bytes(\"\");\n }\n return slice(_bytes, _start, _bytes.length - _start);\n }\n\n /// @notice Converts a byte array into a nibble array by splitting each byte into two nibbles.\n /// Resulting nibble array will be exactly twice as long as the input byte array.\n /// @param _bytes Input byte array to convert.\n /// @return Resulting nibble array.\n function toNibbles(bytes memory _bytes) internal pure returns (bytes memory) {\n bytes memory _nibbles;\n assembly {\n // Grab a free memory offset for the new array\n _nibbles := mload(0x40)\n\n // Load the length of the passed bytes array from memory\n let bytesLength := mload(_bytes)\n\n // Calculate the length of the new nibble array\n // This is the length of the input array times 2\n let nibblesLength := shl(0x01, bytesLength)\n\n // Update the free memory pointer to allocate memory for the new array.\n // To do this, we add the length of the new array + 32 bytes for the array length\n // rounded up to the nearest 32 byte boundary to the current free memory pointer.\n mstore(0x40, add(_nibbles, and(not(0x1F), add(nibblesLength, 0x3F))))\n\n // Store the length of the new array in memory\n mstore(_nibbles, nibblesLength)\n\n // Store the memory offset of the _bytes array's contents on the stack\n let bytesStart := add(_bytes, 0x20)\n\n // Store the memory offset of the nibbles array's contents on the stack\n let nibblesStart := add(_nibbles, 0x20)\n\n // Loop through each byte in the input array\n for { let i := 0x00 } lt(i, bytesLength) { i := add(i, 0x01) } {\n // Get the starting offset of the next 2 bytes in the nibbles array\n let offset := add(nibblesStart, shl(0x01, i))\n // Load the byte at the current index within the `_bytes` array\n let b := byte(0x00, mload(add(bytesStart, i)))\n\n // Pull out the first nibble and store it in the new array\n mstore8(offset, shr(0x04, b))\n // Pull out the second nibble and store it in the new array\n mstore8(add(offset, 0x01), and(b, 0x0F))\n }\n }\n return _nibbles;\n }\n\n /// @notice Compares two byte arrays by comparing their keccak256 hashes.\n /// @param _bytes First byte array to compare.\n /// @param _other Second byte array to compare.\n /// @return True if the two byte arrays are equal, false otherwise.\n function equal(bytes memory _bytes, bytes memory _other) internal pure returns (bool) {\n return keccak256(_bytes) == keccak256(_other);\n }\n}\n" + }, + "@eth-optimism/contracts-bedrock/src/libraries/rlp/RLPReader.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.8;\n\n/// @custom:attribution https://github.com/hamdiallam/Solidity-RLP\n/// @title RLPReader\n/// @notice RLPReader is a library for parsing RLP-encoded byte arrays into Solidity types. Adapted\n/// from Solidity-RLP (https://github.com/hamdiallam/Solidity-RLP) by Hamdi Allam with\n/// various tweaks to improve readability.\nlibrary RLPReader {\n /// @notice Custom pointer type to avoid confusion between pointers and uint256s.\n type MemoryPointer is uint256;\n\n /// @notice RLP item types.\n /// @custom:value DATA_ITEM Represents an RLP data item (NOT a list).\n /// @custom:value LIST_ITEM Represents an RLP list item.\n enum RLPItemType {\n DATA_ITEM,\n LIST_ITEM\n }\n\n /// @notice Struct representing an RLP item.\n /// @custom:field length Length of the RLP item.\n /// @custom:field ptr Pointer to the RLP item in memory.\n struct RLPItem {\n uint256 length;\n MemoryPointer ptr;\n }\n\n /// @notice Max list length that this library will accept.\n uint256 internal constant MAX_LIST_LENGTH = 32;\n\n /// @notice Converts bytes to a reference to memory position and length.\n /// @param _in Input bytes to convert.\n /// @return out_ Output memory reference.\n function toRLPItem(bytes memory _in) internal pure returns (RLPItem memory out_) {\n // Empty arrays are not RLP items.\n require(_in.length > 0, \"RLPReader: length of an RLP item must be greater than zero to be decodable\");\n\n MemoryPointer ptr;\n assembly {\n ptr := add(_in, 32)\n }\n\n out_ = RLPItem({ length: _in.length, ptr: ptr });\n }\n\n /// @notice Reads an RLP list value into a list of RLP items.\n /// @param _in RLP list value.\n /// @return out_ Decoded RLP list items.\n function readList(RLPItem memory _in) internal pure returns (RLPItem[] memory out_) {\n (uint256 listOffset, uint256 listLength, RLPItemType itemType) = _decodeLength(_in);\n\n require(itemType == RLPItemType.LIST_ITEM, \"RLPReader: decoded item type for list is not a list item\");\n\n require(listOffset + listLength == _in.length, \"RLPReader: list item has an invalid data remainder\");\n\n // Solidity in-memory arrays can't be increased in size, but *can* be decreased in size by\n // writing to the length. Since we can't know the number of RLP items without looping over\n // the entire input, we'd have to loop twice to accurately size this array. It's easier to\n // simply set a reasonable maximum list length and decrease the size before we finish.\n out_ = new RLPItem[](MAX_LIST_LENGTH);\n\n uint256 itemCount = 0;\n uint256 offset = listOffset;\n while (offset < _in.length) {\n (uint256 itemOffset, uint256 itemLength,) = _decodeLength(\n RLPItem({ length: _in.length - offset, ptr: MemoryPointer.wrap(MemoryPointer.unwrap(_in.ptr) + offset) })\n );\n\n // We don't need to check itemCount < out.length explicitly because Solidity already\n // handles this check on our behalf, we'd just be wasting gas.\n out_[itemCount] = RLPItem({\n length: itemLength + itemOffset,\n ptr: MemoryPointer.wrap(MemoryPointer.unwrap(_in.ptr) + offset)\n });\n\n itemCount += 1;\n offset += itemOffset + itemLength;\n }\n\n // Decrease the array size to match the actual item count.\n assembly {\n mstore(out_, itemCount)\n }\n }\n\n /// @notice Reads an RLP list value into a list of RLP items.\n /// @param _in RLP list value.\n /// @return out_ Decoded RLP list items.\n function readList(bytes memory _in) internal pure returns (RLPItem[] memory out_) {\n out_ = readList(toRLPItem(_in));\n }\n\n /// @notice Reads an RLP bytes value into bytes.\n /// @param _in RLP bytes value.\n /// @return out_ Decoded bytes.\n function readBytes(RLPItem memory _in) internal pure returns (bytes memory out_) {\n (uint256 itemOffset, uint256 itemLength, RLPItemType itemType) = _decodeLength(_in);\n\n require(itemType == RLPItemType.DATA_ITEM, \"RLPReader: decoded item type for bytes is not a data item\");\n\n require(_in.length == itemOffset + itemLength, \"RLPReader: bytes value contains an invalid remainder\");\n\n out_ = _copy(_in.ptr, itemOffset, itemLength);\n }\n\n /// @notice Reads an RLP bytes value into bytes.\n /// @param _in RLP bytes value.\n /// @return out_ Decoded bytes.\n function readBytes(bytes memory _in) internal pure returns (bytes memory out_) {\n out_ = readBytes(toRLPItem(_in));\n }\n\n /// @notice Reads the raw bytes of an RLP item.\n /// @param _in RLP item to read.\n /// @return out_ Raw RLP bytes.\n function readRawBytes(RLPItem memory _in) internal pure returns (bytes memory out_) {\n out_ = _copy(_in.ptr, 0, _in.length);\n }\n\n /// @notice Decodes the length of an RLP item.\n /// @param _in RLP item to decode.\n /// @return offset_ Offset of the encoded data.\n /// @return length_ Length of the encoded data.\n /// @return type_ RLP item type (LIST_ITEM or DATA_ITEM).\n function _decodeLength(RLPItem memory _in)\n private\n pure\n returns (uint256 offset_, uint256 length_, RLPItemType type_)\n {\n // Short-circuit if there's nothing to decode, note that we perform this check when\n // the user creates an RLP item via toRLPItem, but it's always possible for them to bypass\n // that function and create an RLP item directly. So we need to check this anyway.\n require(_in.length > 0, \"RLPReader: length of an RLP item must be greater than zero to be decodable\");\n\n MemoryPointer ptr = _in.ptr;\n uint256 prefix;\n assembly {\n prefix := byte(0, mload(ptr))\n }\n\n if (prefix <= 0x7f) {\n // Single byte.\n return (0, 1, RLPItemType.DATA_ITEM);\n } else if (prefix <= 0xb7) {\n // Short string.\n\n // slither-disable-next-line variable-scope\n uint256 strLen = prefix - 0x80;\n\n require(\n _in.length > strLen, \"RLPReader: length of content must be greater than string length (short string)\"\n );\n\n bytes1 firstByteOfContent;\n assembly {\n firstByteOfContent := and(mload(add(ptr, 1)), shl(248, 0xff))\n }\n\n require(\n strLen != 1 || firstByteOfContent >= 0x80,\n \"RLPReader: invalid prefix, single byte < 0x80 are not prefixed (short string)\"\n );\n\n return (1, strLen, RLPItemType.DATA_ITEM);\n } else if (prefix <= 0xbf) {\n // Long string.\n uint256 lenOfStrLen = prefix - 0xb7;\n\n require(\n _in.length > lenOfStrLen,\n \"RLPReader: length of content must be > than length of string length (long string)\"\n );\n\n bytes1 firstByteOfContent;\n assembly {\n firstByteOfContent := and(mload(add(ptr, 1)), shl(248, 0xff))\n }\n\n require(\n firstByteOfContent != 0x00, \"RLPReader: length of content must not have any leading zeros (long string)\"\n );\n\n uint256 strLen;\n assembly {\n strLen := shr(sub(256, mul(8, lenOfStrLen)), mload(add(ptr, 1)))\n }\n\n require(strLen > 55, \"RLPReader: length of content must be greater than 55 bytes (long string)\");\n\n require(\n _in.length > lenOfStrLen + strLen,\n \"RLPReader: length of content must be greater than total length (long string)\"\n );\n\n return (1 + lenOfStrLen, strLen, RLPItemType.DATA_ITEM);\n } else if (prefix <= 0xf7) {\n // Short list.\n // slither-disable-next-line variable-scope\n uint256 listLen = prefix - 0xc0;\n\n require(_in.length > listLen, \"RLPReader: length of content must be greater than list length (short list)\");\n\n return (1, listLen, RLPItemType.LIST_ITEM);\n } else {\n // Long list.\n uint256 lenOfListLen = prefix - 0xf7;\n\n require(\n _in.length > lenOfListLen,\n \"RLPReader: length of content must be > than length of list length (long list)\"\n );\n\n bytes1 firstByteOfContent;\n assembly {\n firstByteOfContent := and(mload(add(ptr, 1)), shl(248, 0xff))\n }\n\n require(\n firstByteOfContent != 0x00, \"RLPReader: length of content must not have any leading zeros (long list)\"\n );\n\n uint256 listLen;\n assembly {\n listLen := shr(sub(256, mul(8, lenOfListLen)), mload(add(ptr, 1)))\n }\n\n require(listLen > 55, \"RLPReader: length of content must be greater than 55 bytes (long list)\");\n\n require(\n _in.length > lenOfListLen + listLen,\n \"RLPReader: length of content must be greater than total length (long list)\"\n );\n\n return (1 + lenOfListLen, listLen, RLPItemType.LIST_ITEM);\n }\n }\n\n /// @notice Copies the bytes from a memory location.\n /// @param _src Pointer to the location to read from.\n /// @param _offset Offset to start reading from.\n /// @param _length Number of bytes to read.\n /// @return out_ Copied bytes.\n function _copy(MemoryPointer _src, uint256 _offset, uint256 _length) private pure returns (bytes memory out_) {\n out_ = new bytes(_length);\n if (_length == 0) {\n return out_;\n }\n\n // Mostly based on Solidity's copy_memory_to_memory:\n // solhint-disable max-line-length\n // https://github.com/ethereum/solidity/blob/34dd30d71b4da730488be72ff6af7083cf2a91f6/libsolidity/codegen/YulUtilFunctions.cpp#L102-L114\n uint256 src = MemoryPointer.unwrap(_src) + _offset;\n assembly {\n let dest := add(out_, 32)\n let i := 0\n for { } lt(i, _length) { i := add(i, 32) } { mstore(add(dest, i), mload(add(src, i))) }\n\n if gt(i, _length) { mstore(add(dest, _length), 0) }\n }\n }\n}\n" + }, + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor() {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby disabling any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "@openzeppelin/contracts/interfaces/IERC1271.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1271.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC1271 standard signature validation method for\n * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271].\n *\n * _Available since v4.1._\n */\ninterface IERC1271 {\n /**\n * @dev Should return whether the signature provided is valid for the provided data\n * @param hash Hash of the data to be signed\n * @param signature Signature byte array associated with _data\n */\n function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue);\n}\n" + }, + "@openzeppelin/contracts/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n *\n * Furthermore, `isContract` will also return true if the target contract within\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n * which only has an effect at the end of a transaction.\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n function _contextSuffixLength() internal view virtual returns (uint256) {\n return 0;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/cryptography/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../Strings.sol\";\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSA {\n enum RecoverError {\n NoError,\n InvalidSignature,\n InvalidSignatureLength,\n InvalidSignatureS,\n InvalidSignatureV // Deprecated in v4.8\n }\n\n function _throwError(RecoverError error) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert(\"ECDSA: invalid signature\");\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert(\"ECDSA: invalid signature length\");\n } else if (error == RecoverError.InvalidSignatureS) {\n revert(\"ECDSA: invalid signature 's' value\");\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature` or error string. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n *\n * Documentation for signature generation:\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\n if (signature.length == 65) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n /// @solidity memory-safe-assembly\n assembly {\n r := mload(add(signature, 0x20))\n s := mload(add(signature, 0x40))\n v := byte(0, mload(add(signature, 0x60)))\n }\n return tryRecover(hash, v, r, s);\n } else {\n return (address(0), RecoverError.InvalidSignatureLength);\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature`. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, signature);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n *\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) {\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n uint8 v = uint8((uint256(vs) >> 255) + 27);\n return tryRecover(hash, v, r, s);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n *\n * _Available since v4.2._\n */\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n * `r` and `s` signature fields separately.\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS);\n }\n\n // If the signature is valid (and not malleable), return the signer address\n address signer = ecrecover(hash, v, r, s);\n if (signer == address(0)) {\n return (address(0), RecoverError.InvalidSignature);\n }\n\n return (signer, RecoverError.NoError);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `v`,\n * `r` and `s` signature fields separately.\n */\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 message) {\n // 32 is the length in bytes of hash,\n // enforced by the type signature above\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x00, \"\\x19Ethereum Signed Message:\\n32\")\n mstore(0x1c, hash)\n message := keccak256(0x00, 0x3c)\n }\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from `s`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n\", Strings.toString(s.length), s));\n }\n\n /**\n * @dev Returns an Ethereum Signed Typed Data, created from a\n * `domainSeparator` and a `structHash`. This produces hash corresponding\n * to the one signed with the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\n * JSON-RPC method as part of EIP-712.\n *\n * See {recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 data) {\n /// @solidity memory-safe-assembly\n assembly {\n let ptr := mload(0x40)\n mstore(ptr, \"\\x19\\x01\")\n mstore(add(ptr, 0x02), domainSeparator)\n mstore(add(ptr, 0x22), structHash)\n data := keccak256(ptr, 0x42)\n }\n }\n\n /**\n * @dev Returns an Ethereum Signed Data with intended validator, created from a\n * `validator` and `data` according to the version 0 of EIP-191.\n *\n * See {recover}.\n */\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19\\x00\", validator, data));\n }\n}\n" + }, + "@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/SignatureChecker.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./ECDSA.sol\";\nimport \"../../interfaces/IERC1271.sol\";\n\n/**\n * @dev Signature verification helper that can be used instead of `ECDSA.recover` to seamlessly support both ECDSA\n * signatures from externally owned accounts (EOAs) as well as ERC1271 signatures from smart contract wallets like\n * Argent and Gnosis Safe.\n *\n * _Available since v4.1._\n */\nlibrary SignatureChecker {\n /**\n * @dev Checks if a signature is valid for a given signer and data hash. If the signer is a smart contract, the\n * signature is validated against that smart contract using ERC1271, otherwise it's validated using `ECDSA.recover`.\n *\n * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus\n * change through time. It could return true at block N and false at block N+1 (or the opposite).\n */\n function isValidSignatureNow(address signer, bytes32 hash, bytes memory signature) internal view returns (bool) {\n (address recovered, ECDSA.RecoverError error) = ECDSA.tryRecover(hash, signature);\n return\n (error == ECDSA.RecoverError.NoError && recovered == signer) ||\n isValidERC1271SignatureNow(signer, hash, signature);\n }\n\n /**\n * @dev Checks if a signature is valid for a given signer and data hash. The signature is validated\n * against the signer smart contract using ERC1271.\n *\n * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus\n * change through time. It could return true at block N and false at block N+1 (or the opposite).\n */\n function isValidERC1271SignatureNow(\n address signer,\n bytes32 hash,\n bytes memory signature\n ) internal view returns (bool) {\n (bool success, bytes memory result) = signer.staticcall(\n abi.encodeWithSelector(IERC1271.isValidSignature.selector, hash, signature)\n );\n return (success &&\n result.length >= 32 &&\n abi.decode(result, (bytes32)) == bytes32(IERC1271.isValidSignature.selector));\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/ERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n *\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\n */\nabstract contract ERC165 is IERC165 {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/math/Math.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n enum Rounding {\n Down, // Toward negative infinity\n Up, // Toward infinity\n Zero // Toward zero\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n }\n\n /**\n * @dev Returns the ceiling of the division of two numbers.\n *\n * This differs from standard division with `/` in that it rounds up instead\n * of rounding down.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b - 1) / b can overflow on addition, so we distribute.\n return a == 0 ? 0 : (a - 1) / b + 1;\n }\n\n /**\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\n * with further edits by Uniswap Labs also under MIT license.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\n unchecked {\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n // variables such that product = prod1 * 2^256 + prod0.\n uint256 prod0; // Least significant 256 bits of the product\n uint256 prod1; // Most significant 256 bits of the product\n assembly {\n let mm := mulmod(x, y, not(0))\n prod0 := mul(x, y)\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n }\n\n // Handle non-overflow cases, 256 by 256 division.\n if (prod1 == 0) {\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\n // The surrounding unchecked block does not change this fact.\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\n return prod0 / denominator;\n }\n\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\n require(denominator > prod1, \"Math: mulDiv overflow\");\n\n ///////////////////////////////////////////////\n // 512 by 256 division.\n ///////////////////////////////////////////////\n\n // Make division exact by subtracting the remainder from [prod1 prod0].\n uint256 remainder;\n assembly {\n // Compute remainder using mulmod.\n remainder := mulmod(x, y, denominator)\n\n // Subtract 256 bit number from 512 bit number.\n prod1 := sub(prod1, gt(remainder, prod0))\n prod0 := sub(prod0, remainder)\n }\n\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\n // See https://cs.stackexchange.com/q/138556/92363.\n\n // Does not overflow because the denominator cannot be zero at this stage in the function.\n uint256 twos = denominator & (~denominator + 1);\n assembly {\n // Divide denominator by twos.\n denominator := div(denominator, twos)\n\n // Divide [prod1 prod0] by twos.\n prod0 := div(prod0, twos)\n\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\n twos := add(div(sub(0, twos), twos), 1)\n }\n\n // Shift in bits from prod1 into prod0.\n prod0 |= prod1 * twos;\n\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\n // four bits. That is, denominator * inv = 1 mod 2^4.\n uint256 inverse = (3 * denominator) ^ 2;\n\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\n // in modular arithmetic, doubling the correct bits in each step.\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\n\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\n // is no longer required.\n result = prod0 * inverse;\n return result;\n }\n }\n\n /**\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\n uint256 result = mulDiv(x, y, denominator);\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\n result += 1;\n }\n return result;\n }\n\n /**\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 128;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 64;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 32;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 16;\n }\n if (value >> 8 > 0) {\n value >>= 8;\n result += 8;\n }\n if (value >> 4 > 0) {\n value >>= 4;\n result += 4;\n }\n if (value >> 2 > 0) {\n value >>= 2;\n result += 2;\n }\n if (value >> 1 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log2(value);\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >= 10 ** 64) {\n value /= 10 ** 64;\n result += 64;\n }\n if (value >= 10 ** 32) {\n value /= 10 ** 32;\n result += 32;\n }\n if (value >= 10 ** 16) {\n value /= 10 ** 16;\n result += 16;\n }\n if (value >= 10 ** 8) {\n value /= 10 ** 8;\n result += 8;\n }\n if (value >= 10 ** 4) {\n value /= 10 ** 4;\n result += 4;\n }\n if (value >= 10 ** 2) {\n value /= 10 ** 2;\n result += 2;\n }\n if (value >= 10 ** 1) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log10(value);\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256, rounded down, of a positive value.\n * Returns 0 if given 0.\n *\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n */\n function log256(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 16;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 8;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 4;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 2;\n }\n if (value >> 8 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log256(value);\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/math/SignedMath.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMath {\n /**\n * @dev Returns the largest of two signed numbers.\n */\n function max(int256 a, int256 b) internal pure returns (int256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two signed numbers.\n */\n function min(int256 a, int256 b) internal pure returns (int256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two signed numbers without overflow.\n * The result is rounded towards zero.\n */\n function average(int256 a, int256 b) internal pure returns (int256) {\n // Formula from the book \"Hacker's Delight\"\n int256 x = (a & b) + ((a ^ b) >> 1);\n return x + (int256(uint256(x) >> 255) & (a ^ b));\n }\n\n /**\n * @dev Returns the absolute unsigned value of a signed value.\n */\n function abs(int256 n) internal pure returns (uint256) {\n unchecked {\n // must be unchecked in order to support `n = type(int256).min`\n return uint256(n >= 0 ? n : -n);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./math/Math.sol\";\nimport \"./math/SignedMath.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant _SYMBOLS = \"0123456789abcdef\";\n uint8 private constant _ADDRESS_LENGTH = 20;\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n unchecked {\n uint256 length = Math.log10(value) + 1;\n string memory buffer = new string(length);\n uint256 ptr;\n /// @solidity memory-safe-assembly\n assembly {\n ptr := add(buffer, add(32, length))\n }\n while (true) {\n ptr--;\n /// @solidity memory-safe-assembly\n assembly {\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\n }\n value /= 10;\n if (value == 0) break;\n }\n return buffer;\n }\n }\n\n /**\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\n */\n function toString(int256 value) internal pure returns (string memory) {\n return string(abi.encodePacked(value < 0 ? \"-\" : \"\", toString(SignedMath.abs(value))));\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n unchecked {\n return toHexString(value, Math.log256(value) + 1);\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = _SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\n }\n\n /**\n * @dev Returns true if the two strings are equal.\n */\n function equal(string memory a, string memory b) internal pure returns (bool) {\n return keccak256(bytes(a)) == keccak256(bytes(b));\n }\n}\n" + }, + "contracts/DefaultReverseResolver.sol": { + "content": "pragma solidity >=0.8.4;\n\nimport \"./IDefaultReverseResolver.sol\";\nimport \"@ensdomains/ens-contracts/contracts/reverseRegistrar/SignatureReverseResolver.sol\";\nimport \"@ensdomains/ens-contracts/contracts/wrapper/BytesUtils.sol\";\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\n\n/**\n * A fallback reverser resolver to resolve when L2 reverse resolver has no names set.\n * The contract will be set under \"default.reverse\" namespace\n * It can only be set by EOA as contract accounts are chain dependent.\n */\ncontract DefaultReverseResolver is\n Ownable,\n IDefaultReverseResolver,\n ERC165,\n SignatureReverseResolver\n{\n using ECDSA for bytes32;\n using BytesUtils for bytes;\n // The namehash of 'default.reverse'\n bytes32 private constant DEFAULT_REVERSE_NODE =\n 0x53a2e7cce84726721578c676b4798972d354dd7c62c832415371716693edd312;\n\n /**\n * @dev Constructor\n */\n constructor() SignatureReverseResolver(DEFAULT_REVERSE_NODE, 0) {}\n\n function isAuthorised(address addr) internal view override returns (bool) {\n if (addr != msg.sender) {\n revert Unauthorised();\n }\n }\n\n /*\n * Returns the name associated with an address, for reverse records.\n * This function is non ENSIP standard\n * @param address The ENS address to query.\n * @return The associated name.\n */\n function name(address addr) public view returns (string memory) {\n bytes32 node = _getNamehash(addr);\n return versionable_names[recordVersions[node]][node];\n }\n\n /*\n * Returns the text data associated with an address and key.\n * @param address The ENS address to query.\n * @param key The text data key to query.\n * @return The associated text data.\n */\n function text(\n address addr,\n string memory key\n ) public view returns (string memory) {\n bytes32 node = _getNamehash(addr);\n return versionable_texts[recordVersions[node]][node][key];\n }\n\n function supportsInterface(\n bytes4 interfaceID\n ) public view override(ERC165, SignatureReverseResolver) returns (bool) {\n return\n interfaceID == type(IDefaultReverseResolver).interfaceId ||\n super.supportsInterface(interfaceID);\n }\n}\n" + }, + "contracts/deps.sol": { + "content": "import {L1Verifier} from '@ensdomains/l1-verifier/contracts/L1Verifier.sol';\nimport '@ensdomains/ens-contracts/contracts/reverseRegistrar/L2ReverseRegistrar.sol';\nimport '@ensdomains/ens-contracts/contracts/resolvers/profiles/IVersionableResolver.sol';\n// Storage slot\n// ┌────────────────────┬───────────────────┬──────────────┬\n// │ contract │ state_variable │ storage_slot │\n// ├────────────────────┼───────────────────┼──────────────┼\n// │ L2ReverseRegistrar │ _owner │ 0 │\n// │ L2ReverseRegistrar │ lastUpdated │ 1 │\n// │ L2ReverseRegistrar │ versionable_texts │ 2 │\n// │ L2ReverseRegistrar │ versionable_names │ 3 │\n// │ L2ReverseRegistrar │ recordVersions │ 4 │\n" + }, + "contracts/IDefaultReverseResolver.sol": { + "content": "pragma solidity >=0.8.4;\n\ninterface IDefaultReverseResolver {\n function name(address addr) external view returns (string memory);\n\n function text(\n address addr,\n string memory key\n ) external view returns (string memory);\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": false, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates", + "storageLayout" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/crosschain-reverse-resolver/deployments/sepolia/solcInputs/776c7519acf1eee16c4cde4c93293488.json b/crosschain-reverse-resolver/deployments/sepolia/solcInputs/776c7519acf1eee16c4cde4c93293488.json new file mode 100644 index 00000000..20fec410 --- /dev/null +++ b/crosschain-reverse-resolver/deployments/sepolia/solcInputs/776c7519acf1eee16c4cde4c93293488.json @@ -0,0 +1,102 @@ +{ + "language": "Solidity", + "sources": { + "@ensdomains/ens-contracts/contracts/registry/ENS.sol": { + "content": "pragma solidity >=0.8.4;\n\ninterface ENS {\n // Logged when the owner of a node assigns a new owner to a subnode.\n event NewOwner(bytes32 indexed node, bytes32 indexed label, address owner);\n\n // Logged when the owner of a node transfers ownership to a new account.\n event Transfer(bytes32 indexed node, address owner);\n\n // Logged when the resolver for a node changes.\n event NewResolver(bytes32 indexed node, address resolver);\n\n // Logged when the TTL of a node changes\n event NewTTL(bytes32 indexed node, uint64 ttl);\n\n // Logged when an operator is added or removed.\n event ApprovalForAll(\n address indexed owner,\n address indexed operator,\n bool approved\n );\n\n function setRecord(\n bytes32 node,\n address owner,\n address resolver,\n uint64 ttl\n ) external;\n\n function setSubnodeRecord(\n bytes32 node,\n bytes32 label,\n address owner,\n address resolver,\n uint64 ttl\n ) external;\n\n function setSubnodeOwner(\n bytes32 node,\n bytes32 label,\n address owner\n ) external returns (bytes32);\n\n function setResolver(bytes32 node, address resolver) external;\n\n function setOwner(bytes32 node, address owner) external;\n\n function setTTL(bytes32 node, uint64 ttl) external;\n\n function setApprovalForAll(address operator, bool approved) external;\n\n function owner(bytes32 node) external view returns (address);\n\n function resolver(bytes32 node) external view returns (address);\n\n function ttl(bytes32 node) external view returns (uint64);\n\n function recordExists(bytes32 node) external view returns (bool);\n\n function isApprovedForAll(\n address owner,\n address operator\n ) external view returns (bool);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/IExtendedResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\ninterface IExtendedResolver {\n function resolve(\n bytes memory name,\n bytes memory data\n ) external view returns (bytes memory);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/INameResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface INameResolver {\n event NameChanged(bytes32 indexed node, string name);\n\n /**\n * Returns the name associated with an ENS node, for reverse records.\n * Defined in EIP181.\n * @param node The ENS node to query.\n * @return The associated name.\n */\n function name(bytes32 node) external view returns (string memory);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/ITextResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface ITextResolver {\n event TextChanged(\n bytes32 indexed node,\n string indexed indexedKey,\n string key,\n string value\n );\n\n /**\n * Returns the text data associated with an ENS node and key.\n * @param node The ENS node to query.\n * @param key The text data key to query.\n * @return The associated text data.\n */\n function text(\n bytes32 node,\n string calldata key\n ) external view returns (string memory);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/reverseRegistrar/ISignatureReverseResolver.sol": { + "content": "pragma solidity >=0.8.4;\n\ninterface ISignatureReverseResolver {\n event VersionChanged(bytes32 indexed node, uint64 newVersion);\n event ReverseClaimed(address indexed addr, bytes32 indexed node);\n event NameChanged(bytes32 indexed node, string name);\n event TextChanged(\n bytes32 indexed node,\n string indexed indexedKey,\n string key,\n string value\n );\n\n function setNameForAddrWithSignature(\n address addr,\n string memory name,\n uint256 inceptionDate,\n bytes memory signature\n ) external returns (bytes32);\n\n function setTextForAddrWithSignature(\n address addr,\n string calldata key,\n string calldata value,\n uint256 inceptionDate,\n bytes memory signature\n ) external returns (bytes32);\n\n function clearRecordsWithSignature(\n address addr,\n uint256 inceptionDate,\n bytes memory signature\n ) external;\n\n function node(address addr) external view returns (bytes32);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/reverseRegistrar/SignatureReverseResolver.sol": { + "content": "pragma solidity >=0.8.4;\n\nimport \"../registry/ENS.sol\";\nimport \"./ISignatureReverseResolver.sol\";\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\";\nimport \"../root/Controllable.sol\";\nimport \"../utils/LowLevelCallUtils.sol\";\n\nerror InvalidSignature();\nerror SignatureOutOfDate();\nerror Unauthorised();\n\ncontract SignatureReverseResolver is Ownable, ISignatureReverseResolver {\n using ECDSA for bytes32;\n mapping(bytes32 => uint256) public lastUpdated;\n mapping(uint64 => mapping(bytes32 => mapping(string => string))) versionable_texts;\n mapping(uint64 => mapping(bytes32 => string)) versionable_names;\n mapping(bytes32 => uint64) internal recordVersions;\n\n bytes32 public immutable ParentNode;\n uint256 public immutable coinType;\n\n /*\n * @dev Constructor\n * @param ParentNode The namespace to set.\n * @param _coinType The cointype converted from the chainId of the chain this contract is deployed to.\n */\n constructor(bytes32 _ParentNode, uint256 _coinType) {\n ParentNode = _ParentNode;\n coinType = _coinType;\n }\n\n modifier authorised(address addr) {\n isAuthorised(addr);\n _;\n }\n\n modifier authorisedSignature(\n bytes32 hash,\n address addr,\n uint256 inceptionDate,\n bytes memory signature\n ) {\n isAuthorisedWithSignature(hash, addr, inceptionDate, signature);\n _;\n }\n\n function getLastUpdated(\n bytes32 node\n ) internal view virtual returns (uint256) {\n return lastUpdated[node];\n }\n\n function isAuthorised(address addr) internal view virtual returns (bool) {}\n\n function isAuthorisedWithSignature(\n bytes32 hash,\n address addr,\n uint256 inceptionDate,\n bytes memory signature\n ) internal view returns (bool) {\n bytes32 message = keccak256(\n abi.encodePacked(hash, addr, inceptionDate, coinType)\n ).toEthSignedMessageHash();\n bytes32 node = _getNamehash(addr);\n\n if (!SignatureChecker.isValidSignatureNow(addr, message, signature)) {\n revert InvalidSignature();\n }\n\n if (\n inceptionDate <= lastUpdated[node] || // must be newer than current record\n inceptionDate / 1000 >= block.timestamp // must be in the past\n ) {\n revert SignatureOutOfDate();\n }\n }\n\n /**\n * @dev Sets the name for an addr using a signature that can be verified with ERC1271.\n * @param addr The reverse record to set\n * @param name The name of the reverse record\n * @param inceptionDate Date from when this signature is valid from\n * @param signature The resolver of the reverse node\n * @return The ENS node hash of the reverse record.\n */\n function setNameForAddrWithSignature(\n address addr,\n string memory name,\n uint256 inceptionDate,\n bytes memory signature\n )\n public\n authorisedSignature(\n keccak256(\n abi.encodePacked(\n ISignatureReverseResolver\n .setNameForAddrWithSignature\n .selector,\n name\n )\n ),\n addr,\n inceptionDate,\n signature\n )\n returns (bytes32)\n {\n bytes32 node = _getNamehash(addr);\n _setName(node, name, inceptionDate);\n emit ReverseClaimed(addr, node);\n return node;\n }\n\n /**\n * @dev Sets the name for an addr using a signature that can be verified with ERC1271.\n * @param addr The reverse record to set\n * @param key The key of the text record\n * @param value The value of the text record\n * @param inceptionDate Date from when this signature is valid from\n * @param signature The resolver of the reverse node\n * @return The ENS node hash of the reverse record.\n */\n function setTextForAddrWithSignature(\n address addr,\n string calldata key,\n string calldata value,\n uint256 inceptionDate,\n bytes memory signature\n )\n public\n authorisedSignature(\n keccak256(\n abi.encodePacked(\n ISignatureReverseResolver\n .setTextForAddrWithSignature\n .selector,\n key,\n value\n )\n ),\n addr,\n inceptionDate,\n signature\n )\n returns (bytes32)\n {\n bytes32 node = _getNamehash(addr);\n _setText(node, key, value, inceptionDate);\n return node;\n }\n\n function _setText(\n bytes32 node,\n string calldata key,\n string calldata value,\n uint256 inceptionDate\n ) internal {\n versionable_texts[recordVersions[node]][node][key] = value;\n _setLastUpdated(node, inceptionDate);\n emit TextChanged(node, key, key, value);\n }\n\n /**\n * Returns the text data associated with an ENS node and key.\n * @param node The ENS node to query.\n * @param key The text data key to query.\n * @return The associated text data.\n */\n function _text(\n bytes32 node,\n string calldata key\n ) internal view returns (string memory) {\n return versionable_texts[recordVersions[node]][node][key];\n }\n\n function _setName(\n bytes32 node,\n string memory newName,\n uint256 inceptionDate\n ) internal virtual {\n versionable_names[recordVersions[node]][node] = newName;\n _setLastUpdated(node, inceptionDate);\n emit NameChanged(node, newName);\n }\n\n function _name(bytes32 node) internal view returns (string memory) {\n return versionable_names[recordVersions[node]][node];\n }\n\n /**\n * Increments the record version associated with an ENS node.\n * May only be called by the owner of that node in the ENS registry.\n * @param addr The node to update.\n */\n function _clearRecords(address addr) internal {\n bytes32 labelHash = LowLevelCallUtils.sha3HexAddress(addr);\n bytes32 reverseNode = keccak256(\n abi.encodePacked(ParentNode, labelHash)\n );\n recordVersions[reverseNode]++;\n emit VersionChanged(reverseNode, recordVersions[reverseNode]);\n }\n\n /**\n * Increments the record version associated with an ENS node.\n * May only be called by the owner of that node in the ENS registry.\n * @param addr The node to update.\n * @param signature A signature proving ownership of the node.\n */\n function clearRecordsWithSignature(\n address addr,\n uint256 inceptionDate,\n bytes memory signature\n )\n public\n authorisedSignature(\n keccak256(\n abi.encodePacked(\n ISignatureReverseResolver.clearRecordsWithSignature.selector\n )\n ),\n addr,\n inceptionDate,\n signature\n )\n {\n _clearRecords(addr);\n }\n\n /**\n * @dev Returns the node hash for a given account's reverse records.\n * @param addr The address to hash\n * @return The ENS node hash.\n */\n function node(address addr) public view returns (bytes32) {\n return\n keccak256(\n abi.encodePacked(\n ParentNode,\n LowLevelCallUtils.sha3HexAddress(addr)\n )\n );\n }\n\n function _getNamehash(address addr) internal view returns (bytes32) {\n bytes32 labelHash = LowLevelCallUtils.sha3HexAddress(addr);\n return keccak256(abi.encodePacked(ParentNode, labelHash));\n }\n\n function _setLastUpdated(bytes32 node, uint256 inceptionDate) internal {\n lastUpdated[node] = inceptionDate;\n }\n\n function supportsInterface(\n bytes4 interfaceID\n ) public view virtual returns (bool) {\n return interfaceID == type(ISignatureReverseResolver).interfaceId;\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/root/Controllable.sol": { + "content": "pragma solidity ^0.8.4;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\n\ncontract Controllable is Ownable {\n mapping(address => bool) public controllers;\n\n event ControllerChanged(address indexed controller, bool enabled);\n\n modifier onlyController() {\n require(\n controllers[msg.sender],\n \"Controllable: Caller is not a controller\"\n );\n _;\n }\n\n function setController(address controller, bool enabled) public onlyOwner {\n controllers[controller] = enabled;\n emit ControllerChanged(controller, enabled);\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/utils/HexUtils.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\nlibrary HexUtils {\n /**\n * @dev Attempts to parse bytes32 from a hex string\n * @param str The string to parse\n * @param idx The offset to start parsing at\n * @param lastIdx The (exclusive) last index in `str` to consider. Use `str.length` to scan the whole string.\n */\n function hexStringToBytes32(\n bytes memory str,\n uint256 idx,\n uint256 lastIdx\n ) internal pure returns (bytes32 r, bool valid) {\n valid = true;\n assembly {\n // check that the index to read to is not past the end of the string\n if gt(lastIdx, mload(str)) {\n revert(0, 0)\n }\n\n function getHex(c) -> ascii {\n // chars 48-57: 0-9\n if and(gt(c, 47), lt(c, 58)) {\n ascii := sub(c, 48)\n leave\n }\n // chars 65-70: A-F\n if and(gt(c, 64), lt(c, 71)) {\n ascii := add(sub(c, 65), 10)\n leave\n }\n // chars 97-102: a-f\n if and(gt(c, 96), lt(c, 103)) {\n ascii := add(sub(c, 97), 10)\n leave\n }\n // invalid char\n ascii := 0xff\n }\n\n let ptr := add(str, 32)\n for {\n let i := idx\n } lt(i, lastIdx) {\n i := add(i, 2)\n } {\n let byte1 := getHex(byte(0, mload(add(ptr, i))))\n let byte2 := getHex(byte(0, mload(add(ptr, add(i, 1)))))\n // if either byte is invalid, set invalid and break loop\n if or(eq(byte1, 0xff), eq(byte2, 0xff)) {\n valid := false\n break\n }\n let combined := or(shl(4, byte1), byte2)\n r := or(shl(8, r), combined)\n }\n }\n }\n\n /**\n * @dev Attempts to parse an address from a hex string\n * @param str The string to parse\n * @param idx The offset to start parsing at\n * @param lastIdx The (exclusive) last index in `str` to consider. Use `str.length` to scan the whole string.\n */\n function hexToAddress(\n bytes memory str,\n uint256 idx,\n uint256 lastIdx\n ) internal pure returns (address, bool) {\n if (lastIdx - idx < 40) return (address(0x0), false);\n (bytes32 r, bool valid) = hexStringToBytes32(str, idx, lastIdx);\n return (address(uint160(uint256(r))), valid);\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/utils/LowLevelCallUtils.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.13;\n\nimport {Address} from \"@openzeppelin/contracts/utils/Address.sol\";\n\nlibrary LowLevelCallUtils {\n // This is the hex encoding of the string 'abcdefghijklmnopqrstuvwxyz'\n // It is used as a constant to lookup the characters of the hex address\n bytes32 constant lookup =\n 0x3031323334353637383961626364656600000000000000000000000000000000;\n using Address for address;\n\n /**\n * @dev Makes a static call to the specified `target` with `data`. Return data can be fetched with\n * `returnDataSize` and `readReturnData`.\n * @param target The address to staticcall.\n * @param data The data to pass to the call.\n * @return success True if the call succeeded, or false if it reverts.\n */\n function functionStaticCall(\n address target,\n bytes memory data\n ) internal view returns (bool success) {\n require(\n target.isContract(),\n \"LowLevelCallUtils: static call to non-contract\"\n );\n assembly {\n success := staticcall(\n gas(),\n target,\n add(data, 32),\n mload(data),\n 0,\n 0\n )\n }\n }\n\n /**\n * @dev Returns the size of the return data of the most recent external call.\n */\n function returnDataSize() internal pure returns (uint256 len) {\n assembly {\n len := returndatasize()\n }\n }\n\n /**\n * @dev Reads return data from the most recent external call.\n * @param offset Offset into the return data.\n * @param length Number of bytes to return.\n */\n function readReturnData(\n uint256 offset,\n uint256 length\n ) internal pure returns (bytes memory data) {\n data = new bytes(length);\n assembly {\n returndatacopy(add(data, 32), offset, length)\n }\n }\n\n /**\n * @dev Reverts with the return data from the most recent external call.\n */\n function propagateRevert() internal pure {\n assembly {\n returndatacopy(0, 0, returndatasize())\n revert(0, returndatasize())\n }\n }\n\n /**\n * @dev An optimised function to compute the sha3 of the lower-case\n * hexadecimal representation of an Ethereum address.\n * @param addr The address to hash\n * @return ret The SHA3 hash of the lower-case hexadecimal encoding of the\n * input address.\n */\n function sha3HexAddress(address addr) internal pure returns (bytes32 ret) {\n assembly {\n for {\n let i := 40\n } gt(i, 0) {\n\n } {\n i := sub(i, 1)\n mstore8(i, byte(and(addr, 0xf), lookup))\n addr := div(addr, 0x10)\n i := sub(i, 1)\n mstore8(i, byte(and(addr, 0xf), lookup))\n addr := div(addr, 0x10)\n }\n\n ret := keccak256(0, 40)\n }\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/wrapper/BytesUtils.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity ~0.8.17;\n\nlibrary BytesUtils {\n /*\n * @dev Returns the keccak-256 hash of a byte range.\n * @param self The byte string to hash.\n * @param offset The position to start hashing at.\n * @param len The number of bytes to hash.\n * @return The hash of the byte range.\n */\n function keccak(\n bytes memory self,\n uint256 offset,\n uint256 len\n ) internal pure returns (bytes32 ret) {\n require(offset + len <= self.length);\n assembly {\n ret := keccak256(add(add(self, 32), offset), len)\n }\n }\n\n /**\n * @dev Returns the ENS namehash of a DNS-encoded name.\n * @param self The DNS-encoded name to hash.\n * @param offset The offset at which to start hashing.\n * @return The namehash of the name.\n */\n function namehash(\n bytes memory self,\n uint256 offset\n ) internal pure returns (bytes32) {\n (bytes32 labelhash, uint256 newOffset) = readLabel(self, offset);\n if (labelhash == bytes32(0)) {\n require(offset == self.length - 1, \"namehash: Junk at end of name\");\n return bytes32(0);\n }\n return\n keccak256(abi.encodePacked(namehash(self, newOffset), labelhash));\n }\n\n /**\n * @dev Returns the keccak-256 hash of a DNS-encoded label, and the offset to the start of the next label.\n * @param self The byte string to read a label from.\n * @param idx The index to read a label at.\n * @return labelhash The hash of the label at the specified index, or 0 if it is the last label.\n * @return newIdx The index of the start of the next label.\n */\n function readLabel(\n bytes memory self,\n uint256 idx\n ) internal pure returns (bytes32 labelhash, uint256 newIdx) {\n require(idx < self.length, \"readLabel: Index out of bounds\");\n uint256 len = uint256(uint8(self[idx]));\n if (len > 0) {\n labelhash = keccak(self, idx + 1, len);\n } else {\n labelhash = bytes32(0);\n }\n newIdx = idx + len + 1;\n }\n}\n" + }, + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor() {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby disabling any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "@openzeppelin/contracts/interfaces/IERC1271.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1271.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC1271 standard signature validation method for\n * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271].\n *\n * _Available since v4.1._\n */\ninterface IERC1271 {\n /**\n * @dev Should return whether the signature provided is valid for the provided data\n * @param hash Hash of the data to be signed\n * @param signature Signature byte array associated with _data\n */\n function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue);\n}\n" + }, + "@openzeppelin/contracts/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n *\n * Furthermore, `isContract` will also return true if the target contract within\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n * which only has an effect at the end of a transaction.\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n function _contextSuffixLength() internal view virtual returns (uint256) {\n return 0;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/cryptography/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../Strings.sol\";\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSA {\n enum RecoverError {\n NoError,\n InvalidSignature,\n InvalidSignatureLength,\n InvalidSignatureS,\n InvalidSignatureV // Deprecated in v4.8\n }\n\n function _throwError(RecoverError error) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert(\"ECDSA: invalid signature\");\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert(\"ECDSA: invalid signature length\");\n } else if (error == RecoverError.InvalidSignatureS) {\n revert(\"ECDSA: invalid signature 's' value\");\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature` or error string. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n *\n * Documentation for signature generation:\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\n if (signature.length == 65) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n /// @solidity memory-safe-assembly\n assembly {\n r := mload(add(signature, 0x20))\n s := mload(add(signature, 0x40))\n v := byte(0, mload(add(signature, 0x60)))\n }\n return tryRecover(hash, v, r, s);\n } else {\n return (address(0), RecoverError.InvalidSignatureLength);\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature`. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, signature);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n *\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) {\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n uint8 v = uint8((uint256(vs) >> 255) + 27);\n return tryRecover(hash, v, r, s);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n *\n * _Available since v4.2._\n */\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n * `r` and `s` signature fields separately.\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS);\n }\n\n // If the signature is valid (and not malleable), return the signer address\n address signer = ecrecover(hash, v, r, s);\n if (signer == address(0)) {\n return (address(0), RecoverError.InvalidSignature);\n }\n\n return (signer, RecoverError.NoError);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `v`,\n * `r` and `s` signature fields separately.\n */\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 message) {\n // 32 is the length in bytes of hash,\n // enforced by the type signature above\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x00, \"\\x19Ethereum Signed Message:\\n32\")\n mstore(0x1c, hash)\n message := keccak256(0x00, 0x3c)\n }\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from `s`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n\", Strings.toString(s.length), s));\n }\n\n /**\n * @dev Returns an Ethereum Signed Typed Data, created from a\n * `domainSeparator` and a `structHash`. This produces hash corresponding\n * to the one signed with the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\n * JSON-RPC method as part of EIP-712.\n *\n * See {recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 data) {\n /// @solidity memory-safe-assembly\n assembly {\n let ptr := mload(0x40)\n mstore(ptr, \"\\x19\\x01\")\n mstore(add(ptr, 0x02), domainSeparator)\n mstore(add(ptr, 0x22), structHash)\n data := keccak256(ptr, 0x42)\n }\n }\n\n /**\n * @dev Returns an Ethereum Signed Data with intended validator, created from a\n * `validator` and `data` according to the version 0 of EIP-191.\n *\n * See {recover}.\n */\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19\\x00\", validator, data));\n }\n}\n" + }, + "@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/SignatureChecker.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./ECDSA.sol\";\nimport \"../../interfaces/IERC1271.sol\";\n\n/**\n * @dev Signature verification helper that can be used instead of `ECDSA.recover` to seamlessly support both ECDSA\n * signatures from externally owned accounts (EOAs) as well as ERC1271 signatures from smart contract wallets like\n * Argent and Gnosis Safe.\n *\n * _Available since v4.1._\n */\nlibrary SignatureChecker {\n /**\n * @dev Checks if a signature is valid for a given signer and data hash. If the signer is a smart contract, the\n * signature is validated against that smart contract using ERC1271, otherwise it's validated using `ECDSA.recover`.\n *\n * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus\n * change through time. It could return true at block N and false at block N+1 (or the opposite).\n */\n function isValidSignatureNow(address signer, bytes32 hash, bytes memory signature) internal view returns (bool) {\n (address recovered, ECDSA.RecoverError error) = ECDSA.tryRecover(hash, signature);\n return\n (error == ECDSA.RecoverError.NoError && recovered == signer) ||\n isValidERC1271SignatureNow(signer, hash, signature);\n }\n\n /**\n * @dev Checks if a signature is valid for a given signer and data hash. The signature is validated\n * against the signer smart contract using ERC1271.\n *\n * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus\n * change through time. It could return true at block N and false at block N+1 (or the opposite).\n */\n function isValidERC1271SignatureNow(\n address signer,\n bytes32 hash,\n bytes memory signature\n ) internal view returns (bool) {\n (bool success, bytes memory result) = signer.staticcall(\n abi.encodeWithSelector(IERC1271.isValidSignature.selector, hash, signature)\n );\n return (success &&\n result.length >= 32 &&\n abi.decode(result, (bytes32)) == bytes32(IERC1271.isValidSignature.selector));\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/ERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n *\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\n */\nabstract contract ERC165 is IERC165 {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/math/Math.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n enum Rounding {\n Down, // Toward negative infinity\n Up, // Toward infinity\n Zero // Toward zero\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n }\n\n /**\n * @dev Returns the ceiling of the division of two numbers.\n *\n * This differs from standard division with `/` in that it rounds up instead\n * of rounding down.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b - 1) / b can overflow on addition, so we distribute.\n return a == 0 ? 0 : (a - 1) / b + 1;\n }\n\n /**\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\n * with further edits by Uniswap Labs also under MIT license.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\n unchecked {\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n // variables such that product = prod1 * 2^256 + prod0.\n uint256 prod0; // Least significant 256 bits of the product\n uint256 prod1; // Most significant 256 bits of the product\n assembly {\n let mm := mulmod(x, y, not(0))\n prod0 := mul(x, y)\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n }\n\n // Handle non-overflow cases, 256 by 256 division.\n if (prod1 == 0) {\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\n // The surrounding unchecked block does not change this fact.\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\n return prod0 / denominator;\n }\n\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\n require(denominator > prod1, \"Math: mulDiv overflow\");\n\n ///////////////////////////////////////////////\n // 512 by 256 division.\n ///////////////////////////////////////////////\n\n // Make division exact by subtracting the remainder from [prod1 prod0].\n uint256 remainder;\n assembly {\n // Compute remainder using mulmod.\n remainder := mulmod(x, y, denominator)\n\n // Subtract 256 bit number from 512 bit number.\n prod1 := sub(prod1, gt(remainder, prod0))\n prod0 := sub(prod0, remainder)\n }\n\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\n // See https://cs.stackexchange.com/q/138556/92363.\n\n // Does not overflow because the denominator cannot be zero at this stage in the function.\n uint256 twos = denominator & (~denominator + 1);\n assembly {\n // Divide denominator by twos.\n denominator := div(denominator, twos)\n\n // Divide [prod1 prod0] by twos.\n prod0 := div(prod0, twos)\n\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\n twos := add(div(sub(0, twos), twos), 1)\n }\n\n // Shift in bits from prod1 into prod0.\n prod0 |= prod1 * twos;\n\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\n // four bits. That is, denominator * inv = 1 mod 2^4.\n uint256 inverse = (3 * denominator) ^ 2;\n\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\n // in modular arithmetic, doubling the correct bits in each step.\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\n\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\n // is no longer required.\n result = prod0 * inverse;\n return result;\n }\n }\n\n /**\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\n uint256 result = mulDiv(x, y, denominator);\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\n result += 1;\n }\n return result;\n }\n\n /**\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 128;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 64;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 32;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 16;\n }\n if (value >> 8 > 0) {\n value >>= 8;\n result += 8;\n }\n if (value >> 4 > 0) {\n value >>= 4;\n result += 4;\n }\n if (value >> 2 > 0) {\n value >>= 2;\n result += 2;\n }\n if (value >> 1 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log2(value);\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >= 10 ** 64) {\n value /= 10 ** 64;\n result += 64;\n }\n if (value >= 10 ** 32) {\n value /= 10 ** 32;\n result += 32;\n }\n if (value >= 10 ** 16) {\n value /= 10 ** 16;\n result += 16;\n }\n if (value >= 10 ** 8) {\n value /= 10 ** 8;\n result += 8;\n }\n if (value >= 10 ** 4) {\n value /= 10 ** 4;\n result += 4;\n }\n if (value >= 10 ** 2) {\n value /= 10 ** 2;\n result += 2;\n }\n if (value >= 10 ** 1) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log10(value);\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256, rounded down, of a positive value.\n * Returns 0 if given 0.\n *\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n */\n function log256(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 16;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 8;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 4;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 2;\n }\n if (value >> 8 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log256(value);\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/math/SignedMath.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMath {\n /**\n * @dev Returns the largest of two signed numbers.\n */\n function max(int256 a, int256 b) internal pure returns (int256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two signed numbers.\n */\n function min(int256 a, int256 b) internal pure returns (int256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two signed numbers without overflow.\n * The result is rounded towards zero.\n */\n function average(int256 a, int256 b) internal pure returns (int256) {\n // Formula from the book \"Hacker's Delight\"\n int256 x = (a & b) + ((a ^ b) >> 1);\n return x + (int256(uint256(x) >> 255) & (a ^ b));\n }\n\n /**\n * @dev Returns the absolute unsigned value of a signed value.\n */\n function abs(int256 n) internal pure returns (uint256) {\n unchecked {\n // must be unchecked in order to support `n = type(int256).min`\n return uint256(n >= 0 ? n : -n);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./math/Math.sol\";\nimport \"./math/SignedMath.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant _SYMBOLS = \"0123456789abcdef\";\n uint8 private constant _ADDRESS_LENGTH = 20;\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n unchecked {\n uint256 length = Math.log10(value) + 1;\n string memory buffer = new string(length);\n uint256 ptr;\n /// @solidity memory-safe-assembly\n assembly {\n ptr := add(buffer, add(32, length))\n }\n while (true) {\n ptr--;\n /// @solidity memory-safe-assembly\n assembly {\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\n }\n value /= 10;\n if (value == 0) break;\n }\n return buffer;\n }\n }\n\n /**\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\n */\n function toString(int256 value) internal pure returns (string memory) {\n return string(abi.encodePacked(value < 0 ? \"-\" : \"\", toString(SignedMath.abs(value))));\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n unchecked {\n return toHexString(value, Math.log256(value) + 1);\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = _SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\n }\n\n /**\n * @dev Returns true if the two strings are equal.\n */\n function equal(string memory a, string memory b) internal pure returns (bool) {\n return keccak256(bytes(a)) == keccak256(bytes(b));\n }\n}\n" + }, + "contracts/DefaultReverseResolver.sol": { + "content": "pragma solidity >=0.8.4;\n\nimport \"./IDefaultReverseResolver.sol\";\nimport \"@ensdomains/ens-contracts/contracts/reverseRegistrar/SignatureReverseResolver.sol\";\nimport \"@ensdomains/ens-contracts/contracts/wrapper/BytesUtils.sol\";\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\nimport {ITextResolver} from \"@ensdomains/ens-contracts/contracts/resolvers/profiles/ITextResolver.sol\";\nimport {INameResolver} from \"@ensdomains/ens-contracts/contracts/resolvers/profiles/INameResolver.sol\";\nimport \"@ensdomains/ens-contracts/contracts/utils/HexUtils.sol\";\nimport \"@ensdomains/ens-contracts/contracts/resolvers/profiles/IExtendedResolver.sol\";\n\n/**\n * A fallback reverser resolver to resolve when L2 reverse resolver has no names set.\n * The contract will be set under \"default.reverse\" namespace\n * It can only be set by EOA as contract accounts are chain dependent.\n */\ncontract DefaultReverseResolver is\n Ownable,\n IDefaultReverseResolver,\n IExtendedResolver,\n ERC165,\n SignatureReverseResolver\n{\n uint256 constant ADDRESS_LENGTH = 40;\n using ECDSA for bytes32;\n using BytesUtils for bytes;\n // The namehash of 'default.reverse'\n bytes32 private constant DEFAULT_REVERSE_NODE =\n 0x53a2e7cce84726721578c676b4798972d354dd7c62c832415371716693edd312;\n\n /**\n * @dev Constructor\n */\n constructor() SignatureReverseResolver(DEFAULT_REVERSE_NODE, 0) {}\n\n function isAuthorised(address addr) internal view override returns (bool) {\n if (addr != msg.sender) {\n revert Unauthorised();\n }\n }\n\n /*\n * Returns the name associated with an address, for reverse records.\n * This function is non ENSIP standard\n * @param address The ENS address to query.\n * @return The associated name.\n */\n function name(address addr) public view returns (string memory) {\n bytes32 node = _getNamehash(addr);\n return versionable_names[recordVersions[node]][node];\n }\n\n /*\n * Returns the text data associated with an address and key.\n * @param address The ENS address to query.\n * @param key The text data key to query.\n * @return The associated text data.\n */\n function text(\n address addr,\n string memory key\n ) public view returns (string memory) {\n bytes32 node = _getNamehash(addr);\n return versionable_texts[recordVersions[node]][node][key];\n }\n\n /*\n * @dev Resolve and verify a record stored in l2 target address. It supports fallback to the default resolver\n * @param name DNS encoded ENS name to query\n * @param data The actual calldata\n * @return result result of the call\n */\n function resolve(bytes calldata _name, bytes calldata data) external view returns (bytes memory result) {\n bytes4 selector = bytes4(data);\n (address addr,) = HexUtils.hexToAddress(_name, 1, ADDRESS_LENGTH + 1);\n if (selector == INameResolver.name.selector) {\n return bytes(name(addr));\n }\n if (selector == ITextResolver.text.selector) {\n (,string memory key) = abi.decode(data[4:], (bytes32, string));\n return bytes(text(addr, key));\n }\n }\n\n function supportsInterface(\n bytes4 interfaceID\n ) public view override(ERC165, SignatureReverseResolver) returns (bool) {\n return\n interfaceID == type(IDefaultReverseResolver).interfaceId ||\n interfaceID == type(IExtendedResolver).interfaceId ||\n super.supportsInterface(interfaceID);\n }\n}\n" + }, + "contracts/IDefaultReverseResolver.sol": { + "content": "pragma solidity >=0.8.4;\n\ninterface IDefaultReverseResolver {\n function name(address addr) external view returns (string memory);\n\n function text(\n address addr,\n string memory key\n ) external view returns (string memory);\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": false, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates", + "storageLayout" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/crosschain-reverse-resolver/deployments/sepolia/solcInputs/7cc7da1092d13c01f4d5f27229751af2.json b/crosschain-reverse-resolver/deployments/sepolia/solcInputs/7cc7da1092d13c01f4d5f27229751af2.json new file mode 100644 index 00000000..90284699 --- /dev/null +++ b/crosschain-reverse-resolver/deployments/sepolia/solcInputs/7cc7da1092d13c01f4d5f27229751af2.json @@ -0,0 +1,150 @@ +{ + "language": "Solidity", + "sources": { + "@ensdomains/ens-contracts/contracts/registry/ENS.sol": { + "content": "pragma solidity >=0.8.4;\n\ninterface ENS {\n // Logged when the owner of a node assigns a new owner to a subnode.\n event NewOwner(bytes32 indexed node, bytes32 indexed label, address owner);\n\n // Logged when the owner of a node transfers ownership to a new account.\n event Transfer(bytes32 indexed node, address owner);\n\n // Logged when the resolver for a node changes.\n event NewResolver(bytes32 indexed node, address resolver);\n\n // Logged when the TTL of a node changes\n event NewTTL(bytes32 indexed node, uint64 ttl);\n\n // Logged when an operator is added or removed.\n event ApprovalForAll(\n address indexed owner,\n address indexed operator,\n bool approved\n );\n\n function setRecord(\n bytes32 node,\n address owner,\n address resolver,\n uint64 ttl\n ) external;\n\n function setSubnodeRecord(\n bytes32 node,\n bytes32 label,\n address owner,\n address resolver,\n uint64 ttl\n ) external;\n\n function setSubnodeOwner(\n bytes32 node,\n bytes32 label,\n address owner\n ) external returns (bytes32);\n\n function setResolver(bytes32 node, address resolver) external;\n\n function setOwner(bytes32 node, address owner) external;\n\n function setTTL(bytes32 node, uint64 ttl) external;\n\n function setApprovalForAll(address operator, bool approved) external;\n\n function owner(bytes32 node) external view returns (address);\n\n function resolver(bytes32 node) external view returns (address);\n\n function ttl(bytes32 node) external view returns (uint64);\n\n function recordExists(bytes32 node) external view returns (bool);\n\n function isApprovedForAll(\n address owner,\n address operator\n ) external view returns (bool);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/IMulticallable.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\ninterface IMulticallable {\n function multicall(\n bytes[] calldata data\n ) external returns (bytes[] memory results);\n\n function multicallWithNodeCheck(\n bytes32,\n bytes[] calldata data\n ) external returns (bytes[] memory results);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/Multicallable.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\nimport \"./IMulticallable.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\n\nabstract contract Multicallable is IMulticallable, ERC165 {\n function _multicall(\n bytes32 nodehash,\n bytes[] calldata data\n ) internal returns (bytes[] memory results) {\n results = new bytes[](data.length);\n for (uint256 i = 0; i < data.length; i++) {\n if (nodehash != bytes32(0)) {\n bytes32 txNamehash = bytes32(data[i][4:36]);\n require(\n txNamehash == nodehash,\n \"multicall: All records must have a matching namehash\"\n );\n }\n (bool success, bytes memory result) = address(this).delegatecall(\n data[i]\n );\n require(success);\n results[i] = result;\n }\n return results;\n }\n\n // This function provides an extra security check when called\n // from priviledged contracts (such as EthRegistrarController)\n // that can set records on behalf of the node owners\n function multicallWithNodeCheck(\n bytes32 nodehash,\n bytes[] calldata data\n ) external returns (bytes[] memory results) {\n return _multicall(nodehash, data);\n }\n\n function multicall(\n bytes[] calldata data\n ) public override returns (bytes[] memory results) {\n return _multicall(bytes32(0), data);\n }\n\n function supportsInterface(\n bytes4 interfaceID\n ) public view virtual override returns (bool) {\n return\n interfaceID == type(IMulticallable).interfaceId ||\n super.supportsInterface(interfaceID);\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/IExtendedResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\ninterface IExtendedResolver {\n function resolve(\n bytes memory name,\n bytes memory data\n ) external view returns (bytes memory);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/INameResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface INameResolver {\n event NameChanged(bytes32 indexed node, string name);\n\n /**\n * Returns the name associated with an ENS node, for reverse records.\n * Defined in EIP181.\n * @param node The ENS node to query.\n * @return The associated name.\n */\n function name(bytes32 node) external view returns (string memory);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/ITextResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface ITextResolver {\n event TextChanged(\n bytes32 indexed node,\n string indexed indexedKey,\n string key,\n string value\n );\n\n /**\n * Returns the text data associated with an ENS node and key.\n * @param node The ENS node to query.\n * @param key The text data key to query.\n * @return The associated text data.\n */\n function text(\n bytes32 node,\n string calldata key\n ) external view returns (string memory);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/IVersionableResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface IVersionableResolver {\n event VersionChanged(bytes32 indexed node, uint64 newVersion);\n\n function recordVersions(bytes32 node) external view returns (uint64);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/reverseRegistrar/IL2ReverseRegistrar.sol": { + "content": "pragma solidity >=0.8.4;\n\ninterface IL2ReverseRegistrar {\n function setName(string memory name) external returns (bytes32);\n\n function setNameForAddr(\n address addr,\n string memory name\n ) external returns (bytes32);\n\n function setNameForAddrWithSignatureAndOwnable(\n address contractAddr,\n address owner,\n string memory name,\n uint256 inceptionDate,\n bytes memory signature\n ) external returns (bytes32);\n\n function setText(\n string calldata key,\n string calldata value\n ) external returns (bytes32);\n\n function setTextForAddr(\n address addr,\n string calldata key,\n string calldata value\n ) external returns (bytes32);\n\n function setTextForAddrWithSignatureAndOwnable(\n address contractAddr,\n address owner,\n string calldata key,\n string calldata value,\n uint256 inceptionDate,\n bytes memory signature\n ) external returns (bytes32);\n\n function clearRecords(address addr) external;\n}\n" + }, + "@ensdomains/ens-contracts/contracts/reverseRegistrar/ISignatureReverseResolver.sol": { + "content": "pragma solidity >=0.8.4;\n\ninterface ISignatureReverseResolver {\n function setNameForAddrWithSignature(\n address addr,\n string memory name,\n uint256 inceptionDate,\n bytes memory signature\n ) external returns (bytes32);\n\n function setTextForAddrWithSignature(\n address addr,\n string calldata key,\n string calldata value,\n uint256 inceptionDate,\n bytes memory signature\n ) external returns (bytes32);\n\n function clearRecordsWithSignature(\n address addr,\n uint256 inceptionDate,\n bytes memory signature\n ) external;\n\n function node(address addr) external view returns (bytes32);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/reverseRegistrar/L2ReverseRegistrar.sol": { + "content": "pragma solidity >=0.8.4;\n\nimport \"../registry/ENS.sol\";\nimport \"./IL2ReverseRegistrar.sol\";\nimport \"./SignatureReverseResolver.sol\";\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\";\nimport \"../resolvers/profiles/ITextResolver.sol\";\nimport \"../resolvers/profiles/INameResolver.sol\";\nimport \"../root/Controllable.sol\";\nimport \"../resolvers/Multicallable.sol\";\nimport \"../utils/LowLevelCallUtils.sol\";\n\nerror NotOwnerOfContract();\n\n// @note Inception date\n// The inception date is in milliseconds, and so will be divided by 1000\n// when comparing to block.timestamp. This means that the date will be\n// rounded down to the nearest second.\n\ncontract L2ReverseRegistrar is\n Multicallable,\n Ownable,\n ITextResolver,\n INameResolver,\n IL2ReverseRegistrar,\n SignatureReverseResolver\n{\n using ECDSA for bytes32;\n\n bytes32 public immutable L2ReverseNode;\n\n /**\n * @dev Constructor\n */\n constructor(\n bytes32 _L2ReverseNode,\n uint256 _coinType\n ) SignatureReverseResolver(_L2ReverseNode, _coinType) {\n L2ReverseNode = _L2ReverseNode;\n // coinType = _coinType;\n }\n\n modifier ownerAndAuthorisedWithSignature(\n bytes32 hash,\n address addr,\n address owner,\n uint256 inceptionDate,\n bytes memory signature\n ) {\n isOwnerAndAuthorisedWithSignature(\n hash,\n addr,\n owner,\n inceptionDate,\n signature\n );\n _;\n }\n\n function isAuthorised(address addr) internal view override returns (bool) {\n if (addr != msg.sender && !ownsContract(addr, msg.sender)) {\n revert Unauthorised();\n }\n }\n\n function isOwnerAndAuthorisedWithSignature(\n bytes32 hash,\n address addr,\n address owner,\n uint256 inceptionDate,\n bytes memory signature\n ) internal view returns (bool) {\n bytes32 message = keccak256(\n abi.encodePacked(hash, addr, owner, inceptionDate, coinType)\n ).toEthSignedMessageHash();\n bytes32 node = _getNamehash(addr);\n\n if (!ownsContract(addr, owner)) {\n revert NotOwnerOfContract();\n }\n\n if (\n !SignatureChecker.isValidERC1271SignatureNow(\n owner,\n message,\n signature\n )\n ) {\n revert InvalidSignature();\n }\n\n if (\n inceptionDate <= lastUpdated[node] || // must be newer than current record\n inceptionDate / 1000 >= block.timestamp // must be in the past\n ) {\n revert SignatureOutOfDate();\n }\n }\n\n /**\n * @dev Sets the name for a contract that is owned by a SCW using a signature\n * @param contractAddr The reverse node to set\n * @param owner The owner of the contract (via Ownable)\n * @param name The name of the reverse record\n * @param inceptionDate Date from when this signature is valid from\n * @param signature The signature of an address that will return true on isValidSignature for the owner\n * @return The ENS node hash of the reverse record.\n */\n function setNameForAddrWithSignatureAndOwnable(\n address contractAddr,\n address owner,\n string memory name,\n uint256 inceptionDate,\n bytes memory signature\n )\n public\n ownerAndAuthorisedWithSignature(\n keccak256(\n abi.encodePacked(\n IL2ReverseRegistrar\n .setNameForAddrWithSignatureAndOwnable\n .selector,\n name\n )\n ),\n contractAddr,\n owner,\n inceptionDate,\n signature\n )\n returns (bytes32)\n {\n bytes32 node = _getNamehash(contractAddr);\n _setName(node, name, inceptionDate);\n emit ReverseClaimed(contractAddr, node);\n }\n\n /**\n * @dev Sets the `name()` record for the reverse ENS record associated with\n * the calling account.\n * @param name The name to set for this address.\n * @return The ENS node hash of the reverse record.\n */\n function setName(string memory name) public override returns (bytes32) {\n return setNameForAddr(msg.sender, name);\n }\n\n /**\n * @dev Sets the `name()` record for the reverse ENS record associated with\n * the addr provided account.\n * Can be used if the addr is a contract that is owned by a SCW.\n * @param name The name to set for this address.\n * @return The ENS node hash of the reverse record.\n */\n\n function setNameForAddr(\n address addr,\n string memory name\n ) public authorised(addr) returns (bytes32) {\n bytes32 node = _getNamehash(addr);\n _setName(node, name, block.timestamp);\n emit ReverseClaimed(addr, node);\n return node;\n }\n\n /**\n * @dev Sets the name for a contract that is owned by a SCW using a signature\n * @param contractAddr The reverse node to set\n * @param owner The owner of the contract (via Ownable)\n * @param key The name of the reverse record\n * @param value The name of the reverse record\n * @param inceptionDate Date from when this signature is valid from\n * @param signature The signature of an address that will return true on isValidSignature for the owner\n * @return The ENS node hash of the reverse record.\n */\n function setTextForAddrWithSignatureAndOwnable(\n address contractAddr,\n address owner,\n string calldata key,\n string calldata value,\n uint256 inceptionDate,\n bytes memory signature\n )\n public\n ownerAndAuthorisedWithSignature(\n keccak256(\n abi.encodePacked(\n IL2ReverseRegistrar\n .setTextForAddrWithSignatureAndOwnable\n .selector,\n key,\n value\n )\n ),\n contractAddr,\n owner,\n inceptionDate,\n signature\n )\n returns (bytes32)\n {\n bytes32 node = _getNamehash(contractAddr);\n _setText(node, key, value, inceptionDate);\n }\n\n /**\n * @dev Sets the `name()` record for the reverse ENS record associated with\n * the calling account.\n * @param key The key for this text record.\n * @param value The value to set for this text record.\n * @return The ENS node hash of the reverse record.\n */\n function setText(\n string calldata key,\n string calldata value\n ) public override returns (bytes32) {\n return setTextForAddr(msg.sender, key, value);\n }\n\n /**\n * @dev Sets the `text(key)` record for the reverse ENS record associated with\n * the addr provided account.\n * @param key The key for this text record.\n * @param value The value to set for this text record.\n * @return The ENS node hash of the reverse record.\n */\n\n function setTextForAddr(\n address addr,\n string calldata key,\n string calldata value\n ) public override authorised(addr) returns (bytes32) {\n bytes32 node = _getNamehash(addr);\n _setText(node, key, value, block.timestamp);\n return node;\n }\n\n /**\n * Returns the text data associated with an ENS node and key.\n * @param node The ENS node to query.\n * @param key The text data key to query.\n * @return The associated text data.\n */\n function text(\n bytes32 node,\n string calldata key\n ) external view virtual override returns (string memory) {\n return _text(node, key);\n }\n\n /**\n * Returns the name associated with an ENS node, for reverse records.\n * Defined in EIP181.\n * @param node The ENS node to query.\n * @return The associated name.\n */\n function name(\n bytes32 node\n ) external view virtual override returns (string memory) {\n return _name(node);\n }\n\n /**\n * Increments the record version associated with an ENS node.\n * May only be called by the owner of that node in the ENS registry.\n * @param addr The node to update.\n */\n function clearRecords(address addr) public virtual authorised(addr) {\n _clearRecords(addr);\n }\n\n function ownsContract(\n address contractAddr,\n address addr\n ) internal view returns (bool) {\n try Ownable(contractAddr).owner() returns (address owner) {\n return owner == addr;\n } catch {\n return false;\n }\n }\n\n function supportsInterface(\n bytes4 interfaceID\n )\n public\n view\n override(Multicallable, SignatureReverseResolver)\n returns (bool)\n {\n return\n interfaceID == type(IL2ReverseRegistrar).interfaceId ||\n interfaceID == type(ITextResolver).interfaceId ||\n interfaceID == type(INameResolver).interfaceId ||\n super.supportsInterface(interfaceID);\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/reverseRegistrar/SignatureReverseResolver.sol": { + "content": "pragma solidity >=0.8.4;\n\nimport \"../registry/ENS.sol\";\nimport \"./ISignatureReverseResolver.sol\";\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\";\nimport \"../root/Controllable.sol\";\nimport \"../utils/LowLevelCallUtils.sol\";\n\nerror InvalidSignature();\nerror SignatureOutOfDate();\nerror Unauthorised();\n\n// @note Inception date\n// The inception date is in milliseconds, and so will be divided by 1000\n// when comparing to block.timestamp. This means that the date will be\n// rounded down to the nearest second.\n\ncontract SignatureReverseResolver is Ownable, ISignatureReverseResolver {\n using ECDSA for bytes32;\n mapping(bytes32 => uint256) public lastUpdated;\n mapping(uint64 => mapping(bytes32 => mapping(string => string))) versionable_texts;\n mapping(uint64 => mapping(bytes32 => string)) versionable_names;\n mapping(bytes32 => uint64) internal recordVersions;\n event VersionChanged(bytes32 indexed node, uint64 newVersion);\n event ReverseClaimed(address indexed addr, bytes32 indexed node);\n\n bytes32 public immutable ParentNode;\n uint256 public immutable coinType;\n\n /**\n * @dev Constructor\n */\n constructor(bytes32 _ParentNode, uint256 _coinType) {\n ParentNode = _ParentNode;\n coinType = _coinType;\n }\n\n modifier authorised(address addr) {\n isAuthorised(addr);\n _;\n }\n\n modifier authorisedSignature(\n bytes32 hash,\n address addr,\n uint256 inceptionDate,\n bytes memory signature\n ) {\n isAuthorisedWithSignature(hash, addr, inceptionDate, signature);\n _;\n }\n\n function getLastUpdated(\n bytes32 node\n ) internal view virtual returns (uint256) {\n return lastUpdated[node];\n }\n\n function isAuthorised(address addr) internal view virtual returns (bool) {}\n\n function isAuthorisedWithSignature(\n bytes32 hash,\n address addr,\n uint256 inceptionDate,\n bytes memory signature\n ) internal view returns (bool) {\n bytes32 message = keccak256(\n abi.encodePacked(hash, addr, inceptionDate, coinType)\n ).toEthSignedMessageHash();\n bytes32 node = _getNamehash(addr);\n\n if (!SignatureChecker.isValidSignatureNow(addr, message, signature)) {\n revert InvalidSignature();\n }\n\n if (\n inceptionDate <= lastUpdated[node] || // must be newer than current record\n inceptionDate / 1000 >= block.timestamp // must be in the past\n ) {\n revert SignatureOutOfDate();\n }\n }\n\n /**\n * @dev Sets the name for an addr using a signature that can be verified with ERC1271.\n * @param addr The reverse record to set\n * @param name The name of the reverse record\n * @param inceptionDate Date from when this signature is valid from\n * @param signature The resolver of the reverse node\n * @return The ENS node hash of the reverse record.\n */\n function setNameForAddrWithSignature(\n address addr,\n string memory name,\n uint256 inceptionDate,\n bytes memory signature\n )\n public\n authorisedSignature(\n keccak256(\n abi.encodePacked(\n ISignatureReverseResolver\n .setNameForAddrWithSignature\n .selector,\n name\n )\n ),\n addr,\n inceptionDate,\n signature\n )\n returns (bytes32)\n {\n bytes32 node = _getNamehash(addr);\n _setName(node, name, inceptionDate);\n emit ReverseClaimed(addr, node);\n return node;\n }\n\n /**\n * @dev Sets the name for an addr using a signature that can be verified with ERC1271.\n * @param addr The reverse record to set\n * @param key The key of the text record\n * @param value The value of the text record\n * @param inceptionDate Date from when this signature is valid from\n * @param signature The resolver of the reverse node\n * @return The ENS node hash of the reverse record.\n */\n function setTextForAddrWithSignature(\n address addr,\n string calldata key,\n string calldata value,\n uint256 inceptionDate,\n bytes memory signature\n )\n public\n authorisedSignature(\n keccak256(\n abi.encodePacked(\n ISignatureReverseResolver\n .setTextForAddrWithSignature\n .selector,\n key,\n value\n )\n ),\n addr,\n inceptionDate,\n signature\n )\n returns (bytes32)\n {\n bytes32 node = _getNamehash(addr);\n _setText(node, key, value, inceptionDate);\n return node;\n }\n\n function _setText(\n bytes32 node,\n string calldata key,\n string calldata value,\n uint256 inceptionDate\n ) internal {\n versionable_texts[recordVersions[node]][node][key] = value;\n _setLastUpdated(node, inceptionDate);\n // emit TextChanged(node, key, key, value);\n }\n\n /**\n * Returns the text data associated with an ENS node and key.\n * @param node The ENS node to query.\n * @param key The text data key to query.\n * @return The associated text data.\n */\n function _text(\n bytes32 node,\n string calldata key\n ) internal view returns (string memory) {\n return versionable_texts[recordVersions[node]][node][key];\n }\n\n /**\n * Sets the name associated with an ENS node, for reverse records.\n * May only be called by the owner of that node in the ENS registry.\n * @param node The node to update.\n * @param newName name record\n */\n function _setName(\n bytes32 node,\n string memory newName,\n uint256 inceptionDate\n ) internal virtual {\n versionable_names[recordVersions[node]][node] = newName;\n _setLastUpdated(node, inceptionDate);\n // emit NameChanged(node, newName);\n }\n\n function _name(bytes32 node) internal view returns (string memory) {\n return versionable_names[recordVersions[node]][node];\n }\n\n /**\n * Increments the record version associated with an ENS node.\n * May only be called by the owner of that node in the ENS registry.\n * @param addr The node to update.\n */\n function _clearRecords(address addr) internal {\n bytes32 labelHash = LowLevelCallUtils.sha3HexAddress(addr);\n bytes32 reverseNode = keccak256(\n abi.encodePacked(ParentNode, labelHash)\n );\n recordVersions[reverseNode]++;\n emit VersionChanged(reverseNode, recordVersions[reverseNode]);\n }\n\n /**\n * Increments the record version associated with an ENS node.\n * May only be called by the owner of that node in the ENS registry.\n * @param addr The node to update.\n * @param signature A signature proving ownership of the node.\n */\n function clearRecordsWithSignature(\n address addr,\n uint256 inceptionDate,\n bytes memory signature\n )\n public\n authorisedSignature(\n keccak256(\n abi.encodePacked(\n ISignatureReverseResolver.clearRecordsWithSignature.selector\n )\n ),\n addr,\n inceptionDate,\n signature\n )\n {\n _clearRecords(addr);\n }\n\n /**\n * @dev Returns the node hash for a given account's reverse records.\n * @param addr The address to hash\n * @return The ENS node hash.\n */\n function node(address addr) public view returns (bytes32) {\n return\n keccak256(\n abi.encodePacked(\n ParentNode,\n LowLevelCallUtils.sha3HexAddress(addr)\n )\n );\n }\n\n function _getNamehash(address addr) internal view returns (bytes32) {\n bytes32 labelHash = LowLevelCallUtils.sha3HexAddress(addr);\n return keccak256(abi.encodePacked(ParentNode, labelHash));\n }\n\n function _setLastUpdated(bytes32 node, uint256 inceptionDate) internal {\n lastUpdated[node] = inceptionDate;\n }\n\n function supportsInterface(\n bytes4 interfaceID\n ) public view virtual returns (bool) {\n return interfaceID == type(ISignatureReverseResolver).interfaceId;\n // super.supportsInterface(interfaceID);\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/root/Controllable.sol": { + "content": "pragma solidity ^0.8.4;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\n\ncontract Controllable is Ownable {\n mapping(address => bool) public controllers;\n\n event ControllerChanged(address indexed controller, bool enabled);\n\n modifier onlyController() {\n require(\n controllers[msg.sender],\n \"Controllable: Caller is not a controller\"\n );\n _;\n }\n\n function setController(address controller, bool enabled) public onlyOwner {\n controllers[controller] = enabled;\n emit ControllerChanged(controller, enabled);\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/utils/HexUtils.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\nlibrary HexUtils {\n /**\n * @dev Attempts to parse bytes32 from a hex string\n * @param str The string to parse\n * @param idx The offset to start parsing at\n * @param lastIdx The (exclusive) last index in `str` to consider. Use `str.length` to scan the whole string.\n */\n function hexStringToBytes32(\n bytes memory str,\n uint256 idx,\n uint256 lastIdx\n ) internal pure returns (bytes32 r, bool valid) {\n valid = true;\n assembly {\n // check that the index to read to is not past the end of the string\n if gt(lastIdx, mload(str)) {\n revert(0, 0)\n }\n\n function getHex(c) -> ascii {\n // chars 48-57: 0-9\n if and(gt(c, 47), lt(c, 58)) {\n ascii := sub(c, 48)\n leave\n }\n // chars 65-70: A-F\n if and(gt(c, 64), lt(c, 71)) {\n ascii := add(sub(c, 65), 10)\n leave\n }\n // chars 97-102: a-f\n if and(gt(c, 96), lt(c, 103)) {\n ascii := add(sub(c, 97), 10)\n leave\n }\n // invalid char\n ascii := 0xff\n }\n\n let ptr := add(str, 32)\n for {\n let i := idx\n } lt(i, lastIdx) {\n i := add(i, 2)\n } {\n let byte1 := getHex(byte(0, mload(add(ptr, i))))\n let byte2 := getHex(byte(0, mload(add(ptr, add(i, 1)))))\n // if either byte is invalid, set invalid and break loop\n if or(eq(byte1, 0xff), eq(byte2, 0xff)) {\n valid := false\n break\n }\n let combined := or(shl(4, byte1), byte2)\n r := or(shl(8, r), combined)\n }\n }\n }\n\n /**\n * @dev Attempts to parse an address from a hex string\n * @param str The string to parse\n * @param idx The offset to start parsing at\n * @param lastIdx The (exclusive) last index in `str` to consider. Use `str.length` to scan the whole string.\n */\n function hexToAddress(\n bytes memory str,\n uint256 idx,\n uint256 lastIdx\n ) internal pure returns (address, bool) {\n if (lastIdx - idx < 40) return (address(0x0), false);\n (bytes32 r, bool valid) = hexStringToBytes32(str, idx, lastIdx);\n return (address(uint160(uint256(r))), valid);\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/utils/LowLevelCallUtils.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.13;\n\nimport {Address} from \"@openzeppelin/contracts/utils/Address.sol\";\n\nlibrary LowLevelCallUtils {\n // This is the hex encoding of the string 'abcdefghijklmnopqrstuvwxyz'\n // It is used as a constant to lookup the characters of the hex address\n bytes32 constant lookup =\n 0x3031323334353637383961626364656600000000000000000000000000000000;\n using Address for address;\n\n /**\n * @dev Makes a static call to the specified `target` with `data`. Return data can be fetched with\n * `returnDataSize` and `readReturnData`.\n * @param target The address to staticcall.\n * @param data The data to pass to the call.\n * @return success True if the call succeeded, or false if it reverts.\n */\n function functionStaticCall(\n address target,\n bytes memory data\n ) internal view returns (bool success) {\n require(\n target.isContract(),\n \"LowLevelCallUtils: static call to non-contract\"\n );\n assembly {\n success := staticcall(\n gas(),\n target,\n add(data, 32),\n mload(data),\n 0,\n 0\n )\n }\n }\n\n /**\n * @dev Returns the size of the return data of the most recent external call.\n */\n function returnDataSize() internal pure returns (uint256 len) {\n assembly {\n len := returndatasize()\n }\n }\n\n /**\n * @dev Reads return data from the most recent external call.\n * @param offset Offset into the return data.\n * @param length Number of bytes to return.\n */\n function readReturnData(\n uint256 offset,\n uint256 length\n ) internal pure returns (bytes memory data) {\n data = new bytes(length);\n assembly {\n returndatacopy(add(data, 32), offset, length)\n }\n }\n\n /**\n * @dev Reverts with the return data from the most recent external call.\n */\n function propagateRevert() internal pure {\n assembly {\n returndatacopy(0, 0, returndatasize())\n revert(0, returndatasize())\n }\n }\n\n /**\n * @dev An optimised function to compute the sha3 of the lower-case\n * hexadecimal representation of an Ethereum address.\n * @param addr The address to hash\n * @return ret The SHA3 hash of the lower-case hexadecimal encoding of the\n * input address.\n */\n function sha3HexAddress(address addr) internal pure returns (bytes32 ret) {\n assembly {\n for {\n let i := 40\n } gt(i, 0) {\n\n } {\n i := sub(i, 1)\n mstore8(i, byte(and(addr, 0xf), lookup))\n addr := div(addr, 0x10)\n i := sub(i, 1)\n mstore8(i, byte(and(addr, 0xf), lookup))\n addr := div(addr, 0x10)\n }\n\n ret := keccak256(0, 40)\n }\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/wrapper/BytesUtils.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity ~0.8.17;\n\nlibrary BytesUtils {\n /*\n * @dev Returns the keccak-256 hash of a byte range.\n * @param self The byte string to hash.\n * @param offset The position to start hashing at.\n * @param len The number of bytes to hash.\n * @return The hash of the byte range.\n */\n function keccak(\n bytes memory self,\n uint256 offset,\n uint256 len\n ) internal pure returns (bytes32 ret) {\n require(offset + len <= self.length);\n assembly {\n ret := keccak256(add(add(self, 32), offset), len)\n }\n }\n\n /**\n * @dev Returns the ENS namehash of a DNS-encoded name.\n * @param self The DNS-encoded name to hash.\n * @param offset The offset at which to start hashing.\n * @return The namehash of the name.\n */\n function namehash(\n bytes memory self,\n uint256 offset\n ) internal pure returns (bytes32) {\n (bytes32 labelhash, uint256 newOffset) = readLabel(self, offset);\n if (labelhash == bytes32(0)) {\n require(offset == self.length - 1, \"namehash: Junk at end of name\");\n return bytes32(0);\n }\n return\n keccak256(abi.encodePacked(namehash(self, newOffset), labelhash));\n }\n\n /**\n * @dev Returns the keccak-256 hash of a DNS-encoded label, and the offset to the start of the next label.\n * @param self The byte string to read a label from.\n * @param idx The index to read a label at.\n * @return labelhash The hash of the label at the specified index, or 0 if it is the last label.\n * @return newIdx The index of the start of the next label.\n */\n function readLabel(\n bytes memory self,\n uint256 idx\n ) internal pure returns (bytes32 labelhash, uint256 newIdx) {\n require(idx < self.length, \"readLabel: Index out of bounds\");\n uint256 len = uint256(uint8(self[idx]));\n if (len > 0) {\n labelhash = keccak(self, idx + 1, len);\n } else {\n labelhash = bytes32(0);\n }\n newIdx = idx + len + 1;\n }\n}\n" + }, + "@ensdomains/evm-verifier/contracts/EVMFetcher.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\nimport { IEVMVerifier } from './IEVMVerifier.sol';\nimport { EVMFetchTarget } from './EVMFetchTarget.sol';\nimport { Address } from '@openzeppelin/contracts/utils/Address.sol';\n\ninterface IEVMGateway {\n function getStorageSlots(address addr, bytes32[] memory commands, bytes[] memory constants) external pure returns(bytes memory witness);\n}\n\nuint8 constant FLAG_DYNAMIC = 0x01;\nuint8 constant OP_CONSTANT = 0x00;\nuint8 constant OP_BACKREF = 0x20;\nuint8 constant OP_END = 0xff;\n\n/**\n * @dev A library to facilitate requesting storage data proofs from contracts, possibly on a different chain.\n * See l1-verifier/test/TestL1.sol for example usage.\n */\nlibrary EVMFetcher {\n uint256 constant MAX_COMMANDS = 32;\n uint256 constant MAX_CONSTANTS = 32; // Must not be greater than 32\n\n using Address for address;\n\n error TooManyCommands(uint256 max);\n error CommandTooLong();\n error InvalidReference(uint256 value, uint256 max);\n error OffchainLookup(address sender, string[] urls, bytes callData, bytes4 callbackFunction, bytes extraData);\n\n struct EVMFetchRequest {\n IEVMVerifier verifier;\n address target;\n bytes32[] commands;\n uint256 operationIdx;\n bytes[] constants;\n }\n\n /**\n * @dev Creates a request to fetch the value of multiple storage slots from a contract via CCIP-Read, possibly from\n * another chain.\n * Supports dynamic length values and slot numbers derived from other retrieved values.\n * @param verifier An instance of a verifier contract that can provide and verify the storage slot information.\n * @param target The address of the contract to fetch storage proofs for.\n */\n function newFetchRequest(IEVMVerifier verifier, address target) internal pure returns (EVMFetchRequest memory) {\n bytes32[] memory commands = new bytes32[](MAX_COMMANDS);\n bytes[] memory constants = new bytes[](MAX_CONSTANTS);\n assembly {\n mstore(commands, 0) // Set current array length to 0\n mstore(constants, 0)\n } \n return EVMFetchRequest(verifier, target, commands, 0, constants);\n }\n\n /**\n * @dev Starts describing a new fetch request.\n * Paths specify a series of hashing operations to derive the final slot ID.\n * See https://docs.soliditylang.org/en/v0.8.17/internals/layout_in_storage.html for details on how Solidity\n * lays out storage variables.\n * @param request The request object being operated on.\n * @param baseSlot The base slot ID that forms the root of the path.\n */\n function getStatic(EVMFetchRequest memory request, uint256 baseSlot) internal pure returns (EVMFetchRequest memory) {\n bytes32[] memory commands = request.commands;\n uint256 commandIdx = commands.length;\n if(commandIdx > 0 && request.operationIdx < 32) {\n // Terminate previous command\n _addOperation(request, OP_END);\n }\n assembly {\n mstore(commands, add(commandIdx, 1)) // Increment command array length\n }\n if(request.commands.length > MAX_COMMANDS) {\n revert TooManyCommands(MAX_COMMANDS);\n }\n request.operationIdx = 0;\n _addOperation(request, 0);\n _addOperation(request, _addConstant(request, abi.encode(baseSlot)));\n return request;\n }\n\n /**\n * @dev Starts describing a new fetch request.\n * Paths specify a series of hashing operations to derive the final slot ID.\n * See https://docs.soliditylang.org/en/v0.8.17/internals/layout_in_storage.html for details on how Solidity\n * lays out storage variables.\n * @param request The request object being operated on.\n * @param baseSlot The base slot ID that forms the root of the path.\n */\n function getDynamic(EVMFetchRequest memory request, uint256 baseSlot) internal pure returns (EVMFetchRequest memory) {\n bytes32[] memory commands = request.commands;\n uint256 commandIdx = commands.length;\n if(commandIdx > 0 && request.operationIdx < 32) {\n // Terminate previous command\n _addOperation(request, OP_END);\n }\n assembly {\n mstore(commands, add(commandIdx, 1)) // Increment command array length\n }\n if(request.commands.length > MAX_COMMANDS) {\n revert TooManyCommands(MAX_COMMANDS);\n }\n request.operationIdx = 0;\n _addOperation(request, FLAG_DYNAMIC);\n _addOperation(request, _addConstant(request, abi.encode(baseSlot)));\n return request;\n }\n\n /**\n * @dev Adds a `uint256` element to the current path.\n * @param request The request object being operated on.\n * @param el The element to add.\n */\n function element(EVMFetchRequest memory request, uint256 el) internal pure returns (EVMFetchRequest memory) {\n if(request.operationIdx >= 32) {\n revert CommandTooLong();\n }\n _addOperation(request, _addConstant(request, abi.encode(el)));\n return request;\n }\n\n /**\n * @dev Adds a `bytes32` element to the current path.\n * @param request The request object being operated on.\n * @param el The element to add.\n */\n function element(EVMFetchRequest memory request, bytes32 el) internal pure returns (EVMFetchRequest memory) {\n if(request.operationIdx >= 32) {\n revert CommandTooLong();\n }\n _addOperation(request, _addConstant(request, abi.encode(el)));\n return request;\n }\n\n /**\n * @dev Adds an `address` element to the current path.\n * @param request The request object being operated on.\n * @param el The element to add.\n */\n function element(EVMFetchRequest memory request, address el) internal pure returns (EVMFetchRequest memory) {\n if(request.operationIdx >= 32) {\n revert CommandTooLong();\n }\n _addOperation(request, _addConstant(request, abi.encode(el)));\n return request;\n }\n\n /**\n * @dev Adds a `bytes` element to the current path.\n * @param request The request object being operated on.\n * @param el The element to add.\n */\n function element(EVMFetchRequest memory request, bytes memory el) internal pure returns (EVMFetchRequest memory) {\n if(request.operationIdx >= 32) {\n revert CommandTooLong();\n }\n _addOperation(request, _addConstant(request, el));\n return request;\n }\n\n /**\n * @dev Adds a `string` element to the current path.\n * @param request The request object being operated on.\n * @param el The element to add.\n */\n function element(EVMFetchRequest memory request, string memory el) internal pure returns (EVMFetchRequest memory) {\n if(request.operationIdx >= 32) {\n revert CommandTooLong();\n }\n _addOperation(request, _addConstant(request, bytes(el)));\n return request;\n }\n\n /**\n * @dev Adds a reference to a previous fetch to the current path.\n * @param request The request object being operated on.\n * @param idx The index of the previous fetch request, starting at 0.\n */\n function ref(EVMFetchRequest memory request, uint8 idx) internal pure returns (EVMFetchRequest memory) {\n if(request.operationIdx >= 32) {\n revert CommandTooLong();\n }\n if(idx > request.commands.length || idx > 31) {\n revert InvalidReference(idx, request.commands.length);\n }\n _addOperation(request, OP_BACKREF | idx);\n return request;\n }\n\n /**\n * @dev Initiates the fetch request.\n * Calling this function terminates execution; clients that implement CCIP-Read will make a callback to\n * `callback` with the results of the operation.\n * @param callbackId A callback function selector on this contract that will be invoked via CCIP-Read with the result of the lookup.\n * The function must have a signature matching `(bytes[] memory values, bytes callbackData)` with a return type matching the call in which\n * this function was invoked. Its return data will be returned as the return value of the entire CCIP-read operation.\n * @param callbackData Extra data to supply to the callback.\n */\n function fetch(EVMFetchRequest memory request, bytes4 callbackId, bytes memory callbackData) internal view {\n if(request.commands.length > 0 && request.operationIdx < 32) {\n // Terminate last command\n _addOperation(request, OP_END);\n }\n revert OffchainLookup(\n address(this),\n request.verifier.gatewayURLs(),\n abi.encodeCall(IEVMGateway.getStorageSlots, (request.target, request.commands, request.constants)),\n EVMFetchTarget.getStorageSlotsCallback.selector,\n abi.encode(request.verifier, request.target, request.commands, request.constants, callbackId, callbackData)\n );\n }\n\n function _addConstant(EVMFetchRequest memory request, bytes memory value) private pure returns(uint8 idx) {\n bytes[] memory constants = request.constants;\n idx = uint8(constants.length);\n assembly {\n mstore(constants, add(idx, 1)) // Increment constant array length\n }\n constants[idx] = value;\n }\n\n function _addOperation(EVMFetchRequest memory request, uint8 op) private pure {\n uint256 commandIdx = request.commands.length - 1;\n request.commands[commandIdx] = request.commands[commandIdx] | (bytes32(bytes1(op)) >> (8 * request.operationIdx++));\n }\n}\n" + }, + "@ensdomains/evm-verifier/contracts/EVMFetchTarget.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\nimport { IEVMVerifier } from './IEVMVerifier.sol';\nimport { Address } from '@openzeppelin/contracts/utils/Address.sol';\n\n/**\n * @dev Callback implementation for users of `EVMFetcher`. If you use `EVMFetcher`, your contract must\n * inherit from this contract in order to handle callbacks correctly.\n */\nabstract contract EVMFetchTarget {\n using Address for address;\n\n error ResponseLengthMismatch(uint256 actual, uint256 expected);\n\n /**\n * @dev Internal callback function invoked by CCIP-Read in response to a `getStorageSlots` request.\n */\n function getStorageSlotsCallback(bytes calldata response, bytes calldata extradata) external {\n bytes memory proof = abi.decode(response, (bytes));\n (IEVMVerifier verifier, address addr, bytes32[] memory commands, bytes[] memory constants, bytes4 callback, bytes memory callbackData) =\n abi.decode(extradata, (IEVMVerifier, address, bytes32[], bytes[], bytes4, bytes));\n bytes[] memory values = verifier.getStorageValues(addr, commands, constants, proof);\n if(values.length != commands.length) {\n revert ResponseLengthMismatch(values.length, commands.length);\n }\n bytes memory ret = address(this).functionCall(abi.encodeWithSelector(callback, values, callbackData));\n assembly {\n return(add(ret, 32), mload(ret))\n }\n }\n}\n" + }, + "@ensdomains/evm-verifier/contracts/EVMProofHelper.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\nimport {RLPReader} from \"@eth-optimism/contracts-bedrock/src/libraries/rlp/RLPReader.sol\";\nimport {Bytes} from \"@eth-optimism/contracts-bedrock/src/libraries/Bytes.sol\";\nimport {SecureMerkleTrie} from \"./SecureMerkleTrie.sol\";\n\nstruct StateProof {\n bytes[] stateTrieWitness; // Witness proving the `storageRoot` against a state root.\n bytes[][] storageProofs; // An array of proofs of individual storage elements \n}\n\nuint8 constant OP_CONSTANT = 0x00;\nuint8 constant OP_BACKREF = 0x20;\nuint8 constant FLAG_DYNAMIC = 0x01;\n\nlibrary EVMProofHelper {\n using Bytes for bytes;\n\n error AccountNotFound(address);\n error UnknownOpcode(uint8);\n error InvalidSlotSize(uint256 size);\n\n /**\n * @notice Get the storage root for the provided merkle proof\n * @param stateRoot The state root the witness was generated against\n * @param target The address we are fetching a storage root for\n * @param witness A witness proving the value of the storage root for `target`.\n * @return The storage root retrieved from the provided state root\n */\n function getStorageRoot(bytes32 stateRoot, address target, bytes[] memory witness) private pure returns (bytes32) {\n (bool exists, bytes memory encodedResolverAccount) = SecureMerkleTrie.get(\n abi.encodePacked(target),\n witness,\n stateRoot\n );\n if(!exists) {\n revert AccountNotFound(target);\n }\n RLPReader.RLPItem[] memory accountState = RLPReader.readList(encodedResolverAccount);\n return bytes32(RLPReader.readBytes(accountState[2]));\n }\n\n /**\n * @notice Prove whether the provided storage slot is part of the storageRoot\n * @param storageRoot the storage root for the account that contains the storage slot\n * @param slot The storage key we are fetching the value of\n * @param witness the StorageProof struct containing the necessary proof data\n * @return The retrieved storage proof value or 0x if the storage slot is empty\n */\n function getSingleStorageProof(bytes32 storageRoot, uint256 slot, bytes[] memory witness) private pure returns (bytes memory) {\n (bool exists, bytes memory retrievedValue) = SecureMerkleTrie.get(\n abi.encodePacked(slot),\n witness,\n storageRoot\n );\n if(!exists) {\n // Nonexistent values are treated as zero.\n return \"\";\n }\n return RLPReader.readBytes(retrievedValue);\n }\n\n function getFixedValue(bytes32 storageRoot, uint256 slot, bytes[] memory witness) private pure returns(bytes32) {\n bytes memory value = getSingleStorageProof(storageRoot, slot, witness);\n // RLP encoded storage slots are stored without leading 0 bytes.\n // Casting to bytes32 appends trailing 0 bytes, so we have to bit shift to get the \n // original fixed-length representation back.\n return bytes32(value) >> (256 - 8 * value.length);\n }\n\n function executeOperation(bytes1 operation, bytes[] memory constants, bytes[] memory values) private pure returns(bytes memory) {\n uint8 opcode = uint8(operation) & 0xe0;\n uint8 operand = uint8(operation) & 0x1f;\n\n if(opcode == OP_CONSTANT) {\n return constants[operand];\n } else if(opcode == OP_BACKREF) {\n return values[operand];\n } else {\n revert UnknownOpcode(opcode);\n }\n }\n\n function computeFirstSlot(bytes32 command, bytes[] memory constants, bytes[] memory values) private pure returns(bool isDynamic, uint256 slot) {\n uint8 flags = uint8(command[0]);\n isDynamic = (flags & FLAG_DYNAMIC) != 0;\n\n bytes memory slotData = executeOperation(command[1], constants, values);\n require(slotData.length == 32, \"First path element must be 32 bytes\");\n slot = uint256(bytes32(slotData));\n\n for(uint256 j = 2; j < 32 && command[j] != 0xff; j++) {\n bytes memory index = executeOperation(command[j], constants, values);\n slot = uint256(keccak256(abi.encodePacked(index, slot)));\n }\n }\n\n function getDynamicValue(bytes32 storageRoot, uint256 slot, StateProof memory proof, uint256 proofIdx) private pure returns(bytes memory value, uint256 newProofIdx) {\n uint256 firstValue = uint256(getFixedValue(storageRoot, slot, proof.storageProofs[proofIdx++]));\n if(firstValue & 0x01 == 0x01) {\n // Long value: first slot is `length * 2 + 1`, following slots are data.\n uint256 length = (firstValue - 1) / 2;\n value = \"\";\n slot = uint256(keccak256(abi.encodePacked(slot)));\n // This is horribly inefficient - O(n^2). A better approach would be to build an array of words and concatenate them\n // all at once, but we're trying to avoid writing new library code.\n while(length > 0) {\n if(length < 32) {\n value = bytes.concat(value, getSingleStorageProof(storageRoot, slot++, proof.storageProofs[proofIdx++]).slice(0, length));\n length = 0;\n } else {\n value = bytes.concat(value, getSingleStorageProof(storageRoot, slot++, proof.storageProofs[proofIdx++]));\n length -= 32;\n }\n }\n return (value, proofIdx);\n } else {\n // Short value: least significant byte is `length * 2`, other bytes are data.\n uint256 length = (firstValue & 0xFF) / 2;\n return (abi.encode(firstValue).slice(0, length), proofIdx);\n }\n }\n\n function getStorageValues(address target, bytes32[] memory commands, bytes[] memory constants, bytes32 stateRoot, StateProof memory proof) internal pure returns(bytes[] memory values) {\n bytes32 storageRoot = getStorageRoot(stateRoot, target, proof.stateTrieWitness);\n uint256 proofIdx = 0;\n values = new bytes[](commands.length);\n for(uint256 i = 0; i < commands.length; i++) {\n bytes32 command = commands[i];\n (bool isDynamic, uint256 slot) = computeFirstSlot(command, constants, values);\n if(!isDynamic) {\n values[i] = abi.encode(getFixedValue(storageRoot, slot, proof.storageProofs[proofIdx++]));\n if(values[i].length > 32) {\n revert InvalidSlotSize(values[i].length);\n }\n } else {\n (values[i], proofIdx) = getDynamicValue(storageRoot, slot, proof, proofIdx);\n }\n }\n }\n}" + }, + "@ensdomains/evm-verifier/contracts/IEVMVerifier.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\ninterface IEVMVerifier {\n function gatewayURLs() external view returns(string[] memory);\n function getStorageValues(address target, bytes32[] memory commands, bytes[] memory constants, bytes memory proof) external view returns(bytes[] memory values);\n}\n" + }, + "@ensdomains/evm-verifier/contracts/MerkleTrie.sol": { + "content": "// Pulled from https://github.com/ethereum-optimism/optimism/blob/4d13f0afe8869faf7bba45d8339998525ebc5161/packages/contracts-bedrock/contracts/libraries/trie/MerkleTrie.sol\n// as this is the last version of Optimism's Merkle Trie library that supports nonexistence proofs; support was removed\n// in the next commit for some version.\n// Copyright 2020-2021 Optimism\n// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport { Bytes } from \"@eth-optimism/contracts-bedrock/src/libraries/Bytes.sol\";\nimport { RLPReader } from \"@eth-optimism/contracts-bedrock/src/libraries/rlp/RLPReader.sol\";\n\n\n/**\n * @title MerkleTrie\n * @notice MerkleTrie is a small library for verifying standard Ethereum Merkle-Patricia trie\n * inclusion proofs. By default, this library assumes a hexary trie. One can change the\n * trie radix constant to support other trie radixes.\n */\nlibrary MerkleTrie {\n /**\n * @notice Struct representing a node in the trie.\n */\n struct TrieNode {\n bytes encoded;\n RLPReader.RLPItem[] decoded;\n }\n\n /**\n * @notice Determines the number of elements per branch node.\n */\n uint256 internal constant TREE_RADIX = 16;\n\n /**\n * @notice Branch nodes have TREE_RADIX elements and one value element.\n */\n uint256 internal constant BRANCH_NODE_LENGTH = TREE_RADIX + 1;\n\n /**\n * @notice Leaf nodes and extension nodes have two elements, a `path` and a `value`.\n */\n uint256 internal constant LEAF_OR_EXTENSION_NODE_LENGTH = 2;\n\n /**\n * @notice Prefix for even-nibbled extension node paths.\n */\n uint8 internal constant PREFIX_EXTENSION_EVEN = 0;\n\n /**\n * @notice Prefix for odd-nibbled extension node paths.\n */\n uint8 internal constant PREFIX_EXTENSION_ODD = 1;\n\n /**\n * @notice Prefix for even-nibbled leaf node paths.\n */\n uint8 internal constant PREFIX_LEAF_EVEN = 2;\n\n /**\n * @notice Prefix for odd-nibbled leaf node paths.\n */\n uint8 internal constant PREFIX_LEAF_ODD = 3;\n\n /**\n * @notice RLP representation of `NULL`.\n */\n bytes internal constant RLP_NULL = hex\"80\";\n\n /**\n * @notice Verifies a proof that a given key/value pair is present in the trie.\n *\n * @param _key Key of the node to search for, as a hex string.\n * @param _value Value of the node to search for, as a hex string.\n * @param _proof Merkle trie inclusion proof for the desired node. Unlike traditional Merkle\n * trees, this proof is executed top-down and consists of a list of RLP-encoded\n * nodes that make a path down to the target node.\n * @param _root Known root of the Merkle trie. Used to verify that the included proof is\n * correctly constructed.\n *\n * @return Whether or not the proof is valid.\n */\n function verifyInclusionProof(\n bytes memory _key,\n bytes memory _value,\n bytes[] memory _proof,\n bytes32 _root\n ) internal pure returns (bool) {\n (bool exists, bytes memory value) = get(_key, _proof, _root);\n return (exists && Bytes.equal(_value, value));\n }\n\n /**\n * @notice Retrieves the value associated with a given key.\n *\n * @param _key Key to search for, as hex bytes.\n * @param _proof Merkle trie inclusion proof for the key.\n * @param _root Known root of the Merkle trie.\n *\n * @return Whether or not the key exists.\n * @return Value of the key if it exists.\n */\n function get(\n bytes memory _key,\n bytes[] memory _proof,\n bytes32 _root\n ) internal pure returns (bool, bytes memory) {\n TrieNode[] memory proof = _parseProof(_proof);\n (uint256 pathLength, bytes memory keyRemainder, bool isFinalNode) = _walkNodePath(\n proof,\n _key,\n _root\n );\n\n bool noRemainder = keyRemainder.length == 0;\n\n require(noRemainder || isFinalNode, \"MerkleTrie: provided proof is invalid\");\n\n bytes memory value = noRemainder ? _getNodeValue(proof[pathLength - 1]) : bytes(\"\");\n\n return (value.length > 0, value);\n }\n\n /**\n * @notice Walks through a proof using a provided key.\n *\n * @param _proof Inclusion proof to walk through.\n * @param _key Key to use for the walk.\n * @param _root Known root of the trie.\n *\n * @return Length of the final path\n * @return Portion of the key remaining after the walk.\n * @return Whether or not we've hit a dead end.\n */\n // solhint-disable-next-line code-complexity\n function _walkNodePath(\n TrieNode[] memory _proof,\n bytes memory _key,\n bytes32 _root\n )\n private\n pure\n returns (\n uint256,\n bytes memory,\n bool\n )\n {\n uint256 pathLength = 0;\n bytes memory key = Bytes.toNibbles(_key);\n\n bytes memory currentNodeID = abi.encodePacked(_root);\n uint256 currentKeyIndex = 0;\n uint256 currentKeyIncrement = 0;\n TrieNode memory currentNode;\n\n // Proof is top-down, so we start at the first element (root).\n for (uint256 i = 0; i < _proof.length; i++) {\n currentNode = _proof[i];\n currentKeyIndex += currentKeyIncrement;\n\n // Keep track of the proof elements we actually need.\n // It's expensive to resize arrays, so this simply reduces gas costs.\n pathLength += 1;\n\n if (currentKeyIndex == 0) {\n // First proof element is always the root node.\n require(\n Bytes.equal(abi.encodePacked(keccak256(currentNode.encoded)), currentNodeID),\n \"MerkleTrie: invalid root hash\"\n );\n } else if (currentNode.encoded.length >= 32) {\n // Nodes 32 bytes or larger are hashed inside branch nodes.\n require(\n Bytes.equal(abi.encodePacked(keccak256(currentNode.encoded)), currentNodeID),\n \"MerkleTrie: invalid large internal hash\"\n );\n } else {\n // Nodes smaller than 32 bytes aren't hashed.\n require(\n Bytes.equal(currentNode.encoded, currentNodeID),\n \"MerkleTrie: invalid internal node hash\"\n );\n }\n\n if (currentNode.decoded.length == BRANCH_NODE_LENGTH) {\n if (currentKeyIndex == key.length) {\n // We've hit the end of the key\n // meaning the value should be within this branch node.\n break;\n } else {\n // We're not at the end of the key yet.\n // Figure out what the next node ID should be and continue.\n uint8 branchKey = uint8(key[currentKeyIndex]);\n RLPReader.RLPItem memory nextNode = currentNode.decoded[branchKey];\n currentNodeID = _getNodeID(nextNode);\n currentKeyIncrement = 1;\n continue;\n }\n } else if (currentNode.decoded.length == LEAF_OR_EXTENSION_NODE_LENGTH) {\n bytes memory path = _getNodePath(currentNode);\n uint8 prefix = uint8(path[0]);\n uint8 offset = 2 - (prefix % 2);\n bytes memory pathRemainder = Bytes.slice(path, offset);\n bytes memory keyRemainder = Bytes.slice(key, currentKeyIndex);\n uint256 sharedNibbleLength = _getSharedNibbleLength(pathRemainder, keyRemainder);\n\n require(\n keyRemainder.length >= pathRemainder.length,\n \"MerkleTrie: invalid key length for leaf or extension node\"\n );\n\n if (prefix == PREFIX_LEAF_EVEN || prefix == PREFIX_LEAF_ODD) {\n if (\n pathRemainder.length == sharedNibbleLength &&\n keyRemainder.length == sharedNibbleLength\n ) {\n // The key within this leaf matches our key exactly.\n // Increment the key index to reflect that we have no remainder.\n currentKeyIndex += sharedNibbleLength;\n }\n\n // We've hit a leaf node, so our next node should be NULL.\n currentNodeID = RLP_NULL;\n break;\n } else if (prefix == PREFIX_EXTENSION_EVEN || prefix == PREFIX_EXTENSION_ODD) {\n if (sharedNibbleLength != pathRemainder.length) {\n // Our extension node is not identical to the remainder.\n // We've hit the end of this path\n // updates will need to modify this extension.\n currentNodeID = RLP_NULL;\n break;\n } else {\n // Our extension shares some nibbles.\n // Carry on to the next node.\n currentNodeID = _getNodeID(currentNode.decoded[1]);\n currentKeyIncrement = sharedNibbleLength;\n continue;\n }\n } else {\n revert(\"MerkleTrie: received a node with an unknown prefix\");\n }\n } else {\n revert(\"MerkleTrie: received an unparseable node\");\n }\n }\n\n return (\n pathLength,\n Bytes.slice(key, currentKeyIndex),\n Bytes.equal(currentNodeID, RLP_NULL)\n );\n }\n\n /**\n * @notice Parses an array of proof elements into a new array that contains both the original\n * encoded element and the RLP-decoded element.\n *\n * @param _proof Array of proof elements to parse.\n *\n * @return Proof parsed into easily accessible structs.\n */\n function _parseProof(bytes[] memory _proof) private pure returns (TrieNode[] memory) {\n uint256 length = _proof.length;\n TrieNode[] memory proof = new TrieNode[](length);\n for (uint256 i = 0; i < length; ) {\n proof[i] = TrieNode({ encoded: _proof[i], decoded: RLPReader.readList(_proof[i]) });\n unchecked {\n ++i;\n }\n }\n return proof;\n }\n\n /**\n * @notice Picks out the ID for a node. Node ID is referred to as the \"hash\" within the\n * specification, but nodes < 32 bytes are not actually hashed.\n *\n * @param _node Node to pull an ID for.\n *\n * @return ID for the node, depending on the size of its contents.\n */\n function _getNodeID(RLPReader.RLPItem memory _node) private pure returns (bytes memory) {\n return _node.length < 32 ? RLPReader.readRawBytes(_node) : RLPReader.readBytes(_node);\n }\n\n /**\n * @notice Gets the path for a leaf or extension node.\n *\n * @param _node Node to get a path for.\n *\n * @return Node path, converted to an array of nibbles.\n */\n function _getNodePath(TrieNode memory _node) private pure returns (bytes memory) {\n return Bytes.toNibbles(RLPReader.readBytes(_node.decoded[0]));\n }\n\n /**\n * @notice Gets the value for a node.\n *\n * @param _node Node to get a value for.\n *\n * @return Node value, as hex bytes.\n */\n function _getNodeValue(TrieNode memory _node) private pure returns (bytes memory) {\n return RLPReader.readBytes(_node.decoded[_node.decoded.length - 1]);\n }\n\n /**\n * @notice Utility; determines the number of nibbles shared between two nibble arrays.\n *\n * @param _a First nibble array.\n * @param _b Second nibble array.\n *\n * @return Number of shared nibbles.\n */\n function _getSharedNibbleLength(bytes memory _a, bytes memory _b)\n private\n pure\n returns (uint256)\n {\n uint256 shared;\n uint256 max = (_a.length < _b.length) ? _a.length : _b.length;\n for (; shared < max && _a[shared] == _b[shared]; ) {\n unchecked {\n ++shared;\n }\n }\n return shared;\n }\n}" + }, + "@ensdomains/evm-verifier/contracts/SecureMerkleTrie.sol": { + "content": "// Pulled from https://github.com/ethereum-optimism/optimism/blob/4d13f0afe8869faf7bba45d8339998525ebc5161/packages/contracts-bedrock/contracts/libraries/trie/MerkleTrie.sol\n// as this is the last version of Optimism's Merkle Trie library that supports nonexistence proofs; support was removed\n// in the next commit for some version.\n// Copyright 2020-2021 Optimism\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/* Library Imports */\nimport { MerkleTrie } from \"./MerkleTrie.sol\";\n\n/**\n * @title SecureMerkleTrie\n * @notice SecureMerkleTrie is a thin wrapper around the MerkleTrie library that hashes the input\n * keys. Ethereum's state trie hashes input keys before storing them.\n */\nlibrary SecureMerkleTrie {\n /**\n * @notice Verifies a proof that a given key/value pair is present in the Merkle trie.\n *\n * @param _key Key of the node to search for, as a hex string.\n * @param _value Value of the node to search for, as a hex string.\n * @param _proof Merkle trie inclusion proof for the desired node. Unlike traditional Merkle\n * trees, this proof is executed top-down and consists of a list of RLP-encoded\n * nodes that make a path down to the target node.\n * @param _root Known root of the Merkle trie. Used to verify that the included proof is\n * correctly constructed.\n *\n * @return Whether or not the proof is valid.\n */\n function verifyInclusionProof(\n bytes memory _key,\n bytes memory _value,\n bytes[] memory _proof,\n bytes32 _root\n ) internal pure returns (bool) {\n bytes memory key = _getSecureKey(_key);\n return MerkleTrie.verifyInclusionProof(key, _value, _proof, _root);\n }\n\n /**\n * @notice Retrieves the value associated with a given key.\n *\n * @param _key Key to search for, as hex bytes.\n * @param _proof Merkle trie inclusion proof for the key.\n * @param _root Known root of the Merkle trie.\n *\n * @return Whether or not the key exists.\n * @return Value of the key if it exists.\n */\n function get(\n bytes memory _key,\n bytes[] memory _proof,\n bytes32 _root\n ) internal pure returns (bool, bytes memory) {\n bytes memory key = _getSecureKey(_key);\n return MerkleTrie.get(key, _proof, _root);\n }\n\n /**\n * @notice Computes the hashed version of the input key.\n *\n * @param _key Key to hash.\n *\n * @return Hashed version of the key.\n */\n function _getSecureKey(bytes memory _key) private pure returns (bytes memory) {\n return abi.encodePacked(keccak256(_key));\n }\n}" + }, + "@ensdomains/l1-verifier/contracts/L1Verifier.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\nimport { IEVMVerifier } from \"@ensdomains/evm-verifier/contracts/IEVMVerifier.sol\";\nimport { RLPReader } from \"@eth-optimism/contracts-bedrock/src/libraries/rlp/RLPReader.sol\";\nimport { StateProof, EVMProofHelper } from \"@ensdomains/evm-verifier/contracts/EVMProofHelper.sol\";\n\nstruct L1WitnessData {\n uint256 blockNo;\n bytes blockHeader;\n}\n\ncontract L1Verifier is IEVMVerifier {\n error BlockHeaderHashMismatch(uint256 current, uint256 number, bytes32 expected, bytes32 actual);\n\n string[] _gatewayURLs;\n\n constructor(string[] memory urls) {\n _gatewayURLs = urls;\n }\n\n function gatewayURLs() external view returns(string[] memory) {\n return _gatewayURLs;\n }\n\n function getStorageValues(address target, bytes32[] memory commands, bytes[] memory constants, bytes memory proof) external view returns(bytes[] memory values) {\n (L1WitnessData memory l1Data, StateProof memory stateProof) = abi.decode(proof, (L1WitnessData, StateProof));\n if(keccak256(l1Data.blockHeader) != blockhash(l1Data.blockNo)) {\n revert BlockHeaderHashMismatch(block.number, l1Data.blockNo, blockhash(l1Data.blockNo), keccak256(l1Data.blockHeader));\n }\n RLPReader.RLPItem[] memory headerFields = RLPReader.readList(l1Data.blockHeader);\n bytes32 stateRoot = bytes32(RLPReader.readBytes(headerFields[3]));\n return EVMProofHelper.getStorageValues(target, commands, constants, stateRoot, stateProof);\n }\n}\n" + }, + "@eth-optimism/contracts-bedrock/src/libraries/Bytes.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/// @title Bytes\n/// @notice Bytes is a library for manipulating byte arrays.\nlibrary Bytes {\n /// @custom:attribution https://github.com/GNSPS/solidity-bytes-utils\n /// @notice Slices a byte array with a given starting index and length. Returns a new byte array\n /// as opposed to a pointer to the original array. Will throw if trying to slice more\n /// bytes than exist in the array.\n /// @param _bytes Byte array to slice.\n /// @param _start Starting index of the slice.\n /// @param _length Length of the slice.\n /// @return Slice of the input byte array.\n function slice(bytes memory _bytes, uint256 _start, uint256 _length) internal pure returns (bytes memory) {\n unchecked {\n require(_length + 31 >= _length, \"slice_overflow\");\n require(_start + _length >= _start, \"slice_overflow\");\n require(_bytes.length >= _start + _length, \"slice_outOfBounds\");\n }\n\n bytes memory tempBytes;\n\n assembly {\n switch iszero(_length)\n case 0 {\n // Get a location of some free memory and store it in tempBytes as\n // Solidity does for memory variables.\n tempBytes := mload(0x40)\n\n // The first word of the slice result is potentially a partial\n // word read from the original array. To read it, we calculate\n // the length of that partial word and start copying that many\n // bytes into the array. The first word we copy will start with\n // data we don't care about, but the last `lengthmod` bytes will\n // land at the beginning of the contents of the new array. When\n // we're done copying, we overwrite the full first word with\n // the actual length of the slice.\n let lengthmod := and(_length, 31)\n\n // The multiplication in the next line is necessary\n // because when slicing multiples of 32 bytes (lengthmod == 0)\n // the following copy loop was copying the origin's length\n // and then ending prematurely not copying everything it should.\n let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod)))\n let end := add(mc, _length)\n\n for {\n // The multiplication in the next line has the same exact purpose\n // as the one above.\n let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start)\n } lt(mc, end) {\n mc := add(mc, 0x20)\n cc := add(cc, 0x20)\n } { mstore(mc, mload(cc)) }\n\n mstore(tempBytes, _length)\n\n //update free-memory pointer\n //allocating the array padded to 32 bytes like the compiler does now\n mstore(0x40, and(add(mc, 31), not(31)))\n }\n //if we want a zero-length slice let's just return a zero-length array\n default {\n tempBytes := mload(0x40)\n\n //zero out the 32 bytes slice we are about to return\n //we need to do it because Solidity does not garbage collect\n mstore(tempBytes, 0)\n\n mstore(0x40, add(tempBytes, 0x20))\n }\n }\n\n return tempBytes;\n }\n\n /// @notice Slices a byte array with a given starting index up to the end of the original byte\n /// array. Returns a new array rathern than a pointer to the original.\n /// @param _bytes Byte array to slice.\n /// @param _start Starting index of the slice.\n /// @return Slice of the input byte array.\n function slice(bytes memory _bytes, uint256 _start) internal pure returns (bytes memory) {\n if (_start >= _bytes.length) {\n return bytes(\"\");\n }\n return slice(_bytes, _start, _bytes.length - _start);\n }\n\n /// @notice Converts a byte array into a nibble array by splitting each byte into two nibbles.\n /// Resulting nibble array will be exactly twice as long as the input byte array.\n /// @param _bytes Input byte array to convert.\n /// @return Resulting nibble array.\n function toNibbles(bytes memory _bytes) internal pure returns (bytes memory) {\n bytes memory _nibbles;\n assembly {\n // Grab a free memory offset for the new array\n _nibbles := mload(0x40)\n\n // Load the length of the passed bytes array from memory\n let bytesLength := mload(_bytes)\n\n // Calculate the length of the new nibble array\n // This is the length of the input array times 2\n let nibblesLength := shl(0x01, bytesLength)\n\n // Update the free memory pointer to allocate memory for the new array.\n // To do this, we add the length of the new array + 32 bytes for the array length\n // rounded up to the nearest 32 byte boundary to the current free memory pointer.\n mstore(0x40, add(_nibbles, and(not(0x1F), add(nibblesLength, 0x3F))))\n\n // Store the length of the new array in memory\n mstore(_nibbles, nibblesLength)\n\n // Store the memory offset of the _bytes array's contents on the stack\n let bytesStart := add(_bytes, 0x20)\n\n // Store the memory offset of the nibbles array's contents on the stack\n let nibblesStart := add(_nibbles, 0x20)\n\n // Loop through each byte in the input array\n for { let i := 0x00 } lt(i, bytesLength) { i := add(i, 0x01) } {\n // Get the starting offset of the next 2 bytes in the nibbles array\n let offset := add(nibblesStart, shl(0x01, i))\n // Load the byte at the current index within the `_bytes` array\n let b := byte(0x00, mload(add(bytesStart, i)))\n\n // Pull out the first nibble and store it in the new array\n mstore8(offset, shr(0x04, b))\n // Pull out the second nibble and store it in the new array\n mstore8(add(offset, 0x01), and(b, 0x0F))\n }\n }\n return _nibbles;\n }\n\n /// @notice Compares two byte arrays by comparing their keccak256 hashes.\n /// @param _bytes First byte array to compare.\n /// @param _other Second byte array to compare.\n /// @return True if the two byte arrays are equal, false otherwise.\n function equal(bytes memory _bytes, bytes memory _other) internal pure returns (bool) {\n return keccak256(_bytes) == keccak256(_other);\n }\n}\n" + }, + "@eth-optimism/contracts-bedrock/src/libraries/rlp/RLPReader.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.8;\n\n/// @custom:attribution https://github.com/hamdiallam/Solidity-RLP\n/// @title RLPReader\n/// @notice RLPReader is a library for parsing RLP-encoded byte arrays into Solidity types. Adapted\n/// from Solidity-RLP (https://github.com/hamdiallam/Solidity-RLP) by Hamdi Allam with\n/// various tweaks to improve readability.\nlibrary RLPReader {\n /// @notice Custom pointer type to avoid confusion between pointers and uint256s.\n type MemoryPointer is uint256;\n\n /// @notice RLP item types.\n /// @custom:value DATA_ITEM Represents an RLP data item (NOT a list).\n /// @custom:value LIST_ITEM Represents an RLP list item.\n enum RLPItemType {\n DATA_ITEM,\n LIST_ITEM\n }\n\n /// @notice Struct representing an RLP item.\n /// @custom:field length Length of the RLP item.\n /// @custom:field ptr Pointer to the RLP item in memory.\n struct RLPItem {\n uint256 length;\n MemoryPointer ptr;\n }\n\n /// @notice Max list length that this library will accept.\n uint256 internal constant MAX_LIST_LENGTH = 32;\n\n /// @notice Converts bytes to a reference to memory position and length.\n /// @param _in Input bytes to convert.\n /// @return out_ Output memory reference.\n function toRLPItem(bytes memory _in) internal pure returns (RLPItem memory out_) {\n // Empty arrays are not RLP items.\n require(_in.length > 0, \"RLPReader: length of an RLP item must be greater than zero to be decodable\");\n\n MemoryPointer ptr;\n assembly {\n ptr := add(_in, 32)\n }\n\n out_ = RLPItem({ length: _in.length, ptr: ptr });\n }\n\n /// @notice Reads an RLP list value into a list of RLP items.\n /// @param _in RLP list value.\n /// @return out_ Decoded RLP list items.\n function readList(RLPItem memory _in) internal pure returns (RLPItem[] memory out_) {\n (uint256 listOffset, uint256 listLength, RLPItemType itemType) = _decodeLength(_in);\n\n require(itemType == RLPItemType.LIST_ITEM, \"RLPReader: decoded item type for list is not a list item\");\n\n require(listOffset + listLength == _in.length, \"RLPReader: list item has an invalid data remainder\");\n\n // Solidity in-memory arrays can't be increased in size, but *can* be decreased in size by\n // writing to the length. Since we can't know the number of RLP items without looping over\n // the entire input, we'd have to loop twice to accurately size this array. It's easier to\n // simply set a reasonable maximum list length and decrease the size before we finish.\n out_ = new RLPItem[](MAX_LIST_LENGTH);\n\n uint256 itemCount = 0;\n uint256 offset = listOffset;\n while (offset < _in.length) {\n (uint256 itemOffset, uint256 itemLength,) = _decodeLength(\n RLPItem({ length: _in.length - offset, ptr: MemoryPointer.wrap(MemoryPointer.unwrap(_in.ptr) + offset) })\n );\n\n // We don't need to check itemCount < out.length explicitly because Solidity already\n // handles this check on our behalf, we'd just be wasting gas.\n out_[itemCount] = RLPItem({\n length: itemLength + itemOffset,\n ptr: MemoryPointer.wrap(MemoryPointer.unwrap(_in.ptr) + offset)\n });\n\n itemCount += 1;\n offset += itemOffset + itemLength;\n }\n\n // Decrease the array size to match the actual item count.\n assembly {\n mstore(out_, itemCount)\n }\n }\n\n /// @notice Reads an RLP list value into a list of RLP items.\n /// @param _in RLP list value.\n /// @return out_ Decoded RLP list items.\n function readList(bytes memory _in) internal pure returns (RLPItem[] memory out_) {\n out_ = readList(toRLPItem(_in));\n }\n\n /// @notice Reads an RLP bytes value into bytes.\n /// @param _in RLP bytes value.\n /// @return out_ Decoded bytes.\n function readBytes(RLPItem memory _in) internal pure returns (bytes memory out_) {\n (uint256 itemOffset, uint256 itemLength, RLPItemType itemType) = _decodeLength(_in);\n\n require(itemType == RLPItemType.DATA_ITEM, \"RLPReader: decoded item type for bytes is not a data item\");\n\n require(_in.length == itemOffset + itemLength, \"RLPReader: bytes value contains an invalid remainder\");\n\n out_ = _copy(_in.ptr, itemOffset, itemLength);\n }\n\n /// @notice Reads an RLP bytes value into bytes.\n /// @param _in RLP bytes value.\n /// @return out_ Decoded bytes.\n function readBytes(bytes memory _in) internal pure returns (bytes memory out_) {\n out_ = readBytes(toRLPItem(_in));\n }\n\n /// @notice Reads the raw bytes of an RLP item.\n /// @param _in RLP item to read.\n /// @return out_ Raw RLP bytes.\n function readRawBytes(RLPItem memory _in) internal pure returns (bytes memory out_) {\n out_ = _copy(_in.ptr, 0, _in.length);\n }\n\n /// @notice Decodes the length of an RLP item.\n /// @param _in RLP item to decode.\n /// @return offset_ Offset of the encoded data.\n /// @return length_ Length of the encoded data.\n /// @return type_ RLP item type (LIST_ITEM or DATA_ITEM).\n function _decodeLength(RLPItem memory _in)\n private\n pure\n returns (uint256 offset_, uint256 length_, RLPItemType type_)\n {\n // Short-circuit if there's nothing to decode, note that we perform this check when\n // the user creates an RLP item via toRLPItem, but it's always possible for them to bypass\n // that function and create an RLP item directly. So we need to check this anyway.\n require(_in.length > 0, \"RLPReader: length of an RLP item must be greater than zero to be decodable\");\n\n MemoryPointer ptr = _in.ptr;\n uint256 prefix;\n assembly {\n prefix := byte(0, mload(ptr))\n }\n\n if (prefix <= 0x7f) {\n // Single byte.\n return (0, 1, RLPItemType.DATA_ITEM);\n } else if (prefix <= 0xb7) {\n // Short string.\n\n // slither-disable-next-line variable-scope\n uint256 strLen = prefix - 0x80;\n\n require(\n _in.length > strLen, \"RLPReader: length of content must be greater than string length (short string)\"\n );\n\n bytes1 firstByteOfContent;\n assembly {\n firstByteOfContent := and(mload(add(ptr, 1)), shl(248, 0xff))\n }\n\n require(\n strLen != 1 || firstByteOfContent >= 0x80,\n \"RLPReader: invalid prefix, single byte < 0x80 are not prefixed (short string)\"\n );\n\n return (1, strLen, RLPItemType.DATA_ITEM);\n } else if (prefix <= 0xbf) {\n // Long string.\n uint256 lenOfStrLen = prefix - 0xb7;\n\n require(\n _in.length > lenOfStrLen,\n \"RLPReader: length of content must be > than length of string length (long string)\"\n );\n\n bytes1 firstByteOfContent;\n assembly {\n firstByteOfContent := and(mload(add(ptr, 1)), shl(248, 0xff))\n }\n\n require(\n firstByteOfContent != 0x00, \"RLPReader: length of content must not have any leading zeros (long string)\"\n );\n\n uint256 strLen;\n assembly {\n strLen := shr(sub(256, mul(8, lenOfStrLen)), mload(add(ptr, 1)))\n }\n\n require(strLen > 55, \"RLPReader: length of content must be greater than 55 bytes (long string)\");\n\n require(\n _in.length > lenOfStrLen + strLen,\n \"RLPReader: length of content must be greater than total length (long string)\"\n );\n\n return (1 + lenOfStrLen, strLen, RLPItemType.DATA_ITEM);\n } else if (prefix <= 0xf7) {\n // Short list.\n // slither-disable-next-line variable-scope\n uint256 listLen = prefix - 0xc0;\n\n require(_in.length > listLen, \"RLPReader: length of content must be greater than list length (short list)\");\n\n return (1, listLen, RLPItemType.LIST_ITEM);\n } else {\n // Long list.\n uint256 lenOfListLen = prefix - 0xf7;\n\n require(\n _in.length > lenOfListLen,\n \"RLPReader: length of content must be > than length of list length (long list)\"\n );\n\n bytes1 firstByteOfContent;\n assembly {\n firstByteOfContent := and(mload(add(ptr, 1)), shl(248, 0xff))\n }\n\n require(\n firstByteOfContent != 0x00, \"RLPReader: length of content must not have any leading zeros (long list)\"\n );\n\n uint256 listLen;\n assembly {\n listLen := shr(sub(256, mul(8, lenOfListLen)), mload(add(ptr, 1)))\n }\n\n require(listLen > 55, \"RLPReader: length of content must be greater than 55 bytes (long list)\");\n\n require(\n _in.length > lenOfListLen + listLen,\n \"RLPReader: length of content must be greater than total length (long list)\"\n );\n\n return (1 + lenOfListLen, listLen, RLPItemType.LIST_ITEM);\n }\n }\n\n /// @notice Copies the bytes from a memory location.\n /// @param _src Pointer to the location to read from.\n /// @param _offset Offset to start reading from.\n /// @param _length Number of bytes to read.\n /// @return out_ Copied bytes.\n function _copy(MemoryPointer _src, uint256 _offset, uint256 _length) private pure returns (bytes memory out_) {\n out_ = new bytes(_length);\n if (_length == 0) {\n return out_;\n }\n\n // Mostly based on Solidity's copy_memory_to_memory:\n // solhint-disable max-line-length\n // https://github.com/ethereum/solidity/blob/34dd30d71b4da730488be72ff6af7083cf2a91f6/libsolidity/codegen/YulUtilFunctions.cpp#L102-L114\n uint256 src = MemoryPointer.unwrap(_src) + _offset;\n assembly {\n let dest := add(out_, 32)\n let i := 0\n for { } lt(i, _length) { i := add(i, 32) } { mstore(add(dest, i), mload(add(src, i))) }\n\n if gt(i, _length) { mstore(add(dest, _length), 0) }\n }\n }\n}\n" + }, + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor() {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby disabling any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "@openzeppelin/contracts/interfaces/IERC1271.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1271.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC1271 standard signature validation method for\n * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271].\n *\n * _Available since v4.1._\n */\ninterface IERC1271 {\n /**\n * @dev Should return whether the signature provided is valid for the provided data\n * @param hash Hash of the data to be signed\n * @param signature Signature byte array associated with _data\n */\n function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue);\n}\n" + }, + "@openzeppelin/contracts/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n *\n * Furthermore, `isContract` will also return true if the target contract within\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n * which only has an effect at the end of a transaction.\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n function _contextSuffixLength() internal view virtual returns (uint256) {\n return 0;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/cryptography/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../Strings.sol\";\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSA {\n enum RecoverError {\n NoError,\n InvalidSignature,\n InvalidSignatureLength,\n InvalidSignatureS,\n InvalidSignatureV // Deprecated in v4.8\n }\n\n function _throwError(RecoverError error) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert(\"ECDSA: invalid signature\");\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert(\"ECDSA: invalid signature length\");\n } else if (error == RecoverError.InvalidSignatureS) {\n revert(\"ECDSA: invalid signature 's' value\");\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature` or error string. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n *\n * Documentation for signature generation:\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\n if (signature.length == 65) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n /// @solidity memory-safe-assembly\n assembly {\n r := mload(add(signature, 0x20))\n s := mload(add(signature, 0x40))\n v := byte(0, mload(add(signature, 0x60)))\n }\n return tryRecover(hash, v, r, s);\n } else {\n return (address(0), RecoverError.InvalidSignatureLength);\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature`. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, signature);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n *\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) {\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n uint8 v = uint8((uint256(vs) >> 255) + 27);\n return tryRecover(hash, v, r, s);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n *\n * _Available since v4.2._\n */\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n * `r` and `s` signature fields separately.\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS);\n }\n\n // If the signature is valid (and not malleable), return the signer address\n address signer = ecrecover(hash, v, r, s);\n if (signer == address(0)) {\n return (address(0), RecoverError.InvalidSignature);\n }\n\n return (signer, RecoverError.NoError);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `v`,\n * `r` and `s` signature fields separately.\n */\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 message) {\n // 32 is the length in bytes of hash,\n // enforced by the type signature above\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x00, \"\\x19Ethereum Signed Message:\\n32\")\n mstore(0x1c, hash)\n message := keccak256(0x00, 0x3c)\n }\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from `s`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n\", Strings.toString(s.length), s));\n }\n\n /**\n * @dev Returns an Ethereum Signed Typed Data, created from a\n * `domainSeparator` and a `structHash`. This produces hash corresponding\n * to the one signed with the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\n * JSON-RPC method as part of EIP-712.\n *\n * See {recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 data) {\n /// @solidity memory-safe-assembly\n assembly {\n let ptr := mload(0x40)\n mstore(ptr, \"\\x19\\x01\")\n mstore(add(ptr, 0x02), domainSeparator)\n mstore(add(ptr, 0x22), structHash)\n data := keccak256(ptr, 0x42)\n }\n }\n\n /**\n * @dev Returns an Ethereum Signed Data with intended validator, created from a\n * `validator` and `data` according to the version 0 of EIP-191.\n *\n * See {recover}.\n */\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19\\x00\", validator, data));\n }\n}\n" + }, + "@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/SignatureChecker.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./ECDSA.sol\";\nimport \"../../interfaces/IERC1271.sol\";\n\n/**\n * @dev Signature verification helper that can be used instead of `ECDSA.recover` to seamlessly support both ECDSA\n * signatures from externally owned accounts (EOAs) as well as ERC1271 signatures from smart contract wallets like\n * Argent and Gnosis Safe.\n *\n * _Available since v4.1._\n */\nlibrary SignatureChecker {\n /**\n * @dev Checks if a signature is valid for a given signer and data hash. If the signer is a smart contract, the\n * signature is validated against that smart contract using ERC1271, otherwise it's validated using `ECDSA.recover`.\n *\n * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus\n * change through time. It could return true at block N and false at block N+1 (or the opposite).\n */\n function isValidSignatureNow(address signer, bytes32 hash, bytes memory signature) internal view returns (bool) {\n (address recovered, ECDSA.RecoverError error) = ECDSA.tryRecover(hash, signature);\n return\n (error == ECDSA.RecoverError.NoError && recovered == signer) ||\n isValidERC1271SignatureNow(signer, hash, signature);\n }\n\n /**\n * @dev Checks if a signature is valid for a given signer and data hash. The signature is validated\n * against the signer smart contract using ERC1271.\n *\n * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus\n * change through time. It could return true at block N and false at block N+1 (or the opposite).\n */\n function isValidERC1271SignatureNow(\n address signer,\n bytes32 hash,\n bytes memory signature\n ) internal view returns (bool) {\n (bool success, bytes memory result) = signer.staticcall(\n abi.encodeWithSelector(IERC1271.isValidSignature.selector, hash, signature)\n );\n return (success &&\n result.length >= 32 &&\n abi.decode(result, (bytes32)) == bytes32(IERC1271.isValidSignature.selector));\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/ERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n *\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\n */\nabstract contract ERC165 is IERC165 {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/math/Math.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n enum Rounding {\n Down, // Toward negative infinity\n Up, // Toward infinity\n Zero // Toward zero\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n }\n\n /**\n * @dev Returns the ceiling of the division of two numbers.\n *\n * This differs from standard division with `/` in that it rounds up instead\n * of rounding down.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b - 1) / b can overflow on addition, so we distribute.\n return a == 0 ? 0 : (a - 1) / b + 1;\n }\n\n /**\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\n * with further edits by Uniswap Labs also under MIT license.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\n unchecked {\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n // variables such that product = prod1 * 2^256 + prod0.\n uint256 prod0; // Least significant 256 bits of the product\n uint256 prod1; // Most significant 256 bits of the product\n assembly {\n let mm := mulmod(x, y, not(0))\n prod0 := mul(x, y)\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n }\n\n // Handle non-overflow cases, 256 by 256 division.\n if (prod1 == 0) {\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\n // The surrounding unchecked block does not change this fact.\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\n return prod0 / denominator;\n }\n\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\n require(denominator > prod1, \"Math: mulDiv overflow\");\n\n ///////////////////////////////////////////////\n // 512 by 256 division.\n ///////////////////////////////////////////////\n\n // Make division exact by subtracting the remainder from [prod1 prod0].\n uint256 remainder;\n assembly {\n // Compute remainder using mulmod.\n remainder := mulmod(x, y, denominator)\n\n // Subtract 256 bit number from 512 bit number.\n prod1 := sub(prod1, gt(remainder, prod0))\n prod0 := sub(prod0, remainder)\n }\n\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\n // See https://cs.stackexchange.com/q/138556/92363.\n\n // Does not overflow because the denominator cannot be zero at this stage in the function.\n uint256 twos = denominator & (~denominator + 1);\n assembly {\n // Divide denominator by twos.\n denominator := div(denominator, twos)\n\n // Divide [prod1 prod0] by twos.\n prod0 := div(prod0, twos)\n\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\n twos := add(div(sub(0, twos), twos), 1)\n }\n\n // Shift in bits from prod1 into prod0.\n prod0 |= prod1 * twos;\n\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\n // four bits. That is, denominator * inv = 1 mod 2^4.\n uint256 inverse = (3 * denominator) ^ 2;\n\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\n // in modular arithmetic, doubling the correct bits in each step.\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\n\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\n // is no longer required.\n result = prod0 * inverse;\n return result;\n }\n }\n\n /**\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\n uint256 result = mulDiv(x, y, denominator);\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\n result += 1;\n }\n return result;\n }\n\n /**\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 128;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 64;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 32;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 16;\n }\n if (value >> 8 > 0) {\n value >>= 8;\n result += 8;\n }\n if (value >> 4 > 0) {\n value >>= 4;\n result += 4;\n }\n if (value >> 2 > 0) {\n value >>= 2;\n result += 2;\n }\n if (value >> 1 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log2(value);\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >= 10 ** 64) {\n value /= 10 ** 64;\n result += 64;\n }\n if (value >= 10 ** 32) {\n value /= 10 ** 32;\n result += 32;\n }\n if (value >= 10 ** 16) {\n value /= 10 ** 16;\n result += 16;\n }\n if (value >= 10 ** 8) {\n value /= 10 ** 8;\n result += 8;\n }\n if (value >= 10 ** 4) {\n value /= 10 ** 4;\n result += 4;\n }\n if (value >= 10 ** 2) {\n value /= 10 ** 2;\n result += 2;\n }\n if (value >= 10 ** 1) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log10(value);\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256, rounded down, of a positive value.\n * Returns 0 if given 0.\n *\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n */\n function log256(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 16;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 8;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 4;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 2;\n }\n if (value >> 8 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log256(value);\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/math/SignedMath.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMath {\n /**\n * @dev Returns the largest of two signed numbers.\n */\n function max(int256 a, int256 b) internal pure returns (int256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two signed numbers.\n */\n function min(int256 a, int256 b) internal pure returns (int256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two signed numbers without overflow.\n * The result is rounded towards zero.\n */\n function average(int256 a, int256 b) internal pure returns (int256) {\n // Formula from the book \"Hacker's Delight\"\n int256 x = (a & b) + ((a ^ b) >> 1);\n return x + (int256(uint256(x) >> 255) & (a ^ b));\n }\n\n /**\n * @dev Returns the absolute unsigned value of a signed value.\n */\n function abs(int256 n) internal pure returns (uint256) {\n unchecked {\n // must be unchecked in order to support `n = type(int256).min`\n return uint256(n >= 0 ? n : -n);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./math/Math.sol\";\nimport \"./math/SignedMath.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant _SYMBOLS = \"0123456789abcdef\";\n uint8 private constant _ADDRESS_LENGTH = 20;\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n unchecked {\n uint256 length = Math.log10(value) + 1;\n string memory buffer = new string(length);\n uint256 ptr;\n /// @solidity memory-safe-assembly\n assembly {\n ptr := add(buffer, add(32, length))\n }\n while (true) {\n ptr--;\n /// @solidity memory-safe-assembly\n assembly {\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\n }\n value /= 10;\n if (value == 0) break;\n }\n return buffer;\n }\n }\n\n /**\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\n */\n function toString(int256 value) internal pure returns (string memory) {\n return string(abi.encodePacked(value < 0 ? \"-\" : \"\", toString(SignedMath.abs(value))));\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n unchecked {\n return toHexString(value, Math.log256(value) + 1);\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = _SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\n }\n\n /**\n * @dev Returns true if the two strings are equal.\n */\n function equal(string memory a, string memory b) internal pure returns (bool) {\n return keccak256(bytes(a)) == keccak256(bytes(b));\n }\n}\n" + }, + "contracts/DefaultReverseResolver.sol": { + "content": "pragma solidity >=0.8.4;\n\nimport \"./IDefaultReverseResolver.sol\";\nimport \"@ensdomains/ens-contracts/contracts/reverseRegistrar/SignatureReverseResolver.sol\";\nimport \"@ensdomains/ens-contracts/contracts/wrapper/BytesUtils.sol\";\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\n\n/**\n * A fallback reverser resolver to resolve when L2 reverse resolver has no names set.\n * The contract will be set under \"default.reverse\" namespace\n * It can only be set by EOA as contract accounts are chain dependent.\n */\ncontract DefaultReverseResolver is\n Ownable,\n IDefaultReverseResolver,\n ERC165,\n SignatureReverseResolver\n{\n using ECDSA for bytes32;\n using BytesUtils for bytes;\n // The namehash of 'default.reverse'\n bytes32 private constant DEFAULT_REVERSE_NODE =\n 0x53a2e7cce84726721578c676b4798972d354dd7c62c832415371716693edd312;\n\n /**\n * @dev Constructor\n */\n constructor() SignatureReverseResolver(DEFAULT_REVERSE_NODE, 0) {}\n\n function isAuthorised(address addr) internal view override returns (bool) {\n if (addr != msg.sender) {\n revert Unauthorised();\n }\n }\n\n /*\n * Returns the name associated with an address, for reverse records.\n * This function is non ENSIP standard\n * @param address The ENS address to query.\n * @return The associated name.\n */\n function name(address addr) public view returns (string memory) {\n bytes32 node = _getNamehash(addr);\n return versionable_names[recordVersions[node]][node];\n }\n\n /*\n * Returns the text data associated with an address and key.\n * @param address The ENS address to query.\n * @param key The text data key to query.\n * @return The associated text data.\n */\n function text(\n address addr,\n string memory key\n ) public view returns (string memory) {\n bytes32 node = _getNamehash(addr);\n return versionable_texts[recordVersions[node]][node][key];\n }\n\n function supportsInterface(\n bytes4 interfaceID\n ) public view override(ERC165, SignatureReverseResolver) returns (bool) {\n return\n interfaceID == type(IDefaultReverseResolver).interfaceId ||\n super.supportsInterface(interfaceID);\n }\n}\n" + }, + "contracts/deps.sol": { + "content": "import {L1Verifier} from '@ensdomains/l1-verifier/contracts/L1Verifier.sol';\nimport '@ensdomains/ens-contracts/contracts/reverseRegistrar/L2ReverseRegistrar.sol';\nimport '@ensdomains/ens-contracts/contracts/resolvers/profiles/IVersionableResolver.sol';\n// Storage slot\n// ┌────────────────────┬───────────────────┬──────────────┬\n// │ contract │ state_variable │ storage_slot │\n// ├────────────────────┼───────────────────┼──────────────┼\n// │ L2ReverseRegistrar │ _owner │ 0 │\n// │ L2ReverseRegistrar │ lastUpdated │ 1 │\n// │ L2ReverseRegistrar │ versionable_texts │ 2 │\n// │ L2ReverseRegistrar │ versionable_names │ 3 │\n// │ L2ReverseRegistrar │ recordVersions │ 4 │\n" + }, + "contracts/IDefaultReverseResolver.sol": { + "content": "pragma solidity >=0.8.4;\n\ninterface IDefaultReverseResolver {\n function name(address addr) external view returns (string memory);\n\n function text(\n address addr,\n string memory key\n ) external view returns (string memory);\n}\n" + }, + "contracts/L1ReverseResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\nimport {EVMFetcher} from '@ensdomains/evm-verifier/contracts/EVMFetcher.sol';\nimport {EVMFetchTarget} from '@ensdomains/evm-verifier/contracts/EVMFetchTarget.sol';\nimport {IEVMVerifier} from '@ensdomains/evm-verifier/contracts/IEVMVerifier.sol';\nimport \"@ensdomains/ens-contracts/contracts/resolvers/profiles/INameResolver.sol\";\nimport \"@ensdomains/ens-contracts/contracts/resolvers/profiles/ITextResolver.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\nimport \"@ensdomains/ens-contracts/contracts/utils/HexUtils.sol\";\nimport \"@ensdomains/ens-contracts/contracts/resolvers/profiles/IExtendedResolver.sol\";\nimport \"./IDefaultReverseResolver.sol\";\n\ncontract L1ReverseResolver is EVMFetchTarget, IExtendedResolver, ERC165 {\n using EVMFetcher for EVMFetcher.EVMFetchRequest;\n IEVMVerifier immutable verifier;\n address immutable target;\n IDefaultReverseResolver immutable defaultReverseResolver;\n uint256 constant VERSIONABLE_TEXTS_SLOT = 2;\n uint256 constant VERSIONABLE_NAME_SLOT = 3;\n uint256 constant RECORD_VERSIONS_SLOT = 4;\n uint256 constant ADDRESS_LENGTH = 40;\n using HexUtils for bytes;\n\n constructor(IEVMVerifier _verifier, address _target, IDefaultReverseResolver _defaultReverseResolver ) {\n verifier = _verifier;\n target = _target;\n defaultReverseResolver = _defaultReverseResolver;\n }\n\n /** \n * @dev Resolve and verify a record stored in l2 target address. It supports fallback to the default resolver\n * @param name DNS encoded ENS name to query\n * @param data The actual calldata\n * @return result result of the call\n */\n function resolve(bytes calldata name, bytes calldata data) external view returns (bytes memory result) {\n bytes4 selector = bytes4(data);\n (address addr,) = HexUtils.hexToAddress(name, 1, ADDRESS_LENGTH + 1);\n if (selector == INameResolver.name.selector) {\n (bytes32 node) = abi.decode(data[4:], (bytes32));\n return bytes(_name(node, addr));\n }\n if (selector == ITextResolver.text.selector) {\n (bytes32 node, string memory key) = abi.decode(data[4:], (bytes32, string));\n return bytes(_text(node, key, addr));\n }\n }\n\n function _name(bytes32 node, address addr) private view returns (string memory) {\n EVMFetcher.newFetchRequest(verifier, target)\n .getStatic(RECORD_VERSIONS_SLOT)\n .element(node)\n .getDynamic(VERSIONABLE_NAME_SLOT)\n .ref(0)\n .element(node)\n .fetch(this.nameCallback.selector, abi.encode(addr));\n }\n\n function nameCallback(\n bytes[] memory values,\n bytes memory callbackdata\n ) public view returns (string memory) { \n if(values[1].length == 0 ){\n (address addr) = abi.decode(callbackdata, (address));\n return defaultReverseResolver.name(addr);\n }else{\n return string(values[1]);\n }\n }\n\n function _text(\n bytes32 node,\n string memory key,\n address addr\n ) private view returns (string memory) {\n EVMFetcher.newFetchRequest(verifier, target)\n .getStatic(RECORD_VERSIONS_SLOT)\n .element(node)\n .getDynamic(VERSIONABLE_TEXTS_SLOT)\n .ref(0)\n .element(node)\n .element(key)\n .fetch(this.textCallback.selector, abi.encode(addr, key));\n }\n\n function textCallback(\n bytes[] memory values,\n bytes memory callbackdata\n ) public view returns (string memory) {\n if(values[1].length == 0 ){\n (address addr, string memory key) = abi.decode(callbackdata, (address, string));\n return defaultReverseResolver.text(addr, key);\n }else{\n return string(values[1]);\n }\n }\n\n function supportsInterface(\n bytes4 interfaceId\n ) public override view returns (bool) {\n return\n interfaceId == type(IExtendedResolver).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": false, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates", + "storageLayout" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/crosschain-reverse-resolver/deployments/sepolia/solcInputs/82230a92851c1800498f571d3f1bd7cb.json b/crosschain-reverse-resolver/deployments/sepolia/solcInputs/82230a92851c1800498f571d3f1bd7cb.json new file mode 100644 index 00000000..825eecb6 --- /dev/null +++ b/crosschain-reverse-resolver/deployments/sepolia/solcInputs/82230a92851c1800498f571d3f1bd7cb.json @@ -0,0 +1,126 @@ +{ + "language": "Solidity", + "sources": { + "@ensdomains/ens-contracts/contracts/registry/ENS.sol": { + "content": "pragma solidity >=0.8.4;\n\ninterface ENS {\n // Logged when the owner of a node assigns a new owner to a subnode.\n event NewOwner(bytes32 indexed node, bytes32 indexed label, address owner);\n\n // Logged when the owner of a node transfers ownership to a new account.\n event Transfer(bytes32 indexed node, address owner);\n\n // Logged when the resolver for a node changes.\n event NewResolver(bytes32 indexed node, address resolver);\n\n // Logged when the TTL of a node changes\n event NewTTL(bytes32 indexed node, uint64 ttl);\n\n // Logged when an operator is added or removed.\n event ApprovalForAll(\n address indexed owner,\n address indexed operator,\n bool approved\n );\n\n function setRecord(\n bytes32 node,\n address owner,\n address resolver,\n uint64 ttl\n ) external;\n\n function setSubnodeRecord(\n bytes32 node,\n bytes32 label,\n address owner,\n address resolver,\n uint64 ttl\n ) external;\n\n function setSubnodeOwner(\n bytes32 node,\n bytes32 label,\n address owner\n ) external returns (bytes32);\n\n function setResolver(bytes32 node, address resolver) external;\n\n function setOwner(bytes32 node, address owner) external;\n\n function setTTL(bytes32 node, uint64 ttl) external;\n\n function setApprovalForAll(address operator, bool approved) external;\n\n function owner(bytes32 node) external view returns (address);\n\n function resolver(bytes32 node) external view returns (address);\n\n function ttl(bytes32 node) external view returns (uint64);\n\n function recordExists(bytes32 node) external view returns (bool);\n\n function isApprovedForAll(\n address owner,\n address operator\n ) external view returns (bool);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/IMulticallable.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\ninterface IMulticallable {\n function multicall(\n bytes[] calldata data\n ) external returns (bytes[] memory results);\n\n function multicallWithNodeCheck(\n bytes32,\n bytes[] calldata data\n ) external returns (bytes[] memory results);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/Multicallable.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\nimport \"./IMulticallable.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\n\nabstract contract Multicallable is IMulticallable, ERC165 {\n function _multicall(\n bytes32 nodehash,\n bytes[] calldata data\n ) internal returns (bytes[] memory results) {\n results = new bytes[](data.length);\n for (uint256 i = 0; i < data.length; i++) {\n if (nodehash != bytes32(0)) {\n bytes32 txNamehash = bytes32(data[i][4:36]);\n require(\n txNamehash == nodehash,\n \"multicall: All records must have a matching namehash\"\n );\n }\n (bool success, bytes memory result) = address(this).delegatecall(\n data[i]\n );\n require(success);\n results[i] = result;\n }\n return results;\n }\n\n // This function provides an extra security check when called\n // from priviledged contracts (such as EthRegistrarController)\n // that can set records on behalf of the node owners\n function multicallWithNodeCheck(\n bytes32 nodehash,\n bytes[] calldata data\n ) external returns (bytes[] memory results) {\n return _multicall(nodehash, data);\n }\n\n function multicall(\n bytes[] calldata data\n ) public override returns (bytes[] memory results) {\n return _multicall(bytes32(0), data);\n }\n\n function supportsInterface(\n bytes4 interfaceID\n ) public view virtual override returns (bool) {\n return\n interfaceID == type(IMulticallable).interfaceId ||\n super.supportsInterface(interfaceID);\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/INameResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface INameResolver {\n event NameChanged(bytes32 indexed node, string name);\n\n /**\n * Returns the name associated with an ENS node, for reverse records.\n * Defined in EIP181.\n * @param node The ENS node to query.\n * @return The associated name.\n */\n function name(bytes32 node) external view returns (string memory);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/ITextResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface ITextResolver {\n event TextChanged(\n bytes32 indexed node,\n string indexed indexedKey,\n string key,\n string value\n );\n\n /**\n * Returns the text data associated with an ENS node and key.\n * @param node The ENS node to query.\n * @param key The text data key to query.\n * @return The associated text data.\n */\n function text(\n bytes32 node,\n string calldata key\n ) external view returns (string memory);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/IVersionableResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface IVersionableResolver {\n event VersionChanged(bytes32 indexed node, uint64 newVersion);\n\n function recordVersions(bytes32 node) external view returns (uint64);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/reverseRegistrar/IL2ReverseRegistrar.sol": { + "content": "pragma solidity >=0.8.4;\n\ninterface IL2ReverseRegistrar {\n function setName(string memory name) external returns (bytes32);\n\n function setNameForAddr(\n address addr,\n string memory name\n ) external returns (bytes32);\n\n function setNameForAddrWithSignature(\n address addr,\n string memory name,\n uint256 inceptionDate,\n bytes memory signature\n ) external returns (bytes32);\n\n function setNameForAddrWithSignatureAndOwnable(\n address contractAddr,\n address owner,\n string memory name,\n uint256 inceptionDate,\n bytes memory signature\n ) external returns (bytes32);\n\n function setText(\n string calldata key,\n string calldata value\n ) external returns (bytes32);\n\n function setTextForAddr(\n address addr,\n string calldata key,\n string calldata value\n ) external returns (bytes32);\n\n function setTextForAddrWithSignature(\n address addr,\n string calldata key,\n string calldata value,\n uint256 inceptionDate,\n bytes memory signature\n ) external returns (bytes32);\n\n function setTextForAddrWithSignatureAndOwnable(\n address contractAddr,\n address owner,\n string calldata key,\n string calldata value,\n uint256 inceptionDate,\n bytes memory signature\n ) external returns (bytes32);\n\n function clearRecords(address addr) external;\n\n function clearRecordsWithSignature(\n address addr,\n uint256 inceptionDate,\n bytes memory signature\n ) external;\n\n function node(address addr) external view returns (bytes32);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/reverseRegistrar/L2ReverseRegistrar.sol": { + "content": "pragma solidity >=0.8.4;\n\nimport \"../registry/ENS.sol\";\nimport \"./IL2ReverseRegistrar.sol\";\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\";\nimport \"../resolvers/profiles/ITextResolver.sol\";\nimport \"../resolvers/profiles/INameResolver.sol\";\nimport \"../root/Controllable.sol\";\nimport \"../resolvers/Multicallable.sol\";\n\nerror InvalidSignature();\nerror SignatureOutOfDate();\nerror Unauthorised();\nerror NotOwnerOfContract();\n\n// @note Inception date\n// The inception date is in milliseconds, and so will be divided by 1000\n// when comparing to block.timestamp. This means that the date will be\n// rounded down to the nearest second.\n\ncontract L2ReverseRegistrar is\n Multicallable,\n Ownable,\n ITextResolver,\n INameResolver,\n IL2ReverseRegistrar\n{\n using ECDSA for bytes32;\n mapping(bytes32 => uint256) public lastUpdated;\n mapping(uint64 => mapping(bytes32 => mapping(string => string))) versionable_texts;\n mapping(uint64 => mapping(bytes32 => string)) versionable_names;\n mapping(bytes32 => uint64) internal recordVersions;\n event VersionChanged(bytes32 indexed node, uint64 newVersion);\n event ReverseClaimed(address indexed addr, bytes32 indexed node);\n\n bytes32 public immutable L2ReverseNode;\n uint256 public immutable coinType;\n\n // This is the hex encoding of the string 'abcdefghijklmnopqrstuvwxyz'\n // It is used as a constant to lookup the characters of the hex address\n bytes32 constant lookup =\n 0x3031323334353637383961626364656600000000000000000000000000000000;\n\n /**\n * @dev Constructor\n */\n constructor(bytes32 _L2ReverseNode, uint256 _coinType) {\n L2ReverseNode = _L2ReverseNode;\n coinType = _coinType;\n }\n\n modifier authorised(address addr) {\n isAuthorised(addr);\n _;\n }\n\n modifier authorisedSignature(\n bytes32 hash,\n address addr,\n uint256 inceptionDate,\n bytes memory signature\n ) {\n isAuthorisedWithSignature(hash, addr, inceptionDate, signature);\n _;\n }\n\n modifier ownerAndAuthorisedWithSignature(\n bytes32 hash,\n address addr,\n address owner,\n uint256 inceptionDate,\n bytes memory signature\n ) {\n isOwnerAndAuthorisedWithSignature(\n hash,\n addr,\n owner,\n inceptionDate,\n signature\n );\n _;\n }\n\n function isAuthorised(address addr) internal view returns (bool) {\n if (addr != msg.sender && !ownsContract(addr, msg.sender)) {\n revert Unauthorised();\n }\n }\n\n function isAuthorisedWithSignature(\n bytes32 hash,\n address addr,\n uint256 inceptionDate,\n bytes memory signature\n ) internal view returns (bool) {\n bytes32 message = keccak256(\n abi.encodePacked(hash, addr, inceptionDate, coinType)\n ).toEthSignedMessageHash();\n bytes32 node = _getNamehash(addr);\n\n if (!SignatureChecker.isValidSignatureNow(addr, message, signature)) {\n revert InvalidSignature();\n }\n\n if (\n inceptionDate <= lastUpdated[node] || // must be newer than current record\n inceptionDate / 1000 >= block.timestamp // must be in the past\n ) {\n revert SignatureOutOfDate();\n }\n }\n\n function isOwnerAndAuthorisedWithSignature(\n bytes32 hash,\n address addr,\n address owner,\n uint256 inceptionDate,\n bytes memory signature\n ) internal view returns (bool) {\n bytes32 message = keccak256(\n abi.encodePacked(hash, addr, owner, inceptionDate, coinType)\n ).toEthSignedMessageHash();\n bytes32 node = _getNamehash(addr);\n\n if (!ownsContract(addr, owner)) {\n revert NotOwnerOfContract();\n }\n\n if (\n !SignatureChecker.isValidERC1271SignatureNow(\n owner,\n message,\n signature\n )\n ) {\n revert InvalidSignature();\n }\n\n if (\n inceptionDate <= lastUpdated[node] || // must be newer than current record\n inceptionDate / 1000 >= block.timestamp // must be in the past\n ) {\n revert SignatureOutOfDate();\n }\n }\n\n /**\n * @dev Sets the name for an addr using a signature that can be verified with ERC1271.\n * @param addr The reverse record to set\n * @param name The name of the reverse record\n * @param inceptionDate Date from when this signature is valid from\n * @param signature The resolver of the reverse node\n * @return The ENS node hash of the reverse record.\n */\n function setNameForAddrWithSignature(\n address addr,\n string memory name,\n uint256 inceptionDate,\n bytes memory signature\n )\n public\n override\n authorisedSignature(\n keccak256(\n abi.encodePacked(\n IL2ReverseRegistrar.setNameForAddrWithSignature.selector,\n name\n )\n ),\n addr,\n inceptionDate,\n signature\n )\n returns (bytes32)\n {\n bytes32 node = _getNamehash(addr);\n _setName(node, name, inceptionDate);\n emit ReverseClaimed(addr, node);\n return node;\n }\n\n /**\n * @dev Sets the name for a contract that is owned by a SCW using a signature\n * @param contractAddr The reverse node to set\n * @param owner The owner of the contract (via Ownable)\n * @param name The name of the reverse record\n * @param inceptionDate Date from when this signature is valid from\n * @param signature The signature of an address that will return true on isValidSignature for the owner\n * @return The ENS node hash of the reverse record.\n */\n function setNameForAddrWithSignatureAndOwnable(\n address contractAddr,\n address owner,\n string memory name,\n uint256 inceptionDate,\n bytes memory signature\n )\n public\n ownerAndAuthorisedWithSignature(\n keccak256(\n abi.encodePacked(\n IL2ReverseRegistrar\n .setNameForAddrWithSignatureAndOwnable\n .selector,\n name\n )\n ),\n contractAddr,\n owner,\n inceptionDate,\n signature\n )\n returns (bytes32)\n {\n bytes32 node = _getNamehash(contractAddr);\n _setName(node, name, inceptionDate);\n emit ReverseClaimed(contractAddr, node);\n }\n\n /**\n * @dev Sets the `name()` record for the reverse ENS record associated with\n * the calling account.\n * @param name The name to set for this address.\n * @return The ENS node hash of the reverse record.\n */\n function setName(string memory name) public override returns (bytes32) {\n return setNameForAddr(msg.sender, name);\n }\n\n /**\n * @dev Sets the `name()` record for the reverse ENS record associated with\n * the addr provided account.\n * Can be used if the addr is a contract that is owned by a SCW.\n * @param name The name to set for this address.\n * @return The ENS node hash of the reverse record.\n */\n\n function setNameForAddr(\n address addr,\n string memory name\n ) public authorised(addr) returns (bytes32) {\n bytes32 node = _getNamehash(addr);\n _setName(node, name, block.timestamp);\n emit ReverseClaimed(addr, node);\n return node;\n }\n\n /**\n * @dev Sets the name for an addr using a signature that can be verified with ERC1271.\n * @param addr The reverse record to set\n * @param key The key of the text record\n * @param value The value of the text record\n * @param inceptionDate Date from when this signature is valid from\n * @param signature The resolver of the reverse node\n * @return The ENS node hash of the reverse record.\n */\n function setTextForAddrWithSignature(\n address addr,\n string calldata key,\n string calldata value,\n uint256 inceptionDate,\n bytes memory signature\n )\n public\n override\n authorisedSignature(\n keccak256(\n abi.encodePacked(\n IL2ReverseRegistrar.setTextForAddrWithSignature.selector,\n key,\n value\n )\n ),\n addr,\n inceptionDate,\n signature\n )\n returns (bytes32)\n {\n bytes32 node = _getNamehash(addr);\n _setText(node, key, value, inceptionDate);\n return node;\n }\n\n /**\n * @dev Sets the name for a contract that is owned by a SCW using a signature\n * @param contractAddr The reverse node to set\n * @param owner The owner of the contract (via Ownable)\n * @param key The name of the reverse record\n * @param value The name of the reverse record\n * @param inceptionDate Date from when this signature is valid from\n * @param signature The signature of an address that will return true on isValidSignature for the owner\n * @return The ENS node hash of the reverse record.\n */\n function setTextForAddrWithSignatureAndOwnable(\n address contractAddr,\n address owner,\n string calldata key,\n string calldata value,\n uint256 inceptionDate,\n bytes memory signature\n )\n public\n ownerAndAuthorisedWithSignature(\n keccak256(\n abi.encodePacked(\n IL2ReverseRegistrar\n .setTextForAddrWithSignatureAndOwnable\n .selector,\n key,\n value\n )\n ),\n contractAddr,\n owner,\n inceptionDate,\n signature\n )\n returns (bytes32)\n {\n bytes32 node = _getNamehash(contractAddr);\n _setText(node, key, value, inceptionDate);\n }\n\n /**\n * @dev Sets the `name()` record for the reverse ENS record associated with\n * the calling account.\n * @param key The key for this text record.\n * @param value The value to set for this text record.\n * @return The ENS node hash of the reverse record.\n */\n function setText(\n string calldata key,\n string calldata value\n ) public override returns (bytes32) {\n return setTextForAddr(msg.sender, key, value);\n }\n\n /**\n * @dev Sets the `text(key)` record for the reverse ENS record associated with\n * the addr provided account.\n * @param key The key for this text record.\n * @param value The value to set for this text record.\n * @return The ENS node hash of the reverse record.\n */\n\n function setTextForAddr(\n address addr,\n string calldata key,\n string calldata value\n ) public override authorised(addr) returns (bytes32) {\n bytes32 node = _getNamehash(addr);\n _setText(node, key, value, block.timestamp);\n return node;\n }\n\n function _setText(\n bytes32 node,\n string calldata key,\n string calldata value,\n uint256 inceptionDate\n ) internal {\n versionable_texts[recordVersions[node]][node][key] = value;\n _setLastUpdated(node, inceptionDate);\n emit TextChanged(node, key, key, value);\n }\n\n /**\n * Returns the text data associated with an ENS node and key.\n * @param node The ENS node to query.\n * @param key The text data key to query.\n * @return The associated text data.\n */\n function text(\n bytes32 node,\n string calldata key\n ) external view virtual override returns (string memory) {\n return versionable_texts[recordVersions[node]][node][key];\n }\n\n /**\n * Sets the name associated with an ENS node, for reverse records.\n * May only be called by the owner of that node in the ENS registry.\n * @param node The node to update.\n * @param newName name record\n */\n function _setName(\n bytes32 node,\n string memory newName,\n uint256 inceptionDate\n ) internal virtual {\n versionable_names[recordVersions[node]][node] = newName;\n _setLastUpdated(node, inceptionDate);\n emit NameChanged(node, newName);\n }\n\n /**\n * Returns the name associated with an ENS node, for reverse records.\n * Defined in EIP181.\n * @param node The ENS node to query.\n * @return The associated name.\n */\n function name(\n bytes32 node\n ) external view virtual override returns (string memory) {\n return versionable_names[recordVersions[node]][node];\n }\n\n /**\n * Increments the record version associated with an ENS node.\n * May only be called by the owner of that node in the ENS registry.\n * @param addr The node to update.\n */\n function clearRecords(address addr) public virtual authorised(addr) {\n bytes32 labelHash = sha3HexAddress(addr);\n bytes32 reverseNode = keccak256(\n abi.encodePacked(L2ReverseNode, labelHash)\n );\n recordVersions[reverseNode]++;\n emit VersionChanged(reverseNode, recordVersions[reverseNode]);\n }\n\n /**\n * Increments the record version associated with an ENS node.\n * May only be called by the owner of that node in the ENS registry.\n * @param addr The node to update.\n * @param signature A signature proving ownership of the node.\n */\n function clearRecordsWithSignature(\n address addr,\n uint256 inceptionDate,\n bytes memory signature\n )\n public\n virtual\n authorisedSignature(\n keccak256(\n abi.encodePacked(\n IL2ReverseRegistrar.clearRecordsWithSignature.selector\n )\n ),\n addr,\n inceptionDate,\n signature\n )\n {\n bytes32 labelHash = sha3HexAddress(addr);\n bytes32 reverseNode = keccak256(\n abi.encodePacked(L2ReverseNode, labelHash)\n );\n recordVersions[reverseNode]++;\n emit VersionChanged(reverseNode, recordVersions[reverseNode]);\n }\n\n /**\n * @dev Returns the node hash for a given account's reverse records.\n * @param addr The address to hash\n * @return The ENS node hash.\n */\n function node(address addr) public view override returns (bytes32) {\n return keccak256(abi.encodePacked(L2ReverseNode, sha3HexAddress(addr)));\n }\n\n function ownsContract(\n address contractAddr,\n address addr\n ) internal view returns (bool) {\n try Ownable(contractAddr).owner() returns (address owner) {\n return owner == addr;\n } catch {\n return false;\n }\n }\n\n function _getNamehash(address addr) internal view returns (bytes32) {\n bytes32 labelHash = sha3HexAddress(addr);\n return keccak256(abi.encodePacked(L2ReverseNode, labelHash));\n }\n\n function _setLastUpdated(bytes32 node, uint256 inceptionDate) internal {\n lastUpdated[node] = inceptionDate;\n }\n\n /**\n * @dev An optimised function to compute the sha3 of the lower-case\n * hexadecimal representation of an Ethereum address.\n * @param addr The address to hash\n * @return ret The SHA3 hash of the lower-case hexadecimal encoding of the\n * input address.\n */\n function sha3HexAddress(address addr) internal pure returns (bytes32 ret) {\n assembly {\n for {\n let i := 40\n } gt(i, 0) {\n\n } {\n i := sub(i, 1)\n mstore8(i, byte(and(addr, 0xf), lookup))\n addr := div(addr, 0x10)\n i := sub(i, 1)\n mstore8(i, byte(and(addr, 0xf), lookup))\n addr := div(addr, 0x10)\n }\n\n ret := keccak256(0, 40)\n }\n }\n\n function supportsInterface(\n bytes4 interfaceID\n ) public view override(Multicallable) returns (bool) {\n return\n interfaceID == type(IL2ReverseRegistrar).interfaceId ||\n interfaceID == type(ITextResolver).interfaceId ||\n interfaceID == type(INameResolver).interfaceId ||\n super.supportsInterface(interfaceID);\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/root/Controllable.sol": { + "content": "pragma solidity ^0.8.4;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\n\ncontract Controllable is Ownable {\n mapping(address => bool) public controllers;\n\n event ControllerChanged(address indexed controller, bool enabled);\n\n modifier onlyController() {\n require(\n controllers[msg.sender],\n \"Controllable: Caller is not a controller\"\n );\n _;\n }\n\n function setController(address controller, bool enabled) public onlyOwner {\n controllers[controller] = enabled;\n emit ControllerChanged(controller, enabled);\n }\n}\n" + }, + "@ensdomains/evm-verifier/contracts/EVMFetcher.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\nimport { IEVMVerifier } from './IEVMVerifier.sol';\nimport { EVMFetchTarget } from './EVMFetchTarget.sol';\nimport { Address } from '@openzeppelin/contracts/utils/Address.sol';\n\ninterface IEVMGateway {\n function getStorageSlots(address addr, bytes32[] memory commands, bytes[] memory constants) external pure returns(bytes memory witness);\n}\n\nuint8 constant FLAG_DYNAMIC = 0x01;\nuint8 constant OP_CONSTANT = 0x00;\nuint8 constant OP_BACKREF = 0x20;\nuint8 constant OP_END = 0xff;\n\n/**\n * @dev A library to facilitate requesting storage data proofs from contracts, possibly on a different chain.\n * See l1-verifier/test/TestL1.sol for example usage.\n */\nlibrary EVMFetcher {\n uint256 constant MAX_COMMANDS = 32;\n uint256 constant MAX_CONSTANTS = 32; // Must not be greater than 32\n\n using Address for address;\n\n error TooManyCommands(uint256 max);\n error CommandTooLong();\n error InvalidReference(uint256 value, uint256 max);\n error OffchainLookup(address sender, string[] urls, bytes callData, bytes4 callbackFunction, bytes extraData);\n\n struct EVMFetchRequest {\n IEVMVerifier verifier;\n address target;\n bytes32[] commands;\n uint256 operationIdx;\n bytes[] constants;\n }\n\n /**\n * @dev Creates a request to fetch the value of multiple storage slots from a contract via CCIP-Read, possibly from\n * another chain.\n * Supports dynamic length values and slot numbers derived from other retrieved values.\n * @param verifier An instance of a verifier contract that can provide and verify the storage slot information.\n * @param target The address of the contract to fetch storage proofs for.\n */\n function newFetchRequest(IEVMVerifier verifier, address target) internal pure returns (EVMFetchRequest memory) {\n bytes32[] memory commands = new bytes32[](MAX_COMMANDS);\n bytes[] memory constants = new bytes[](MAX_CONSTANTS);\n assembly {\n mstore(commands, 0) // Set current array length to 0\n mstore(constants, 0)\n } \n return EVMFetchRequest(verifier, target, commands, 0, constants);\n }\n\n /**\n * @dev Starts describing a new fetch request.\n * Paths specify a series of hashing operations to derive the final slot ID.\n * See https://docs.soliditylang.org/en/v0.8.17/internals/layout_in_storage.html for details on how Solidity\n * lays out storage variables.\n * @param request The request object being operated on.\n * @param baseSlot The base slot ID that forms the root of the path.\n */\n function getStatic(EVMFetchRequest memory request, uint256 baseSlot) internal pure returns (EVMFetchRequest memory) {\n bytes32[] memory commands = request.commands;\n uint256 commandIdx = commands.length;\n if(commandIdx > 0 && request.operationIdx < 32) {\n // Terminate previous command\n _addOperation(request, OP_END);\n }\n assembly {\n mstore(commands, add(commandIdx, 1)) // Increment command array length\n }\n if(request.commands.length > MAX_COMMANDS) {\n revert TooManyCommands(MAX_COMMANDS);\n }\n request.operationIdx = 0;\n _addOperation(request, 0);\n _addOperation(request, _addConstant(request, abi.encode(baseSlot)));\n return request;\n }\n\n /**\n * @dev Starts describing a new fetch request.\n * Paths specify a series of hashing operations to derive the final slot ID.\n * See https://docs.soliditylang.org/en/v0.8.17/internals/layout_in_storage.html for details on how Solidity\n * lays out storage variables.\n * @param request The request object being operated on.\n * @param baseSlot The base slot ID that forms the root of the path.\n */\n function getDynamic(EVMFetchRequest memory request, uint256 baseSlot) internal pure returns (EVMFetchRequest memory) {\n bytes32[] memory commands = request.commands;\n uint256 commandIdx = commands.length;\n if(commandIdx > 0 && request.operationIdx < 32) {\n // Terminate previous command\n _addOperation(request, OP_END);\n }\n assembly {\n mstore(commands, add(commandIdx, 1)) // Increment command array length\n }\n if(request.commands.length > MAX_COMMANDS) {\n revert TooManyCommands(MAX_COMMANDS);\n }\n request.operationIdx = 0;\n _addOperation(request, FLAG_DYNAMIC);\n _addOperation(request, _addConstant(request, abi.encode(baseSlot)));\n return request;\n }\n\n /**\n * @dev Adds a `uint256` element to the current path.\n * @param request The request object being operated on.\n * @param el The element to add.\n */\n function element(EVMFetchRequest memory request, uint256 el) internal pure returns (EVMFetchRequest memory) {\n if(request.operationIdx >= 32) {\n revert CommandTooLong();\n }\n _addOperation(request, _addConstant(request, abi.encode(el)));\n return request;\n }\n\n /**\n * @dev Adds a `bytes32` element to the current path.\n * @param request The request object being operated on.\n * @param el The element to add.\n */\n function element(EVMFetchRequest memory request, bytes32 el) internal pure returns (EVMFetchRequest memory) {\n if(request.operationIdx >= 32) {\n revert CommandTooLong();\n }\n _addOperation(request, _addConstant(request, abi.encode(el)));\n return request;\n }\n\n /**\n * @dev Adds an `address` element to the current path.\n * @param request The request object being operated on.\n * @param el The element to add.\n */\n function element(EVMFetchRequest memory request, address el) internal pure returns (EVMFetchRequest memory) {\n if(request.operationIdx >= 32) {\n revert CommandTooLong();\n }\n _addOperation(request, _addConstant(request, abi.encode(el)));\n return request;\n }\n\n /**\n * @dev Adds a `bytes` element to the current path.\n * @param request The request object being operated on.\n * @param el The element to add.\n */\n function element(EVMFetchRequest memory request, bytes memory el) internal pure returns (EVMFetchRequest memory) {\n if(request.operationIdx >= 32) {\n revert CommandTooLong();\n }\n _addOperation(request, _addConstant(request, el));\n return request;\n }\n\n /**\n * @dev Adds a `string` element to the current path.\n * @param request The request object being operated on.\n * @param el The element to add.\n */\n function element(EVMFetchRequest memory request, string memory el) internal pure returns (EVMFetchRequest memory) {\n if(request.operationIdx >= 32) {\n revert CommandTooLong();\n }\n _addOperation(request, _addConstant(request, bytes(el)));\n return request;\n }\n\n /**\n * @dev Adds a reference to a previous fetch to the current path.\n * @param request The request object being operated on.\n * @param idx The index of the previous fetch request, starting at 0.\n */\n function ref(EVMFetchRequest memory request, uint8 idx) internal pure returns (EVMFetchRequest memory) {\n if(request.operationIdx >= 32) {\n revert CommandTooLong();\n }\n if(idx > request.commands.length || idx > 31) {\n revert InvalidReference(idx, request.commands.length);\n }\n _addOperation(request, OP_BACKREF | idx);\n return request;\n }\n\n /**\n * @dev Initiates the fetch request.\n * Calling this function terminates execution; clients that implement CCIP-Read will make a callback to\n * `callback` with the results of the operation.\n * @param callbackId A callback function selector on this contract that will be invoked via CCIP-Read with the result of the lookup.\n * The function must have a signature matching `(bytes[] memory values, bytes callbackData)` with a return type matching the call in which\n * this function was invoked. Its return data will be returned as the return value of the entire CCIP-read operation.\n * @param callbackData Extra data to supply to the callback.\n */\n function fetch(EVMFetchRequest memory request, bytes4 callbackId, bytes memory callbackData) internal view {\n if(request.commands.length > 0 && request.operationIdx < 32) {\n // Terminate last command\n _addOperation(request, OP_END);\n }\n revert OffchainLookup(\n address(this),\n request.verifier.gatewayURLs(),\n abi.encodeCall(IEVMGateway.getStorageSlots, (request.target, request.commands, request.constants)),\n EVMFetchTarget.getStorageSlotsCallback.selector,\n abi.encode(request.verifier, request.target, request.commands, request.constants, callbackId, callbackData)\n );\n }\n\n function _addConstant(EVMFetchRequest memory request, bytes memory value) private pure returns(uint8 idx) {\n bytes[] memory constants = request.constants;\n idx = uint8(constants.length);\n assembly {\n mstore(constants, add(idx, 1)) // Increment constant array length\n }\n constants[idx] = value;\n }\n\n function _addOperation(EVMFetchRequest memory request, uint8 op) private pure {\n uint256 commandIdx = request.commands.length - 1;\n request.commands[commandIdx] = request.commands[commandIdx] | (bytes32(bytes1(op)) >> (8 * request.operationIdx++));\n }\n}\n" + }, + "@ensdomains/evm-verifier/contracts/EVMFetchTarget.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\nimport { IEVMVerifier } from './IEVMVerifier.sol';\nimport { Address } from '@openzeppelin/contracts/utils/Address.sol';\n\n/**\n * @dev Callback implementation for users of `EVMFetcher`. If you use `EVMFetcher`, your contract must\n * inherit from this contract in order to handle callbacks correctly.\n */\nabstract contract EVMFetchTarget {\n using Address for address;\n\n error ResponseLengthMismatch(uint256 actual, uint256 expected);\n\n /**\n * @dev Internal callback function invoked by CCIP-Read in response to a `getStorageSlots` request.\n */\n function getStorageSlotsCallback(bytes calldata response, bytes calldata extradata) external {\n bytes memory proof = abi.decode(response, (bytes));\n (IEVMVerifier verifier, address addr, bytes32[] memory commands, bytes[] memory constants, bytes4 callback, bytes memory callbackData) =\n abi.decode(extradata, (IEVMVerifier, address, bytes32[], bytes[], bytes4, bytes));\n bytes[] memory values = verifier.getStorageValues(addr, commands, constants, proof);\n if(values.length != commands.length) {\n revert ResponseLengthMismatch(values.length, commands.length);\n }\n bytes memory ret = address(this).functionCall(abi.encodeWithSelector(callback, values, callbackData));\n assembly {\n return(add(ret, 32), mload(ret))\n }\n }\n}\n" + }, + "@ensdomains/evm-verifier/contracts/EVMProofHelper.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\nimport {RLPReader} from \"@eth-optimism/contracts-bedrock/src/libraries/rlp/RLPReader.sol\";\nimport {Bytes} from \"@eth-optimism/contracts-bedrock/src/libraries/Bytes.sol\";\nimport {SecureMerkleTrie} from \"./SecureMerkleTrie.sol\";\n\nstruct StateProof {\n bytes[] stateTrieWitness; // Witness proving the `storageRoot` against a state root.\n bytes[][] storageProofs; // An array of proofs of individual storage elements \n}\n\nuint8 constant OP_CONSTANT = 0x00;\nuint8 constant OP_BACKREF = 0x20;\nuint8 constant FLAG_DYNAMIC = 0x01;\n\nlibrary EVMProofHelper {\n using Bytes for bytes;\n\n error AccountNotFound(address);\n error UnknownOpcode(uint8);\n error InvalidSlotSize(uint256 size);\n\n /**\n * @notice Get the storage root for the provided merkle proof\n * @param stateRoot The state root the witness was generated against\n * @param target The address we are fetching a storage root for\n * @param witness A witness proving the value of the storage root for `target`.\n * @return The storage root retrieved from the provided state root\n */\n function getStorageRoot(bytes32 stateRoot, address target, bytes[] memory witness) private pure returns (bytes32) {\n (bool exists, bytes memory encodedResolverAccount) = SecureMerkleTrie.get(\n abi.encodePacked(target),\n witness,\n stateRoot\n );\n if(!exists) {\n revert AccountNotFound(target);\n }\n RLPReader.RLPItem[] memory accountState = RLPReader.readList(encodedResolverAccount);\n return bytes32(RLPReader.readBytes(accountState[2]));\n }\n\n /**\n * @notice Prove whether the provided storage slot is part of the storageRoot\n * @param storageRoot the storage root for the account that contains the storage slot\n * @param slot The storage key we are fetching the value of\n * @param witness the StorageProof struct containing the necessary proof data\n * @return The retrieved storage proof value or 0x if the storage slot is empty\n */\n function getSingleStorageProof(bytes32 storageRoot, uint256 slot, bytes[] memory witness) private pure returns (bytes memory) {\n (bool exists, bytes memory retrievedValue) = SecureMerkleTrie.get(\n abi.encodePacked(slot),\n witness,\n storageRoot\n );\n if(!exists) {\n // Nonexistent values are treated as zero.\n return \"\";\n }\n return RLPReader.readBytes(retrievedValue);\n }\n\n function getFixedValue(bytes32 storageRoot, uint256 slot, bytes[] memory witness) private pure returns(bytes32) {\n bytes memory value = getSingleStorageProof(storageRoot, slot, witness);\n // RLP encoded storage slots are stored without leading 0 bytes.\n // Casting to bytes32 appends trailing 0 bytes, so we have to bit shift to get the \n // original fixed-length representation back.\n return bytes32(value) >> (256 - 8 * value.length);\n }\n\n function executeOperation(bytes1 operation, bytes[] memory constants, bytes[] memory values) private pure returns(bytes memory) {\n uint8 opcode = uint8(operation) & 0xe0;\n uint8 operand = uint8(operation) & 0x1f;\n\n if(opcode == OP_CONSTANT) {\n return constants[operand];\n } else if(opcode == OP_BACKREF) {\n return values[operand];\n } else {\n revert UnknownOpcode(opcode);\n }\n }\n\n function computeFirstSlot(bytes32 command, bytes[] memory constants, bytes[] memory values) private pure returns(bool isDynamic, uint256 slot) {\n uint8 flags = uint8(command[0]);\n isDynamic = (flags & FLAG_DYNAMIC) != 0;\n\n bytes memory slotData = executeOperation(command[1], constants, values);\n require(slotData.length == 32, \"First path element must be 32 bytes\");\n slot = uint256(bytes32(slotData));\n\n for(uint256 j = 2; j < 32 && command[j] != 0xff; j++) {\n bytes memory index = executeOperation(command[j], constants, values);\n slot = uint256(keccak256(abi.encodePacked(index, slot)));\n }\n }\n\n function getDynamicValue(bytes32 storageRoot, uint256 slot, StateProof memory proof, uint256 proofIdx) private pure returns(bytes memory value, uint256 newProofIdx) {\n uint256 firstValue = uint256(getFixedValue(storageRoot, slot, proof.storageProofs[proofIdx++]));\n if(firstValue & 0x01 == 0x01) {\n // Long value: first slot is `length * 2 + 1`, following slots are data.\n uint256 length = (firstValue - 1) / 2;\n value = \"\";\n slot = uint256(keccak256(abi.encodePacked(slot)));\n // This is horribly inefficient - O(n^2). A better approach would be to build an array of words and concatenate them\n // all at once, but we're trying to avoid writing new library code.\n while(length > 0) {\n if(length < 32) {\n value = bytes.concat(value, getSingleStorageProof(storageRoot, slot++, proof.storageProofs[proofIdx++]).slice(0, length));\n length = 0;\n } else {\n value = bytes.concat(value, getSingleStorageProof(storageRoot, slot++, proof.storageProofs[proofIdx++]));\n length -= 32;\n }\n }\n return (value, proofIdx);\n } else {\n // Short value: least significant byte is `length * 2`, other bytes are data.\n uint256 length = (firstValue & 0xFF) / 2;\n return (abi.encode(firstValue).slice(0, length), proofIdx);\n }\n }\n\n function getStorageValues(address target, bytes32[] memory commands, bytes[] memory constants, bytes32 stateRoot, StateProof memory proof) internal pure returns(bytes[] memory values) {\n bytes32 storageRoot = getStorageRoot(stateRoot, target, proof.stateTrieWitness);\n uint256 proofIdx = 0;\n values = new bytes[](commands.length);\n for(uint256 i = 0; i < commands.length; i++) {\n bytes32 command = commands[i];\n (bool isDynamic, uint256 slot) = computeFirstSlot(command, constants, values);\n if(!isDynamic) {\n values[i] = abi.encode(getFixedValue(storageRoot, slot, proof.storageProofs[proofIdx++]));\n if(values[i].length > 32) {\n revert InvalidSlotSize(values[i].length);\n }\n } else {\n (values[i], proofIdx) = getDynamicValue(storageRoot, slot, proof, proofIdx);\n }\n }\n }\n}" + }, + "@ensdomains/evm-verifier/contracts/IEVMVerifier.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\ninterface IEVMVerifier {\n function gatewayURLs() external view returns(string[] memory);\n function getStorageValues(address target, bytes32[] memory commands, bytes[] memory constants, bytes memory proof) external view returns(bytes[] memory values);\n}\n" + }, + "@ensdomains/evm-verifier/contracts/MerkleTrie.sol": { + "content": "// Pulled from https://github.com/ethereum-optimism/optimism/blob/4d13f0afe8869faf7bba45d8339998525ebc5161/packages/contracts-bedrock/contracts/libraries/trie/MerkleTrie.sol\n// as this is the last version of Optimism's Merkle Trie library that supports nonexistence proofs; support was removed\n// in the next commit for some version.\n// Copyright 2020-2021 Optimism\n// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport { Bytes } from \"@eth-optimism/contracts-bedrock/src/libraries/Bytes.sol\";\nimport { RLPReader } from \"@eth-optimism/contracts-bedrock/src/libraries/rlp/RLPReader.sol\";\n\n\n/**\n * @title MerkleTrie\n * @notice MerkleTrie is a small library for verifying standard Ethereum Merkle-Patricia trie\n * inclusion proofs. By default, this library assumes a hexary trie. One can change the\n * trie radix constant to support other trie radixes.\n */\nlibrary MerkleTrie {\n /**\n * @notice Struct representing a node in the trie.\n */\n struct TrieNode {\n bytes encoded;\n RLPReader.RLPItem[] decoded;\n }\n\n /**\n * @notice Determines the number of elements per branch node.\n */\n uint256 internal constant TREE_RADIX = 16;\n\n /**\n * @notice Branch nodes have TREE_RADIX elements and one value element.\n */\n uint256 internal constant BRANCH_NODE_LENGTH = TREE_RADIX + 1;\n\n /**\n * @notice Leaf nodes and extension nodes have two elements, a `path` and a `value`.\n */\n uint256 internal constant LEAF_OR_EXTENSION_NODE_LENGTH = 2;\n\n /**\n * @notice Prefix for even-nibbled extension node paths.\n */\n uint8 internal constant PREFIX_EXTENSION_EVEN = 0;\n\n /**\n * @notice Prefix for odd-nibbled extension node paths.\n */\n uint8 internal constant PREFIX_EXTENSION_ODD = 1;\n\n /**\n * @notice Prefix for even-nibbled leaf node paths.\n */\n uint8 internal constant PREFIX_LEAF_EVEN = 2;\n\n /**\n * @notice Prefix for odd-nibbled leaf node paths.\n */\n uint8 internal constant PREFIX_LEAF_ODD = 3;\n\n /**\n * @notice RLP representation of `NULL`.\n */\n bytes internal constant RLP_NULL = hex\"80\";\n\n /**\n * @notice Verifies a proof that a given key/value pair is present in the trie.\n *\n * @param _key Key of the node to search for, as a hex string.\n * @param _value Value of the node to search for, as a hex string.\n * @param _proof Merkle trie inclusion proof for the desired node. Unlike traditional Merkle\n * trees, this proof is executed top-down and consists of a list of RLP-encoded\n * nodes that make a path down to the target node.\n * @param _root Known root of the Merkle trie. Used to verify that the included proof is\n * correctly constructed.\n *\n * @return Whether or not the proof is valid.\n */\n function verifyInclusionProof(\n bytes memory _key,\n bytes memory _value,\n bytes[] memory _proof,\n bytes32 _root\n ) internal pure returns (bool) {\n (bool exists, bytes memory value) = get(_key, _proof, _root);\n return (exists && Bytes.equal(_value, value));\n }\n\n /**\n * @notice Retrieves the value associated with a given key.\n *\n * @param _key Key to search for, as hex bytes.\n * @param _proof Merkle trie inclusion proof for the key.\n * @param _root Known root of the Merkle trie.\n *\n * @return Whether or not the key exists.\n * @return Value of the key if it exists.\n */\n function get(\n bytes memory _key,\n bytes[] memory _proof,\n bytes32 _root\n ) internal pure returns (bool, bytes memory) {\n TrieNode[] memory proof = _parseProof(_proof);\n (uint256 pathLength, bytes memory keyRemainder, bool isFinalNode) = _walkNodePath(\n proof,\n _key,\n _root\n );\n\n bool noRemainder = keyRemainder.length == 0;\n\n require(noRemainder || isFinalNode, \"MerkleTrie: provided proof is invalid\");\n\n bytes memory value = noRemainder ? _getNodeValue(proof[pathLength - 1]) : bytes(\"\");\n\n return (value.length > 0, value);\n }\n\n /**\n * @notice Walks through a proof using a provided key.\n *\n * @param _proof Inclusion proof to walk through.\n * @param _key Key to use for the walk.\n * @param _root Known root of the trie.\n *\n * @return Length of the final path\n * @return Portion of the key remaining after the walk.\n * @return Whether or not we've hit a dead end.\n */\n // solhint-disable-next-line code-complexity\n function _walkNodePath(\n TrieNode[] memory _proof,\n bytes memory _key,\n bytes32 _root\n )\n private\n pure\n returns (\n uint256,\n bytes memory,\n bool\n )\n {\n uint256 pathLength = 0;\n bytes memory key = Bytes.toNibbles(_key);\n\n bytes memory currentNodeID = abi.encodePacked(_root);\n uint256 currentKeyIndex = 0;\n uint256 currentKeyIncrement = 0;\n TrieNode memory currentNode;\n\n // Proof is top-down, so we start at the first element (root).\n for (uint256 i = 0; i < _proof.length; i++) {\n currentNode = _proof[i];\n currentKeyIndex += currentKeyIncrement;\n\n // Keep track of the proof elements we actually need.\n // It's expensive to resize arrays, so this simply reduces gas costs.\n pathLength += 1;\n\n if (currentKeyIndex == 0) {\n // First proof element is always the root node.\n require(\n Bytes.equal(abi.encodePacked(keccak256(currentNode.encoded)), currentNodeID),\n \"MerkleTrie: invalid root hash\"\n );\n } else if (currentNode.encoded.length >= 32) {\n // Nodes 32 bytes or larger are hashed inside branch nodes.\n require(\n Bytes.equal(abi.encodePacked(keccak256(currentNode.encoded)), currentNodeID),\n \"MerkleTrie: invalid large internal hash\"\n );\n } else {\n // Nodes smaller than 32 bytes aren't hashed.\n require(\n Bytes.equal(currentNode.encoded, currentNodeID),\n \"MerkleTrie: invalid internal node hash\"\n );\n }\n\n if (currentNode.decoded.length == BRANCH_NODE_LENGTH) {\n if (currentKeyIndex == key.length) {\n // We've hit the end of the key\n // meaning the value should be within this branch node.\n break;\n } else {\n // We're not at the end of the key yet.\n // Figure out what the next node ID should be and continue.\n uint8 branchKey = uint8(key[currentKeyIndex]);\n RLPReader.RLPItem memory nextNode = currentNode.decoded[branchKey];\n currentNodeID = _getNodeID(nextNode);\n currentKeyIncrement = 1;\n continue;\n }\n } else if (currentNode.decoded.length == LEAF_OR_EXTENSION_NODE_LENGTH) {\n bytes memory path = _getNodePath(currentNode);\n uint8 prefix = uint8(path[0]);\n uint8 offset = 2 - (prefix % 2);\n bytes memory pathRemainder = Bytes.slice(path, offset);\n bytes memory keyRemainder = Bytes.slice(key, currentKeyIndex);\n uint256 sharedNibbleLength = _getSharedNibbleLength(pathRemainder, keyRemainder);\n\n require(\n keyRemainder.length >= pathRemainder.length,\n \"MerkleTrie: invalid key length for leaf or extension node\"\n );\n\n if (prefix == PREFIX_LEAF_EVEN || prefix == PREFIX_LEAF_ODD) {\n if (\n pathRemainder.length == sharedNibbleLength &&\n keyRemainder.length == sharedNibbleLength\n ) {\n // The key within this leaf matches our key exactly.\n // Increment the key index to reflect that we have no remainder.\n currentKeyIndex += sharedNibbleLength;\n }\n\n // We've hit a leaf node, so our next node should be NULL.\n currentNodeID = RLP_NULL;\n break;\n } else if (prefix == PREFIX_EXTENSION_EVEN || prefix == PREFIX_EXTENSION_ODD) {\n if (sharedNibbleLength != pathRemainder.length) {\n // Our extension node is not identical to the remainder.\n // We've hit the end of this path\n // updates will need to modify this extension.\n currentNodeID = RLP_NULL;\n break;\n } else {\n // Our extension shares some nibbles.\n // Carry on to the next node.\n currentNodeID = _getNodeID(currentNode.decoded[1]);\n currentKeyIncrement = sharedNibbleLength;\n continue;\n }\n } else {\n revert(\"MerkleTrie: received a node with an unknown prefix\");\n }\n } else {\n revert(\"MerkleTrie: received an unparseable node\");\n }\n }\n\n return (\n pathLength,\n Bytes.slice(key, currentKeyIndex),\n Bytes.equal(currentNodeID, RLP_NULL)\n );\n }\n\n /**\n * @notice Parses an array of proof elements into a new array that contains both the original\n * encoded element and the RLP-decoded element.\n *\n * @param _proof Array of proof elements to parse.\n *\n * @return Proof parsed into easily accessible structs.\n */\n function _parseProof(bytes[] memory _proof) private pure returns (TrieNode[] memory) {\n uint256 length = _proof.length;\n TrieNode[] memory proof = new TrieNode[](length);\n for (uint256 i = 0; i < length; ) {\n proof[i] = TrieNode({ encoded: _proof[i], decoded: RLPReader.readList(_proof[i]) });\n unchecked {\n ++i;\n }\n }\n return proof;\n }\n\n /**\n * @notice Picks out the ID for a node. Node ID is referred to as the \"hash\" within the\n * specification, but nodes < 32 bytes are not actually hashed.\n *\n * @param _node Node to pull an ID for.\n *\n * @return ID for the node, depending on the size of its contents.\n */\n function _getNodeID(RLPReader.RLPItem memory _node) private pure returns (bytes memory) {\n return _node.length < 32 ? RLPReader.readRawBytes(_node) : RLPReader.readBytes(_node);\n }\n\n /**\n * @notice Gets the path for a leaf or extension node.\n *\n * @param _node Node to get a path for.\n *\n * @return Node path, converted to an array of nibbles.\n */\n function _getNodePath(TrieNode memory _node) private pure returns (bytes memory) {\n return Bytes.toNibbles(RLPReader.readBytes(_node.decoded[0]));\n }\n\n /**\n * @notice Gets the value for a node.\n *\n * @param _node Node to get a value for.\n *\n * @return Node value, as hex bytes.\n */\n function _getNodeValue(TrieNode memory _node) private pure returns (bytes memory) {\n return RLPReader.readBytes(_node.decoded[_node.decoded.length - 1]);\n }\n\n /**\n * @notice Utility; determines the number of nibbles shared between two nibble arrays.\n *\n * @param _a First nibble array.\n * @param _b Second nibble array.\n *\n * @return Number of shared nibbles.\n */\n function _getSharedNibbleLength(bytes memory _a, bytes memory _b)\n private\n pure\n returns (uint256)\n {\n uint256 shared;\n uint256 max = (_a.length < _b.length) ? _a.length : _b.length;\n for (; shared < max && _a[shared] == _b[shared]; ) {\n unchecked {\n ++shared;\n }\n }\n return shared;\n }\n}" + }, + "@ensdomains/evm-verifier/contracts/SecureMerkleTrie.sol": { + "content": "// Pulled from https://github.com/ethereum-optimism/optimism/blob/4d13f0afe8869faf7bba45d8339998525ebc5161/packages/contracts-bedrock/contracts/libraries/trie/MerkleTrie.sol\n// as this is the last version of Optimism's Merkle Trie library that supports nonexistence proofs; support was removed\n// in the next commit for some version.\n// Copyright 2020-2021 Optimism\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/* Library Imports */\nimport { MerkleTrie } from \"./MerkleTrie.sol\";\n\n/**\n * @title SecureMerkleTrie\n * @notice SecureMerkleTrie is a thin wrapper around the MerkleTrie library that hashes the input\n * keys. Ethereum's state trie hashes input keys before storing them.\n */\nlibrary SecureMerkleTrie {\n /**\n * @notice Verifies a proof that a given key/value pair is present in the Merkle trie.\n *\n * @param _key Key of the node to search for, as a hex string.\n * @param _value Value of the node to search for, as a hex string.\n * @param _proof Merkle trie inclusion proof for the desired node. Unlike traditional Merkle\n * trees, this proof is executed top-down and consists of a list of RLP-encoded\n * nodes that make a path down to the target node.\n * @param _root Known root of the Merkle trie. Used to verify that the included proof is\n * correctly constructed.\n *\n * @return Whether or not the proof is valid.\n */\n function verifyInclusionProof(\n bytes memory _key,\n bytes memory _value,\n bytes[] memory _proof,\n bytes32 _root\n ) internal pure returns (bool) {\n bytes memory key = _getSecureKey(_key);\n return MerkleTrie.verifyInclusionProof(key, _value, _proof, _root);\n }\n\n /**\n * @notice Retrieves the value associated with a given key.\n *\n * @param _key Key to search for, as hex bytes.\n * @param _proof Merkle trie inclusion proof for the key.\n * @param _root Known root of the Merkle trie.\n *\n * @return Whether or not the key exists.\n * @return Value of the key if it exists.\n */\n function get(\n bytes memory _key,\n bytes[] memory _proof,\n bytes32 _root\n ) internal pure returns (bool, bytes memory) {\n bytes memory key = _getSecureKey(_key);\n return MerkleTrie.get(key, _proof, _root);\n }\n\n /**\n * @notice Computes the hashed version of the input key.\n *\n * @param _key Key to hash.\n *\n * @return Hashed version of the key.\n */\n function _getSecureKey(bytes memory _key) private pure returns (bytes memory) {\n return abi.encodePacked(keccak256(_key));\n }\n}" + }, + "@ensdomains/l1-verifier/contracts/L1Verifier.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\nimport { IEVMVerifier } from \"@ensdomains/evm-verifier/contracts/IEVMVerifier.sol\";\nimport { RLPReader } from \"@eth-optimism/contracts-bedrock/src/libraries/rlp/RLPReader.sol\";\nimport { StateProof, EVMProofHelper } from \"@ensdomains/evm-verifier/contracts/EVMProofHelper.sol\";\n\nstruct L1WitnessData {\n uint256 blockNo;\n bytes blockHeader;\n}\n\ncontract L1Verifier is IEVMVerifier {\n error BlockHeaderHashMismatch(uint256 current, uint256 number, bytes32 expected, bytes32 actual);\n\n string[] _gatewayURLs;\n\n constructor(string[] memory urls) {\n _gatewayURLs = urls;\n }\n\n function gatewayURLs() external view returns(string[] memory) {\n return _gatewayURLs;\n }\n\n function getStorageValues(address target, bytes32[] memory commands, bytes[] memory constants, bytes memory proof) external view returns(bytes[] memory values) {\n (L1WitnessData memory l1Data, StateProof memory stateProof) = abi.decode(proof, (L1WitnessData, StateProof));\n if(keccak256(l1Data.blockHeader) != blockhash(l1Data.blockNo)) {\n revert BlockHeaderHashMismatch(block.number, l1Data.blockNo, blockhash(l1Data.blockNo), keccak256(l1Data.blockHeader));\n }\n RLPReader.RLPItem[] memory headerFields = RLPReader.readList(l1Data.blockHeader);\n bytes32 stateRoot = bytes32(RLPReader.readBytes(headerFields[3]));\n return EVMProofHelper.getStorageValues(target, commands, constants, stateRoot, stateProof);\n }\n}\n" + }, + "@eth-optimism/contracts-bedrock/src/libraries/Bytes.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/// @title Bytes\n/// @notice Bytes is a library for manipulating byte arrays.\nlibrary Bytes {\n /// @custom:attribution https://github.com/GNSPS/solidity-bytes-utils\n /// @notice Slices a byte array with a given starting index and length. Returns a new byte array\n /// as opposed to a pointer to the original array. Will throw if trying to slice more\n /// bytes than exist in the array.\n /// @param _bytes Byte array to slice.\n /// @param _start Starting index of the slice.\n /// @param _length Length of the slice.\n /// @return Slice of the input byte array.\n function slice(bytes memory _bytes, uint256 _start, uint256 _length) internal pure returns (bytes memory) {\n unchecked {\n require(_length + 31 >= _length, \"slice_overflow\");\n require(_start + _length >= _start, \"slice_overflow\");\n require(_bytes.length >= _start + _length, \"slice_outOfBounds\");\n }\n\n bytes memory tempBytes;\n\n assembly {\n switch iszero(_length)\n case 0 {\n // Get a location of some free memory and store it in tempBytes as\n // Solidity does for memory variables.\n tempBytes := mload(0x40)\n\n // The first word of the slice result is potentially a partial\n // word read from the original array. To read it, we calculate\n // the length of that partial word and start copying that many\n // bytes into the array. The first word we copy will start with\n // data we don't care about, but the last `lengthmod` bytes will\n // land at the beginning of the contents of the new array. When\n // we're done copying, we overwrite the full first word with\n // the actual length of the slice.\n let lengthmod := and(_length, 31)\n\n // The multiplication in the next line is necessary\n // because when slicing multiples of 32 bytes (lengthmod == 0)\n // the following copy loop was copying the origin's length\n // and then ending prematurely not copying everything it should.\n let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod)))\n let end := add(mc, _length)\n\n for {\n // The multiplication in the next line has the same exact purpose\n // as the one above.\n let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start)\n } lt(mc, end) {\n mc := add(mc, 0x20)\n cc := add(cc, 0x20)\n } { mstore(mc, mload(cc)) }\n\n mstore(tempBytes, _length)\n\n //update free-memory pointer\n //allocating the array padded to 32 bytes like the compiler does now\n mstore(0x40, and(add(mc, 31), not(31)))\n }\n //if we want a zero-length slice let's just return a zero-length array\n default {\n tempBytes := mload(0x40)\n\n //zero out the 32 bytes slice we are about to return\n //we need to do it because Solidity does not garbage collect\n mstore(tempBytes, 0)\n\n mstore(0x40, add(tempBytes, 0x20))\n }\n }\n\n return tempBytes;\n }\n\n /// @notice Slices a byte array with a given starting index up to the end of the original byte\n /// array. Returns a new array rathern than a pointer to the original.\n /// @param _bytes Byte array to slice.\n /// @param _start Starting index of the slice.\n /// @return Slice of the input byte array.\n function slice(bytes memory _bytes, uint256 _start) internal pure returns (bytes memory) {\n if (_start >= _bytes.length) {\n return bytes(\"\");\n }\n return slice(_bytes, _start, _bytes.length - _start);\n }\n\n /// @notice Converts a byte array into a nibble array by splitting each byte into two nibbles.\n /// Resulting nibble array will be exactly twice as long as the input byte array.\n /// @param _bytes Input byte array to convert.\n /// @return Resulting nibble array.\n function toNibbles(bytes memory _bytes) internal pure returns (bytes memory) {\n bytes memory _nibbles;\n assembly {\n // Grab a free memory offset for the new array\n _nibbles := mload(0x40)\n\n // Load the length of the passed bytes array from memory\n let bytesLength := mload(_bytes)\n\n // Calculate the length of the new nibble array\n // This is the length of the input array times 2\n let nibblesLength := shl(0x01, bytesLength)\n\n // Update the free memory pointer to allocate memory for the new array.\n // To do this, we add the length of the new array + 32 bytes for the array length\n // rounded up to the nearest 32 byte boundary to the current free memory pointer.\n mstore(0x40, add(_nibbles, and(not(0x1F), add(nibblesLength, 0x3F))))\n\n // Store the length of the new array in memory\n mstore(_nibbles, nibblesLength)\n\n // Store the memory offset of the _bytes array's contents on the stack\n let bytesStart := add(_bytes, 0x20)\n\n // Store the memory offset of the nibbles array's contents on the stack\n let nibblesStart := add(_nibbles, 0x20)\n\n // Loop through each byte in the input array\n for { let i := 0x00 } lt(i, bytesLength) { i := add(i, 0x01) } {\n // Get the starting offset of the next 2 bytes in the nibbles array\n let offset := add(nibblesStart, shl(0x01, i))\n // Load the byte at the current index within the `_bytes` array\n let b := byte(0x00, mload(add(bytesStart, i)))\n\n // Pull out the first nibble and store it in the new array\n mstore8(offset, shr(0x04, b))\n // Pull out the second nibble and store it in the new array\n mstore8(add(offset, 0x01), and(b, 0x0F))\n }\n }\n return _nibbles;\n }\n\n /// @notice Compares two byte arrays by comparing their keccak256 hashes.\n /// @param _bytes First byte array to compare.\n /// @param _other Second byte array to compare.\n /// @return True if the two byte arrays are equal, false otherwise.\n function equal(bytes memory _bytes, bytes memory _other) internal pure returns (bool) {\n return keccak256(_bytes) == keccak256(_other);\n }\n}\n" + }, + "@eth-optimism/contracts-bedrock/src/libraries/rlp/RLPReader.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.8;\n\n/// @custom:attribution https://github.com/hamdiallam/Solidity-RLP\n/// @title RLPReader\n/// @notice RLPReader is a library for parsing RLP-encoded byte arrays into Solidity types. Adapted\n/// from Solidity-RLP (https://github.com/hamdiallam/Solidity-RLP) by Hamdi Allam with\n/// various tweaks to improve readability.\nlibrary RLPReader {\n /// @notice Custom pointer type to avoid confusion between pointers and uint256s.\n type MemoryPointer is uint256;\n\n /// @notice RLP item types.\n /// @custom:value DATA_ITEM Represents an RLP data item (NOT a list).\n /// @custom:value LIST_ITEM Represents an RLP list item.\n enum RLPItemType {\n DATA_ITEM,\n LIST_ITEM\n }\n\n /// @notice Struct representing an RLP item.\n /// @custom:field length Length of the RLP item.\n /// @custom:field ptr Pointer to the RLP item in memory.\n struct RLPItem {\n uint256 length;\n MemoryPointer ptr;\n }\n\n /// @notice Max list length that this library will accept.\n uint256 internal constant MAX_LIST_LENGTH = 32;\n\n /// @notice Converts bytes to a reference to memory position and length.\n /// @param _in Input bytes to convert.\n /// @return out_ Output memory reference.\n function toRLPItem(bytes memory _in) internal pure returns (RLPItem memory out_) {\n // Empty arrays are not RLP items.\n require(_in.length > 0, \"RLPReader: length of an RLP item must be greater than zero to be decodable\");\n\n MemoryPointer ptr;\n assembly {\n ptr := add(_in, 32)\n }\n\n out_ = RLPItem({ length: _in.length, ptr: ptr });\n }\n\n /// @notice Reads an RLP list value into a list of RLP items.\n /// @param _in RLP list value.\n /// @return out_ Decoded RLP list items.\n function readList(RLPItem memory _in) internal pure returns (RLPItem[] memory out_) {\n (uint256 listOffset, uint256 listLength, RLPItemType itemType) = _decodeLength(_in);\n\n require(itemType == RLPItemType.LIST_ITEM, \"RLPReader: decoded item type for list is not a list item\");\n\n require(listOffset + listLength == _in.length, \"RLPReader: list item has an invalid data remainder\");\n\n // Solidity in-memory arrays can't be increased in size, but *can* be decreased in size by\n // writing to the length. Since we can't know the number of RLP items without looping over\n // the entire input, we'd have to loop twice to accurately size this array. It's easier to\n // simply set a reasonable maximum list length and decrease the size before we finish.\n out_ = new RLPItem[](MAX_LIST_LENGTH);\n\n uint256 itemCount = 0;\n uint256 offset = listOffset;\n while (offset < _in.length) {\n (uint256 itemOffset, uint256 itemLength,) = _decodeLength(\n RLPItem({ length: _in.length - offset, ptr: MemoryPointer.wrap(MemoryPointer.unwrap(_in.ptr) + offset) })\n );\n\n // We don't need to check itemCount < out.length explicitly because Solidity already\n // handles this check on our behalf, we'd just be wasting gas.\n out_[itemCount] = RLPItem({\n length: itemLength + itemOffset,\n ptr: MemoryPointer.wrap(MemoryPointer.unwrap(_in.ptr) + offset)\n });\n\n itemCount += 1;\n offset += itemOffset + itemLength;\n }\n\n // Decrease the array size to match the actual item count.\n assembly {\n mstore(out_, itemCount)\n }\n }\n\n /// @notice Reads an RLP list value into a list of RLP items.\n /// @param _in RLP list value.\n /// @return out_ Decoded RLP list items.\n function readList(bytes memory _in) internal pure returns (RLPItem[] memory out_) {\n out_ = readList(toRLPItem(_in));\n }\n\n /// @notice Reads an RLP bytes value into bytes.\n /// @param _in RLP bytes value.\n /// @return out_ Decoded bytes.\n function readBytes(RLPItem memory _in) internal pure returns (bytes memory out_) {\n (uint256 itemOffset, uint256 itemLength, RLPItemType itemType) = _decodeLength(_in);\n\n require(itemType == RLPItemType.DATA_ITEM, \"RLPReader: decoded item type for bytes is not a data item\");\n\n require(_in.length == itemOffset + itemLength, \"RLPReader: bytes value contains an invalid remainder\");\n\n out_ = _copy(_in.ptr, itemOffset, itemLength);\n }\n\n /// @notice Reads an RLP bytes value into bytes.\n /// @param _in RLP bytes value.\n /// @return out_ Decoded bytes.\n function readBytes(bytes memory _in) internal pure returns (bytes memory out_) {\n out_ = readBytes(toRLPItem(_in));\n }\n\n /// @notice Reads the raw bytes of an RLP item.\n /// @param _in RLP item to read.\n /// @return out_ Raw RLP bytes.\n function readRawBytes(RLPItem memory _in) internal pure returns (bytes memory out_) {\n out_ = _copy(_in.ptr, 0, _in.length);\n }\n\n /// @notice Decodes the length of an RLP item.\n /// @param _in RLP item to decode.\n /// @return offset_ Offset of the encoded data.\n /// @return length_ Length of the encoded data.\n /// @return type_ RLP item type (LIST_ITEM or DATA_ITEM).\n function _decodeLength(RLPItem memory _in)\n private\n pure\n returns (uint256 offset_, uint256 length_, RLPItemType type_)\n {\n // Short-circuit if there's nothing to decode, note that we perform this check when\n // the user creates an RLP item via toRLPItem, but it's always possible for them to bypass\n // that function and create an RLP item directly. So we need to check this anyway.\n require(_in.length > 0, \"RLPReader: length of an RLP item must be greater than zero to be decodable\");\n\n MemoryPointer ptr = _in.ptr;\n uint256 prefix;\n assembly {\n prefix := byte(0, mload(ptr))\n }\n\n if (prefix <= 0x7f) {\n // Single byte.\n return (0, 1, RLPItemType.DATA_ITEM);\n } else if (prefix <= 0xb7) {\n // Short string.\n\n // slither-disable-next-line variable-scope\n uint256 strLen = prefix - 0x80;\n\n require(\n _in.length > strLen, \"RLPReader: length of content must be greater than string length (short string)\"\n );\n\n bytes1 firstByteOfContent;\n assembly {\n firstByteOfContent := and(mload(add(ptr, 1)), shl(248, 0xff))\n }\n\n require(\n strLen != 1 || firstByteOfContent >= 0x80,\n \"RLPReader: invalid prefix, single byte < 0x80 are not prefixed (short string)\"\n );\n\n return (1, strLen, RLPItemType.DATA_ITEM);\n } else if (prefix <= 0xbf) {\n // Long string.\n uint256 lenOfStrLen = prefix - 0xb7;\n\n require(\n _in.length > lenOfStrLen,\n \"RLPReader: length of content must be > than length of string length (long string)\"\n );\n\n bytes1 firstByteOfContent;\n assembly {\n firstByteOfContent := and(mload(add(ptr, 1)), shl(248, 0xff))\n }\n\n require(\n firstByteOfContent != 0x00, \"RLPReader: length of content must not have any leading zeros (long string)\"\n );\n\n uint256 strLen;\n assembly {\n strLen := shr(sub(256, mul(8, lenOfStrLen)), mload(add(ptr, 1)))\n }\n\n require(strLen > 55, \"RLPReader: length of content must be greater than 55 bytes (long string)\");\n\n require(\n _in.length > lenOfStrLen + strLen,\n \"RLPReader: length of content must be greater than total length (long string)\"\n );\n\n return (1 + lenOfStrLen, strLen, RLPItemType.DATA_ITEM);\n } else if (prefix <= 0xf7) {\n // Short list.\n // slither-disable-next-line variable-scope\n uint256 listLen = prefix - 0xc0;\n\n require(_in.length > listLen, \"RLPReader: length of content must be greater than list length (short list)\");\n\n return (1, listLen, RLPItemType.LIST_ITEM);\n } else {\n // Long list.\n uint256 lenOfListLen = prefix - 0xf7;\n\n require(\n _in.length > lenOfListLen,\n \"RLPReader: length of content must be > than length of list length (long list)\"\n );\n\n bytes1 firstByteOfContent;\n assembly {\n firstByteOfContent := and(mload(add(ptr, 1)), shl(248, 0xff))\n }\n\n require(\n firstByteOfContent != 0x00, \"RLPReader: length of content must not have any leading zeros (long list)\"\n );\n\n uint256 listLen;\n assembly {\n listLen := shr(sub(256, mul(8, lenOfListLen)), mload(add(ptr, 1)))\n }\n\n require(listLen > 55, \"RLPReader: length of content must be greater than 55 bytes (long list)\");\n\n require(\n _in.length > lenOfListLen + listLen,\n \"RLPReader: length of content must be greater than total length (long list)\"\n );\n\n return (1 + lenOfListLen, listLen, RLPItemType.LIST_ITEM);\n }\n }\n\n /// @notice Copies the bytes from a memory location.\n /// @param _src Pointer to the location to read from.\n /// @param _offset Offset to start reading from.\n /// @param _length Number of bytes to read.\n /// @return out_ Copied bytes.\n function _copy(MemoryPointer _src, uint256 _offset, uint256 _length) private pure returns (bytes memory out_) {\n out_ = new bytes(_length);\n if (_length == 0) {\n return out_;\n }\n\n // Mostly based on Solidity's copy_memory_to_memory:\n // solhint-disable max-line-length\n // https://github.com/ethereum/solidity/blob/34dd30d71b4da730488be72ff6af7083cf2a91f6/libsolidity/codegen/YulUtilFunctions.cpp#L102-L114\n uint256 src = MemoryPointer.unwrap(_src) + _offset;\n assembly {\n let dest := add(out_, 32)\n let i := 0\n for { } lt(i, _length) { i := add(i, 32) } { mstore(add(dest, i), mload(add(src, i))) }\n\n if gt(i, _length) { mstore(add(dest, _length), 0) }\n }\n }\n}\n" + }, + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor() {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby disabling any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "@openzeppelin/contracts/interfaces/IERC1271.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1271.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC1271 standard signature validation method for\n * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271].\n *\n * _Available since v4.1._\n */\ninterface IERC1271 {\n /**\n * @dev Should return whether the signature provided is valid for the provided data\n * @param hash Hash of the data to be signed\n * @param signature Signature byte array associated with _data\n */\n function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue);\n}\n" + }, + "@openzeppelin/contracts/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n *\n * Furthermore, `isContract` will also return true if the target contract within\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n * which only has an effect at the end of a transaction.\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n function _contextSuffixLength() internal view virtual returns (uint256) {\n return 0;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/cryptography/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../Strings.sol\";\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSA {\n enum RecoverError {\n NoError,\n InvalidSignature,\n InvalidSignatureLength,\n InvalidSignatureS,\n InvalidSignatureV // Deprecated in v4.8\n }\n\n function _throwError(RecoverError error) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert(\"ECDSA: invalid signature\");\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert(\"ECDSA: invalid signature length\");\n } else if (error == RecoverError.InvalidSignatureS) {\n revert(\"ECDSA: invalid signature 's' value\");\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature` or error string. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n *\n * Documentation for signature generation:\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\n if (signature.length == 65) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n /// @solidity memory-safe-assembly\n assembly {\n r := mload(add(signature, 0x20))\n s := mload(add(signature, 0x40))\n v := byte(0, mload(add(signature, 0x60)))\n }\n return tryRecover(hash, v, r, s);\n } else {\n return (address(0), RecoverError.InvalidSignatureLength);\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature`. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, signature);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n *\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) {\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n uint8 v = uint8((uint256(vs) >> 255) + 27);\n return tryRecover(hash, v, r, s);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n *\n * _Available since v4.2._\n */\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n * `r` and `s` signature fields separately.\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS);\n }\n\n // If the signature is valid (and not malleable), return the signer address\n address signer = ecrecover(hash, v, r, s);\n if (signer == address(0)) {\n return (address(0), RecoverError.InvalidSignature);\n }\n\n return (signer, RecoverError.NoError);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `v`,\n * `r` and `s` signature fields separately.\n */\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 message) {\n // 32 is the length in bytes of hash,\n // enforced by the type signature above\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x00, \"\\x19Ethereum Signed Message:\\n32\")\n mstore(0x1c, hash)\n message := keccak256(0x00, 0x3c)\n }\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from `s`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n\", Strings.toString(s.length), s));\n }\n\n /**\n * @dev Returns an Ethereum Signed Typed Data, created from a\n * `domainSeparator` and a `structHash`. This produces hash corresponding\n * to the one signed with the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\n * JSON-RPC method as part of EIP-712.\n *\n * See {recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 data) {\n /// @solidity memory-safe-assembly\n assembly {\n let ptr := mload(0x40)\n mstore(ptr, \"\\x19\\x01\")\n mstore(add(ptr, 0x02), domainSeparator)\n mstore(add(ptr, 0x22), structHash)\n data := keccak256(ptr, 0x42)\n }\n }\n\n /**\n * @dev Returns an Ethereum Signed Data with intended validator, created from a\n * `validator` and `data` according to the version 0 of EIP-191.\n *\n * See {recover}.\n */\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19\\x00\", validator, data));\n }\n}\n" + }, + "@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/SignatureChecker.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./ECDSA.sol\";\nimport \"../../interfaces/IERC1271.sol\";\n\n/**\n * @dev Signature verification helper that can be used instead of `ECDSA.recover` to seamlessly support both ECDSA\n * signatures from externally owned accounts (EOAs) as well as ERC1271 signatures from smart contract wallets like\n * Argent and Gnosis Safe.\n *\n * _Available since v4.1._\n */\nlibrary SignatureChecker {\n /**\n * @dev Checks if a signature is valid for a given signer and data hash. If the signer is a smart contract, the\n * signature is validated against that smart contract using ERC1271, otherwise it's validated using `ECDSA.recover`.\n *\n * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus\n * change through time. It could return true at block N and false at block N+1 (or the opposite).\n */\n function isValidSignatureNow(address signer, bytes32 hash, bytes memory signature) internal view returns (bool) {\n (address recovered, ECDSA.RecoverError error) = ECDSA.tryRecover(hash, signature);\n return\n (error == ECDSA.RecoverError.NoError && recovered == signer) ||\n isValidERC1271SignatureNow(signer, hash, signature);\n }\n\n /**\n * @dev Checks if a signature is valid for a given signer and data hash. The signature is validated\n * against the signer smart contract using ERC1271.\n *\n * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus\n * change through time. It could return true at block N and false at block N+1 (or the opposite).\n */\n function isValidERC1271SignatureNow(\n address signer,\n bytes32 hash,\n bytes memory signature\n ) internal view returns (bool) {\n (bool success, bytes memory result) = signer.staticcall(\n abi.encodeWithSelector(IERC1271.isValidSignature.selector, hash, signature)\n );\n return (success &&\n result.length >= 32 &&\n abi.decode(result, (bytes32)) == bytes32(IERC1271.isValidSignature.selector));\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/ERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n *\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\n */\nabstract contract ERC165 is IERC165 {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/math/Math.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n enum Rounding {\n Down, // Toward negative infinity\n Up, // Toward infinity\n Zero // Toward zero\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n }\n\n /**\n * @dev Returns the ceiling of the division of two numbers.\n *\n * This differs from standard division with `/` in that it rounds up instead\n * of rounding down.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b - 1) / b can overflow on addition, so we distribute.\n return a == 0 ? 0 : (a - 1) / b + 1;\n }\n\n /**\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\n * with further edits by Uniswap Labs also under MIT license.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\n unchecked {\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n // variables such that product = prod1 * 2^256 + prod0.\n uint256 prod0; // Least significant 256 bits of the product\n uint256 prod1; // Most significant 256 bits of the product\n assembly {\n let mm := mulmod(x, y, not(0))\n prod0 := mul(x, y)\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n }\n\n // Handle non-overflow cases, 256 by 256 division.\n if (prod1 == 0) {\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\n // The surrounding unchecked block does not change this fact.\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\n return prod0 / denominator;\n }\n\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\n require(denominator > prod1, \"Math: mulDiv overflow\");\n\n ///////////////////////////////////////////////\n // 512 by 256 division.\n ///////////////////////////////////////////////\n\n // Make division exact by subtracting the remainder from [prod1 prod0].\n uint256 remainder;\n assembly {\n // Compute remainder using mulmod.\n remainder := mulmod(x, y, denominator)\n\n // Subtract 256 bit number from 512 bit number.\n prod1 := sub(prod1, gt(remainder, prod0))\n prod0 := sub(prod0, remainder)\n }\n\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\n // See https://cs.stackexchange.com/q/138556/92363.\n\n // Does not overflow because the denominator cannot be zero at this stage in the function.\n uint256 twos = denominator & (~denominator + 1);\n assembly {\n // Divide denominator by twos.\n denominator := div(denominator, twos)\n\n // Divide [prod1 prod0] by twos.\n prod0 := div(prod0, twos)\n\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\n twos := add(div(sub(0, twos), twos), 1)\n }\n\n // Shift in bits from prod1 into prod0.\n prod0 |= prod1 * twos;\n\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\n // four bits. That is, denominator * inv = 1 mod 2^4.\n uint256 inverse = (3 * denominator) ^ 2;\n\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\n // in modular arithmetic, doubling the correct bits in each step.\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\n\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\n // is no longer required.\n result = prod0 * inverse;\n return result;\n }\n }\n\n /**\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\n uint256 result = mulDiv(x, y, denominator);\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\n result += 1;\n }\n return result;\n }\n\n /**\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 128;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 64;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 32;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 16;\n }\n if (value >> 8 > 0) {\n value >>= 8;\n result += 8;\n }\n if (value >> 4 > 0) {\n value >>= 4;\n result += 4;\n }\n if (value >> 2 > 0) {\n value >>= 2;\n result += 2;\n }\n if (value >> 1 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log2(value);\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >= 10 ** 64) {\n value /= 10 ** 64;\n result += 64;\n }\n if (value >= 10 ** 32) {\n value /= 10 ** 32;\n result += 32;\n }\n if (value >= 10 ** 16) {\n value /= 10 ** 16;\n result += 16;\n }\n if (value >= 10 ** 8) {\n value /= 10 ** 8;\n result += 8;\n }\n if (value >= 10 ** 4) {\n value /= 10 ** 4;\n result += 4;\n }\n if (value >= 10 ** 2) {\n value /= 10 ** 2;\n result += 2;\n }\n if (value >= 10 ** 1) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log10(value);\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256, rounded down, of a positive value.\n * Returns 0 if given 0.\n *\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n */\n function log256(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 16;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 8;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 4;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 2;\n }\n if (value >> 8 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log256(value);\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/math/SignedMath.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMath {\n /**\n * @dev Returns the largest of two signed numbers.\n */\n function max(int256 a, int256 b) internal pure returns (int256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two signed numbers.\n */\n function min(int256 a, int256 b) internal pure returns (int256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two signed numbers without overflow.\n * The result is rounded towards zero.\n */\n function average(int256 a, int256 b) internal pure returns (int256) {\n // Formula from the book \"Hacker's Delight\"\n int256 x = (a & b) + ((a ^ b) >> 1);\n return x + (int256(uint256(x) >> 255) & (a ^ b));\n }\n\n /**\n * @dev Returns the absolute unsigned value of a signed value.\n */\n function abs(int256 n) internal pure returns (uint256) {\n unchecked {\n // must be unchecked in order to support `n = type(int256).min`\n return uint256(n >= 0 ? n : -n);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./math/Math.sol\";\nimport \"./math/SignedMath.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant _SYMBOLS = \"0123456789abcdef\";\n uint8 private constant _ADDRESS_LENGTH = 20;\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n unchecked {\n uint256 length = Math.log10(value) + 1;\n string memory buffer = new string(length);\n uint256 ptr;\n /// @solidity memory-safe-assembly\n assembly {\n ptr := add(buffer, add(32, length))\n }\n while (true) {\n ptr--;\n /// @solidity memory-safe-assembly\n assembly {\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\n }\n value /= 10;\n if (value == 0) break;\n }\n return buffer;\n }\n }\n\n /**\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\n */\n function toString(int256 value) internal pure returns (string memory) {\n return string(abi.encodePacked(value < 0 ? \"-\" : \"\", toString(SignedMath.abs(value))));\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n unchecked {\n return toHexString(value, Math.log256(value) + 1);\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = _SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\n }\n\n /**\n * @dev Returns true if the two strings are equal.\n */\n function equal(string memory a, string memory b) internal pure returns (bool) {\n return keccak256(bytes(a)) == keccak256(bytes(b));\n }\n}\n" + }, + "contracts/deps.sol": { + "content": "import {L1Verifier} from '@ensdomains/l1-verifier/contracts/L1Verifier.sol';\nimport '@ensdomains/ens-contracts/contracts/reverseRegistrar/L2ReverseRegistrar.sol';\nimport '@ensdomains/ens-contracts/contracts/resolvers/profiles/IVersionableResolver.sol';\n// Storage slot\n// ┌────────────────────┬───────────────────┬──────────────┬\n// │ contract │ state_variable │ storage_slot │\n// ├────────────────────┼───────────────────┼──────────────┼\n// │ L2ReverseRegistrar │ _owner │ 0 │\n// │ L2ReverseRegistrar │ lastUpdated │ 1 │\n// │ L2ReverseRegistrar │ versionable_texts │ 2 │\n// │ L2ReverseRegistrar │ versionable_names │ 3 │\n// │ L2ReverseRegistrar │ recordVersions │ 4 │\n" + }, + "contracts/L1ReverseResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\nimport {EVMFetcher} from '@ensdomains/evm-verifier/contracts/EVMFetcher.sol';\nimport {EVMFetchTarget} from '@ensdomains/evm-verifier/contracts/EVMFetchTarget.sol';\nimport {IEVMVerifier} from '@ensdomains/evm-verifier/contracts/IEVMVerifier.sol';\nimport \"@ensdomains/ens-contracts/contracts/resolvers/profiles/INameResolver.sol\";\nimport \"@ensdomains/ens-contracts/contracts/resolvers/profiles/ITextResolver.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\n\ncontract L1ReverseResolver is EVMFetchTarget, INameResolver, ITextResolver, ERC165 {\n using EVMFetcher for EVMFetcher.EVMFetchRequest;\n IEVMVerifier immutable verifier;\n address immutable target;\n uint256 constant VERSIONABLE_TEXTS_SLOT = 2;\n uint256 constant VERSIONABLE_NAME_SLOT = 3;\n uint256 constant RECORD_VERSIONS_SLOT = 4;\n \n constructor(IEVMVerifier _verifier, address _target) {\n verifier = _verifier;\n target = _target;\n }\n\n /**\n * Returns the address associated with an ENS node.\n * @param node The ENS node to query.\n * @return The associated name.\n */\n // return versionable_names[recordVersions[node]][node];\n function name(bytes32 node) public view returns (string memory) {\n EVMFetcher.newFetchRequest(verifier, target)\n .getStatic(RECORD_VERSIONS_SLOT)\n .element(node)\n .getDynamic(VERSIONABLE_NAME_SLOT)\n .ref(0)\n .element(node)\n .fetch(this.nameCallback.selector, ''); // recordVersions\n }\n\n function nameCallback(\n bytes[] memory values,\n bytes memory\n ) public pure returns (string memory) {\n return string(values[1]);\n }\n\n /**\n * Returns the text data associated with an ENS node and key.\n * @param node The ENS node to query.\n * @param key The text data key to query.\n * @return The associated text data.\n */\n function text(\n bytes32 node,\n string calldata key\n ) public view returns (string memory) {\n EVMFetcher.newFetchRequest(verifier, target)\n .getStatic(RECORD_VERSIONS_SLOT)\n .element(node)\n .getDynamic(VERSIONABLE_TEXTS_SLOT)\n .ref(0)\n .element(node)\n .element(key)\n .fetch(this.textCallback.selector, '');\n }\n\n function textCallback(\n bytes[] memory values,\n bytes memory\n ) public pure returns (string memory) {\n return string(values[1]);\n }\n\n function supportsInterface(\n bytes4 interfaceId\n ) public override view returns (bool) {\n return\n interfaceId == type(ITextResolver).interfaceId ||\n interfaceId == type(INameResolver).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": false, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates", + "storageLayout" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/crosschain-reverse-resolver/deployments/sepolia/solcInputs/dcec9c73907104c64dc9e5d2a7545303.json b/crosschain-reverse-resolver/deployments/sepolia/solcInputs/dcec9c73907104c64dc9e5d2a7545303.json new file mode 100644 index 00000000..bb2d3191 --- /dev/null +++ b/crosschain-reverse-resolver/deployments/sepolia/solcInputs/dcec9c73907104c64dc9e5d2a7545303.json @@ -0,0 +1,126 @@ +{ + "language": "Solidity", + "sources": { + "@ensdomains/ens-contracts/contracts/registry/ENS.sol": { + "content": "pragma solidity >=0.8.4;\n\ninterface ENS {\n // Logged when the owner of a node assigns a new owner to a subnode.\n event NewOwner(bytes32 indexed node, bytes32 indexed label, address owner);\n\n // Logged when the owner of a node transfers ownership to a new account.\n event Transfer(bytes32 indexed node, address owner);\n\n // Logged when the resolver for a node changes.\n event NewResolver(bytes32 indexed node, address resolver);\n\n // Logged when the TTL of a node changes\n event NewTTL(bytes32 indexed node, uint64 ttl);\n\n // Logged when an operator is added or removed.\n event ApprovalForAll(\n address indexed owner,\n address indexed operator,\n bool approved\n );\n\n function setRecord(\n bytes32 node,\n address owner,\n address resolver,\n uint64 ttl\n ) external;\n\n function setSubnodeRecord(\n bytes32 node,\n bytes32 label,\n address owner,\n address resolver,\n uint64 ttl\n ) external;\n\n function setSubnodeOwner(\n bytes32 node,\n bytes32 label,\n address owner\n ) external returns (bytes32);\n\n function setResolver(bytes32 node, address resolver) external;\n\n function setOwner(bytes32 node, address owner) external;\n\n function setTTL(bytes32 node, uint64 ttl) external;\n\n function setApprovalForAll(address operator, bool approved) external;\n\n function owner(bytes32 node) external view returns (address);\n\n function resolver(bytes32 node) external view returns (address);\n\n function ttl(bytes32 node) external view returns (uint64);\n\n function recordExists(bytes32 node) external view returns (bool);\n\n function isApprovedForAll(\n address owner,\n address operator\n ) external view returns (bool);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/IMulticallable.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\ninterface IMulticallable {\n function multicall(\n bytes[] calldata data\n ) external returns (bytes[] memory results);\n\n function multicallWithNodeCheck(\n bytes32,\n bytes[] calldata data\n ) external returns (bytes[] memory results);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/Multicallable.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\nimport \"./IMulticallable.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\n\nabstract contract Multicallable is IMulticallable, ERC165 {\n function _multicall(\n bytes32 nodehash,\n bytes[] calldata data\n ) internal returns (bytes[] memory results) {\n results = new bytes[](data.length);\n for (uint256 i = 0; i < data.length; i++) {\n if (nodehash != bytes32(0)) {\n bytes32 txNamehash = bytes32(data[i][4:36]);\n require(\n txNamehash == nodehash,\n \"multicall: All records must have a matching namehash\"\n );\n }\n (bool success, bytes memory result) = address(this).delegatecall(\n data[i]\n );\n require(success);\n results[i] = result;\n }\n return results;\n }\n\n // This function provides an extra security check when called\n // from priviledged contracts (such as EthRegistrarController)\n // that can set records on behalf of the node owners\n function multicallWithNodeCheck(\n bytes32 nodehash,\n bytes[] calldata data\n ) external returns (bytes[] memory results) {\n return _multicall(nodehash, data);\n }\n\n function multicall(\n bytes[] calldata data\n ) public override returns (bytes[] memory results) {\n return _multicall(bytes32(0), data);\n }\n\n function supportsInterface(\n bytes4 interfaceID\n ) public view virtual override returns (bool) {\n return\n interfaceID == type(IMulticallable).interfaceId ||\n super.supportsInterface(interfaceID);\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/INameResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface INameResolver {\n event NameChanged(bytes32 indexed node, string name);\n\n /**\n * Returns the name associated with an ENS node, for reverse records.\n * Defined in EIP181.\n * @param node The ENS node to query.\n * @return The associated name.\n */\n function name(bytes32 node) external view returns (string memory);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/ITextResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface ITextResolver {\n event TextChanged(\n bytes32 indexed node,\n string indexed indexedKey,\n string key,\n string value\n );\n\n /**\n * Returns the text data associated with an ENS node and key.\n * @param node The ENS node to query.\n * @param key The text data key to query.\n * @return The associated text data.\n */\n function text(\n bytes32 node,\n string calldata key\n ) external view returns (string memory);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/resolvers/profiles/IVersionableResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface IVersionableResolver {\n event VersionChanged(bytes32 indexed node, uint64 newVersion);\n\n function recordVersions(bytes32 node) external view returns (uint64);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/reverseRegistrar/IL2ReverseRegistrar.sol": { + "content": "pragma solidity >=0.8.4;\n\ninterface IL2ReverseRegistrar {\n function setName(string memory name) external returns (bytes32);\n\n function setNameForAddr(\n address addr,\n string memory name\n ) external returns (bytes32);\n\n function setNameForAddrWithSignature(\n address addr,\n string memory name,\n uint256 inceptionDate,\n bytes memory signature\n ) external returns (bytes32);\n\n function setNameForAddrWithSignatureAndOwnable(\n address contractAddr,\n address owner,\n string memory name,\n uint256 inceptionDate,\n bytes memory signature\n ) external returns (bytes32);\n\n function setText(\n string calldata key,\n string calldata value\n ) external returns (bytes32);\n\n function setTextForAddr(\n address addr,\n string calldata key,\n string calldata value\n ) external returns (bytes32);\n\n function setTextForAddrWithSignature(\n address addr,\n string calldata key,\n string calldata value,\n uint256 inceptionDate,\n bytes memory signature\n ) external returns (bytes32);\n\n function setTextForAddrWithSignatureAndOwnable(\n address contractAddr,\n address owner,\n string calldata key,\n string calldata value,\n uint256 inceptionDate,\n bytes memory signature\n ) external returns (bytes32);\n\n function clearRecords(address addr) external;\n\n function clearRecordsWithSignature(\n address addr,\n uint256 inceptionDate,\n bytes memory signature\n ) external;\n\n function node(address addr) external view returns (bytes32);\n}\n" + }, + "@ensdomains/ens-contracts/contracts/reverseRegistrar/L2ReverseRegistrar.sol": { + "content": "pragma solidity >=0.8.4;\n\nimport \"../registry/ENS.sol\";\nimport \"./IL2ReverseRegistrar.sol\";\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\";\nimport \"../resolvers/profiles/ITextResolver.sol\";\nimport \"../resolvers/profiles/INameResolver.sol\";\nimport \"../root/Controllable.sol\";\nimport \"../resolvers/Multicallable.sol\";\n\nerror InvalidSignature();\nerror SignatureOutOfDate();\nerror Unauthorised();\nerror NotOwnerOfContract();\n\n// @note Inception date\n// The inception date is in milliseconds, and so will be divided by 1000\n// when comparing to block.timestamp. This means that the date will be\n// rounded down to the nearest second.\n\ncontract L2ReverseRegistrar is\n Multicallable,\n Ownable,\n ITextResolver,\n INameResolver,\n IL2ReverseRegistrar\n{\n using ECDSA for bytes32;\n mapping(bytes32 => uint256) public lastUpdated;\n mapping(uint64 => mapping(bytes32 => mapping(string => string))) versionable_texts;\n mapping(uint64 => mapping(bytes32 => string)) versionable_names;\n mapping(bytes32 => uint64) internal recordVersions;\n event VersionChanged(bytes32 indexed node, uint64 newVersion);\n event ReverseClaimed(address indexed addr, bytes32 indexed node);\n\n bytes32 public immutable L2ReverseNode;\n uint256 public immutable coinType;\n\n // This is the hex encoding of the string 'abcdefghijklmnopqrstuvwxyz'\n // It is used as a constant to lookup the characters of the hex address\n bytes32 constant lookup =\n 0x3031323334353637383961626364656600000000000000000000000000000000;\n\n /**\n * @dev Constructor\n */\n constructor(bytes32 _L2ReverseNode, uint256 _coinType) {\n L2ReverseNode = _L2ReverseNode;\n coinType = _coinType;\n }\n\n modifier authorised(address addr) {\n isAuthorised(addr);\n _;\n }\n\n modifier authorisedSignature(\n bytes32 hash,\n address addr,\n uint256 inceptionDate,\n bytes memory signature\n ) {\n isAuthorisedWithSignature(hash, addr, inceptionDate, signature);\n _;\n }\n\n modifier ownerAndAuthorisedWithSignature(\n bytes32 hash,\n address addr,\n address owner,\n uint256 inceptionDate,\n bytes memory signature\n ) {\n isOwnerAndAuthorisedWithSignature(\n hash,\n addr,\n owner,\n inceptionDate,\n signature\n );\n _;\n }\n\n function isAuthorised(address addr) internal view returns (bool) {\n if (addr != msg.sender && !ownsContract(addr, msg.sender)) {\n revert Unauthorised();\n }\n }\n\n function isAuthorisedWithSignature(\n bytes32 hash,\n address addr,\n uint256 inceptionDate,\n bytes memory signature\n ) internal view returns (bool) {\n bytes32 message = keccak256(\n abi.encodePacked(hash, addr, inceptionDate, coinType)\n ).toEthSignedMessageHash();\n bytes32 node = _getNamehash(addr);\n\n if (!SignatureChecker.isValidSignatureNow(addr, message, signature)) {\n revert InvalidSignature();\n }\n\n if (\n inceptionDate <= lastUpdated[node] || // must be newer than current record\n inceptionDate / 1000 >= block.timestamp // must be in the past\n ) {\n revert SignatureOutOfDate();\n }\n }\n\n function isOwnerAndAuthorisedWithSignature(\n bytes32 hash,\n address addr,\n address owner,\n uint256 inceptionDate,\n bytes memory signature\n ) internal view returns (bool) {\n bytes32 message = keccak256(\n abi.encodePacked(hash, addr, owner, inceptionDate, coinType)\n ).toEthSignedMessageHash();\n bytes32 node = _getNamehash(addr);\n\n if (!ownsContract(addr, owner)) {\n revert NotOwnerOfContract();\n }\n\n if (\n !SignatureChecker.isValidERC1271SignatureNow(\n owner,\n message,\n signature\n )\n ) {\n revert InvalidSignature();\n }\n\n if (\n inceptionDate <= lastUpdated[node] || // must be newer than current record\n inceptionDate / 1000 >= block.timestamp // must be in the past\n ) {\n revert SignatureOutOfDate();\n }\n }\n\n /**\n * @dev Sets the name for an addr using a signature that can be verified with ERC1271.\n * @param addr The reverse record to set\n * @param name The name of the reverse record\n * @param inceptionDate Date from when this signature is valid from\n * @param signature The resolver of the reverse node\n * @return The ENS node hash of the reverse record.\n */\n function setNameForAddrWithSignature(\n address addr,\n string memory name,\n uint256 inceptionDate,\n bytes memory signature\n )\n public\n override\n authorisedSignature(\n keccak256(\n abi.encodePacked(\n IL2ReverseRegistrar.setNameForAddrWithSignature.selector,\n name\n )\n ),\n addr,\n inceptionDate,\n signature\n )\n returns (bytes32)\n {\n bytes32 node = _getNamehash(addr);\n\n _setName(node, name, inceptionDate);\n return node;\n }\n\n /**\n * @dev Sets the name for a contract that is owned by a SCW using a signature\n * @param contractAddr The reverse node to set\n * @param owner The owner of the contract (via Ownable)\n * @param name The name of the reverse record\n * @param inceptionDate Date from when this signature is valid from\n * @param signature The signature of an address that will return true on isValidSignature for the owner\n * @return The ENS node hash of the reverse record.\n */\n function setNameForAddrWithSignatureAndOwnable(\n address contractAddr,\n address owner,\n string memory name,\n uint256 inceptionDate,\n bytes memory signature\n )\n public\n ownerAndAuthorisedWithSignature(\n keccak256(\n abi.encodePacked(\n IL2ReverseRegistrar\n .setNameForAddrWithSignatureAndOwnable\n .selector,\n name\n )\n ),\n contractAddr,\n owner,\n inceptionDate,\n signature\n )\n returns (bytes32)\n {\n bytes32 node = _getNamehash(contractAddr);\n _setName(node, name, inceptionDate);\n }\n\n /**\n * @dev Sets the `name()` record for the reverse ENS record associated with\n * the calling account.\n * @param name The name to set for this address.\n * @return The ENS node hash of the reverse record.\n */\n function setName(string memory name) public override returns (bytes32) {\n return setNameForAddr(msg.sender, name);\n }\n\n /**\n * @dev Sets the `name()` record for the reverse ENS record associated with\n * the addr provided account.\n * Can be used if the addr is a contract that is owned by a SCW.\n * @param name The name to set for this address.\n * @return The ENS node hash of the reverse record.\n */\n\n function setNameForAddr(\n address addr,\n string memory name\n ) public authorised(addr) returns (bytes32) {\n bytes32 node = _getNamehash(addr);\n _setName(node, name, block.timestamp);\n return node;\n }\n\n /**\n * @dev Sets the name for an addr using a signature that can be verified with ERC1271.\n * @param addr The reverse record to set\n * @param key The key of the text record\n * @param value The value of the text record\n * @param inceptionDate Date from when this signature is valid from\n * @param signature The resolver of the reverse node\n * @return The ENS node hash of the reverse record.\n */\n function setTextForAddrWithSignature(\n address addr,\n string calldata key,\n string calldata value,\n uint256 inceptionDate,\n bytes memory signature\n )\n public\n override\n authorisedSignature(\n keccak256(\n abi.encodePacked(\n IL2ReverseRegistrar.setTextForAddrWithSignature.selector,\n key,\n value\n )\n ),\n addr,\n inceptionDate,\n signature\n )\n returns (bytes32)\n {\n bytes32 node = _getNamehash(addr);\n _setText(node, key, value, inceptionDate);\n return node;\n }\n\n /**\n * @dev Sets the name for a contract that is owned by a SCW using a signature\n * @param contractAddr The reverse node to set\n * @param owner The owner of the contract (via Ownable)\n * @param key The name of the reverse record\n * @param value The name of the reverse record\n * @param inceptionDate Date from when this signature is valid from\n * @param signature The signature of an address that will return true on isValidSignature for the owner\n * @return The ENS node hash of the reverse record.\n */\n function setTextForAddrWithSignatureAndOwnable(\n address contractAddr,\n address owner,\n string calldata key,\n string calldata value,\n uint256 inceptionDate,\n bytes memory signature\n )\n public\n ownerAndAuthorisedWithSignature(\n keccak256(\n abi.encodePacked(\n IL2ReverseRegistrar\n .setTextForAddrWithSignatureAndOwnable\n .selector,\n key,\n value\n )\n ),\n contractAddr,\n owner,\n inceptionDate,\n signature\n )\n returns (bytes32)\n {\n bytes32 node = _getNamehash(contractAddr);\n _setText(node, key, value, inceptionDate);\n }\n\n /**\n * @dev Sets the `name()` record for the reverse ENS record associated with\n * the calling account.\n * @param key The key for this text record.\n * @param value The value to set for this text record.\n * @return The ENS node hash of the reverse record.\n */\n function setText(\n string calldata key,\n string calldata value\n ) public override returns (bytes32) {\n return setTextForAddr(msg.sender, key, value);\n }\n\n /**\n * @dev Sets the `text(key)` record for the reverse ENS record associated with\n * the addr provided account.\n * @param key The key for this text record.\n * @param value The value to set for this text record.\n * @return The ENS node hash of the reverse record.\n */\n\n function setTextForAddr(\n address addr,\n string calldata key,\n string calldata value\n ) public override authorised(addr) returns (bytes32) {\n bytes32 node = _getNamehash(addr);\n _setText(node, key, value, block.timestamp);\n return node;\n }\n\n function _setText(\n bytes32 node,\n string calldata key,\n string calldata value,\n uint256 inceptionDate\n ) internal {\n versionable_texts[recordVersions[node]][node][key] = value;\n _setLastUpdated(node, inceptionDate);\n emit TextChanged(node, key, key, value);\n }\n\n /**\n * Returns the text data associated with an ENS node and key.\n * @param node The ENS node to query.\n * @param key The text data key to query.\n * @return The associated text data.\n */\n function text(\n bytes32 node,\n string calldata key\n ) external view virtual override returns (string memory) {\n return versionable_texts[recordVersions[node]][node][key];\n }\n\n /**\n * Sets the name associated with an ENS node, for reverse records.\n * May only be called by the owner of that node in the ENS registry.\n * @param node The node to update.\n * @param newName name record\n */\n function _setName(\n bytes32 node,\n string memory newName,\n uint256 inceptionDate\n ) internal virtual {\n versionable_names[recordVersions[node]][node] = newName;\n _setLastUpdated(node, inceptionDate);\n emit NameChanged(node, newName);\n }\n\n /**\n * Returns the name associated with an ENS node, for reverse records.\n * Defined in EIP181.\n * @param node The ENS node to query.\n * @return The associated name.\n */\n function name(\n bytes32 node\n ) external view virtual override returns (string memory) {\n return versionable_names[recordVersions[node]][node];\n }\n\n /**\n * Increments the record version associated with an ENS node.\n * May only be called by the owner of that node in the ENS registry.\n * @param addr The node to update.\n */\n function clearRecords(address addr) public virtual authorised(addr) {\n bytes32 labelHash = sha3HexAddress(addr);\n bytes32 reverseNode = keccak256(\n abi.encodePacked(L2ReverseNode, labelHash)\n );\n recordVersions[reverseNode]++;\n emit VersionChanged(reverseNode, recordVersions[reverseNode]);\n }\n\n /**\n * Increments the record version associated with an ENS node.\n * May only be called by the owner of that node in the ENS registry.\n * @param addr The node to update.\n * @param signature A signature proving ownership of the node.\n */\n function clearRecordsWithSignature(\n address addr,\n uint256 inceptionDate,\n bytes memory signature\n )\n public\n virtual\n authorisedSignature(\n keccak256(\n abi.encodePacked(\n IL2ReverseRegistrar.clearRecordsWithSignature.selector\n )\n ),\n addr,\n inceptionDate,\n signature\n )\n {\n bytes32 labelHash = sha3HexAddress(addr);\n bytes32 reverseNode = keccak256(\n abi.encodePacked(L2ReverseNode, labelHash)\n );\n recordVersions[reverseNode]++;\n emit VersionChanged(reverseNode, recordVersions[reverseNode]);\n }\n\n /**\n * @dev Returns the node hash for a given account's reverse records.\n * @param addr The address to hash\n * @return The ENS node hash.\n */\n function node(address addr) public view override returns (bytes32) {\n return keccak256(abi.encodePacked(L2ReverseNode, sha3HexAddress(addr)));\n }\n\n function ownsContract(\n address contractAddr,\n address addr\n ) internal view returns (bool) {\n try Ownable(contractAddr).owner() returns (address owner) {\n return owner == addr;\n } catch {\n return false;\n }\n }\n\n function _getNamehash(address addr) internal view returns (bytes32) {\n bytes32 labelHash = sha3HexAddress(addr);\n return keccak256(abi.encodePacked(L2ReverseNode, labelHash));\n }\n\n function _setLastUpdated(bytes32 node, uint256 inceptionDate) internal {\n lastUpdated[node] = inceptionDate;\n }\n\n /**\n * @dev An optimised function to compute the sha3 of the lower-case\n * hexadecimal representation of an Ethereum address.\n * @param addr The address to hash\n * @return ret The SHA3 hash of the lower-case hexadecimal encoding of the\n * input address.\n */\n function sha3HexAddress(address addr) internal pure returns (bytes32 ret) {\n assembly {\n for {\n let i := 40\n } gt(i, 0) {\n\n } {\n i := sub(i, 1)\n mstore8(i, byte(and(addr, 0xf), lookup))\n addr := div(addr, 0x10)\n i := sub(i, 1)\n mstore8(i, byte(and(addr, 0xf), lookup))\n addr := div(addr, 0x10)\n }\n\n ret := keccak256(0, 40)\n }\n }\n\n function supportsInterface(\n bytes4 interfaceID\n ) public view override(Multicallable) returns (bool) {\n return\n interfaceID == type(IL2ReverseRegistrar).interfaceId ||\n interfaceID == type(ITextResolver).interfaceId ||\n interfaceID == type(INameResolver).interfaceId ||\n super.supportsInterface(interfaceID);\n }\n}\n" + }, + "@ensdomains/ens-contracts/contracts/root/Controllable.sol": { + "content": "pragma solidity ^0.8.4;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\n\ncontract Controllable is Ownable {\n mapping(address => bool) public controllers;\n\n event ControllerChanged(address indexed controller, bool enabled);\n\n modifier onlyController() {\n require(\n controllers[msg.sender],\n \"Controllable: Caller is not a controller\"\n );\n _;\n }\n\n function setController(address controller, bool enabled) public onlyOwner {\n controllers[controller] = enabled;\n emit ControllerChanged(controller, enabled);\n }\n}\n" + }, + "@ensdomains/evm-verifier/contracts/EVMFetcher.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\nimport { IEVMVerifier } from './IEVMVerifier.sol';\nimport { EVMFetchTarget } from './EVMFetchTarget.sol';\nimport { Address } from '@openzeppelin/contracts/utils/Address.sol';\n\ninterface IEVMGateway {\n function getStorageSlots(address addr, bytes32[] memory commands, bytes[] memory constants) external pure returns(bytes memory witness);\n}\n\nuint8 constant FLAG_DYNAMIC = 0x01;\nuint8 constant OP_CONSTANT = 0x00;\nuint8 constant OP_BACKREF = 0x20;\nuint8 constant OP_END = 0xff;\n\n/**\n * @dev A library to facilitate requesting storage data proofs from contracts, possibly on a different chain.\n * See l1-verifier/test/TestL1.sol for example usage.\n */\nlibrary EVMFetcher {\n uint256 constant MAX_COMMANDS = 32;\n uint256 constant MAX_CONSTANTS = 32; // Must not be greater than 32\n\n using Address for address;\n\n error TooManyCommands(uint256 max);\n error CommandTooLong();\n error InvalidReference(uint256 value, uint256 max);\n error OffchainLookup(address sender, string[] urls, bytes callData, bytes4 callbackFunction, bytes extraData);\n\n struct EVMFetchRequest {\n IEVMVerifier verifier;\n address target;\n bytes32[] commands;\n uint256 operationIdx;\n bytes[] constants;\n }\n\n /**\n * @dev Creates a request to fetch the value of multiple storage slots from a contract via CCIP-Read, possibly from\n * another chain.\n * Supports dynamic length values and slot numbers derived from other retrieved values.\n * @param verifier An instance of a verifier contract that can provide and verify the storage slot information.\n * @param target The address of the contract to fetch storage proofs for.\n */\n function newFetchRequest(IEVMVerifier verifier, address target) internal pure returns (EVMFetchRequest memory) {\n bytes32[] memory commands = new bytes32[](MAX_COMMANDS);\n bytes[] memory constants = new bytes[](MAX_CONSTANTS);\n assembly {\n mstore(commands, 0) // Set current array length to 0\n mstore(constants, 0)\n } \n return EVMFetchRequest(verifier, target, commands, 0, constants);\n }\n\n /**\n * @dev Starts describing a new fetch request.\n * Paths specify a series of hashing operations to derive the final slot ID.\n * See https://docs.soliditylang.org/en/v0.8.17/internals/layout_in_storage.html for details on how Solidity\n * lays out storage variables.\n * @param request The request object being operated on.\n * @param baseSlot The base slot ID that forms the root of the path.\n */\n function getStatic(EVMFetchRequest memory request, uint256 baseSlot) internal pure returns (EVMFetchRequest memory) {\n bytes32[] memory commands = request.commands;\n uint256 commandIdx = commands.length;\n if(commandIdx > 0 && request.operationIdx < 32) {\n // Terminate previous command\n _addOperation(request, OP_END);\n }\n assembly {\n mstore(commands, add(commandIdx, 1)) // Increment command array length\n }\n if(request.commands.length > MAX_COMMANDS) {\n revert TooManyCommands(MAX_COMMANDS);\n }\n request.operationIdx = 0;\n _addOperation(request, 0);\n _addOperation(request, _addConstant(request, abi.encode(baseSlot)));\n return request;\n }\n\n /**\n * @dev Starts describing a new fetch request.\n * Paths specify a series of hashing operations to derive the final slot ID.\n * See https://docs.soliditylang.org/en/v0.8.17/internals/layout_in_storage.html for details on how Solidity\n * lays out storage variables.\n * @param request The request object being operated on.\n * @param baseSlot The base slot ID that forms the root of the path.\n */\n function getDynamic(EVMFetchRequest memory request, uint256 baseSlot) internal pure returns (EVMFetchRequest memory) {\n bytes32[] memory commands = request.commands;\n uint256 commandIdx = commands.length;\n if(commandIdx > 0 && request.operationIdx < 32) {\n // Terminate previous command\n _addOperation(request, OP_END);\n }\n assembly {\n mstore(commands, add(commandIdx, 1)) // Increment command array length\n }\n if(request.commands.length > MAX_COMMANDS) {\n revert TooManyCommands(MAX_COMMANDS);\n }\n request.operationIdx = 0;\n _addOperation(request, FLAG_DYNAMIC);\n _addOperation(request, _addConstant(request, abi.encode(baseSlot)));\n return request;\n }\n\n /**\n * @dev Adds a `uint256` element to the current path.\n * @param request The request object being operated on.\n * @param el The element to add.\n */\n function element(EVMFetchRequest memory request, uint256 el) internal pure returns (EVMFetchRequest memory) {\n if(request.operationIdx >= 32) {\n revert CommandTooLong();\n }\n _addOperation(request, _addConstant(request, abi.encode(el)));\n return request;\n }\n\n /**\n * @dev Adds a `bytes32` element to the current path.\n * @param request The request object being operated on.\n * @param el The element to add.\n */\n function element(EVMFetchRequest memory request, bytes32 el) internal pure returns (EVMFetchRequest memory) {\n if(request.operationIdx >= 32) {\n revert CommandTooLong();\n }\n _addOperation(request, _addConstant(request, abi.encode(el)));\n return request;\n }\n\n /**\n * @dev Adds an `address` element to the current path.\n * @param request The request object being operated on.\n * @param el The element to add.\n */\n function element(EVMFetchRequest memory request, address el) internal pure returns (EVMFetchRequest memory) {\n if(request.operationIdx >= 32) {\n revert CommandTooLong();\n }\n _addOperation(request, _addConstant(request, abi.encode(el)));\n return request;\n }\n\n /**\n * @dev Adds a `bytes` element to the current path.\n * @param request The request object being operated on.\n * @param el The element to add.\n */\n function element(EVMFetchRequest memory request, bytes memory el) internal pure returns (EVMFetchRequest memory) {\n if(request.operationIdx >= 32) {\n revert CommandTooLong();\n }\n _addOperation(request, _addConstant(request, el));\n return request;\n }\n\n /**\n * @dev Adds a `string` element to the current path.\n * @param request The request object being operated on.\n * @param el The element to add.\n */\n function element(EVMFetchRequest memory request, string memory el) internal pure returns (EVMFetchRequest memory) {\n if(request.operationIdx >= 32) {\n revert CommandTooLong();\n }\n _addOperation(request, _addConstant(request, bytes(el)));\n return request;\n }\n\n /**\n * @dev Adds a reference to a previous fetch to the current path.\n * @param request The request object being operated on.\n * @param idx The index of the previous fetch request, starting at 0.\n */\n function ref(EVMFetchRequest memory request, uint8 idx) internal pure returns (EVMFetchRequest memory) {\n if(request.operationIdx >= 32) {\n revert CommandTooLong();\n }\n if(idx > request.commands.length || idx > 31) {\n revert InvalidReference(idx, request.commands.length);\n }\n _addOperation(request, OP_BACKREF | idx);\n return request;\n }\n\n /**\n * @dev Initiates the fetch request.\n * Calling this function terminates execution; clients that implement CCIP-Read will make a callback to\n * `callback` with the results of the operation.\n * @param callbackId A callback function selector on this contract that will be invoked via CCIP-Read with the result of the lookup.\n * The function must have a signature matching `(bytes[] memory values, bytes callbackData)` with a return type matching the call in which\n * this function was invoked. Its return data will be returned as the return value of the entire CCIP-read operation.\n * @param callbackData Extra data to supply to the callback.\n */\n function fetch(EVMFetchRequest memory request, bytes4 callbackId, bytes memory callbackData) internal view {\n if(request.commands.length > 0 && request.operationIdx < 32) {\n // Terminate last command\n _addOperation(request, OP_END);\n }\n revert OffchainLookup(\n address(this),\n request.verifier.gatewayURLs(),\n abi.encodeCall(IEVMGateway.getStorageSlots, (request.target, request.commands, request.constants)),\n EVMFetchTarget.getStorageSlotsCallback.selector,\n abi.encode(request.verifier, request.target, request.commands, request.constants, callbackId, callbackData)\n );\n }\n\n function _addConstant(EVMFetchRequest memory request, bytes memory value) private pure returns(uint8 idx) {\n bytes[] memory constants = request.constants;\n idx = uint8(constants.length);\n assembly {\n mstore(constants, add(idx, 1)) // Increment constant array length\n }\n constants[idx] = value;\n }\n\n function _addOperation(EVMFetchRequest memory request, uint8 op) private pure {\n uint256 commandIdx = request.commands.length - 1;\n request.commands[commandIdx] = request.commands[commandIdx] | (bytes32(bytes1(op)) >> (8 * request.operationIdx++));\n }\n}\n" + }, + "@ensdomains/evm-verifier/contracts/EVMFetchTarget.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\nimport { IEVMVerifier } from './IEVMVerifier.sol';\nimport { Address } from '@openzeppelin/contracts/utils/Address.sol';\n\n/**\n * @dev Callback implementation for users of `EVMFetcher`. If you use `EVMFetcher`, your contract must\n * inherit from this contract in order to handle callbacks correctly.\n */\nabstract contract EVMFetchTarget {\n using Address for address;\n\n error ResponseLengthMismatch(uint256 actual, uint256 expected);\n\n /**\n * @dev Internal callback function invoked by CCIP-Read in response to a `getStorageSlots` request.\n */\n function getStorageSlotsCallback(bytes calldata response, bytes calldata extradata) external {\n bytes memory proof = abi.decode(response, (bytes));\n (IEVMVerifier verifier, address addr, bytes32[] memory commands, bytes[] memory constants, bytes4 callback, bytes memory callbackData) =\n abi.decode(extradata, (IEVMVerifier, address, bytes32[], bytes[], bytes4, bytes));\n bytes[] memory values = verifier.getStorageValues(addr, commands, constants, proof);\n if(values.length != commands.length) {\n revert ResponseLengthMismatch(values.length, commands.length);\n }\n bytes memory ret = address(this).functionCall(abi.encodeWithSelector(callback, values, callbackData));\n assembly {\n return(add(ret, 32), mload(ret))\n }\n }\n}\n" + }, + "@ensdomains/evm-verifier/contracts/EVMProofHelper.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\nimport {RLPReader} from \"@eth-optimism/contracts-bedrock/src/libraries/rlp/RLPReader.sol\";\nimport {Bytes} from \"@eth-optimism/contracts-bedrock/src/libraries/Bytes.sol\";\nimport {SecureMerkleTrie} from \"./SecureMerkleTrie.sol\";\n\nstruct StateProof {\n bytes[] stateTrieWitness; // Witness proving the `storageRoot` against a state root.\n bytes[][] storageProofs; // An array of proofs of individual storage elements \n}\n\nuint8 constant OP_CONSTANT = 0x00;\nuint8 constant OP_BACKREF = 0x20;\nuint8 constant FLAG_DYNAMIC = 0x01;\n\nlibrary EVMProofHelper {\n using Bytes for bytes;\n\n error AccountNotFound(address);\n error UnknownOpcode(uint8);\n error InvalidSlotSize(uint256 size);\n\n /**\n * @notice Get the storage root for the provided merkle proof\n * @param stateRoot The state root the witness was generated against\n * @param target The address we are fetching a storage root for\n * @param witness A witness proving the value of the storage root for `target`.\n * @return The storage root retrieved from the provided state root\n */\n function getStorageRoot(bytes32 stateRoot, address target, bytes[] memory witness) private pure returns (bytes32) {\n (bool exists, bytes memory encodedResolverAccount) = SecureMerkleTrie.get(\n abi.encodePacked(target),\n witness,\n stateRoot\n );\n if(!exists) {\n revert AccountNotFound(target);\n }\n RLPReader.RLPItem[] memory accountState = RLPReader.readList(encodedResolverAccount);\n return bytes32(RLPReader.readBytes(accountState[2]));\n }\n\n /**\n * @notice Prove whether the provided storage slot is part of the storageRoot\n * @param storageRoot the storage root for the account that contains the storage slot\n * @param slot The storage key we are fetching the value of\n * @param witness the StorageProof struct containing the necessary proof data\n * @return The retrieved storage proof value or 0x if the storage slot is empty\n */\n function getSingleStorageProof(bytes32 storageRoot, uint256 slot, bytes[] memory witness) private pure returns (bytes memory) {\n (bool exists, bytes memory retrievedValue) = SecureMerkleTrie.get(\n abi.encodePacked(slot),\n witness,\n storageRoot\n );\n if(!exists) {\n // Nonexistent values are treated as zero.\n return \"\";\n }\n return RLPReader.readBytes(retrievedValue);\n }\n\n function getFixedValue(bytes32 storageRoot, uint256 slot, bytes[] memory witness) private pure returns(bytes32) {\n bytes memory value = getSingleStorageProof(storageRoot, slot, witness);\n // RLP encoded storage slots are stored without leading 0 bytes.\n // Casting to bytes32 appends trailing 0 bytes, so we have to bit shift to get the \n // original fixed-length representation back.\n return bytes32(value) >> (256 - 8 * value.length);\n }\n\n function executeOperation(bytes1 operation, bytes[] memory constants, bytes[] memory values) private pure returns(bytes memory) {\n uint8 opcode = uint8(operation) & 0xe0;\n uint8 operand = uint8(operation) & 0x1f;\n\n if(opcode == OP_CONSTANT) {\n return constants[operand];\n } else if(opcode == OP_BACKREF) {\n return values[operand];\n } else {\n revert UnknownOpcode(opcode);\n }\n }\n\n function computeFirstSlot(bytes32 command, bytes[] memory constants, bytes[] memory values) private pure returns(bool isDynamic, uint256 slot) {\n uint8 flags = uint8(command[0]);\n isDynamic = (flags & FLAG_DYNAMIC) != 0;\n\n bytes memory slotData = executeOperation(command[1], constants, values);\n require(slotData.length == 32, \"First path element must be 32 bytes\");\n slot = uint256(bytes32(slotData));\n\n for(uint256 j = 2; j < 32 && command[j] != 0xff; j++) {\n bytes memory index = executeOperation(command[j], constants, values);\n slot = uint256(keccak256(abi.encodePacked(index, slot)));\n }\n }\n\n function getDynamicValue(bytes32 storageRoot, uint256 slot, StateProof memory proof, uint256 proofIdx) private pure returns(bytes memory value, uint256 newProofIdx) {\n uint256 firstValue = uint256(getFixedValue(storageRoot, slot, proof.storageProofs[proofIdx++]));\n if(firstValue & 0x01 == 0x01) {\n // Long value: first slot is `length * 2 + 1`, following slots are data.\n uint256 length = (firstValue - 1) / 2;\n value = \"\";\n slot = uint256(keccak256(abi.encodePacked(slot)));\n // This is horribly inefficient - O(n^2). A better approach would be to build an array of words and concatenate them\n // all at once, but we're trying to avoid writing new library code.\n while(length > 0) {\n if(length < 32) {\n value = bytes.concat(value, getSingleStorageProof(storageRoot, slot++, proof.storageProofs[proofIdx++]).slice(0, length));\n length = 0;\n } else {\n value = bytes.concat(value, getSingleStorageProof(storageRoot, slot++, proof.storageProofs[proofIdx++]));\n length -= 32;\n }\n }\n return (value, proofIdx);\n } else {\n // Short value: least significant byte is `length * 2`, other bytes are data.\n uint256 length = (firstValue & 0xFF) / 2;\n return (abi.encode(firstValue).slice(0, length), proofIdx);\n }\n }\n\n function getStorageValues(address target, bytes32[] memory commands, bytes[] memory constants, bytes32 stateRoot, StateProof memory proof) internal pure returns(bytes[] memory values) {\n bytes32 storageRoot = getStorageRoot(stateRoot, target, proof.stateTrieWitness);\n uint256 proofIdx = 0;\n values = new bytes[](commands.length);\n for(uint256 i = 0; i < commands.length; i++) {\n bytes32 command = commands[i];\n (bool isDynamic, uint256 slot) = computeFirstSlot(command, constants, values);\n if(!isDynamic) {\n values[i] = abi.encode(getFixedValue(storageRoot, slot, proof.storageProofs[proofIdx++]));\n if(values[i].length > 32) {\n revert InvalidSlotSize(values[i].length);\n }\n } else {\n (values[i], proofIdx) = getDynamicValue(storageRoot, slot, proof, proofIdx);\n }\n }\n }\n}" + }, + "@ensdomains/evm-verifier/contracts/IEVMVerifier.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\ninterface IEVMVerifier {\n function gatewayURLs() external view returns(string[] memory);\n function getStorageValues(address target, bytes32[] memory commands, bytes[] memory constants, bytes memory proof) external view returns(bytes[] memory values);\n}\n" + }, + "@ensdomains/evm-verifier/contracts/MerkleTrie.sol": { + "content": "// Pulled from https://github.com/ethereum-optimism/optimism/blob/4d13f0afe8869faf7bba45d8339998525ebc5161/packages/contracts-bedrock/contracts/libraries/trie/MerkleTrie.sol\n// as this is the last version of Optimism's Merkle Trie library that supports nonexistence proofs; support was removed\n// in the next commit for some version.\n// Copyright 2020-2021 Optimism\n// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport { Bytes } from \"@eth-optimism/contracts-bedrock/src/libraries/Bytes.sol\";\nimport { RLPReader } from \"@eth-optimism/contracts-bedrock/src/libraries/rlp/RLPReader.sol\";\n\n\n/**\n * @title MerkleTrie\n * @notice MerkleTrie is a small library for verifying standard Ethereum Merkle-Patricia trie\n * inclusion proofs. By default, this library assumes a hexary trie. One can change the\n * trie radix constant to support other trie radixes.\n */\nlibrary MerkleTrie {\n /**\n * @notice Struct representing a node in the trie.\n */\n struct TrieNode {\n bytes encoded;\n RLPReader.RLPItem[] decoded;\n }\n\n /**\n * @notice Determines the number of elements per branch node.\n */\n uint256 internal constant TREE_RADIX = 16;\n\n /**\n * @notice Branch nodes have TREE_RADIX elements and one value element.\n */\n uint256 internal constant BRANCH_NODE_LENGTH = TREE_RADIX + 1;\n\n /**\n * @notice Leaf nodes and extension nodes have two elements, a `path` and a `value`.\n */\n uint256 internal constant LEAF_OR_EXTENSION_NODE_LENGTH = 2;\n\n /**\n * @notice Prefix for even-nibbled extension node paths.\n */\n uint8 internal constant PREFIX_EXTENSION_EVEN = 0;\n\n /**\n * @notice Prefix for odd-nibbled extension node paths.\n */\n uint8 internal constant PREFIX_EXTENSION_ODD = 1;\n\n /**\n * @notice Prefix for even-nibbled leaf node paths.\n */\n uint8 internal constant PREFIX_LEAF_EVEN = 2;\n\n /**\n * @notice Prefix for odd-nibbled leaf node paths.\n */\n uint8 internal constant PREFIX_LEAF_ODD = 3;\n\n /**\n * @notice RLP representation of `NULL`.\n */\n bytes internal constant RLP_NULL = hex\"80\";\n\n /**\n * @notice Verifies a proof that a given key/value pair is present in the trie.\n *\n * @param _key Key of the node to search for, as a hex string.\n * @param _value Value of the node to search for, as a hex string.\n * @param _proof Merkle trie inclusion proof for the desired node. Unlike traditional Merkle\n * trees, this proof is executed top-down and consists of a list of RLP-encoded\n * nodes that make a path down to the target node.\n * @param _root Known root of the Merkle trie. Used to verify that the included proof is\n * correctly constructed.\n *\n * @return Whether or not the proof is valid.\n */\n function verifyInclusionProof(\n bytes memory _key,\n bytes memory _value,\n bytes[] memory _proof,\n bytes32 _root\n ) internal pure returns (bool) {\n (bool exists, bytes memory value) = get(_key, _proof, _root);\n return (exists && Bytes.equal(_value, value));\n }\n\n /**\n * @notice Retrieves the value associated with a given key.\n *\n * @param _key Key to search for, as hex bytes.\n * @param _proof Merkle trie inclusion proof for the key.\n * @param _root Known root of the Merkle trie.\n *\n * @return Whether or not the key exists.\n * @return Value of the key if it exists.\n */\n function get(\n bytes memory _key,\n bytes[] memory _proof,\n bytes32 _root\n ) internal pure returns (bool, bytes memory) {\n TrieNode[] memory proof = _parseProof(_proof);\n (uint256 pathLength, bytes memory keyRemainder, bool isFinalNode) = _walkNodePath(\n proof,\n _key,\n _root\n );\n\n bool noRemainder = keyRemainder.length == 0;\n\n require(noRemainder || isFinalNode, \"MerkleTrie: provided proof is invalid\");\n\n bytes memory value = noRemainder ? _getNodeValue(proof[pathLength - 1]) : bytes(\"\");\n\n return (value.length > 0, value);\n }\n\n /**\n * @notice Walks through a proof using a provided key.\n *\n * @param _proof Inclusion proof to walk through.\n * @param _key Key to use for the walk.\n * @param _root Known root of the trie.\n *\n * @return Length of the final path\n * @return Portion of the key remaining after the walk.\n * @return Whether or not we've hit a dead end.\n */\n // solhint-disable-next-line code-complexity\n function _walkNodePath(\n TrieNode[] memory _proof,\n bytes memory _key,\n bytes32 _root\n )\n private\n pure\n returns (\n uint256,\n bytes memory,\n bool\n )\n {\n uint256 pathLength = 0;\n bytes memory key = Bytes.toNibbles(_key);\n\n bytes memory currentNodeID = abi.encodePacked(_root);\n uint256 currentKeyIndex = 0;\n uint256 currentKeyIncrement = 0;\n TrieNode memory currentNode;\n\n // Proof is top-down, so we start at the first element (root).\n for (uint256 i = 0; i < _proof.length; i++) {\n currentNode = _proof[i];\n currentKeyIndex += currentKeyIncrement;\n\n // Keep track of the proof elements we actually need.\n // It's expensive to resize arrays, so this simply reduces gas costs.\n pathLength += 1;\n\n if (currentKeyIndex == 0) {\n // First proof element is always the root node.\n require(\n Bytes.equal(abi.encodePacked(keccak256(currentNode.encoded)), currentNodeID),\n \"MerkleTrie: invalid root hash\"\n );\n } else if (currentNode.encoded.length >= 32) {\n // Nodes 32 bytes or larger are hashed inside branch nodes.\n require(\n Bytes.equal(abi.encodePacked(keccak256(currentNode.encoded)), currentNodeID),\n \"MerkleTrie: invalid large internal hash\"\n );\n } else {\n // Nodes smaller than 32 bytes aren't hashed.\n require(\n Bytes.equal(currentNode.encoded, currentNodeID),\n \"MerkleTrie: invalid internal node hash\"\n );\n }\n\n if (currentNode.decoded.length == BRANCH_NODE_LENGTH) {\n if (currentKeyIndex == key.length) {\n // We've hit the end of the key\n // meaning the value should be within this branch node.\n break;\n } else {\n // We're not at the end of the key yet.\n // Figure out what the next node ID should be and continue.\n uint8 branchKey = uint8(key[currentKeyIndex]);\n RLPReader.RLPItem memory nextNode = currentNode.decoded[branchKey];\n currentNodeID = _getNodeID(nextNode);\n currentKeyIncrement = 1;\n continue;\n }\n } else if (currentNode.decoded.length == LEAF_OR_EXTENSION_NODE_LENGTH) {\n bytes memory path = _getNodePath(currentNode);\n uint8 prefix = uint8(path[0]);\n uint8 offset = 2 - (prefix % 2);\n bytes memory pathRemainder = Bytes.slice(path, offset);\n bytes memory keyRemainder = Bytes.slice(key, currentKeyIndex);\n uint256 sharedNibbleLength = _getSharedNibbleLength(pathRemainder, keyRemainder);\n\n require(\n keyRemainder.length >= pathRemainder.length,\n \"MerkleTrie: invalid key length for leaf or extension node\"\n );\n\n if (prefix == PREFIX_LEAF_EVEN || prefix == PREFIX_LEAF_ODD) {\n if (\n pathRemainder.length == sharedNibbleLength &&\n keyRemainder.length == sharedNibbleLength\n ) {\n // The key within this leaf matches our key exactly.\n // Increment the key index to reflect that we have no remainder.\n currentKeyIndex += sharedNibbleLength;\n }\n\n // We've hit a leaf node, so our next node should be NULL.\n currentNodeID = RLP_NULL;\n break;\n } else if (prefix == PREFIX_EXTENSION_EVEN || prefix == PREFIX_EXTENSION_ODD) {\n if (sharedNibbleLength != pathRemainder.length) {\n // Our extension node is not identical to the remainder.\n // We've hit the end of this path\n // updates will need to modify this extension.\n currentNodeID = RLP_NULL;\n break;\n } else {\n // Our extension shares some nibbles.\n // Carry on to the next node.\n currentNodeID = _getNodeID(currentNode.decoded[1]);\n currentKeyIncrement = sharedNibbleLength;\n continue;\n }\n } else {\n revert(\"MerkleTrie: received a node with an unknown prefix\");\n }\n } else {\n revert(\"MerkleTrie: received an unparseable node\");\n }\n }\n\n return (\n pathLength,\n Bytes.slice(key, currentKeyIndex),\n Bytes.equal(currentNodeID, RLP_NULL)\n );\n }\n\n /**\n * @notice Parses an array of proof elements into a new array that contains both the original\n * encoded element and the RLP-decoded element.\n *\n * @param _proof Array of proof elements to parse.\n *\n * @return Proof parsed into easily accessible structs.\n */\n function _parseProof(bytes[] memory _proof) private pure returns (TrieNode[] memory) {\n uint256 length = _proof.length;\n TrieNode[] memory proof = new TrieNode[](length);\n for (uint256 i = 0; i < length; ) {\n proof[i] = TrieNode({ encoded: _proof[i], decoded: RLPReader.readList(_proof[i]) });\n unchecked {\n ++i;\n }\n }\n return proof;\n }\n\n /**\n * @notice Picks out the ID for a node. Node ID is referred to as the \"hash\" within the\n * specification, but nodes < 32 bytes are not actually hashed.\n *\n * @param _node Node to pull an ID for.\n *\n * @return ID for the node, depending on the size of its contents.\n */\n function _getNodeID(RLPReader.RLPItem memory _node) private pure returns (bytes memory) {\n return _node.length < 32 ? RLPReader.readRawBytes(_node) : RLPReader.readBytes(_node);\n }\n\n /**\n * @notice Gets the path for a leaf or extension node.\n *\n * @param _node Node to get a path for.\n *\n * @return Node path, converted to an array of nibbles.\n */\n function _getNodePath(TrieNode memory _node) private pure returns (bytes memory) {\n return Bytes.toNibbles(RLPReader.readBytes(_node.decoded[0]));\n }\n\n /**\n * @notice Gets the value for a node.\n *\n * @param _node Node to get a value for.\n *\n * @return Node value, as hex bytes.\n */\n function _getNodeValue(TrieNode memory _node) private pure returns (bytes memory) {\n return RLPReader.readBytes(_node.decoded[_node.decoded.length - 1]);\n }\n\n /**\n * @notice Utility; determines the number of nibbles shared between two nibble arrays.\n *\n * @param _a First nibble array.\n * @param _b Second nibble array.\n *\n * @return Number of shared nibbles.\n */\n function _getSharedNibbleLength(bytes memory _a, bytes memory _b)\n private\n pure\n returns (uint256)\n {\n uint256 shared;\n uint256 max = (_a.length < _b.length) ? _a.length : _b.length;\n for (; shared < max && _a[shared] == _b[shared]; ) {\n unchecked {\n ++shared;\n }\n }\n return shared;\n }\n}" + }, + "@ensdomains/evm-verifier/contracts/SecureMerkleTrie.sol": { + "content": "// Pulled from https://github.com/ethereum-optimism/optimism/blob/4d13f0afe8869faf7bba45d8339998525ebc5161/packages/contracts-bedrock/contracts/libraries/trie/MerkleTrie.sol\n// as this is the last version of Optimism's Merkle Trie library that supports nonexistence proofs; support was removed\n// in the next commit for some version.\n// Copyright 2020-2021 Optimism\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/* Library Imports */\nimport { MerkleTrie } from \"./MerkleTrie.sol\";\n\n/**\n * @title SecureMerkleTrie\n * @notice SecureMerkleTrie is a thin wrapper around the MerkleTrie library that hashes the input\n * keys. Ethereum's state trie hashes input keys before storing them.\n */\nlibrary SecureMerkleTrie {\n /**\n * @notice Verifies a proof that a given key/value pair is present in the Merkle trie.\n *\n * @param _key Key of the node to search for, as a hex string.\n * @param _value Value of the node to search for, as a hex string.\n * @param _proof Merkle trie inclusion proof for the desired node. Unlike traditional Merkle\n * trees, this proof is executed top-down and consists of a list of RLP-encoded\n * nodes that make a path down to the target node.\n * @param _root Known root of the Merkle trie. Used to verify that the included proof is\n * correctly constructed.\n *\n * @return Whether or not the proof is valid.\n */\n function verifyInclusionProof(\n bytes memory _key,\n bytes memory _value,\n bytes[] memory _proof,\n bytes32 _root\n ) internal pure returns (bool) {\n bytes memory key = _getSecureKey(_key);\n return MerkleTrie.verifyInclusionProof(key, _value, _proof, _root);\n }\n\n /**\n * @notice Retrieves the value associated with a given key.\n *\n * @param _key Key to search for, as hex bytes.\n * @param _proof Merkle trie inclusion proof for the key.\n * @param _root Known root of the Merkle trie.\n *\n * @return Whether or not the key exists.\n * @return Value of the key if it exists.\n */\n function get(\n bytes memory _key,\n bytes[] memory _proof,\n bytes32 _root\n ) internal pure returns (bool, bytes memory) {\n bytes memory key = _getSecureKey(_key);\n return MerkleTrie.get(key, _proof, _root);\n }\n\n /**\n * @notice Computes the hashed version of the input key.\n *\n * @param _key Key to hash.\n *\n * @return Hashed version of the key.\n */\n function _getSecureKey(bytes memory _key) private pure returns (bytes memory) {\n return abi.encodePacked(keccak256(_key));\n }\n}" + }, + "@ensdomains/l1-verifier/contracts/L1Verifier.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\nimport { IEVMVerifier } from \"@ensdomains/evm-verifier/contracts/IEVMVerifier.sol\";\nimport { RLPReader } from \"@eth-optimism/contracts-bedrock/src/libraries/rlp/RLPReader.sol\";\nimport { StateProof, EVMProofHelper } from \"@ensdomains/evm-verifier/contracts/EVMProofHelper.sol\";\n\nstruct L1WitnessData {\n uint256 blockNo;\n bytes blockHeader;\n}\n\ncontract L1Verifier is IEVMVerifier {\n error BlockHeaderHashMismatch(uint256 current, uint256 number, bytes32 expected, bytes32 actual);\n\n string[] _gatewayURLs;\n\n constructor(string[] memory urls) {\n _gatewayURLs = urls;\n }\n\n function gatewayURLs() external view returns(string[] memory) {\n return _gatewayURLs;\n }\n\n function getStorageValues(address target, bytes32[] memory commands, bytes[] memory constants, bytes memory proof) external view returns(bytes[] memory values) {\n (L1WitnessData memory l1Data, StateProof memory stateProof) = abi.decode(proof, (L1WitnessData, StateProof));\n if(keccak256(l1Data.blockHeader) != blockhash(l1Data.blockNo)) {\n revert BlockHeaderHashMismatch(block.number, l1Data.blockNo, blockhash(l1Data.blockNo), keccak256(l1Data.blockHeader));\n }\n RLPReader.RLPItem[] memory headerFields = RLPReader.readList(l1Data.blockHeader);\n bytes32 stateRoot = bytes32(RLPReader.readBytes(headerFields[3]));\n return EVMProofHelper.getStorageValues(target, commands, constants, stateRoot, stateProof);\n }\n}\n" + }, + "@eth-optimism/contracts-bedrock/src/libraries/Bytes.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/// @title Bytes\n/// @notice Bytes is a library for manipulating byte arrays.\nlibrary Bytes {\n /// @custom:attribution https://github.com/GNSPS/solidity-bytes-utils\n /// @notice Slices a byte array with a given starting index and length. Returns a new byte array\n /// as opposed to a pointer to the original array. Will throw if trying to slice more\n /// bytes than exist in the array.\n /// @param _bytes Byte array to slice.\n /// @param _start Starting index of the slice.\n /// @param _length Length of the slice.\n /// @return Slice of the input byte array.\n function slice(bytes memory _bytes, uint256 _start, uint256 _length) internal pure returns (bytes memory) {\n unchecked {\n require(_length + 31 >= _length, \"slice_overflow\");\n require(_start + _length >= _start, \"slice_overflow\");\n require(_bytes.length >= _start + _length, \"slice_outOfBounds\");\n }\n\n bytes memory tempBytes;\n\n assembly {\n switch iszero(_length)\n case 0 {\n // Get a location of some free memory and store it in tempBytes as\n // Solidity does for memory variables.\n tempBytes := mload(0x40)\n\n // The first word of the slice result is potentially a partial\n // word read from the original array. To read it, we calculate\n // the length of that partial word and start copying that many\n // bytes into the array. The first word we copy will start with\n // data we don't care about, but the last `lengthmod` bytes will\n // land at the beginning of the contents of the new array. When\n // we're done copying, we overwrite the full first word with\n // the actual length of the slice.\n let lengthmod := and(_length, 31)\n\n // The multiplication in the next line is necessary\n // because when slicing multiples of 32 bytes (lengthmod == 0)\n // the following copy loop was copying the origin's length\n // and then ending prematurely not copying everything it should.\n let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod)))\n let end := add(mc, _length)\n\n for {\n // The multiplication in the next line has the same exact purpose\n // as the one above.\n let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start)\n } lt(mc, end) {\n mc := add(mc, 0x20)\n cc := add(cc, 0x20)\n } { mstore(mc, mload(cc)) }\n\n mstore(tempBytes, _length)\n\n //update free-memory pointer\n //allocating the array padded to 32 bytes like the compiler does now\n mstore(0x40, and(add(mc, 31), not(31)))\n }\n //if we want a zero-length slice let's just return a zero-length array\n default {\n tempBytes := mload(0x40)\n\n //zero out the 32 bytes slice we are about to return\n //we need to do it because Solidity does not garbage collect\n mstore(tempBytes, 0)\n\n mstore(0x40, add(tempBytes, 0x20))\n }\n }\n\n return tempBytes;\n }\n\n /// @notice Slices a byte array with a given starting index up to the end of the original byte\n /// array. Returns a new array rathern than a pointer to the original.\n /// @param _bytes Byte array to slice.\n /// @param _start Starting index of the slice.\n /// @return Slice of the input byte array.\n function slice(bytes memory _bytes, uint256 _start) internal pure returns (bytes memory) {\n if (_start >= _bytes.length) {\n return bytes(\"\");\n }\n return slice(_bytes, _start, _bytes.length - _start);\n }\n\n /// @notice Converts a byte array into a nibble array by splitting each byte into two nibbles.\n /// Resulting nibble array will be exactly twice as long as the input byte array.\n /// @param _bytes Input byte array to convert.\n /// @return Resulting nibble array.\n function toNibbles(bytes memory _bytes) internal pure returns (bytes memory) {\n bytes memory _nibbles;\n assembly {\n // Grab a free memory offset for the new array\n _nibbles := mload(0x40)\n\n // Load the length of the passed bytes array from memory\n let bytesLength := mload(_bytes)\n\n // Calculate the length of the new nibble array\n // This is the length of the input array times 2\n let nibblesLength := shl(0x01, bytesLength)\n\n // Update the free memory pointer to allocate memory for the new array.\n // To do this, we add the length of the new array + 32 bytes for the array length\n // rounded up to the nearest 32 byte boundary to the current free memory pointer.\n mstore(0x40, add(_nibbles, and(not(0x1F), add(nibblesLength, 0x3F))))\n\n // Store the length of the new array in memory\n mstore(_nibbles, nibblesLength)\n\n // Store the memory offset of the _bytes array's contents on the stack\n let bytesStart := add(_bytes, 0x20)\n\n // Store the memory offset of the nibbles array's contents on the stack\n let nibblesStart := add(_nibbles, 0x20)\n\n // Loop through each byte in the input array\n for { let i := 0x00 } lt(i, bytesLength) { i := add(i, 0x01) } {\n // Get the starting offset of the next 2 bytes in the nibbles array\n let offset := add(nibblesStart, shl(0x01, i))\n // Load the byte at the current index within the `_bytes` array\n let b := byte(0x00, mload(add(bytesStart, i)))\n\n // Pull out the first nibble and store it in the new array\n mstore8(offset, shr(0x04, b))\n // Pull out the second nibble and store it in the new array\n mstore8(add(offset, 0x01), and(b, 0x0F))\n }\n }\n return _nibbles;\n }\n\n /// @notice Compares two byte arrays by comparing their keccak256 hashes.\n /// @param _bytes First byte array to compare.\n /// @param _other Second byte array to compare.\n /// @return True if the two byte arrays are equal, false otherwise.\n function equal(bytes memory _bytes, bytes memory _other) internal pure returns (bool) {\n return keccak256(_bytes) == keccak256(_other);\n }\n}\n" + }, + "@eth-optimism/contracts-bedrock/src/libraries/rlp/RLPReader.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.8;\n\n/// @custom:attribution https://github.com/hamdiallam/Solidity-RLP\n/// @title RLPReader\n/// @notice RLPReader is a library for parsing RLP-encoded byte arrays into Solidity types. Adapted\n/// from Solidity-RLP (https://github.com/hamdiallam/Solidity-RLP) by Hamdi Allam with\n/// various tweaks to improve readability.\nlibrary RLPReader {\n /// @notice Custom pointer type to avoid confusion between pointers and uint256s.\n type MemoryPointer is uint256;\n\n /// @notice RLP item types.\n /// @custom:value DATA_ITEM Represents an RLP data item (NOT a list).\n /// @custom:value LIST_ITEM Represents an RLP list item.\n enum RLPItemType {\n DATA_ITEM,\n LIST_ITEM\n }\n\n /// @notice Struct representing an RLP item.\n /// @custom:field length Length of the RLP item.\n /// @custom:field ptr Pointer to the RLP item in memory.\n struct RLPItem {\n uint256 length;\n MemoryPointer ptr;\n }\n\n /// @notice Max list length that this library will accept.\n uint256 internal constant MAX_LIST_LENGTH = 32;\n\n /// @notice Converts bytes to a reference to memory position and length.\n /// @param _in Input bytes to convert.\n /// @return out_ Output memory reference.\n function toRLPItem(bytes memory _in) internal pure returns (RLPItem memory out_) {\n // Empty arrays are not RLP items.\n require(_in.length > 0, \"RLPReader: length of an RLP item must be greater than zero to be decodable\");\n\n MemoryPointer ptr;\n assembly {\n ptr := add(_in, 32)\n }\n\n out_ = RLPItem({ length: _in.length, ptr: ptr });\n }\n\n /// @notice Reads an RLP list value into a list of RLP items.\n /// @param _in RLP list value.\n /// @return out_ Decoded RLP list items.\n function readList(RLPItem memory _in) internal pure returns (RLPItem[] memory out_) {\n (uint256 listOffset, uint256 listLength, RLPItemType itemType) = _decodeLength(_in);\n\n require(itemType == RLPItemType.LIST_ITEM, \"RLPReader: decoded item type for list is not a list item\");\n\n require(listOffset + listLength == _in.length, \"RLPReader: list item has an invalid data remainder\");\n\n // Solidity in-memory arrays can't be increased in size, but *can* be decreased in size by\n // writing to the length. Since we can't know the number of RLP items without looping over\n // the entire input, we'd have to loop twice to accurately size this array. It's easier to\n // simply set a reasonable maximum list length and decrease the size before we finish.\n out_ = new RLPItem[](MAX_LIST_LENGTH);\n\n uint256 itemCount = 0;\n uint256 offset = listOffset;\n while (offset < _in.length) {\n (uint256 itemOffset, uint256 itemLength,) = _decodeLength(\n RLPItem({ length: _in.length - offset, ptr: MemoryPointer.wrap(MemoryPointer.unwrap(_in.ptr) + offset) })\n );\n\n // We don't need to check itemCount < out.length explicitly because Solidity already\n // handles this check on our behalf, we'd just be wasting gas.\n out_[itemCount] = RLPItem({\n length: itemLength + itemOffset,\n ptr: MemoryPointer.wrap(MemoryPointer.unwrap(_in.ptr) + offset)\n });\n\n itemCount += 1;\n offset += itemOffset + itemLength;\n }\n\n // Decrease the array size to match the actual item count.\n assembly {\n mstore(out_, itemCount)\n }\n }\n\n /// @notice Reads an RLP list value into a list of RLP items.\n /// @param _in RLP list value.\n /// @return out_ Decoded RLP list items.\n function readList(bytes memory _in) internal pure returns (RLPItem[] memory out_) {\n out_ = readList(toRLPItem(_in));\n }\n\n /// @notice Reads an RLP bytes value into bytes.\n /// @param _in RLP bytes value.\n /// @return out_ Decoded bytes.\n function readBytes(RLPItem memory _in) internal pure returns (bytes memory out_) {\n (uint256 itemOffset, uint256 itemLength, RLPItemType itemType) = _decodeLength(_in);\n\n require(itemType == RLPItemType.DATA_ITEM, \"RLPReader: decoded item type for bytes is not a data item\");\n\n require(_in.length == itemOffset + itemLength, \"RLPReader: bytes value contains an invalid remainder\");\n\n out_ = _copy(_in.ptr, itemOffset, itemLength);\n }\n\n /// @notice Reads an RLP bytes value into bytes.\n /// @param _in RLP bytes value.\n /// @return out_ Decoded bytes.\n function readBytes(bytes memory _in) internal pure returns (bytes memory out_) {\n out_ = readBytes(toRLPItem(_in));\n }\n\n /// @notice Reads the raw bytes of an RLP item.\n /// @param _in RLP item to read.\n /// @return out_ Raw RLP bytes.\n function readRawBytes(RLPItem memory _in) internal pure returns (bytes memory out_) {\n out_ = _copy(_in.ptr, 0, _in.length);\n }\n\n /// @notice Decodes the length of an RLP item.\n /// @param _in RLP item to decode.\n /// @return offset_ Offset of the encoded data.\n /// @return length_ Length of the encoded data.\n /// @return type_ RLP item type (LIST_ITEM or DATA_ITEM).\n function _decodeLength(RLPItem memory _in)\n private\n pure\n returns (uint256 offset_, uint256 length_, RLPItemType type_)\n {\n // Short-circuit if there's nothing to decode, note that we perform this check when\n // the user creates an RLP item via toRLPItem, but it's always possible for them to bypass\n // that function and create an RLP item directly. So we need to check this anyway.\n require(_in.length > 0, \"RLPReader: length of an RLP item must be greater than zero to be decodable\");\n\n MemoryPointer ptr = _in.ptr;\n uint256 prefix;\n assembly {\n prefix := byte(0, mload(ptr))\n }\n\n if (prefix <= 0x7f) {\n // Single byte.\n return (0, 1, RLPItemType.DATA_ITEM);\n } else if (prefix <= 0xb7) {\n // Short string.\n\n // slither-disable-next-line variable-scope\n uint256 strLen = prefix - 0x80;\n\n require(\n _in.length > strLen, \"RLPReader: length of content must be greater than string length (short string)\"\n );\n\n bytes1 firstByteOfContent;\n assembly {\n firstByteOfContent := and(mload(add(ptr, 1)), shl(248, 0xff))\n }\n\n require(\n strLen != 1 || firstByteOfContent >= 0x80,\n \"RLPReader: invalid prefix, single byte < 0x80 are not prefixed (short string)\"\n );\n\n return (1, strLen, RLPItemType.DATA_ITEM);\n } else if (prefix <= 0xbf) {\n // Long string.\n uint256 lenOfStrLen = prefix - 0xb7;\n\n require(\n _in.length > lenOfStrLen,\n \"RLPReader: length of content must be > than length of string length (long string)\"\n );\n\n bytes1 firstByteOfContent;\n assembly {\n firstByteOfContent := and(mload(add(ptr, 1)), shl(248, 0xff))\n }\n\n require(\n firstByteOfContent != 0x00, \"RLPReader: length of content must not have any leading zeros (long string)\"\n );\n\n uint256 strLen;\n assembly {\n strLen := shr(sub(256, mul(8, lenOfStrLen)), mload(add(ptr, 1)))\n }\n\n require(strLen > 55, \"RLPReader: length of content must be greater than 55 bytes (long string)\");\n\n require(\n _in.length > lenOfStrLen + strLen,\n \"RLPReader: length of content must be greater than total length (long string)\"\n );\n\n return (1 + lenOfStrLen, strLen, RLPItemType.DATA_ITEM);\n } else if (prefix <= 0xf7) {\n // Short list.\n // slither-disable-next-line variable-scope\n uint256 listLen = prefix - 0xc0;\n\n require(_in.length > listLen, \"RLPReader: length of content must be greater than list length (short list)\");\n\n return (1, listLen, RLPItemType.LIST_ITEM);\n } else {\n // Long list.\n uint256 lenOfListLen = prefix - 0xf7;\n\n require(\n _in.length > lenOfListLen,\n \"RLPReader: length of content must be > than length of list length (long list)\"\n );\n\n bytes1 firstByteOfContent;\n assembly {\n firstByteOfContent := and(mload(add(ptr, 1)), shl(248, 0xff))\n }\n\n require(\n firstByteOfContent != 0x00, \"RLPReader: length of content must not have any leading zeros (long list)\"\n );\n\n uint256 listLen;\n assembly {\n listLen := shr(sub(256, mul(8, lenOfListLen)), mload(add(ptr, 1)))\n }\n\n require(listLen > 55, \"RLPReader: length of content must be greater than 55 bytes (long list)\");\n\n require(\n _in.length > lenOfListLen + listLen,\n \"RLPReader: length of content must be greater than total length (long list)\"\n );\n\n return (1 + lenOfListLen, listLen, RLPItemType.LIST_ITEM);\n }\n }\n\n /// @notice Copies the bytes from a memory location.\n /// @param _src Pointer to the location to read from.\n /// @param _offset Offset to start reading from.\n /// @param _length Number of bytes to read.\n /// @return out_ Copied bytes.\n function _copy(MemoryPointer _src, uint256 _offset, uint256 _length) private pure returns (bytes memory out_) {\n out_ = new bytes(_length);\n if (_length == 0) {\n return out_;\n }\n\n // Mostly based on Solidity's copy_memory_to_memory:\n // solhint-disable max-line-length\n // https://github.com/ethereum/solidity/blob/34dd30d71b4da730488be72ff6af7083cf2a91f6/libsolidity/codegen/YulUtilFunctions.cpp#L102-L114\n uint256 src = MemoryPointer.unwrap(_src) + _offset;\n assembly {\n let dest := add(out_, 32)\n let i := 0\n for { } lt(i, _length) { i := add(i, 32) } { mstore(add(dest, i), mload(add(src, i))) }\n\n if gt(i, _length) { mstore(add(dest, _length), 0) }\n }\n }\n}\n" + }, + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor() {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby disabling any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "@openzeppelin/contracts/interfaces/IERC1271.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1271.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC1271 standard signature validation method for\n * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271].\n *\n * _Available since v4.1._\n */\ninterface IERC1271 {\n /**\n * @dev Should return whether the signature provided is valid for the provided data\n * @param hash Hash of the data to be signed\n * @param signature Signature byte array associated with _data\n */\n function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue);\n}\n" + }, + "@openzeppelin/contracts/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n *\n * Furthermore, `isContract` will also return true if the target contract within\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n * which only has an effect at the end of a transaction.\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n function _contextSuffixLength() internal view virtual returns (uint256) {\n return 0;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/cryptography/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../Strings.sol\";\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSA {\n enum RecoverError {\n NoError,\n InvalidSignature,\n InvalidSignatureLength,\n InvalidSignatureS,\n InvalidSignatureV // Deprecated in v4.8\n }\n\n function _throwError(RecoverError error) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert(\"ECDSA: invalid signature\");\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert(\"ECDSA: invalid signature length\");\n } else if (error == RecoverError.InvalidSignatureS) {\n revert(\"ECDSA: invalid signature 's' value\");\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature` or error string. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n *\n * Documentation for signature generation:\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\n if (signature.length == 65) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n /// @solidity memory-safe-assembly\n assembly {\n r := mload(add(signature, 0x20))\n s := mload(add(signature, 0x40))\n v := byte(0, mload(add(signature, 0x60)))\n }\n return tryRecover(hash, v, r, s);\n } else {\n return (address(0), RecoverError.InvalidSignatureLength);\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature`. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, signature);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n *\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) {\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n uint8 v = uint8((uint256(vs) >> 255) + 27);\n return tryRecover(hash, v, r, s);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n *\n * _Available since v4.2._\n */\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n * `r` and `s` signature fields separately.\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS);\n }\n\n // If the signature is valid (and not malleable), return the signer address\n address signer = ecrecover(hash, v, r, s);\n if (signer == address(0)) {\n return (address(0), RecoverError.InvalidSignature);\n }\n\n return (signer, RecoverError.NoError);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `v`,\n * `r` and `s` signature fields separately.\n */\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 message) {\n // 32 is the length in bytes of hash,\n // enforced by the type signature above\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x00, \"\\x19Ethereum Signed Message:\\n32\")\n mstore(0x1c, hash)\n message := keccak256(0x00, 0x3c)\n }\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from `s`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n\", Strings.toString(s.length), s));\n }\n\n /**\n * @dev Returns an Ethereum Signed Typed Data, created from a\n * `domainSeparator` and a `structHash`. This produces hash corresponding\n * to the one signed with the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\n * JSON-RPC method as part of EIP-712.\n *\n * See {recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 data) {\n /// @solidity memory-safe-assembly\n assembly {\n let ptr := mload(0x40)\n mstore(ptr, \"\\x19\\x01\")\n mstore(add(ptr, 0x02), domainSeparator)\n mstore(add(ptr, 0x22), structHash)\n data := keccak256(ptr, 0x42)\n }\n }\n\n /**\n * @dev Returns an Ethereum Signed Data with intended validator, created from a\n * `validator` and `data` according to the version 0 of EIP-191.\n *\n * See {recover}.\n */\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19\\x00\", validator, data));\n }\n}\n" + }, + "@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/SignatureChecker.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./ECDSA.sol\";\nimport \"../../interfaces/IERC1271.sol\";\n\n/**\n * @dev Signature verification helper that can be used instead of `ECDSA.recover` to seamlessly support both ECDSA\n * signatures from externally owned accounts (EOAs) as well as ERC1271 signatures from smart contract wallets like\n * Argent and Gnosis Safe.\n *\n * _Available since v4.1._\n */\nlibrary SignatureChecker {\n /**\n * @dev Checks if a signature is valid for a given signer and data hash. If the signer is a smart contract, the\n * signature is validated against that smart contract using ERC1271, otherwise it's validated using `ECDSA.recover`.\n *\n * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus\n * change through time. It could return true at block N and false at block N+1 (or the opposite).\n */\n function isValidSignatureNow(address signer, bytes32 hash, bytes memory signature) internal view returns (bool) {\n (address recovered, ECDSA.RecoverError error) = ECDSA.tryRecover(hash, signature);\n return\n (error == ECDSA.RecoverError.NoError && recovered == signer) ||\n isValidERC1271SignatureNow(signer, hash, signature);\n }\n\n /**\n * @dev Checks if a signature is valid for a given signer and data hash. The signature is validated\n * against the signer smart contract using ERC1271.\n *\n * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus\n * change through time. It could return true at block N and false at block N+1 (or the opposite).\n */\n function isValidERC1271SignatureNow(\n address signer,\n bytes32 hash,\n bytes memory signature\n ) internal view returns (bool) {\n (bool success, bytes memory result) = signer.staticcall(\n abi.encodeWithSelector(IERC1271.isValidSignature.selector, hash, signature)\n );\n return (success &&\n result.length >= 32 &&\n abi.decode(result, (bytes32)) == bytes32(IERC1271.isValidSignature.selector));\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/ERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n *\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\n */\nabstract contract ERC165 is IERC165 {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/math/Math.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n enum Rounding {\n Down, // Toward negative infinity\n Up, // Toward infinity\n Zero // Toward zero\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n }\n\n /**\n * @dev Returns the ceiling of the division of two numbers.\n *\n * This differs from standard division with `/` in that it rounds up instead\n * of rounding down.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b - 1) / b can overflow on addition, so we distribute.\n return a == 0 ? 0 : (a - 1) / b + 1;\n }\n\n /**\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\n * with further edits by Uniswap Labs also under MIT license.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\n unchecked {\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n // variables such that product = prod1 * 2^256 + prod0.\n uint256 prod0; // Least significant 256 bits of the product\n uint256 prod1; // Most significant 256 bits of the product\n assembly {\n let mm := mulmod(x, y, not(0))\n prod0 := mul(x, y)\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n }\n\n // Handle non-overflow cases, 256 by 256 division.\n if (prod1 == 0) {\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\n // The surrounding unchecked block does not change this fact.\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\n return prod0 / denominator;\n }\n\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\n require(denominator > prod1, \"Math: mulDiv overflow\");\n\n ///////////////////////////////////////////////\n // 512 by 256 division.\n ///////////////////////////////////////////////\n\n // Make division exact by subtracting the remainder from [prod1 prod0].\n uint256 remainder;\n assembly {\n // Compute remainder using mulmod.\n remainder := mulmod(x, y, denominator)\n\n // Subtract 256 bit number from 512 bit number.\n prod1 := sub(prod1, gt(remainder, prod0))\n prod0 := sub(prod0, remainder)\n }\n\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\n // See https://cs.stackexchange.com/q/138556/92363.\n\n // Does not overflow because the denominator cannot be zero at this stage in the function.\n uint256 twos = denominator & (~denominator + 1);\n assembly {\n // Divide denominator by twos.\n denominator := div(denominator, twos)\n\n // Divide [prod1 prod0] by twos.\n prod0 := div(prod0, twos)\n\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\n twos := add(div(sub(0, twos), twos), 1)\n }\n\n // Shift in bits from prod1 into prod0.\n prod0 |= prod1 * twos;\n\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\n // four bits. That is, denominator * inv = 1 mod 2^4.\n uint256 inverse = (3 * denominator) ^ 2;\n\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\n // in modular arithmetic, doubling the correct bits in each step.\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\n\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\n // is no longer required.\n result = prod0 * inverse;\n return result;\n }\n }\n\n /**\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\n uint256 result = mulDiv(x, y, denominator);\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\n result += 1;\n }\n return result;\n }\n\n /**\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 128;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 64;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 32;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 16;\n }\n if (value >> 8 > 0) {\n value >>= 8;\n result += 8;\n }\n if (value >> 4 > 0) {\n value >>= 4;\n result += 4;\n }\n if (value >> 2 > 0) {\n value >>= 2;\n result += 2;\n }\n if (value >> 1 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log2(value);\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >= 10 ** 64) {\n value /= 10 ** 64;\n result += 64;\n }\n if (value >= 10 ** 32) {\n value /= 10 ** 32;\n result += 32;\n }\n if (value >= 10 ** 16) {\n value /= 10 ** 16;\n result += 16;\n }\n if (value >= 10 ** 8) {\n value /= 10 ** 8;\n result += 8;\n }\n if (value >= 10 ** 4) {\n value /= 10 ** 4;\n result += 4;\n }\n if (value >= 10 ** 2) {\n value /= 10 ** 2;\n result += 2;\n }\n if (value >= 10 ** 1) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log10(value);\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256, rounded down, of a positive value.\n * Returns 0 if given 0.\n *\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n */\n function log256(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 16;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 8;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 4;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 2;\n }\n if (value >> 8 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log256(value);\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/math/SignedMath.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMath {\n /**\n * @dev Returns the largest of two signed numbers.\n */\n function max(int256 a, int256 b) internal pure returns (int256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two signed numbers.\n */\n function min(int256 a, int256 b) internal pure returns (int256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two signed numbers without overflow.\n * The result is rounded towards zero.\n */\n function average(int256 a, int256 b) internal pure returns (int256) {\n // Formula from the book \"Hacker's Delight\"\n int256 x = (a & b) + ((a ^ b) >> 1);\n return x + (int256(uint256(x) >> 255) & (a ^ b));\n }\n\n /**\n * @dev Returns the absolute unsigned value of a signed value.\n */\n function abs(int256 n) internal pure returns (uint256) {\n unchecked {\n // must be unchecked in order to support `n = type(int256).min`\n return uint256(n >= 0 ? n : -n);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./math/Math.sol\";\nimport \"./math/SignedMath.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant _SYMBOLS = \"0123456789abcdef\";\n uint8 private constant _ADDRESS_LENGTH = 20;\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n unchecked {\n uint256 length = Math.log10(value) + 1;\n string memory buffer = new string(length);\n uint256 ptr;\n /// @solidity memory-safe-assembly\n assembly {\n ptr := add(buffer, add(32, length))\n }\n while (true) {\n ptr--;\n /// @solidity memory-safe-assembly\n assembly {\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\n }\n value /= 10;\n if (value == 0) break;\n }\n return buffer;\n }\n }\n\n /**\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\n */\n function toString(int256 value) internal pure returns (string memory) {\n return string(abi.encodePacked(value < 0 ? \"-\" : \"\", toString(SignedMath.abs(value))));\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n unchecked {\n return toHexString(value, Math.log256(value) + 1);\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = _SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\n }\n\n /**\n * @dev Returns true if the two strings are equal.\n */\n function equal(string memory a, string memory b) internal pure returns (bool) {\n return keccak256(bytes(a)) == keccak256(bytes(b));\n }\n}\n" + }, + "contracts/deps.sol": { + "content": "import {L1Verifier} from '@ensdomains/l1-verifier/contracts/L1Verifier.sol';\nimport '@ensdomains/ens-contracts/contracts/reverseRegistrar/L2ReverseRegistrar.sol';\nimport '@ensdomains/ens-contracts/contracts/resolvers/profiles/IVersionableResolver.sol';\n// Storage slot\n// ┌────────────────────┬───────────────────┬──────────────┬\n// │ contract │ state_variable │ storage_slot │\n// ├────────────────────┼───────────────────┼──────────────┼\n// │ L2ReverseRegistrar │ _owner │ 0 │\n// │ L2ReverseRegistrar │ lastUpdated │ 1 │\n// │ L2ReverseRegistrar │ versionable_texts │ 2 │\n// │ L2ReverseRegistrar │ versionable_names │ 3 │\n// │ L2ReverseRegistrar │ recordVersions │ 4 │\n" + }, + "contracts/L1ReverseResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\nimport {EVMFetcher} from '@ensdomains/evm-verifier/contracts/EVMFetcher.sol';\nimport {EVMFetchTarget} from '@ensdomains/evm-verifier/contracts/EVMFetchTarget.sol';\nimport {IEVMVerifier} from '@ensdomains/evm-verifier/contracts/IEVMVerifier.sol';\nimport \"@ensdomains/ens-contracts/contracts/resolvers/profiles/INameResolver.sol\";\nimport \"@ensdomains/ens-contracts/contracts/resolvers/profiles/ITextResolver.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\n\ncontract L1ReverseResolver is EVMFetchTarget, INameResolver, ITextResolver, ERC165 {\n using EVMFetcher for EVMFetcher.EVMFetchRequest;\n IEVMVerifier immutable verifier;\n address immutable target;\n uint256 constant VERSIONABLE_TEXTS_SLOT = 2;\n uint256 constant VERSIONABLE_NAME_SLOT = 3;\n uint256 constant RECORD_VERSIONS_SLOT = 4;\n \n constructor(IEVMVerifier _verifier, address _target) {\n verifier = _verifier;\n target = _target;\n }\n\n /**\n * Returns the address associated with an ENS node.\n * @param node The ENS node to query.\n * @return The associated name.\n */\n // return versionable_names[recordVersions[node]][node];\n function name(bytes32 node) public view returns (string memory) {\n EVMFetcher.newFetchRequest(verifier, target)\n .getStatic(RECORD_VERSIONS_SLOT)\n .element(node)\n .getDynamic(VERSIONABLE_NAME_SLOT)\n .ref(0)\n .element(node)\n .fetch(this.nameCallback.selector, ''); // recordVersions\n }\n\n function nameCallback(\n bytes[] memory values,\n bytes memory\n ) public pure returns (string memory) {\n return string(values[1]);\n }\n\n /**\n * Returns the text data associated with an ENS node and key.\n * @param node The ENS node to query.\n * @param key The text data key to query.\n * @return The associated text data.\n */\n function text(\n bytes32 node,\n string calldata key\n ) public view returns (string memory) {\n EVMFetcher.newFetchRequest(verifier, target)\n .getStatic(RECORD_VERSIONS_SLOT)\n .element(node)\n .getDynamic(VERSIONABLE_TEXTS_SLOT)\n .ref(0)\n .element(node)\n .element(key)\n .fetch(this.textCallback.selector, '');\n }\n\n function textCallback(\n bytes[] memory values,\n bytes memory\n ) public pure returns (string memory) {\n return string(values[1]);\n }\n\n function supportsInterface(\n bytes4 interfaceId\n ) public override view returns (bool) {\n return\n interfaceId == type(ITextResolver).interfaceId ||\n interfaceId == type(INameResolver).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": false, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates", + "storageLayout" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/crosschain-reverse-resolver/hardhat.config.ts b/crosschain-reverse-resolver/hardhat.config.ts index e2809d85..ce61fabe 100644 --- a/crosschain-reverse-resolver/hardhat.config.ts +++ b/crosschain-reverse-resolver/hardhat.config.ts @@ -5,39 +5,42 @@ import 'hardhat-deploy'; import 'hardhat-deploy-ethers'; const DEPLOYER_PRIVATE_KEY = process.env.DEPLOYER_PRIVATE_KEY ?? "ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"; const L1_PROVIDER_URL = process.env.L1_PROVIDER_URL || ''; +const L2_PROVIDER_URL = process.env.L2_PROVIDER_URL || ''; const L1_ETHERSCAN_API_KEY = process.env.L1_ETHERSCAN_API_KEY || ''; const L2_ETHERSCAN_API_KEY = process.env.L2_ETHERSCAN_API_KEY || ''; -console.log({L1_PROVIDER_URL,L1_ETHERSCAN_API_KEY,L2_ETHERSCAN_API_KEY}) +console.log({L1_PROVIDER_URL,L2_PROVIDER_URL,L1_ETHERSCAN_API_KEY,L2_ETHERSCAN_API_KEY}) const config: HardhatUserConfig = { solidity: '0.8.19', networks: { ganache: { url: `http://localhost:${parseInt(process.env['RPC_PORT'] || '8545')}`, }, - goerli: { + sepolia: { url: L1_PROVIDER_URL, + chainId: 11155111, accounts: [DEPLOYER_PRIVATE_KEY], deploy: [ "deploy_l1/" ], }, - optimismGoerli: { - url: "https://goerli.optimism.io", - accounts: [DEPLOYER_PRIVATE_KEY], - deploy: [ "deploy_l2/" ], + optimismSepolia: { + url: 'https://sepolia.optimism.io', + chainId: 11155420, + accounts: [DEPLOYER_PRIVATE_KEY] }, - baseGoerli: { - url: "https://goerli.base.org", - accounts: [DEPLOYER_PRIVATE_KEY], - deploy: [ "deploy_l2/" ], + baseSepolia: { + url: 'https://sepolia.base.org', + chainId: 84532, + accounts: [DEPLOYER_PRIVATE_KEY] + }, + arbitrumSepolia: { + url: 'https://sepolia-rollup.arbitrum.io/rpc', + chainId: 421614, + accounts: [DEPLOYER_PRIVATE_KEY] }, - arbitrumGoerli: { - url: "https://goerli-rollup.arbitrum.io/rpc", - accounts: [DEPLOYER_PRIVATE_KEY], - deploy: [ "deploy_l2/" ], - } }, etherscan: { apiKey: { goerli: L1_ETHERSCAN_API_KEY, + sepolia: L1_ETHERSCAN_API_KEY, optimismGoerli: L2_ETHERSCAN_API_KEY, baseGoerli: L2_ETHERSCAN_API_KEY, arbitrumGoerli: L2_ETHERSCAN_API_KEY, diff --git a/crosschain-reverse-resolver/package.json b/crosschain-reverse-resolver/package.json index cb67ff41..5e7bc16c 100644 --- a/crosschain-reverse-resolver/package.json +++ b/crosschain-reverse-resolver/package.json @@ -7,7 +7,8 @@ "test": "node scripts/test.js", "storage": "hardhat check", "setname": "hardhat run scripts/setname.ts", - "getname": "hardhat run scripts/getname.ts --network goerli", + "setdefaultname": "hardhat run scripts/setdefaultname.ts --network sepolia", + "getname": "hardhat run scripts/getname.ts --network sepolia", "clean": "rm -fr artifacts cache node_modules typechain-types", "lint": "exit 0" }, diff --git a/crosschain-reverse-resolver/scripts/getname.ts b/crosschain-reverse-resolver/scripts/getname.ts index ef5a2d4a..72dea1eb 100644 --- a/crosschain-reverse-resolver/scripts/getname.ts +++ b/crosschain-reverse-resolver/scripts/getname.ts @@ -1,25 +1,49 @@ import hre from 'hardhat'; import packet from 'dns-packet'; -const abi = ['function name(bytes32) view returns(string)']; +const abi = [ + 'function supportsInterface(bytes4) view returns(bool)', + 'function name(bytes32) view returns(string)', + 'function resolve(bytes,bytes) view returns(bytes)' +]; +const defaultabi = ['function name(address) view returns(string)']; const encodeName = (name) => '0x' + packet.name.encode(name).toString('hex') +const extendedResolverInterface = '0x9061b923' import {ethers} from 'ethers'; export const main = async () => { if (!process.env.REVERSE_NAMESPACE || !process.env.L1_PROVIDER_URL || !process.env.ETH_ADDRESS) throw 'Set REVERSE_NAMESPACE, L1_PROVIDER_URL and ETH_ADDRESS'; - const namespace = process.env.REVERSE_NAMESPACE; const L1_PROVIDER_URL = process.env.L1_PROVIDER_URL; + const L2_PROVIDER_URL = process.env.L2_PROVIDER_URL; + const L2_REVERSE_REGISTRAR_ADDRESS = process.env.L2_REVERSE_REGISTRAR_ADDRESS + const DEFAULT_REVERSE_RESOLVER_ADDRESS = process.env.DEFAULT_REVERSE_RESOLVER_ADDRESS const ETH_ADDRESS = process.env.ETH_ADDRESS; const provider = new ethers.JsonRpcProvider(L1_PROVIDER_URL); + const l2provider = new ethers.JsonRpcProvider(L2_PROVIDER_URL); const name = ETH_ADDRESS.substring(2).toLowerCase() + "." + namespace const encodedname = encodeName(name) const reversenode = ethers.namehash(name) console.log({namespace, ETH_ADDRESS, name, encodedname,reversenode}) const reverseresolver = await provider.getResolver(namespace); - console.log({reverseresolver}) + console.log({L2_PROVIDER_URL, L2_REVERSE_REGISTRAR_ADDRESS}) + if (L2_PROVIDER_URL && L2_REVERSE_REGISTRAR_ADDRESS){ + const l2resolver = new ethers.Contract(L2_REVERSE_REGISTRAR_ADDRESS, abi, l2provider); + console.log(`l2: Reverse node for ${name} is set to `, await l2resolver.name(reversenode)) + } + if(DEFAULT_REVERSE_RESOLVER_ADDRESS){ + const defaultResolver = new ethers.Contract(DEFAULT_REVERSE_RESOLVER_ADDRESS, defaultabi, provider); + } const l1resolver = new ethers.Contract(reverseresolver.address, abi, provider); - console.log(`Reverse node is set to `, await l1resolver.name(reversenode, {enableCcipRead:true})) + if(await l1resolver.supportsInterface(extendedResolverInterface)){ + const i = new ethers.Interface(abi) + const calldata = i.encodeFunctionData("name", [reversenode]) + const result = await l1resolver.resolve(encodedname, calldata, { enableCcipRead: true }) + console.log(`l1: Reverse node for ${name} is set to `, ethers.toUtf8String(result)) + }else { + const result = await l1resolver.name(reversenode, { enableCcipRead: true }) + console.log(`l1: Reverse node for ${name} is set to `, result) + } }; main(); \ No newline at end of file diff --git a/crosschain-reverse-resolver/scripts/setdefaultname.ts b/crosschain-reverse-resolver/scripts/setdefaultname.ts new file mode 100644 index 00000000..46b84261 --- /dev/null +++ b/crosschain-reverse-resolver/scripts/setdefaultname.ts @@ -0,0 +1,60 @@ +import hre from 'hardhat'; + +const ethers = hre.ethers; +export const main = async () => { + const [signer] = await hre.ethers.getSigners(); + if (!process.env.DEPLOYER_PRIVATE_KEY) + throw 'Set DEPLOYER_PRIVATE_KEY'; + if (!process.env.REVERSE_NAMESPACE) + throw 'Set REVERSE_NAMESPACE'; + if (!process.env.L1_PROVIDER_URL) + throw 'Set L1_PROVIDER_URL'; + if (!process.env.DEFAULT_REVERSE_RESOLVER_ADDRESS) + throw 'Set DEFAULT_REVERSE_RESOLVER_ADDRESS'; + if (!process.env.DEFAULT_ENS_NAME) + throw 'Set DEFAULT_ENS_NAME'; + const L1_PROVIDER_URL = process.env.L1_PROVIDER_URL; + const DEFAULT_REVERSE_RESOLVER_ADDRESS = process.env.DEFAULT_REVERSE_RESOLVER_ADDRESS; + const DEPLOYER_PRIVATE_KEY = process.env.DEPLOYER_PRIVATE_KEY; + const namespace = process.env.REVERSE_NAMESPACE; + const DEFAULT_ENS_NAME = process.env.DEFAULT_ENS_NAME; + const DefaultReverseResolverFactory = (await hre.ethers.getContractFactory("DefaultReverseResolver")) as DefaultReverseResolverFactory__factory; + const DefaultReverseResolver = DefaultReverseResolverFactory + .connect(signer) + .attach(DEFAULT_REVERSE_RESOLVER_ADDRESS); + const testSigner = new ethers.Wallet(DEPLOYER_PRIVATE_KEY); + const ETH_ADDRESS = testSigner.address + const name = ETH_ADDRESS.substring(2).toLowerCase() + "." + namespace + const reversenode = ethers.namehash(name) + console.log({ DEFAULT_REVERSE_RESOLVER_ADDRESS, L1_PROVIDER_URL,DEFAULT_ENS_NAME, ETH_ADDRESS, namespace, name, reversenode}) + + const funcId = ethers + .id('setNameForAddrWithSignature(address,string,uint256,bytes)') + .substring(0, 10) + const block = await ethers.provider.getBlock("latest") + const inceptionDate = block?.timestamp + const message = ethers.solidityPackedKeccak256( + ['bytes32', 'address', 'uint256', 'uint256'], + [ethers.solidityPackedKeccak256(['bytes4', 'string'], [funcId, DEFAULT_ENS_NAME]), ETH_ADDRESS, inceptionDate, 0], + ) + const signature = await testSigner.signMessage(ethers.toBeArray(message)) + console.log({ + ETH_ADDRESS, + DEFAULT_ENS_NAME, + inceptionDate, + signature + }) + + const tx = await DefaultReverseResolver['setNameForAddrWithSignature']( + ETH_ADDRESS, + DEFAULT_ENS_NAME, + inceptionDate, + signature, + ) + + const rec = await tx.wait(); + console.log({txhash:rec.hash}); + console.log(await DefaultReverseResolver.name(ETH_ADDRESS)) +}; + +main(); \ No newline at end of file diff --git a/crosschain-reverse-resolver/scripts/setname.ts b/crosschain-reverse-resolver/scripts/setname.ts index 9dc386fe..248c747f 100644 --- a/crosschain-reverse-resolver/scripts/setname.ts +++ b/crosschain-reverse-resolver/scripts/setname.ts @@ -3,8 +3,14 @@ const ethers = hre.ethers; export const main = async () => { const [signer] = await hre.ethers.getSigners(); - if (!process.env.REVERSE_NAMESPACE || !process.env.L2_PROVIDER_URL || !process.env.L2_REVERSE_REGISTRAR_ADDRESS || !process.env.ENS_NAME) - throw 'Set REVERSE_NAMESPACE, L2_PROVIDER_URL, L2_REVERSE_REGISTRAR_ADDRESS, and ENS_NAME'; + if (!process.env.REVERSE_NAMESPACE) + throw 'Set REVERSE_NAMESPACE'; + if (!process.env.L2_PROVIDER_URL) + throw 'Set L2_PROVIDER_URL'; + if (!process.env.L2_REVERSE_REGISTRAR_ADDRESS) + throw 'Set L2_REVERSE_REGISTRAR_ADDRESS'; + if (!process.env.ENS_NAME) + throw 'Set ENS_NAME'; const L2_PROVIDER_URL = process.env.L2_PROVIDER_URL; const L2_REVERSE_REGISTRAR_ADDRESS = process.env.L2_REVERSE_REGISTRAR_ADDRESS; @@ -14,19 +20,16 @@ export const main = async () => { const name = ETH_ADDRESS.substring(2).toLowerCase() + "." + namespace const reversenode = ethers.namehash(name) - const L2ReverseRegistrarFactory = (await hre.ethers.getContractFactory("L2ReverseRegistrar")) as L2ReverseRegistrarFactory__factory; - const l2ReverseRegistrar = L2ReverseRegistrarFactory + const L2ReverseResolverFactory = (await hre.ethers.getContractFactory("L2ReverseResolver")) as L2ReverseResolverFactory__factory; + const L2ReverseResolver = L2ReverseResolverFactory .connect(signer) .attach(L2_REVERSE_REGISTRAR_ADDRESS); console.log({ L2_REVERSE_REGISTRAR_ADDRESS, L2_PROVIDER_URL,ENS_NAME, ETH_ADDRESS, namespace, name, reversenode}) - const tx = await l2ReverseRegistrar.setName(ENS_NAME, { - gasPrice: "900000", - gasLimit: 500000, - }); + const tx = await L2ReverseResolver.setName(ENS_NAME); const rec = await tx.wait(); console.log({txhash:rec.hash}); - console.log(await l2ReverseRegistrar.name(reversenode, {enableCcipRead:true})) + console.log(await L2ReverseResolver.name(reversenode)) }; main(); \ No newline at end of file diff --git a/crosschain-reverse-resolver/test/testReverseResolver.ts b/crosschain-reverse-resolver/test/testReverseResolver.ts index 146f13c9..ce4e1ebe 100644 --- a/crosschain-reverse-resolver/test/testReverseResolver.ts +++ b/crosschain-reverse-resolver/test/testReverseResolver.ts @@ -14,7 +14,10 @@ import { FetchRequest } from 'ethers'; import { ethers } from 'hardhat'; import { EthereumProvider } from 'hardhat/types'; import request from 'supertest'; +import packet from 'dns-packet'; const NAMESPACE = 2147483658 // OP +const encodeName = (name) => '0x' + packet.name.encode(name).toString('hex') + type ethersObj = typeof ethersT & Omit & { provider: Omit & { @@ -29,12 +32,22 @@ declare module 'hardhat/types/runtime' { } } +// looks like there are time dependencies for verification to success, hence adding a dalay +const wait = async x => { + return new Promise(resolve => { + setTimeout(resolve, 3000, 2 * x); + }); +}; + describe('Crosschain Reverse Resolver', () => { let provider: BrowserProvider; let signer: Signer; let verifier: Contract; let target: Contract; let l2contract: Contract; + let l2contractAddress: string; + let defaultReverseResolver: Contract; + let defaultReverseAddress: string; before(async () => { // Hack to get a 'real' ethers provider from hardhat. The default `HardhatProvider` @@ -71,52 +84,173 @@ describe('Crosschain Reverse Resolver', () => { signer ); verifier = await l1VerifierFactory.deploy(['test:']); - + const DefaultReverseResolverFactory = await ethers.getContractFactory( + 'DefaultReverseResolver', + ) + defaultReverseResolver = await DefaultReverseResolverFactory.deploy() + await provider.send('evm_mine', []); const testL2Factory = await ethers.getContractFactory( - 'L2ReverseRegistrar', + 'L2ReverseResolver', signer ); - l2contract = await testL2Factory.deploy(ethers.namehash(`${NAMESPACE}.reverse`)); - + l2contract = await testL2Factory.deploy(ethers.namehash(`${NAMESPACE}.reverse`), NAMESPACE); + l2contractAddress = await l2contract.getAddress(); + defaultReverseAddress = await defaultReverseResolver.getAddress(); const testL1Factory = await ethers.getContractFactory( 'L1ReverseResolver', signer ); - target = await testL1Factory.deploy(await verifier.getAddress(), await l2contract.getAddress()); + target = await testL1Factory.deploy( + await verifier.getAddress(), + l2contractAddress, + defaultReverseAddress + ); // Mine an empty block so we have something to prove against await provider.send('evm_mine', []); }); it("should test name", async() => { const name = 'vitalik.eth' + const testAddress = await signer.getAddress() const node = await l2contract.node( - await signer.getAddress(), + testAddress, ) - await l2contract.clearRecords(await signer.getAddress()) + const reverseLabel = testAddress.substring(2).toLowerCase() + const l2ReverseName = `${reverseLabel}.${NAMESPACE}.reverse` + const encodedL2ReverseName = encodeName(l2ReverseName) + + await l2contract.clearRecords(await signer.getAddress()) await l2contract.setName(name) await provider.send("evm_mine", []); - const result2 = await target.name(node, { enableCcipRead: true }) - expect(result2).to.equal(name); + await wait(1); + + const i = new ethers.Interface(["function name(bytes32) returns(string)"]) + const calldata = i.encodeFunctionData("name", [node]) + const result2 = await target.resolve(encodedL2ReverseName, calldata, { enableCcipRead: true }) + // throws Error: invalid length for result data + // const decoded = i.decodeFunctionResult("name", result2) + expect(ethers.toUtf8String(result2)).to.equal(name); + }) + + it("should test fallback name", async() => { + const testSigner = new ethers.Wallet('0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80'); + const testAddress = testSigner.address + const name = 'myname.eth' + const reverseLabel = testAddress.substring(2).toLowerCase() + const l2ReverseName = `${reverseLabel}.${NAMESPACE}.reverse` + const l2ReverseNode = ethers.namehash(l2ReverseName) + const encodedL2ReverseName = encodeName(l2ReverseName) + + const defaultReverseName = `${reverseLabel}.default.reverse` + const defaultReverseNode = ethers.namehash(defaultReverseName) + const encodedDefaultReverseName = encodeName(defaultReverseName) + + const funcId = ethers + .id('setNameForAddrWithSignature(address,string,uint256,bytes)') + .substring(0, 10) + + const block = await provider.getBlock('latest') + const inceptionDate = block?.timestamp + const message = ethers.solidityPackedKeccak256( + ['address', 'bytes32', 'address', 'uint256', 'uint256'], + [defaultReverseAddress, ethers.solidityPackedKeccak256(['bytes4', 'string'], [funcId, name]), testAddress, inceptionDate, 0], + ) + const signature = await testSigner.signMessage(ethers.toBeArray(message)) + await defaultReverseResolver['setNameForAddrWithSignature']( + testAddress, + name, + inceptionDate, + signature, + ) + await provider.send("evm_mine", []); + await wait(1); + + const i = new ethers.Interface(["function name(bytes32) returns(string)"]) + expect(await defaultReverseResolver['name(address)'](testAddress)).to.equal(name) + + const defaultcalldata = i.encodeFunctionData("name", [defaultReverseNode]) + const defaultResult = await defaultReverseResolver.resolve(encodedDefaultReverseName, defaultcalldata) + expect(ethers.toUtf8String(defaultResult)).to.equal(name); + + const l2calldata = i.encodeFunctionData("name", [l2ReverseNode]) + const result2 = await target.resolve(encodedL2ReverseName, l2calldata, { enableCcipRead: true }) + expect(ethers.toUtf8String(result2)).to.equal(name); }) it("should test text record", async() => { const key = 'name' const value = 'nick.eth' + const testAddress = await signer.getAddress() const node = await l2contract.node( - await signer.getAddress(), + testAddress ) + const reverseLabel = testAddress.substring(2).toLowerCase() + const l2ReverseName = `${reverseLabel}.${NAMESPACE}.reverse` + const encodedL2ReverseName = encodeName(l2ReverseName) + await l2contract.clearRecords(await signer.getAddress()) await l2contract.setText(key, value) await provider.send("evm_mine", []); + await wait(1); + const result = await l2contract.text(node, key) expect(result).to.equal(value); - const result2 = await target.text(node, key, { enableCcipRead: true }) - expect(result2).to.equal(value); + const i = new ethers.Interface(["function text(bytes32, string) returns(string)"]) + const calldata = i.encodeFunctionData("text", [node, key]) + const result2 = await target.resolve(encodedL2ReverseName, calldata, { enableCcipRead: true }) + expect(ethers.toUtf8String(result2)).to.equal(value); + }) + + it("should test fallback text", async() => { + const testSigner = new ethers.Wallet('0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80'); + const testAddress = testSigner.address + const key = 'name' + const value = 'myname.eth' + const reverseLabel = testAddress.substring(2).toLowerCase() + const l2ReverseName = `${reverseLabel}.${NAMESPACE}.reverse` + const l2ReverseNode = ethers.namehash(l2ReverseName) + const encodedL2ReverseName = encodeName(l2ReverseName) + + const defaultReverseName = `${reverseLabel}.default.reverse` + const defaultReverseNode = ethers.namehash(defaultReverseName) + const encodedDefaultReverseName = encodeName(defaultReverseName) + + const funcId = ethers + .id('setTextForAddrWithSignature(address,string,string,uint256,bytes)') + .substring(0, 10) + + const block = await provider.getBlock('latest') + const inceptionDate = block?.timestamp + const message = ethers.solidityPackedKeccak256( + ['address', 'bytes32', 'address', 'uint256', 'uint256'], + [defaultReverseAddress, ethers.solidityPackedKeccak256(['bytes4', 'string', 'string'], [funcId, key, value]), testAddress, inceptionDate, 0], + ) + const signature = await testSigner.signMessage(ethers.toBeArray(message)) + await defaultReverseResolver['setTextForAddrWithSignature']( + testAddress, + key, + value, + inceptionDate, + signature, + ) + await provider.send("evm_mine", []); + await wait(1); + + expect(await defaultReverseResolver["text(address,string)"](testAddress, key)).to.equal(value) + const i = new ethers.Interface(["function text(bytes32,string) returns(string)"]) + + const defaultcalldata = i.encodeFunctionData("text", [defaultReverseNode, key]) + const defaultResult = await defaultReverseResolver.resolve(encodedDefaultReverseName, defaultcalldata) + expect(ethers.toUtf8String(defaultResult)).to.equal(value); + + const calldata = i.encodeFunctionData("text", [l2ReverseNode, key]) + const result2 = await target.resolve(encodedL2ReverseName, calldata, { enableCcipRead: true }) + expect(ethers.toUtf8String(result2)).to.equal(value); }) it("should support interface", async() => { - expect(await target.supportsInterface('0x59d1d43c')).to.equal(true) // ITextResolver - expect(await target.supportsInterface('0x691f3431')).to.equal(true) // INameResolver + expect(await defaultReverseResolver.supportsInterface('0x9061b923')).to.equal(true) // IExtendedResolver + expect(await target.supportsInterface('0x9061b923')).to.equal(true) // IExtendedResolver expect(await target.supportsInterface('0x01ffc9a7')).to.equal(true) // ERC-165 support }) }); diff --git a/evm-gateway/package.json b/evm-gateway/package.json index 66901332..98ee1954 100644 --- a/evm-gateway/package.json +++ b/evm-gateway/package.json @@ -6,6 +6,7 @@ "module": "./_esm/index.js", "dependencies": { "@chainlink/ccip-read-server": "^0.2.1", + "@cloudflare/workers-types": "^4.20240117.0", "@ensdomains/ccip-read-cf-worker": "^0.0.1", "ethers": "^6.7.1" }, diff --git a/evm-gateway/src/utils.ts b/evm-gateway/src/utils.ts index 170d588f..0524bdf4 100644 --- a/evm-gateway/src/utils.ts +++ b/evm-gateway/src/utils.ts @@ -1,3 +1,5 @@ +import { Request as CFWRequest } from '@cloudflare/workers-types'; + export interface Router { - handle: (request: Request) => void; + handle: (request: CFWRequest) => Promise; } diff --git a/l1-gateway/src/worker.ts b/l1-gateway/src/worker.ts index bdff5f3c..97b7f52c 100644 --- a/l1-gateway/src/worker.ts +++ b/l1-gateway/src/worker.ts @@ -1,10 +1,11 @@ +import { Request as CFWRequest } from '@cloudflare/workers-types'; import { Server } from '@ensdomains/ccip-read-cf-worker'; import type { Router } from '@ensdomains/evm-gateway'; interface Env { WORKER_PROVIDER_URL: string; } let app: Router; -async function fetch(request: Request, env: Env) { +async function fetch(request: CFWRequest, env: Env) { // Loading libraries dynamically as a temp work around. // Otherwise, deployment thorws "Error: Script startup exceeded CPU time limit." error if (!app) { diff --git a/op-gateway/README.md b/op-gateway/README.md index d4a496d6..d6552f47 100644 --- a/op-gateway/README.md +++ b/op-gateway/README.md @@ -21,11 +21,12 @@ yarn dev cd op-gateway npm install -g wrangler wrngler login -wrangler secret put L1_PROVIDER_URL -wrangler secret put L2_PROVIDER_URL -wrangler secret put L2_OUTPUT_ORACLE -wrangler secret put DELAY -yarn deploy --env op-sepolia // or --env base-sepolia for base deployment +wrangler secret put L1_PROVIDER_URL --env op-sepolia|base-sepolia +wrangler secret put L2_PROVIDER_URL --env op-sepolia|base-sepolia +wrangler secret put L2_OUTPUT_ORACLE --env op-sepolia|base-sepolia +wrangler secret put DELAY --env op-sepolia|base-sepolia +wrangler secret put ENDPOINT_URL --env op-sepolia|base-sepolia +yarn deploy --env op-sepolia|base-sepolia ``` ## How to test diff --git a/op-gateway/src/worker.ts b/op-gateway/src/worker.ts index 1ed3959d..7592ce10 100644 --- a/op-gateway/src/worker.ts +++ b/op-gateway/src/worker.ts @@ -1,24 +1,88 @@ +import { Request as CFWRequest } from '@cloudflare/workers-types'; import { Server } from '@ensdomains/ccip-read-cf-worker'; import type { Router } from '@ensdomains/evm-gateway'; +import { Tracker } from '@ensdomains/server-analytics'; + interface Env { L1_PROVIDER_URL: string; L2_PROVIDER_URL: string; L2_OUTPUT_ORACLE: string; DELAY: number; + GATEWAY_DOMAIN: string; + ENDPOINT_URL: string; +} +interface LogResult { + (request: CFWRequest, result: Response): Promise; } -let app: Router; -async function fetch(request: Request, env: Env) { + +let app: Router, logResult: LogResult; +const decodeUrl = (url: string) => { + const trackingData = url.match( + /\/0x[a-fA-F0-9]{40}\/0x[a-fA-F0-9]{1,}\.json/ + ); + if (trackingData) { + return { + sender: trackingData[0].slice(1, 42), + calldata: trackingData[0].slice(44).replace('.json', ''), + }; + } else { + return {}; + } +}; + +async function fetch(request: CFWRequest, env: Env) { + // Set PROVIDER_URL under .dev.vars locally. Set the key as secret remotely with `wrangler secret put WORKER_PROVIDER_URL` + const { + L1_PROVIDER_URL, + L2_PROVIDER_URL, + L2_OUTPUT_ORACLE, + DELAY, + GATEWAY_DOMAIN, + ENDPOINT_URL, + } = env; + + const tracker = new Tracker(GATEWAY_DOMAIN, { + apiEndpoint: ENDPOINT_URL, + enableLogging: true, + }); + // Loading libraries dynamically as a temp work around. // Otherwise, deployment thorws "Error: Script startup exceeded CPU time limit." error if (!app) { const ethers = await import('ethers'); const EVMGateway = (await import('@ensdomains/evm-gateway')).EVMGateway; const OPProofService = (await import('./OPProofService.js')).OPProofService; - // Set PROVIDER_URL under .dev.vars locally. Set the key as secret remotely with `wrangler secret put WORKER_PROVIDER_URL` - const { L1_PROVIDER_URL, L2_PROVIDER_URL, L2_OUTPUT_ORACLE, DELAY } = env; const l1Provider = new ethers.JsonRpcProvider(L1_PROVIDER_URL); const l2Provider = new ethers.JsonRpcProvider(L2_PROVIDER_URL); + logResult = async ( + request: CFWRequest, + result: Response + ): Promise => { + if (request.url.match(/favicon/)) { + return result; + } + if (!result.body) { + return result; + } + const [streamForLog, streamForResult] = result.body.tee(); + const logResultData = ( + await new Response(streamForLog).json() + ).data.substring(0, 200); + const props = decodeUrl(request.url); + await tracker.trackEvent( + request, + 'result', + { props: { ...props, result: logResultData } }, + true + ); + const myHeaders = new Headers(); + myHeaders.set('Access-Control-Allow-Origin', '*'); + myHeaders.set('Access-Control-Allow-Methods', 'GET,HEAD,POST,OPTIONS'); + myHeaders.set('Access-Control-Max-Age', '86400'); + return new Response(streamForResult, { ...result, headers: myHeaders }); + }; + console.log({ L1_PROVIDER_URL, L2_PROVIDER_URL, DELAY }); const gateway = new EVMGateway( new OPProofService( @@ -33,7 +97,15 @@ async function fetch(request: Request, env: Env) { gateway.add(server); app = server.makeApp('/'); } - return app.handle(request); + const props = decodeUrl(request.url); + await tracker.trackEvent( + request, + 'request', + { props: { ...props, ...{} } }, + true + ); + + return app.handle(request).then(logResult.bind(null, request)); } export default { diff --git a/op-gateway/wrangler.toml b/op-gateway/wrangler.toml index b9da3cf4..9175b4ef 100644 --- a/op-gateway/wrangler.toml +++ b/op-gateway/wrangler.toml @@ -11,6 +11,9 @@ command = "yarn build" [env.base-sepolia] name = "base-sepolia-gateway-worker" - +[env.base-sepolia.vars] +GATEWAY_DOMAIN="base-sepolia-gateway-worker.ens-cf.workers.dev" [env.op-sepolia] name = "op-sepolia-gateway-worker" +[env.op-sepolia.vars] +GATEWAY_DOMAIN="op-sepolia-gateway-worker.ens-cf.workers.dev" \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index 42ea5e16..e4dc3b47 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -37,7 +37,6 @@ "ES2022", // By using ES2022 we get access to the `.cause` property on `Error` instances. "DOM" // For `btoa` and `atob`. ], - // Skip type checking for node modules "skipLibCheck": true }