diff --git a/packages/l1-contracts/contracts/L1Resolver.sol b/packages/l1-contracts/contracts/L1Resolver.sol index 9bddfc625..1c6c0146e 100644 --- a/packages/l1-contracts/contracts/L1Resolver.sol +++ b/packages/l1-contracts/contracts/L1Resolver.sol @@ -27,9 +27,9 @@ contract L1Resolver is { using EVMFetcher for EVMFetcher.EVMFetchRequest; using BytesUtils for bytes; - IEVMVerifier immutable verifier; - ENS immutable ens; - INameWrapper immutable nameWrapper; + IEVMVerifier public immutable verifier; + ENS public immutable ens; + INameWrapper public immutable nameWrapper; mapping(bytes32 => address) targets; uint256 constant COIN_TYPE_ETH = 60; uint256 constant RECORD_VERSIONS_SLOT = 0; @@ -40,7 +40,7 @@ contract L1Resolver is string public graphqlUrl; uint256 public l2ChainId; - event TargetSet(bytes32 indexed node, address target); + event TargetSet(bytes name, address target); function isAuthorised(bytes32 node) internal view returns (bool) { // TODO: Add support for @@ -62,11 +62,6 @@ contract L1Resolver is */ error StorageHandledByL2(uint256 chainId, address contractAddress); - modifier authorised(bytes32 node) { - require(isAuthorised(node)); - _; - } - /** * @param _verifier The chain verifier address * @param _ens The ENS registry address @@ -99,12 +94,15 @@ contract L1Resolver is /** * Set target address to verify aagainst - * @param node The ENS node to query. + * @param name The encoded name to query. * @param target The L2 resolver address to verify against. */ - function setTarget(bytes32 node, address target) public authorised(node) { + function setTarget(bytes calldata name, address target) public { + (bytes32 node, ) = getTarget(name); + require(isAuthorised(node)); targets[node] = target; - emit TargetSet(node, target); + emit TargetSet(name, target); + emit MetadataChanged(name, graphqlUrl); } /** diff --git a/packages/l1-contracts/deploy/02_deploy_l1Resolver.ts b/packages/l1-contracts/deploy/02_deploy_l1Resolver.ts index 2248c0b08..ff21aee6e 100644 --- a/packages/l1-contracts/deploy/02_deploy_l1Resolver.ts +++ b/packages/l1-contracts/deploy/02_deploy_l1Resolver.ts @@ -6,6 +6,9 @@ import { address as PublicResolverLineaSepoliaAddr } from "../../l2-contracts/de import { address as ENSRegistryMainnetAddr } from "../../l2-contracts/deployments/mainnet/ENSRegistry.json"; import { address as NameWrapperMainnetAddr } from "../../l2-contracts/deployments/mainnet/NameWrapper.json"; import { address as PublicResolverMainnetAddr } from "../../l2-contracts/deployments/mainnet/PublicResolver.json"; +import packet from "dns-packet"; + +const encodeName = (name) => "0x" + packet.name.encode(name).toString("hex"); const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const { getNamedAccounts, deployments, network, ethers } = hre; @@ -14,8 +17,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const lineaSparseProofVerifier = await get("LineaSparseProofVerifier"); // ens namehash of linea-sepolia.eth - let node = - "0x1944d8f922dbda424d5bb8181be5344d513cd0210312d2dcccd37d54c11a17de"; + let node = encodeName("linea-sepolia.eth"); let target = PublicResolverLineaSepoliaAddr; const args: any[] = []; @@ -31,8 +33,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { break; case "mainnet": // ens namehash of linea.eth - node = - "0x527aac89ac1d1de5dd84cff89ec92c69b028ce9ce3fa3d654882474ab4402ec3"; + node = encodeName("linea.eth"); target = PublicResolverMainnetAddr; // TODO add when deployed on mainnet // args.push(PohVerifierSepoliaAddr,ENSRegistryMainnetAddr, NameWrapperMainnetAddr); diff --git a/packages/l1-contracts/deployments/sepolia/L1Resolver.json b/packages/l1-contracts/deployments/sepolia/L1Resolver.json index 3e7ac0d72..1eadac275 100644 --- a/packages/l1-contracts/deployments/sepolia/L1Resolver.json +++ b/packages/l1-contracts/deployments/sepolia/L1Resolver.json @@ -1,5 +1,5 @@ { - "address": "0x024A4449b68257EC87EbeF3df12268281cFC0a75", + "address": "0x694DC6bac0835Db310a764574aF5DfF9D5639316", "abi": [ { "inputs": [ @@ -150,10 +150,10 @@ "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "bytes32", - "name": "node", - "type": "bytes32" + "indexed": false, + "internalType": "bytes", + "name": "name", + "type": "bytes" }, { "indexed": false, @@ -237,6 +237,19 @@ "stateMutability": "pure", "type": "function" }, + { + "inputs": [], + "name": "ens", + "outputs": [ + { + "internalType": "contract ENS", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -324,6 +337,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "nameWrapper", + "outputs": [ + { + "internalType": "contract INameWrapper", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -375,9 +401,9 @@ { "inputs": [ { - "internalType": "bytes32", - "name": "node", - "type": "bytes32" + "internalType": "bytes", + "name": "name", + "type": "bytes" }, { "internalType": "address", @@ -432,21 +458,34 @@ ], "stateMutability": "pure", "type": "function" + }, + { + "inputs": [], + "name": "verifier", + "outputs": [ + { + "internalType": "contract IEVMVerifier", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" } ], - "transactionHash": "0x8782bcb60dbe4210d9721836ea808eb5141c8acc11c5081413fa32d4b52494da", + "transactionHash": "0x3eb3402f31a01d636ff35b092e19baf69e3c48f2d91721ff3552fe831babb5be", "receipt": { "to": null, "from": "0x4a8e79E5258592f208ddba8A8a0d3ffEB051B10A", - "contractAddress": "0x024A4449b68257EC87EbeF3df12268281cFC0a75", - "transactionIndex": 48, - "gasUsed": "1910793", + "contractAddress": "0x694DC6bac0835Db310a764574aF5DfF9D5639316", + "transactionIndex": 14, + "gasUsed": "2022765", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x8b148644349e36101340f3effd497d261ef7182d71cfbd534b8707b7726c6c67", - "transactionHash": "0x8782bcb60dbe4210d9721836ea808eb5141c8acc11c5081413fa32d4b52494da", + "blockHash": "0x7b89e38bf4686011d48a10a827e823045f0b6d148bf439e881fcee357f107d41", + "transactionHash": "0x3eb3402f31a01d636ff35b092e19baf69e3c48f2d91721ff3552fe831babb5be", "logs": [], - "blockNumber": 5860188, - "cumulativeGasUsed": "10481103", + "blockNumber": 5866723, + "cumulativeGasUsed": "4854821", "status": 1, "byzantium": true }, @@ -457,11 +496,11 @@ "https://api.studio.thegraph.com/query/69290/ens-linea-sepolia/version/latest", 59141 ], - "numDeployments": 2, - "solcInputHash": "3d40a7bf9588ff5346ee1046c26bf7c9", - "metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"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\":\"_l2ChainId\",\"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\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"}],\"name\":\"StorageHandledByL2\",\"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\":\"string\",\"name\":\"graphqlUrl\",\"type\":\"string\"}],\"name\":\"MetadataChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"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\":[{\"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\":\"l2ChainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"name\",\"type\":\"bytes\"}],\"name\":\"metadata\",\"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\":\"bytes\",\"name\":\"name\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"setAddr\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"result\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"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\"}],\"devdoc\":{\"errors\":{\"StorageHandledByL2(uint256,address)\":[{\"details\":\"EIP-5559 - Error to raise when mutations are being deferred to an L2.\",\"params\":{\"chainId\":\"Chain ID to perform the deferred mutation to.\",\"contractAddress\":\"Contract Address at which the deferred mutation should transact with.\"}}]},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_ens\":\"The ENS registry address\",\"_graphqlUrl\":\"The offchain/l2 graphql endpoint url\",\"_l2ChainId\":\"The chainId at which the resolver resolves data from\",\"_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\":\"graphqlUrl The GraphQL URL used by the resolver\"}},\"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\"}},\"setAddr(bytes,address)\":{\"details\":\"Resolve and throws an EIP 3559 compliant error\",\"params\":{\"_addr\":\"The actual calldata\",\"name\":\"DNS encoded ENS name to query\"},\"returns\":{\"result\":\"result of the call\"}},\"setTarget(bytes32,address)\":{\"params\":{\"node\":\"The ENS node 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(bytes32,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\":200},\"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\"},\"@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/IAddrSetter.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.25;\\n\\ninterface IAddrSetter {\\n function setAddr(\\n bytes calldata name,\\n address _addr\\n ) external view returns (bytes memory result);\\n}\\n\",\"keccak256\":\"0xd211ec6793d80d0bb7643d8f15e5773abe38541edee0b85eb83283ca5fdd1525\",\"license\":\"MIT\"},\"contracts/IMetadataResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.25;\\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 graphqlUrl The GraphQL URL used by the resolver\\n *\\n */\\n function metadata(\\n bytes calldata name\\n ) external view returns (string memory graphqlUrl);\\n\\n event MetadataChanged(bytes name, string graphqlUrl);\\n}\\n\",\"keccak256\":\"0xe2edf067122145bfd59e95b0f5b3507bd0cd2715b6b7d7068e70c6cbef09e5ae\",\"license\":\"MIT\"},\"contracts/ITargetResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.25;\\n\\ninterface ITargetResolver {\\n function getTarget(\\n bytes memory name\\n ) external view returns (bytes32 node, address target);\\n}\\n\",\"keccak256\":\"0x2daa66377cc37fc99b927d87f5495259ed6e49c0f10af1f75bd5fd74964e5b78\",\"license\":\"MIT\"},\"contracts/L1Resolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.25;\\n\\nimport {EVMFetcher} from \\\"./linea-verifier/EVMFetcher.sol\\\";\\nimport {EVMFetchTarget} from \\\"./linea-verifier/EVMFetchTarget.sol\\\";\\nimport {IEVMVerifier} from \\\"./linea-verifier/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 {IAddrSetter} from \\\"./IAddrSetter.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/introspection/ERC165.sol\\\";\\n\\ncontract L1Resolver is\\n EVMFetchTarget,\\n ITargetResolver,\\n IMetadataResolver,\\n IExtendedResolver,\\n IAddrSetter,\\n ERC165\\n{\\n using EVMFetcher for EVMFetcher.EVMFetchRequest;\\n using BytesUtils for bytes;\\n IEVMVerifier immutable verifier;\\n ENS immutable ens;\\n INameWrapper 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_ABIS_SLOT = 1;\\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 l2ChainId;\\n\\n event TargetSet(bytes32 indexed node, address target);\\n\\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 * @dev EIP-5559 - Error to raise when mutations are being deferred to an L2.\\n * @param chainId Chain ID to perform the deferred mutation to.\\n * @param contractAddress Contract Address at which the deferred mutation should transact with.\\n */\\n error StorageHandledByL2(uint256 chainId, address contractAddress);\\n\\n modifier authorised(bytes32 node) {\\n require(isAuthorised(node));\\n _;\\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 _l2ChainId The chainId at which the resolver resolves data from\\n */\\n constructor(\\n IEVMVerifier _verifier,\\n ENS _ens,\\n INameWrapper _nameWrapper,\\n string memory _graphqlUrl,\\n uint256 _l2ChainId\\n ) {\\n require(\\n address(_nameWrapper) != address(0),\\n \\\"Name Wrapper address must be set\\\"\\n );\\n require(\\n address(_verifier) != address(0),\\n \\\"Verifier address must be set\\\"\\n );\\n require(address(_ens) != address(0), \\\"Registry address must be set\\\");\\n verifier = _verifier;\\n ens = _ens;\\n nameWrapper = _nameWrapper;\\n graphqlUrl = _graphqlUrl;\\n l2ChainId = _l2ChainId;\\n }\\n\\n /**\\n * Set target address to verify aagainst\\n * @param node The ENS node to query.\\n * @param target The L2 resolver address to verify against.\\n */\\n function setTarget(bytes32 node, address target) public authorised(node) {\\n targets[node] = target;\\n emit TargetSet(node, target);\\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(name, offset + len + 1);\\n node = keccak256(abi.encodePacked(node, label));\\n if (targets[node] != address(0)) {\\n return (node, targets[node]);\\n }\\n } else {\\n return (bytes32(0), address(0));\\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(\\n bytes calldata name,\\n bytes calldata data\\n ) 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(\\n data[4:],\\n (bytes32, uint256)\\n );\\n return _addr(node, cointype, target);\\n }\\n if (selector == ITextResolver.text.selector) {\\n (bytes32 node, string memory key) = abi.decode(\\n data[4:],\\n (bytes32, string)\\n );\\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 /**\\n * @dev Resolve and throws an EIP 3559 compliant error\\n * @param name DNS encoded ENS name to query\\n * @param _addr The actual calldata\\n * @return result result of the call\\n */\\n function setAddr(\\n bytes calldata name,\\n address _addr\\n ) external view returns (bytes memory result) {\\n (, address target) = _getTarget(name, 0);\\n _writeDeferral(target);\\n }\\n\\n function _addr(\\n bytes32 node,\\n address target\\n ) private view returns (bytes memory) {\\n EVMFetcher\\n .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\\n .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\\n .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(\\n bytes32 node,\\n address target\\n ) private view returns (bytes memory) {\\n EVMFetcher\\n .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 graphqlUrl The GraphQL URL used by the resolver\\n */\\n function metadata(bytes calldata name) public view returns (string memory) {\\n return (graphqlUrl);\\n }\\n\\n function supportsInterface(\\n bytes4 interfaceId\\n ) public view override returns (bool) {\\n return\\n interfaceId == type(IExtendedResolver).interfaceId ||\\n interfaceId == type(ITargetResolver).interfaceId ||\\n interfaceId == type(IMetadataResolver).interfaceId ||\\n interfaceId == type(IAddrSetter).interfaceId ||\\n super.supportsInterface(interfaceId);\\n }\\n\\n function _writeDeferral(address target) internal view {\\n revert StorageHandledByL2(l2ChainId, target);\\n }\\n}\\n\",\"keccak256\":\"0x736f586effb83fdd886dd37f9d570c82bdfeb29b7ba7888c129a3edc9336adac\",\"license\":\"MIT\"},\"contracts/linea-verifier/EVMFetchTarget.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.25;\\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(\\n bytes calldata response,\\n bytes calldata extradata\\n ) external {\\n bytes memory proof = abi.decode(response, (bytes));\\n (\\n IEVMVerifier verifier,\\n bytes32[] memory commands,\\n bytes[] memory constants,\\n bytes4 callback,\\n bytes memory callbackData\\n ) = abi.decode(\\n extradata,\\n (IEVMVerifier, bytes32[], bytes[], bytes4, bytes)\\n );\\n bytes[] memory values = verifier.getStorageValues(\\n commands,\\n constants,\\n proof\\n );\\n if (values.length != commands.length) {\\n revert ResponseLengthMismatch(values.length, commands.length);\\n }\\n bytes memory ret = address(this).functionCall(\\n abi.encodeWithSelector(callback, values, callbackData)\\n );\\n assembly {\\n return(add(ret, 32), mload(ret))\\n }\\n }\\n}\\n\",\"keccak256\":\"0xff598cf7042e31b6445e41344a1742ecee12fa5fb28da515f5b2fccd2fec72bf\",\"license\":\"MIT\"},\"contracts/linea-verifier/EVMFetcher.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.25;\\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(\\n address addr,\\n bytes32[] memory commands,\\n bytes[] memory constants\\n ) 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(\\n address sender,\\n string[] urls,\\n bytes callData,\\n bytes4 callbackFunction,\\n bytes extraData\\n );\\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(\\n IEVMVerifier verifier,\\n address target\\n ) 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(\\n EVMFetchRequest memory request,\\n uint256 baseSlot\\n ) 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(\\n EVMFetchRequest memory request,\\n uint256 baseSlot\\n ) 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(\\n EVMFetchRequest memory request,\\n uint256 el\\n ) 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(\\n EVMFetchRequest memory request,\\n bytes32 el\\n ) 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(\\n EVMFetchRequest memory request,\\n address el\\n ) 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(\\n EVMFetchRequest memory request,\\n bytes memory el\\n ) 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(\\n EVMFetchRequest memory request,\\n string memory el\\n ) 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(\\n EVMFetchRequest memory request,\\n uint8 idx\\n ) 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(\\n EVMFetchRequest memory request,\\n bytes4 callbackId,\\n bytes memory callbackData\\n ) internal view {\\n if (request.commands.length > 0 && request.operationIdx < 32) {\\n // Terminate last command\\n _addOperation(request, OP_END);\\n }\\n\\n revert OffchainLookup(\\n address(this),\\n request.verifier.gatewayURLs(),\\n abi.encodeCall(\\n IEVMGateway.getStorageSlots,\\n (request.target, request.commands, request.constants)\\n ),\\n EVMFetchTarget.getStorageSlotsCallback.selector,\\n abi.encode(\\n request.verifier,\\n request.commands,\\n request.constants,\\n callbackId,\\n callbackData\\n )\\n );\\n }\\n\\n function _addConstant(\\n EVMFetchRequest memory request,\\n bytes memory value\\n ) 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(\\n EVMFetchRequest memory request,\\n uint8 op\\n ) private pure {\\n uint256 commandIdx = request.commands.length - 1;\\n request.commands[commandIdx] =\\n request.commands[commandIdx] |\\n (bytes32(bytes1(op)) >> (8 * request.operationIdx++));\\n }\\n}\\n\",\"keccak256\":\"0xc53848b88ec0ab63f1b4c59daa5de8d0b33431d05da3722c20d410318ec9c0b8\",\"license\":\"MIT\"},\"contracts/linea-verifier/IEVMVerifier.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.25;\\n\\ninterface IEVMVerifier {\\n function gatewayURLs() external view returns (string[] memory);\\n\\n function getStorageValues(\\n bytes32[] memory commands,\\n bytes[] memory constants,\\n bytes memory proof\\n ) external view returns (bytes[] memory values);\\n}\\n\",\"keccak256\":\"0x9ffc2a113f5f562575a6a8d87669130587a428c16c9f08e35fea56778051ee08\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60e060405234610362576122d9803803908161001a81610367565b91823960a08183810103126103625780516001600160a01b039182821682036103625760208101518381168103610362576040820151908482168203610362576060830151936001600160401b03851161036257601f938781018587830101121561036257808601516001600160401b03811161026857601f19966100a58288018916602001610367565b99828b5283016020838386010101116103625760005b82811061034c57505060009089016020015260800151958381161561030857808216156102c35782161561027e5760805260a05260c0528351906001600160401b0382116102685760019283548481811c9116801561025e575b602082101461024857828111610200575b5060209183116001146101a1575081929394600092610196575b5050600019600383901b1c191690821b1790555b600255604051611f4c908161038d823960805181818161109f01528181611288015281816113fd0152611501015260a05181610665015260c0518161069c0152f35b015190503880610140565b8216908360005260206000209160005b8181106101ea57509583859697106101d1575b505050811b019055610154565b015160001960f88460031b161c191690553880806101c4565b87830151845592850192602092830192016101b1565b8460005260206000208380860160051c8201926020871061023f575b0160051c019085905b828110610233575050610126565b60008155018590610225565b9250819261021c565b634e487b7160e01b600052602260045260246000fd5b90607f1690610115565b634e487b7160e01b600052604160045260246000fd5b60405162461bcd60e51b815260206004820152601c60248201527f52656769737472792061646472657373206d75737420626520736574000000006044820152606490fd5b60405162461bcd60e51b815260206004820152601c60248201527f56657269666965722061646472657373206d75737420626520736574000000006044820152606490fd5b606460405162461bcd60e51b815260206004820152602060248201527f4e616d6520577261707065722061646472657373206d757374206265207365746044820152fd5b602082850182018101518c8301820152016100bb565b600080fd5b6040519190601f01601f191682016001600160401b038111838210176102685760405256fe6080604052600436101561001257600080fd5b60003560e01c806301ffc9a7146100dd57806315f64386146100d857806338bf92e6146100ab5780634062b43f146100d35780634280bfb5146100ce5780635bdaa916146100c95780638a596ebe146100c45780639061b923146100bf578063d6ae3cd5146100ba578063de9abe5e146100ab578063f00eebf4146100b5578063f470901a146100b05763fcd2e381146100ab57600080fd5b610495565b610a9a565b610a22565b610a04565b61091e565b6108e1565b6107ee565b61061d565b6105f0565b6102ca565b6100fc565b35906001600160e01b0319821682036100f757565b600080fd5b346100f75760203660031901126100f75760043563ffffffff60e01b81168091036100f75761015f90639061b92360e01b8114908115610196575b8115610185575b8115610174575b8115610163575b5060405190151581529081906020820190565b0390f35b6301ffc9a760e01b1490503861014c565b633c03bafd60e21b81149150610145565b63452cb75f60e11b8114915061013e565b630afb21c360e11b81149150610137565b634e487b7160e01b600052604160045260246000fd5b604081019081106001600160401b038211176101d857604052565b6101a7565b602081019081106001600160401b038211176101d857604052565b61042081019081106001600160401b038211176101d857604052565b90601f801991011681019081106001600160401b038211176101d857604052565b6001600160401b0381116101d857601f01601f191660200190565b92919261025c82610235565b9161026a6040519384610214565b8294818452818301116100f7578281602093846000960137010152565b9080601f830112156100f7578160206102a293359101610250565b90565b906020828203126100f75781356001600160401b0381116100f7576102a29201610287565b346100f75760203660031901126100f7576004356001600160401b0381116100f75761030660006103016040933690600401610287565b610f30565b82519182526001600160a01b03166020820152f35b6001600160401b0381116101d85760051b60200190565b81601f820112156100f75780359160209161034c8461031b565b9361035a6040519586610214565b808552838086019160051b830101928084116100f757848301915b8483106103855750505050505090565b82356001600160401b0381116100f75786916103a684848094890101610287565b815201920191610375565b9060406003198301126100f7576001600160401b036004358181116100f757836103dd91600401610332565b926024359182116100f7576102a291600401610287565b60005b8381106104075750506000910152565b81810151838201526020016103f7565b90602091610430815180928185528580860191016103f4565b601f01601f1916010190565b906020916020815260605180602083015260005b818110610471575060409293506000838284010152601f8019910116010190565b6080810151838201604001528401610450565b9060206102a2928181520190610417565b346100f7576104a3366103b1565b508051600110156104f4576104d26104e0604061015f9301516040519283916020808401526040830190610417565b03601f198101835282610214565b604051918291602083526020830190610417565b610b22565b604051906000600190600154918260011c92600181169182156105e6575b6020916020861084146105d2578588528794936020860193929181156105b35750600114610551575b50505061054f92500383610214565b565b92509361058060016000527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf690565b946000935b82851061059d5750505061054f935001388080610540565b8654858501529586019588955093810193610585565b9250505061054f9491925060ff19168252151560051b01388080610540565b634e487b7160e01b85526022600452602485fd5b93607f1693610517565b346100f75760003660031901126100f75761015f6104e06104f9565b6001600160a01b038116036100f757565b346100f75760403660031901126100f75760043560243561063d8161060c565b6040516302571be360e01b8152600481018390526001600160a01b03929060209081816024817f000000000000000000000000000000000000000000000000000000000000000089165afa918215610753578591600093610758575b507f0000000000000000000000000000000000000000000000000000000000000000821691831682146106e1575b50506106da906106df9433911614610b4c565b610b53565b005b6040516331a9108f60e11b81526004810185905295909250908290869060249082905afa8015610753576106df956106da93600092610726575b5050918195506106c7565b6107459250803d1061074c575b61073d8183610214565b810190610ff5565b388061071b565b503d610733565b610e1c565b816107709294503d851161074c5761073d8183610214565b9138610699565b9181601f840112156100f7578235916001600160401b0383116100f757602083818601950101116100f757565b60406003198201126100f7576001600160401b03916004358381116100f757826107d091600401610777565b939093926024359182116100f7576107ea91600401610777565b9091565b346100f75761081361083f600061081c610807366107a4565b969183919301906102a5565b94810190610baf565b9492939096916040518097819482936322b2358760e01b84528860048501610de5565b03916001600160a01b03165afa928315610753576000936108bc575b5082519051908181036108965761088e84610888876104d287604051948593602085015260248401610e28565b3061100a565b602081519101f35b604051632918942560e01b815260048101919091526024810191909152604490fd5b0390fd5b6108da9193503d806000833e6108d28183610214565b810190610caa565b913861085b565b346100f75760203660031901126100f7576004356001600160401b0381116100f757610911903690600401610777565b505061015f6104e06104f9565b346100f7576103016000610940610934366107a4565b94929095913691610250565b9290506001600160e01b03196109568383610e4d565b16631d9dabef60e11b81146109f0576378e5bf0360e11b81146109d357631674750f60e21b81146109b65763bc1c58d160e01b1461099b576040518061015f8161043c565b816109b1926109a992610e79565b810190610e96565b6114f3565b50816109cd926109c592610e79565b810190610ebb565b906113ee565b50816109ea926109e292610e79565b810190610ea5565b9061126e565b50816109ff926109a992610e79565b611089565b346100f75760003660031901126100f7576020600254604051908152f35b346100f75760403660031901126100f7576004356001600160401b0381116100f757610a6e6000610301610a5c6044943690600401610777565b610a6760243561060c565b3691610250565b60025460405163e0a0507160e01b815260048101919091526001600160a01b0390911660248201529050fd5b346100f757610aa8366103b1565b508051600110156104f4576104d2610b01604061015f93015160208151910151906bffffffffffffffffffffffff19918281169160148110610b0d575b50506040805160609290921c6020830152909384925090820190565b60405191829182610484565b8391925060140360031b1b1616803880610ae5565b634e487b7160e01b600052603260045260246000fd5b80518210156104f45760209160051b010190565b156100f757565b9060207faf930f9068b0eb51ed43cbf5948d6bab0229ebadb371dd850de50b9d6d30106a91836000526000825260406000209060018060a01b031690816bffffffffffffffffffffffff60a01b825416179055604051908152a2565b9060a0828203126100f7578135610bc58161060c565b926001600160401b03906020848101358381116100f75785019084601f830112156100f757813591610bf68361031b565b92610c046040519485610214565b808452828085019160051b830101918783116100f7578301905b828210610c6657505050509360408101358381116100f75784610c42918301610332565b93610c4f606083016100e2565b9360808301359081116100f7576102a29201610287565b81358152908301908301610c1e565b90929192610c8281610235565b91610c906040519384610214565b8294828452828201116100f757602061054f9301906103f4565b9060209081838203126100f75782516001600160401b03938482116100f757019080601f830112156100f7578151610ce18161031b565b94604090610cf26040519788610214565b828752858088019360051b860101948486116100f757868101935b868510610d1f57505050505050505090565b84518381116100f757820186603f820112156100f7578891610d4988838886809601519101610c75565b815201940193610d0d565b90815180825260208080930193019160005b828110610d74575050505090565b835185529381019392810192600101610d66565b90808251908181526020809101926020808460051b8301019501936000915b848310610db75750505050505090565b9091929394958480610dd5600193601f198682030187528a51610417565b9801930193019194939290610da7565b91610e0e90610e006102a29593606086526060860190610d54565b908482036020860152610d88565b916040818403910152610417565b6040513d6000823e3d90fd5b9091610e3f6102a293604084526040840190610d88565b916020818403910152610417565b6001600160e01b03199035818116939260048110610e6a57505050565b60040360031b82901b16169150565b90929192836004116100f75783116100f757600401916003190190565b908160209103126100f7573590565b91908260409103126100f7576020823592013590565b91906040838203126100f7578235926020810135906001600160401b0382116100f757019080601f830112156100f7578160206102a293359101610250565b634e487b7160e01b600052601160045260246000fd5b9060018201809211610f1e57565b610efa565b91908201809211610f1e57565b91909180518310156104f4576020838201015160f81c8015610fe95790610f75610f7083610f6a610f7b95610f6489610f10565b866115ba565b96610f23565b610f10565b90610f30565b60408051602081019384529081019490945292610f9b81606081016104d2565b51902060008181526020819052604090206001600160a01b0390610fc7905b546001600160a01b031690565b16610fd0579190565b91506102a2610fba836000526000602052604060002090565b50509050600090600090565b908160209103126100f757516102a28161060c565b906102a2916000806040519361101f856101bd565b601e85527f416464726573733a206c6f772d6c6576656c2063616c6c206661696c65640000602086015260208151910182855af13d15611081573d9161106483610235565b926110726040519485610214565b83523d6000602085013e611cf2565b606091611cf2565b6110c86110d26110cd836110c86110c36110d7977f0000000000000000000000000000000000000000000000000000000000000000611611565b6116ad565b611724565b611758565b6117cf565b6110df6115d4565b5060608101602091828251101561125c5760049060409061111c6111168351603c88820152878152611110816101bd565b83611ee9565b82611e88565b815194611128866101dd565b60008652828201948186515115159182611251575b5050611243575b8151600090611163906001600160a01b03165b6001600160a01b031690565b8451632d43cbef60e21b815295869182905afa9384156107535760009461121e575b50818101516001600160a01b0316948051966080840197885197865198899263ea9cd3bf60e01b8785015260248401926111be936118ec565b0393601f199485810189526111d39089610214565b516001600160a01b03169151975185519889948501936111f294611922565b0390810185526112029085610214565b51630556f18360e41b81529283926108b8923060048601611a3c565b61123c9194503d806000833e6112348183610214565b810190611842565b9238611185565b61124c82611d83565b611144565b51109050813861113d565b604051631601fac760e31b8152600490fd5b806110c86110d26110cd6110c8946110c86110c36112ac997f0000000000000000000000000000000000000000000000000000000000000000611611565b60409060048251926112bd846101dd565b60008452808301908151511515806113e0575b6113d2575b83516000906112ec906001600160a01b0316611157565b8251632d43cbef60e21b815294859182905afa928315610753576000936113af575b50602084015192936108b89361139791906001600160a01b03169361138b8151986113796080850197611357895189519d8e9363ea9cd3bf60e01b6020860152602485016118ec565b039461136c601f19968d88820190528d610214565b516001600160a01b031690565b92519651865197889460208601611973565b03908101845283610214565b51630556f18360e41b81529384933060048601611a3c565b6108b893506113cb611397913d806000833e6112348183610214565b935061130e565b6113db84611d83565b6112d5565b5060206060850151106112d0565b9091816110c86110c3611421937f0000000000000000000000000000000000000000000000000000000000000000611611565b9061142a6115d4565b50602060408301805160018151801515806114e6575b6114d8575b0190525151116114bf576110c8826000606061148595015261146681611e2d565b6110d2611116604051611110816104d26020820190600a602083019252565b9061148e6115d4565b5060206060830151101561125c576111166114a99183611ee9565b604051906114b6826101dd565b60008252611ae0565b604051630251ce0160e31b815260206004820152602490fd5b6114e187611d83565b611445565b5084606088015110611440565b90816110c86110c3611525937f0000000000000000000000000000000000000000000000000000000000000000611611565b9061152e6115d4565b50602060408301805160018151801515806115ad575b61159f575b0190525151116114bf576110c8826000606061158995015261156a81611e2d565b6110d2611116604051611110816104d260208201906003602083019252565b60405190611596826101dd565b60008252611c06565b6115a887611d83565b611549565b5084606088015110611544565b90828101808211610f1e578251106100f757016020012090565b6040519060a082018281106001600160401b038211176101d857604052606060808360008152600060208201528260408201526000838201520152565b6116196115d4565b50604051611626816101f8565b60209160208252610400928336602085013760405193611645856101f8565b60005b81811061169e5750505060008252600083526040519360a085018581106001600160401b038211176101d8576040526001600160a01b039182168552166020840152604083015260006060830152608082015290565b60608682018401528201611648565b6116b56115d4565b5060206040820180516001815180151580611717575b611709575b0190525151116114bf57600060608201526116ea81611de1565b6102a2611116604051611110816104d260208201906000602083019252565b61171286611d83565b6116d0565b50846060870151106116cb565b9061172d6115d4565b5060206060830151101561125c576111166102a29160405190602082015260208152611110816101bd565b6117606115d4565b50602060408201805160018151801515806117c2575b6117b4575b0190525151116114bf576000606082015261179581611e2d565b6102a2611116604051611110816104d260208201906002602083019252565b6117bd86611d83565b61177b565b5084606087015110611776565b6117d76115d4565b506060810160208151101561125c57604082019081515160001991828201918211610f1e57611807828551610b38565b51908051938414610f1e576001840190526001600160fd1b0383168303610f1e5761183e92600160fd1b9060031b1c179251610b38565b5290565b9060209081838203126100f75782516001600160401b03938482116100f757019080601f830112156100f75781516118798161031b565b9460409061188a6040519788610214565b828752858088019360051b860101948486116100f757868101935b8685106118b757505050505050505090565b84518381116100f757820186603f820112156100f75788916118e188838886809601519101610c75565b8152019401936118a5565b6001600160a01b0390911681526060602082018190526102a293919261191491840190610d54565b916040818403910152610d88565b9261194a6102a295936119589360018060a01b0316865260a0602087015260a0860190610d54565b908482036040860152610d88565b91637a38480d60e11b60608201526080818403910152610417565b9261194a6102a2959361199b9360018060a01b0316865260a0602087015260a0860190610d54565b91631c5fc97360e11b60608201526080818403910152610417565b9261194a6102a295936119de9360018060a01b0316865260a0602087015260a0860190610d54565b91636f4d5f2f60e11b60608201526080818403910152610417565b9261194a6102a29593611a219360018060a01b0316865260a0602087015260a0860190610d54565b9163fcd2e38160e01b60608201526080818403910152610417565b92909493919460a084019060018060a01b0316845260209060a06020860152865180915260c0850191602060c08360051b8801019801926000905b838210611ab457505050505084611a9991846102a29697036040860152610417565b632ded548b60e11b6060840152916080818403910152610417565b90919293988380611ad160019360bf198c82030186528d51610417565b9b019201920190939291611a77565b600460408201805151151580611bf8575b611bea575b8251600090611b0d906001600160a01b0316611157565b604051632d43cbef60e21b815293849182905afa91821561075357600092611bc7575b50602083015191926108b892611bad91906001600160a01b031692611ba1815197611b8e6080850196611b7a88516040519c8d9363ea9cd3bf60e01b6020860152602485016118ec565b039461136c601f19968781018d528c610214565b92519551604051968794602086016119b6565b03908101835282610214565b604051630556f18360e41b81529384933060048601611a3c565b6108b89250611be3611bad913d806000833e6112348183610214565b9250611b30565b611bf383611d83565b611af6565b506020606084015110611af1565b600460408201805151151580611ce4575b611cd6575b8251600090611c33906001600160a01b0316611157565b604051632d43cbef60e21b815293849182905afa91821561075357600092611cb3575b50602083015191926108b892611bad91906001600160a01b031692611ba1815197611ca06080850196611b7a88516040519c8d9363ea9cd3bf60e01b6020860152602485016118ec565b92519551604051968794602086016119f9565b6108b89250611ccf611bad913d806000833e6112348183610214565b9250611c56565b611cdf83611d83565b611c1c565b506020606084015110611c17565b91929015611d545750815115611d06575090565b3b15611d0f5790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b825190915015611d675750805190602001fd5b60405162461bcd60e51b81529081906108b89060048301610484565b604081019081515160001991828201918211610f1e576060611da6838651610b38565b5191018051938414610f1e576001840190526001600160fd1b0383168303610f1e57611dde9260ff60f81b9060031b1c179251610b38565b52565b60408101805151600019808201918211610f1e576060611e02838551610b38565b5194018051918214610f1e576001820190526001600160fd1b03811603610f1e57611dde9151610b38565b604081019081515160001991828201918211610f1e576060611e50838651610b38565b5191018051938414610f1e576001840190526001600160fd1b0383168303610f1e57611dde92600160f81b9060031b1c179251610b38565b60408101805151909291600019808301928311610f1e576060611eac848751610b38565b5192018051918214610f1e576001820190526001600160fd1b0381168103610f1e57611dde9360ff60f81b9060f81b169060031b1c179251610b38565b6080611f139193929301519260ff845116938491600183018252611f0d8383610b38565b52610b38565b5056fea2646970667358221220115f026084ff9e96f10ed0a5ab7d1a9f37b33a9b51dc27cfe2c0a48b6f9e3fb264736f6c63430008190033", - "deployedBytecode": "0x6080604052600436101561001257600080fd5b60003560e01c806301ffc9a7146100dd57806315f64386146100d857806338bf92e6146100ab5780634062b43f146100d35780634280bfb5146100ce5780635bdaa916146100c95780638a596ebe146100c45780639061b923146100bf578063d6ae3cd5146100ba578063de9abe5e146100ab578063f00eebf4146100b5578063f470901a146100b05763fcd2e381146100ab57600080fd5b610495565b610a9a565b610a22565b610a04565b61091e565b6108e1565b6107ee565b61061d565b6105f0565b6102ca565b6100fc565b35906001600160e01b0319821682036100f757565b600080fd5b346100f75760203660031901126100f75760043563ffffffff60e01b81168091036100f75761015f90639061b92360e01b8114908115610196575b8115610185575b8115610174575b8115610163575b5060405190151581529081906020820190565b0390f35b6301ffc9a760e01b1490503861014c565b633c03bafd60e21b81149150610145565b63452cb75f60e11b8114915061013e565b630afb21c360e11b81149150610137565b634e487b7160e01b600052604160045260246000fd5b604081019081106001600160401b038211176101d857604052565b6101a7565b602081019081106001600160401b038211176101d857604052565b61042081019081106001600160401b038211176101d857604052565b90601f801991011681019081106001600160401b038211176101d857604052565b6001600160401b0381116101d857601f01601f191660200190565b92919261025c82610235565b9161026a6040519384610214565b8294818452818301116100f7578281602093846000960137010152565b9080601f830112156100f7578160206102a293359101610250565b90565b906020828203126100f75781356001600160401b0381116100f7576102a29201610287565b346100f75760203660031901126100f7576004356001600160401b0381116100f75761030660006103016040933690600401610287565b610f30565b82519182526001600160a01b03166020820152f35b6001600160401b0381116101d85760051b60200190565b81601f820112156100f75780359160209161034c8461031b565b9361035a6040519586610214565b808552838086019160051b830101928084116100f757848301915b8483106103855750505050505090565b82356001600160401b0381116100f75786916103a684848094890101610287565b815201920191610375565b9060406003198301126100f7576001600160401b036004358181116100f757836103dd91600401610332565b926024359182116100f7576102a291600401610287565b60005b8381106104075750506000910152565b81810151838201526020016103f7565b90602091610430815180928185528580860191016103f4565b601f01601f1916010190565b906020916020815260605180602083015260005b818110610471575060409293506000838284010152601f8019910116010190565b6080810151838201604001528401610450565b9060206102a2928181520190610417565b346100f7576104a3366103b1565b508051600110156104f4576104d26104e0604061015f9301516040519283916020808401526040830190610417565b03601f198101835282610214565b604051918291602083526020830190610417565b610b22565b604051906000600190600154918260011c92600181169182156105e6575b6020916020861084146105d2578588528794936020860193929181156105b35750600114610551575b50505061054f92500383610214565b565b92509361058060016000527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf690565b946000935b82851061059d5750505061054f935001388080610540565b8654858501529586019588955093810193610585565b9250505061054f9491925060ff19168252151560051b01388080610540565b634e487b7160e01b85526022600452602485fd5b93607f1693610517565b346100f75760003660031901126100f75761015f6104e06104f9565b6001600160a01b038116036100f757565b346100f75760403660031901126100f75760043560243561063d8161060c565b6040516302571be360e01b8152600481018390526001600160a01b03929060209081816024817f000000000000000000000000000000000000000000000000000000000000000089165afa918215610753578591600093610758575b507f0000000000000000000000000000000000000000000000000000000000000000821691831682146106e1575b50506106da906106df9433911614610b4c565b610b53565b005b6040516331a9108f60e11b81526004810185905295909250908290869060249082905afa8015610753576106df956106da93600092610726575b5050918195506106c7565b6107459250803d1061074c575b61073d8183610214565b810190610ff5565b388061071b565b503d610733565b610e1c565b816107709294503d851161074c5761073d8183610214565b9138610699565b9181601f840112156100f7578235916001600160401b0383116100f757602083818601950101116100f757565b60406003198201126100f7576001600160401b03916004358381116100f757826107d091600401610777565b939093926024359182116100f7576107ea91600401610777565b9091565b346100f75761081361083f600061081c610807366107a4565b969183919301906102a5565b94810190610baf565b9492939096916040518097819482936322b2358760e01b84528860048501610de5565b03916001600160a01b03165afa928315610753576000936108bc575b5082519051908181036108965761088e84610888876104d287604051948593602085015260248401610e28565b3061100a565b602081519101f35b604051632918942560e01b815260048101919091526024810191909152604490fd5b0390fd5b6108da9193503d806000833e6108d28183610214565b810190610caa565b913861085b565b346100f75760203660031901126100f7576004356001600160401b0381116100f757610911903690600401610777565b505061015f6104e06104f9565b346100f7576103016000610940610934366107a4565b94929095913691610250565b9290506001600160e01b03196109568383610e4d565b16631d9dabef60e11b81146109f0576378e5bf0360e11b81146109d357631674750f60e21b81146109b65763bc1c58d160e01b1461099b576040518061015f8161043c565b816109b1926109a992610e79565b810190610e96565b6114f3565b50816109cd926109c592610e79565b810190610ebb565b906113ee565b50816109ea926109e292610e79565b810190610ea5565b9061126e565b50816109ff926109a992610e79565b611089565b346100f75760003660031901126100f7576020600254604051908152f35b346100f75760403660031901126100f7576004356001600160401b0381116100f757610a6e6000610301610a5c6044943690600401610777565b610a6760243561060c565b3691610250565b60025460405163e0a0507160e01b815260048101919091526001600160a01b0390911660248201529050fd5b346100f757610aa8366103b1565b508051600110156104f4576104d2610b01604061015f93015160208151910151906bffffffffffffffffffffffff19918281169160148110610b0d575b50506040805160609290921c6020830152909384925090820190565b60405191829182610484565b8391925060140360031b1b1616803880610ae5565b634e487b7160e01b600052603260045260246000fd5b80518210156104f45760209160051b010190565b156100f757565b9060207faf930f9068b0eb51ed43cbf5948d6bab0229ebadb371dd850de50b9d6d30106a91836000526000825260406000209060018060a01b031690816bffffffffffffffffffffffff60a01b825416179055604051908152a2565b9060a0828203126100f7578135610bc58161060c565b926001600160401b03906020848101358381116100f75785019084601f830112156100f757813591610bf68361031b565b92610c046040519485610214565b808452828085019160051b830101918783116100f7578301905b828210610c6657505050509360408101358381116100f75784610c42918301610332565b93610c4f606083016100e2565b9360808301359081116100f7576102a29201610287565b81358152908301908301610c1e565b90929192610c8281610235565b91610c906040519384610214565b8294828452828201116100f757602061054f9301906103f4565b9060209081838203126100f75782516001600160401b03938482116100f757019080601f830112156100f7578151610ce18161031b565b94604090610cf26040519788610214565b828752858088019360051b860101948486116100f757868101935b868510610d1f57505050505050505090565b84518381116100f757820186603f820112156100f7578891610d4988838886809601519101610c75565b815201940193610d0d565b90815180825260208080930193019160005b828110610d74575050505090565b835185529381019392810192600101610d66565b90808251908181526020809101926020808460051b8301019501936000915b848310610db75750505050505090565b9091929394958480610dd5600193601f198682030187528a51610417565b9801930193019194939290610da7565b91610e0e90610e006102a29593606086526060860190610d54565b908482036020860152610d88565b916040818403910152610417565b6040513d6000823e3d90fd5b9091610e3f6102a293604084526040840190610d88565b916020818403910152610417565b6001600160e01b03199035818116939260048110610e6a57505050565b60040360031b82901b16169150565b90929192836004116100f75783116100f757600401916003190190565b908160209103126100f7573590565b91908260409103126100f7576020823592013590565b91906040838203126100f7578235926020810135906001600160401b0382116100f757019080601f830112156100f7578160206102a293359101610250565b634e487b7160e01b600052601160045260246000fd5b9060018201809211610f1e57565b610efa565b91908201809211610f1e57565b91909180518310156104f4576020838201015160f81c8015610fe95790610f75610f7083610f6a610f7b95610f6489610f10565b866115ba565b96610f23565b610f10565b90610f30565b60408051602081019384529081019490945292610f9b81606081016104d2565b51902060008181526020819052604090206001600160a01b0390610fc7905b546001600160a01b031690565b16610fd0579190565b91506102a2610fba836000526000602052604060002090565b50509050600090600090565b908160209103126100f757516102a28161060c565b906102a2916000806040519361101f856101bd565b601e85527f416464726573733a206c6f772d6c6576656c2063616c6c206661696c65640000602086015260208151910182855af13d15611081573d9161106483610235565b926110726040519485610214565b83523d6000602085013e611cf2565b606091611cf2565b6110c86110d26110cd836110c86110c36110d7977f0000000000000000000000000000000000000000000000000000000000000000611611565b6116ad565b611724565b611758565b6117cf565b6110df6115d4565b5060608101602091828251101561125c5760049060409061111c6111168351603c88820152878152611110816101bd565b83611ee9565b82611e88565b815194611128866101dd565b60008652828201948186515115159182611251575b5050611243575b8151600090611163906001600160a01b03165b6001600160a01b031690565b8451632d43cbef60e21b815295869182905afa9384156107535760009461121e575b50818101516001600160a01b0316948051966080840197885197865198899263ea9cd3bf60e01b8785015260248401926111be936118ec565b0393601f199485810189526111d39089610214565b516001600160a01b03169151975185519889948501936111f294611922565b0390810185526112029085610214565b51630556f18360e41b81529283926108b8923060048601611a3c565b61123c9194503d806000833e6112348183610214565b810190611842565b9238611185565b61124c82611d83565b611144565b51109050813861113d565b604051631601fac760e31b8152600490fd5b806110c86110d26110cd6110c8946110c86110c36112ac997f0000000000000000000000000000000000000000000000000000000000000000611611565b60409060048251926112bd846101dd565b60008452808301908151511515806113e0575b6113d2575b83516000906112ec906001600160a01b0316611157565b8251632d43cbef60e21b815294859182905afa928315610753576000936113af575b50602084015192936108b89361139791906001600160a01b03169361138b8151986113796080850197611357895189519d8e9363ea9cd3bf60e01b6020860152602485016118ec565b039461136c601f19968d88820190528d610214565b516001600160a01b031690565b92519651865197889460208601611973565b03908101845283610214565b51630556f18360e41b81529384933060048601611a3c565b6108b893506113cb611397913d806000833e6112348183610214565b935061130e565b6113db84611d83565b6112d5565b5060206060850151106112d0565b9091816110c86110c3611421937f0000000000000000000000000000000000000000000000000000000000000000611611565b9061142a6115d4565b50602060408301805160018151801515806114e6575b6114d8575b0190525151116114bf576110c8826000606061148595015261146681611e2d565b6110d2611116604051611110816104d26020820190600a602083019252565b9061148e6115d4565b5060206060830151101561125c576111166114a99183611ee9565b604051906114b6826101dd565b60008252611ae0565b604051630251ce0160e31b815260206004820152602490fd5b6114e187611d83565b611445565b5084606088015110611440565b90816110c86110c3611525937f0000000000000000000000000000000000000000000000000000000000000000611611565b9061152e6115d4565b50602060408301805160018151801515806115ad575b61159f575b0190525151116114bf576110c8826000606061158995015261156a81611e2d565b6110d2611116604051611110816104d260208201906003602083019252565b60405190611596826101dd565b60008252611c06565b6115a887611d83565b611549565b5084606088015110611544565b90828101808211610f1e578251106100f757016020012090565b6040519060a082018281106001600160401b038211176101d857604052606060808360008152600060208201528260408201526000838201520152565b6116196115d4565b50604051611626816101f8565b60209160208252610400928336602085013760405193611645856101f8565b60005b81811061169e5750505060008252600083526040519360a085018581106001600160401b038211176101d8576040526001600160a01b039182168552166020840152604083015260006060830152608082015290565b60608682018401528201611648565b6116b56115d4565b5060206040820180516001815180151580611717575b611709575b0190525151116114bf57600060608201526116ea81611de1565b6102a2611116604051611110816104d260208201906000602083019252565b61171286611d83565b6116d0565b50846060870151106116cb565b9061172d6115d4565b5060206060830151101561125c576111166102a29160405190602082015260208152611110816101bd565b6117606115d4565b50602060408201805160018151801515806117c2575b6117b4575b0190525151116114bf576000606082015261179581611e2d565b6102a2611116604051611110816104d260208201906002602083019252565b6117bd86611d83565b61177b565b5084606087015110611776565b6117d76115d4565b506060810160208151101561125c57604082019081515160001991828201918211610f1e57611807828551610b38565b51908051938414610f1e576001840190526001600160fd1b0383168303610f1e5761183e92600160fd1b9060031b1c179251610b38565b5290565b9060209081838203126100f75782516001600160401b03938482116100f757019080601f830112156100f75781516118798161031b565b9460409061188a6040519788610214565b828752858088019360051b860101948486116100f757868101935b8685106118b757505050505050505090565b84518381116100f757820186603f820112156100f75788916118e188838886809601519101610c75565b8152019401936118a5565b6001600160a01b0390911681526060602082018190526102a293919261191491840190610d54565b916040818403910152610d88565b9261194a6102a295936119589360018060a01b0316865260a0602087015260a0860190610d54565b908482036040860152610d88565b91637a38480d60e11b60608201526080818403910152610417565b9261194a6102a2959361199b9360018060a01b0316865260a0602087015260a0860190610d54565b91631c5fc97360e11b60608201526080818403910152610417565b9261194a6102a295936119de9360018060a01b0316865260a0602087015260a0860190610d54565b91636f4d5f2f60e11b60608201526080818403910152610417565b9261194a6102a29593611a219360018060a01b0316865260a0602087015260a0860190610d54565b9163fcd2e38160e01b60608201526080818403910152610417565b92909493919460a084019060018060a01b0316845260209060a06020860152865180915260c0850191602060c08360051b8801019801926000905b838210611ab457505050505084611a9991846102a29697036040860152610417565b632ded548b60e11b6060840152916080818403910152610417565b90919293988380611ad160019360bf198c82030186528d51610417565b9b019201920190939291611a77565b600460408201805151151580611bf8575b611bea575b8251600090611b0d906001600160a01b0316611157565b604051632d43cbef60e21b815293849182905afa91821561075357600092611bc7575b50602083015191926108b892611bad91906001600160a01b031692611ba1815197611b8e6080850196611b7a88516040519c8d9363ea9cd3bf60e01b6020860152602485016118ec565b039461136c601f19968781018d528c610214565b92519551604051968794602086016119b6565b03908101835282610214565b604051630556f18360e41b81529384933060048601611a3c565b6108b89250611be3611bad913d806000833e6112348183610214565b9250611b30565b611bf383611d83565b611af6565b506020606084015110611af1565b600460408201805151151580611ce4575b611cd6575b8251600090611c33906001600160a01b0316611157565b604051632d43cbef60e21b815293849182905afa91821561075357600092611cb3575b50602083015191926108b892611bad91906001600160a01b031692611ba1815197611ca06080850196611b7a88516040519c8d9363ea9cd3bf60e01b6020860152602485016118ec565b92519551604051968794602086016119f9565b6108b89250611ccf611bad913d806000833e6112348183610214565b9250611c56565b611cdf83611d83565b611c1c565b506020606084015110611c17565b91929015611d545750815115611d06575090565b3b15611d0f5790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b825190915015611d675750805190602001fd5b60405162461bcd60e51b81529081906108b89060048301610484565b604081019081515160001991828201918211610f1e576060611da6838651610b38565b5191018051938414610f1e576001840190526001600160fd1b0383168303610f1e57611dde9260ff60f81b9060031b1c179251610b38565b52565b60408101805151600019808201918211610f1e576060611e02838551610b38565b5194018051918214610f1e576001820190526001600160fd1b03811603610f1e57611dde9151610b38565b604081019081515160001991828201918211610f1e576060611e50838651610b38565b5191018051938414610f1e576001840190526001600160fd1b0383168303610f1e57611dde92600160f81b9060031b1c179251610b38565b60408101805151909291600019808301928311610f1e576060611eac848751610b38565b5192018051918214610f1e576001820190526001600160fd1b0381168103610f1e57611dde9360ff60f81b9060f81b169060031b1c179251610b38565b6080611f139193929301519260ff845116938491600183018252611f0d8383610b38565b52610b38565b5056fea2646970667358221220115f026084ff9e96f10ed0a5ab7d1a9f37b33a9b51dc27cfe2c0a48b6f9e3fb264736f6c63430008190033", + "numDeployments": 3, + "solcInputHash": "f61b67d309df2633cb65b80f0947946b", + "metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"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\":\"_l2ChainId\",\"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\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"}],\"name\":\"StorageHandledByL2\",\"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\":\"string\",\"name\":\"graphqlUrl\",\"type\":\"string\"}],\"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\":\"l2ChainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"name\",\"type\":\"bytes\"}],\"name\":\"metadata\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"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\":\"_addr\",\"type\":\"address\"}],\"name\":\"setAddr\",\"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\":{\"errors\":{\"StorageHandledByL2(uint256,address)\":[{\"details\":\"EIP-5559 - Error to raise when mutations are being deferred to an L2.\",\"params\":{\"chainId\":\"Chain ID to perform the deferred mutation to.\",\"contractAddress\":\"Contract Address at which the deferred mutation should transact with.\"}}]},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_ens\":\"The ENS registry address\",\"_graphqlUrl\":\"The offchain/l2 graphql endpoint url\",\"_l2ChainId\":\"The chainId at which the resolver resolves data from\",\"_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\":\"graphqlUrl The GraphQL URL used by the resolver\"}},\"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\"}},\"setAddr(bytes,address)\":{\"details\":\"Resolve and throws an EIP 3559 compliant error\",\"params\":{\"_addr\":\"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\":200},\"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\"},\"@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/IAddrSetter.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.25;\\n\\ninterface IAddrSetter {\\n function setAddr(\\n bytes calldata name,\\n address _addr\\n ) external view returns (bytes memory result);\\n}\\n\",\"keccak256\":\"0xd211ec6793d80d0bb7643d8f15e5773abe38541edee0b85eb83283ca5fdd1525\",\"license\":\"MIT\"},\"contracts/IMetadataResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.25;\\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 graphqlUrl The GraphQL URL used by the resolver\\n *\\n */\\n function metadata(\\n bytes calldata name\\n ) external view returns (string memory graphqlUrl);\\n\\n event MetadataChanged(bytes name, string graphqlUrl);\\n}\\n\",\"keccak256\":\"0xe2edf067122145bfd59e95b0f5b3507bd0cd2715b6b7d7068e70c6cbef09e5ae\",\"license\":\"MIT\"},\"contracts/ITargetResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.25;\\n\\ninterface ITargetResolver {\\n function getTarget(\\n bytes memory name\\n ) external view returns (bytes32 node, address target);\\n}\\n\",\"keccak256\":\"0x2daa66377cc37fc99b927d87f5495259ed6e49c0f10af1f75bd5fd74964e5b78\",\"license\":\"MIT\"},\"contracts/L1Resolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.25;\\n\\nimport {EVMFetcher} from \\\"./linea-verifier/EVMFetcher.sol\\\";\\nimport {EVMFetchTarget} from \\\"./linea-verifier/EVMFetchTarget.sol\\\";\\nimport {IEVMVerifier} from \\\"./linea-verifier/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 {IAddrSetter} from \\\"./IAddrSetter.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/introspection/ERC165.sol\\\";\\n\\ncontract L1Resolver is\\n EVMFetchTarget,\\n ITargetResolver,\\n IMetadataResolver,\\n IExtendedResolver,\\n IAddrSetter,\\n ERC165\\n{\\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_ABIS_SLOT = 1;\\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 l2ChainId;\\n\\n event TargetSet(bytes name, address target);\\n\\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 * @dev EIP-5559 - Error to raise when mutations are being deferred to an L2.\\n * @param chainId Chain ID to perform the deferred mutation to.\\n * @param contractAddress Contract Address at which the deferred mutation should transact with.\\n */\\n error StorageHandledByL2(uint256 chainId, address contractAddress);\\n\\n modifier authorised(bytes32 node) {\\n require(isAuthorised(node));\\n _;\\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 _l2ChainId The chainId at which the resolver resolves data from\\n */\\n constructor(\\n IEVMVerifier _verifier,\\n ENS _ens,\\n INameWrapper _nameWrapper,\\n string memory _graphqlUrl,\\n uint256 _l2ChainId\\n ) {\\n require(\\n address(_nameWrapper) != address(0),\\n \\\"Name Wrapper address must be set\\\"\\n );\\n require(\\n address(_verifier) != address(0),\\n \\\"Verifier address must be set\\\"\\n );\\n require(address(_ens) != address(0), \\\"Registry address must be set\\\");\\n verifier = _verifier;\\n ens = _ens;\\n nameWrapper = _nameWrapper;\\n graphqlUrl = _graphqlUrl;\\n l2ChainId = _l2ChainId;\\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 emit MetadataChanged(name, graphqlUrl);\\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(name, offset + len + 1);\\n node = keccak256(abi.encodePacked(node, label));\\n if (targets[node] != address(0)) {\\n return (node, targets[node]);\\n }\\n } else {\\n return (bytes32(0), address(0));\\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(\\n bytes calldata name,\\n bytes calldata data\\n ) 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(\\n data[4:],\\n (bytes32, uint256)\\n );\\n return _addr(node, cointype, target);\\n }\\n if (selector == ITextResolver.text.selector) {\\n (bytes32 node, string memory key) = abi.decode(\\n data[4:],\\n (bytes32, string)\\n );\\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 /**\\n * @dev Resolve and throws an EIP 3559 compliant error\\n * @param name DNS encoded ENS name to query\\n * @param _addr The actual calldata\\n * @return result result of the call\\n */\\n function setAddr(\\n bytes calldata name,\\n address _addr\\n ) external view returns (bytes memory result) {\\n (, address target) = _getTarget(name, 0);\\n _writeDeferral(target);\\n }\\n\\n function _addr(\\n bytes32 node,\\n address target\\n ) private view returns (bytes memory) {\\n EVMFetcher\\n .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\\n .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\\n .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(\\n bytes32 node,\\n address target\\n ) private view returns (bytes memory) {\\n EVMFetcher\\n .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 graphqlUrl The GraphQL URL used by the resolver\\n */\\n function metadata(bytes calldata name) public view returns (string memory) {\\n return (graphqlUrl);\\n }\\n\\n function supportsInterface(\\n bytes4 interfaceId\\n ) public view override returns (bool) {\\n return\\n interfaceId == type(IExtendedResolver).interfaceId ||\\n interfaceId == type(ITargetResolver).interfaceId ||\\n interfaceId == type(IMetadataResolver).interfaceId ||\\n interfaceId == type(IAddrSetter).interfaceId ||\\n super.supportsInterface(interfaceId);\\n }\\n\\n function _writeDeferral(address target) internal view {\\n revert StorageHandledByL2(l2ChainId, target);\\n }\\n}\\n\",\"keccak256\":\"0x4c5a366dc4f6c3f3de5a987550478053f5724d143b3670c1000c71e4f621b106\",\"license\":\"MIT\"},\"contracts/linea-verifier/EVMFetchTarget.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.25;\\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(\\n bytes calldata response,\\n bytes calldata extradata\\n ) external {\\n bytes memory proof = abi.decode(response, (bytes));\\n (\\n IEVMVerifier verifier,\\n bytes32[] memory commands,\\n bytes[] memory constants,\\n bytes4 callback,\\n bytes memory callbackData\\n ) = abi.decode(\\n extradata,\\n (IEVMVerifier, bytes32[], bytes[], bytes4, bytes)\\n );\\n bytes[] memory values = verifier.getStorageValues(\\n commands,\\n constants,\\n proof\\n );\\n if (values.length != commands.length) {\\n revert ResponseLengthMismatch(values.length, commands.length);\\n }\\n bytes memory ret = address(this).functionCall(\\n abi.encodeWithSelector(callback, values, callbackData)\\n );\\n assembly {\\n return(add(ret, 32), mload(ret))\\n }\\n }\\n}\\n\",\"keccak256\":\"0xff598cf7042e31b6445e41344a1742ecee12fa5fb28da515f5b2fccd2fec72bf\",\"license\":\"MIT\"},\"contracts/linea-verifier/EVMFetcher.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.25;\\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(\\n address addr,\\n bytes32[] memory commands,\\n bytes[] memory constants\\n ) 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(\\n address sender,\\n string[] urls,\\n bytes callData,\\n bytes4 callbackFunction,\\n bytes extraData\\n );\\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(\\n IEVMVerifier verifier,\\n address target\\n ) 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(\\n EVMFetchRequest memory request,\\n uint256 baseSlot\\n ) 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(\\n EVMFetchRequest memory request,\\n uint256 baseSlot\\n ) 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(\\n EVMFetchRequest memory request,\\n uint256 el\\n ) 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(\\n EVMFetchRequest memory request,\\n bytes32 el\\n ) 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(\\n EVMFetchRequest memory request,\\n address el\\n ) 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(\\n EVMFetchRequest memory request,\\n bytes memory el\\n ) 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(\\n EVMFetchRequest memory request,\\n string memory el\\n ) 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(\\n EVMFetchRequest memory request,\\n uint8 idx\\n ) 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(\\n EVMFetchRequest memory request,\\n bytes4 callbackId,\\n bytes memory callbackData\\n ) internal view {\\n if (request.commands.length > 0 && request.operationIdx < 32) {\\n // Terminate last command\\n _addOperation(request, OP_END);\\n }\\n\\n revert OffchainLookup(\\n address(this),\\n request.verifier.gatewayURLs(),\\n abi.encodeCall(\\n IEVMGateway.getStorageSlots,\\n (request.target, request.commands, request.constants)\\n ),\\n EVMFetchTarget.getStorageSlotsCallback.selector,\\n abi.encode(\\n request.verifier,\\n request.commands,\\n request.constants,\\n callbackId,\\n callbackData\\n )\\n );\\n }\\n\\n function _addConstant(\\n EVMFetchRequest memory request,\\n bytes memory value\\n ) 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(\\n EVMFetchRequest memory request,\\n uint8 op\\n ) private pure {\\n uint256 commandIdx = request.commands.length - 1;\\n request.commands[commandIdx] =\\n request.commands[commandIdx] |\\n (bytes32(bytes1(op)) >> (8 * request.operationIdx++));\\n }\\n}\\n\",\"keccak256\":\"0xc53848b88ec0ab63f1b4c59daa5de8d0b33431d05da3722c20d410318ec9c0b8\",\"license\":\"MIT\"},\"contracts/linea-verifier/IEVMVerifier.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.25;\\n\\ninterface IEVMVerifier {\\n function gatewayURLs() external view returns (string[] memory);\\n\\n function getStorageValues(\\n bytes32[] memory commands,\\n bytes[] memory constants,\\n bytes memory proof\\n ) external view returns (bytes[] memory values);\\n}\\n\",\"keccak256\":\"0x9ffc2a113f5f562575a6a8d87669130587a428c16c9f08e35fea56778051ee08\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60e060405234610377576124f4803803908161001a8161037c565b91823960a08183810103126103775780516001600160a01b039182821682036103775760208101518381168103610377576040820151908482168203610377576060830151936001600160401b03851161037757601f938781018587830101121561037757808601516001600160401b03811161027d57601f19966100a5828801891660200161037c565b99828b5283016020838386010101116103775760005b82811061036157505060009089016020015260800151958381161561031d57808216156102d8578216156102935760805260a05260c0528351906001600160401b03821161027d5760019283548481811c91168015610273575b602082101461025d57828111610215575b5060209183116001146101b65750819293946000926101ab575b5050600019600383901b1c191690821b1790555b60025560405161215290816103a28239608051818181610361015281816113420152818161152301528181611698015261179c015260a0518181816105840152610a3a015260c05181818161097d0152610a6f0152f35b015190503880610140565b8216908360005260206000209160005b8181106101ff57509583859697106101e6575b505050811b019055610154565b015160001960f88460031b161c191690553880806101d9565b87830151845592850192602092830192016101c6565b8460005260206000208380860160051c82019260208710610254575b0160051c019085905b828110610248575050610126565b6000815501859061023a565b92508192610231565b634e487b7160e01b600052602260045260246000fd5b90607f1690610115565b634e487b7160e01b600052604160045260246000fd5b60405162461bcd60e51b815260206004820152601c60248201527f52656769737472792061646472657373206d75737420626520736574000000006044820152606490fd5b60405162461bcd60e51b815260206004820152601c60248201527f56657269666965722061646472657373206d75737420626520736574000000006044820152606490fd5b606460405162461bcd60e51b815260206004820152602060248201527f4e616d6520577261707065722061646472657373206d757374206265207365746044820152fd5b602082850182018101518c8301820152016100bb565b600080fd5b6040519190601f01601f191682016001600160401b0381118382101761027d5760405256fe6080604052600436101561001257600080fd5b60003560e01c806301ffc9a71461010d57806315f64386146101085780632b7ac3f31461010357806338bf92e6146100cc5780633f15457f146100fe5780634062b43f146100f95780635bdaa916146100f45780638a596ebe146100ef5780639061b923146100ea578063a8e5fbc0146100e5578063d358df77146100e0578063d6ae3cd5146100db578063de9abe5e146100cc578063f00eebf4146100d6578063f470901a146100d15763fcd2e381146100cc57600080fd5b61050a565b610c9c565b610c50565b610c32565b6109f5565b610967565b610881565b61083c565b610744565b6106a2565b61056e565b61034b565b6102fa565b61012c565b35906001600160e01b03198216820361012757565b600080fd5b346101275760203660031901126101275760043563ffffffff60e01b81168091036101275761018f90639061b92360e01b81149081156101c6575b81156101b5575b81156101a4575b8115610193575b5060405190151581529081906020820190565b0390f35b6301ffc9a760e01b1490503861017c565b633c03bafd60e21b81149150610175565b63452cb75f60e11b8114915061016e565b630afb21c360e11b81149150610167565b634e487b7160e01b600052604160045260246000fd5b604081019081106001600160401b0382111761020857604052565b6101d7565b602081019081106001600160401b0382111761020857604052565b61042081019081106001600160401b0382111761020857604052565b90601f801991011681019081106001600160401b0382111761020857604052565b6001600160401b03811161020857601f01601f191660200190565b92919261028c82610265565b9161029a6040519384610244565b829481845281830111610127578281602093846000960137010152565b9080601f83011215610127578160206102d293359101610280565b90565b906020828203126101275781356001600160401b038111610127576102d292016102b7565b34610127576020366003190112610127576004356001600160401b03811161012757610336600061033160409336906004016102b7565b6111e8565b82519182526001600160a01b03166020820152f35b34610127576000366003190112610127576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b6001600160401b0381116102085760051b60200190565b81601f82011215610127578035916020916103c184610390565b936103cf6040519586610244565b808552838086019160051b8301019280841161012757848301915b8483106103fa5750505050505090565b82356001600160401b03811161012757869161041b848480948901016102b7565b8152019201916103ea565b906040600319830112610127576001600160401b036004358181116101275783610452916004016103a7565b92602435918211610127576102d2916004016102b7565b60005b83811061047c5750506000910152565b818101518382015260200161046c565b906020916104a581518092818552858086019101610469565b601f01601f1916010190565b906020916020815260605180602083015260005b8181106104e6575060409293506000838284010152601f8019910116010190565b60808101518382016040015284016104c5565b9060206102d292818152019061048c565b346101275761051836610426565b5080516001101561056957610547610555604061018f930151604051928391602080840152604083019061048c565b03601f198101835282610244565b60405191829160208352602083019061048c565b610d24565b34610127576000366003190112610127576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b90600182811c921680156105e3575b60208310146105cd57565b634e487b7160e01b600052602260045260246000fd5b91607f16916105c2565b90600091600190600154610600816105b3565b808352926020916001811690811561067d5750600114610621575b50505050565b9293945060016000527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6926000935b85851061066a57505050602092500101903880808061061b565b8054858501840152938201938101610650565b92505050602093945060ff929192191683830152151560051b0101903880808061061b565b346101275760003660031901126101275761018f604051610555816106c6816105ed565b0382610244565b9181601f84011215610127578235916001600160401b038311610127576020838186019501011161012757565b6040600319820112610127576001600160401b03916004358381116101275782610726916004016106cd565b9390939260243591821161012757610740916004016106cd565b9091565b3461012757610769610795600061077261075d366106fa565b969183919301906102d5565b94810190610d4e565b9492939096916040518097819482936322b2358760e01b84528860048501610f86565b03916001600160a01b03165afa92831561083757600093610812575b5082519051908181036107ec576107e4846107de8761054787604051948593602085015260248401610fc9565b306112ad565b602081519101f35b604051632918942560e01b815260048101919091526024810191909152604490fd5b0390fd5b6108309193503d806000833e6108288183610244565b810190610e4b565b91386107b1565b610fbd565b34610127576020366003190112610127576004356001600160401b0381116101275761086c9036906004016106cd565b505061018f604051610555816106c6816105ed565b346101275761033160006108a3610897366106fa565b94929095913691610280565b9290506001600160e01b03196108b98383610fee565b16631d9dabef60e11b8114610953576378e5bf0360e11b811461093657631674750f60e21b81146109195763bc1c58d160e01b146108fe576040518061018f816104b1565b816109149261090c9261101a565b810190611037565b61178e565b5081610930926109289261101a565b81019061105c565b90611689565b508161094d926109459261101a565b810190611046565b90611509565b50816109629261090c9261101a565b61132c565b34610127576000366003190112610127576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b6001600160a01b0381160361012757565b604060031982011261012757600435906001600160401b038211610127576109e7916004016106cd565b90916024356102d2816109ac565b3461012757610a03366109bd565b91610a146000610331368585610280565b506040516302571be360e01b8152600481018290526001600160a01b03602080836024817f000000000000000000000000000000000000000000000000000000000000000086165afa92831561083757600093610c11575b507f00000000000000000000000000000000000000000000000000000000000000008216908383168214610b4d575b505094610b2881610b097f88781081cc340609705af0f96bf3ba64ea267873444e91725bd072f2af0f44d895610af9610b36967f3c68652dbd57659176ef0092991d5753aac3039c3134b7a3eb5689acfaccf62d9b3391161461109b565b6000526000602052604060002090565b80546001600160a01b0319166001600160a01b03909216919091179055565b6040519182918686846110c3565b0390a1610b48604051928392836110ec565b0390a1005b6040516331a9108f60e11b8152600481018690529790935091908390889060249082905afa801561083757610b097f88781081cc340609705af0f96bf3ba64ea267873444e91725bd072f2af0f44d895610af9610b289486947f3c68652dbd57659176ef0092991d5753aac3039c3134b7a3eb5689acfaccf62d9c610b3699600092610be4575b50509750959a5050955050610a9b565b610c039250803d10610c0a575b610bfb8183610244565b810190611855565b3880610bd4565b503d610bf1565b819350610c2b9083923d8611610c0a57610bfb8183610244565b9290610a6c565b34610127576000366003190112610127576020600254604051908152f35b34610127576044610c706000610331610c68366109bd565b503691610280565b60025460405163e0a0507160e01b815260048101919091526001600160a01b0390911660248201529050fd5b3461012757610caa36610426565b5080516001101561056957610547610d03604061018f93015160208151910151906bffffffffffffffffffffffff19918281169160148110610d0f575b50506040805160609290921c6020830152909384925090820190565b604051918291826104f9565b8391925060140360031b1b1616803880610ce7565b634e487b7160e01b600052603260045260246000fd5b80518210156105695760209160051b010190565b9060a082820312610127578135610d64816109ac565b926001600160401b03906020848101358381116101275785019084601f8301121561012757813591610d9583610390565b92610da36040519485610244565b808452828085019160051b83010191878311610127578301905b828210610e0557505050509360408101358381116101275784610de19183016103a7565b93610dee60608301610112565b936080830135908111610127576102d292016102b7565b81358152908301908301610dbd565b90929192610e2181610265565b91610e2f6040519384610244565b829482845282820111610127576020610e49930190610469565b565b9060209081838203126101275782516001600160401b039384821161012757019080601f83011215610127578151610e8281610390565b94604090610e936040519788610244565b828752858088019360051b8601019484861161012757868101935b868510610ec057505050505050505090565b845183811161012757820186603f82011215610127578891610eea88838886809601519101610e14565b815201940193610eae565b90815180825260208080930193019160005b828110610f15575050505090565b835185529381019392810192600101610f07565b90808251908181526020809101926020808460051b8301019501936000915b848310610f585750505050505090565b9091929394958480610f76600193601f198682030187528a5161048c565b9801930193019194939290610f48565b91610faf90610fa16102d29593606086526060860190610ef5565b908482036020860152610f29565b91604081840391015261048c565b6040513d6000823e3d90fd5b9091610fe06102d293604084526040840190610f29565b91602081840391015261048c565b6001600160e01b0319903581811693926004811061100b57505050565b60040360031b82901b16169150565b909291928360041161012757831161012757600401916003190190565b90816020910312610127573590565b9190826040910312610127576020823592013590565b9190604083820312610127578235926020810135906001600160401b03821161012757019080601f83011215610127578160206102d293359101610280565b1561012757565b908060209392818452848401376000828201840152601f01601f1916010190565b916020916110dc919594956040855260408501916110a2565b6001600160a01b03909416910152565b9190611100916040845260408401916110a2565b8181036020928301526001805460009392909161111c836105b3565b8083529260018116908115611195575060011461113b575b5050505090565b9293509060016000527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf692846000945b8386106111815750505050010138808080611134565b80548587018301529401938590820161116b565b60ff191685840152505090151560051b0101905038808080611134565b634e487b7160e01b600052601160045260246000fd5b90600182018092116111d657565b6111b2565b919082018092116111d657565b9190918051831015610569576020838201015160f81c80156112a1579061122d611228836112226112339561121c896111c8565b8661186a565b966111db565b6111c8565b906111e8565b604080516020810193845290810194909452926112538160608101610547565b51902060008181526020819052604090206001600160a01b039061127f905b546001600160a01b031690565b16611288579190565b91506102d2611272836000526000602052604060002090565b50509050600090600090565b906102d291600080604051936112c2856101ed565b601e85527f416464726573733a206c6f772d6c6576656c2063616c6c206661696c65640000602086015260208151910182855af13d15611324573d9161130783610265565b926113156040519485610244565b83523d6000602085013e611ef8565b606091611ef8565b61136b6113756113708361136b61136661137a977f00000000000000000000000000000000000000000000000000000000000000006118c1565b61195d565b6119d4565b611a08565b611a7f565b611382611884565b506060810160209182825110156114f7576004906040906113bf6113b98351603c888201528781526113b3816101ed565b836120ef565b8261208e565b8151946113cb8661020d565b600086528282019481865151151591826114ec575b50506114de575b8151600090611406906001600160a01b03165b6001600160a01b031690565b8451632d43cbef60e21b815295869182905afa938415610837576000946114c1575b50818101516001600160a01b0316948051966080840197885197865198899263ea9cd3bf60e01b87850152602484019261146193611af2565b0393601f199485810189526114769089610244565b516001600160a01b031691519751855198899485019361149594611b28565b0390810185526114a59085610244565b51630556f18360e41b815292839261080e923060048601611c42565b6114d79194503d806000833e6108288183610244565b9238611428565b6114e782611f89565b6113e7565b5110905081386113e0565b604051631601fac760e31b8152600490fd5b8061136b61137561137061136b9461136b611366611547997f00000000000000000000000000000000000000000000000000000000000000006118c1565b60409060048251926115588461020d565b600084528083019081515115158061167b575b61166d575b8351600090611587906001600160a01b03166113fa565b8251632d43cbef60e21b815294859182905afa9283156108375760009361164a575b506020840151929361080e9361163291906001600160a01b03169361162681519861161460808501976115f2895189519d8e9363ea9cd3bf60e01b602086015260248501611af2565b0394611607601f19968d88820190528d610244565b516001600160a01b031690565b92519651865197889460208601611b79565b03908101845283610244565b51630556f18360e41b81529384933060048601611c42565b61080e9350611666611632913d806000833e6108288183610244565b93506115a9565b61167684611f89565b611570565b50602060608501511061156b565b90918161136b6113666116bc937f00000000000000000000000000000000000000000000000000000000000000006118c1565b906116c5611884565b5060206040830180516001815180151580611781575b611773575b01905251511161175a5761136b826000606061172095015261170181612033565b6113756113b96040516113b3816105476020820190600a602083019252565b90611729611884565b506020606083015110156114f7576113b961174491836120ef565b604051906117518261020d565b60008252611ce6565b604051630251ce0160e31b815260206004820152602490fd5b61177c87611f89565b6116e0565b50846060880151106116db565b908161136b6113666117c0937f00000000000000000000000000000000000000000000000000000000000000006118c1565b906117c9611884565b5060206040830180516001815180151580611848575b61183a575b01905251511161175a5761136b826000606061182495015261180581612033565b6113756113b96040516113b38161054760208201906003602083019252565b604051906118318261020d565b60008252611e0c565b61184387611f89565b6117e4565b50846060880151106117df565b9081602091031261012757516102d2816109ac565b908281018082116111d65782511061012757016020012090565b6040519060a082018281106001600160401b0382111761020857604052606060808360008152600060208201528260408201526000838201520152565b6118c9611884565b506040516118d681610228565b602091602082526104009283366020850137604051936118f585610228565b60005b81811061194e5750505060008252600083526040519360a085018581106001600160401b03821117610208576040526001600160a01b039182168552166020840152604083015260006060830152608082015290565b606086820184015282016118f8565b611965611884565b50602060408201805160018151801515806119c7575b6119b9575b01905251511161175a576000606082015261199a81611fe7565b6102d26113b96040516113b38161054760208201906000602083019252565b6119c286611f89565b611980565b508460608701511061197b565b906119dd611884565b506020606083015110156114f7576113b96102d291604051906020820152602081526113b3816101ed565b611a10611884565b5060206040820180516001815180151580611a72575b611a64575b01905251511161175a5760006060820152611a4581612033565b6102d26113b96040516113b38161054760208201906002602083019252565b611a6d86611f89565b611a2b565b5084606087015110611a26565b611a87611884565b50606081016020815110156114f7576040820190815151600019918282019182116111d657611ab7828551610d3a565b519080519384146111d6576001840190526001600160fd1b03831683036111d657611aee92600160fd1b9060031b1c179251610d3a565b5290565b6001600160a01b0390911681526060602082018190526102d2939192611b1a91840190610ef5565b916040818403910152610f29565b92611b506102d29593611b5e9360018060a01b0316865260a0602087015260a0860190610ef5565b908482036040860152610f29565b91637a38480d60e11b6060820152608081840391015261048c565b92611b506102d29593611ba19360018060a01b0316865260a0602087015260a0860190610ef5565b91631c5fc97360e11b6060820152608081840391015261048c565b92611b506102d29593611be49360018060a01b0316865260a0602087015260a0860190610ef5565b91636f4d5f2f60e11b6060820152608081840391015261048c565b92611b506102d29593611c279360018060a01b0316865260a0602087015260a0860190610ef5565b9163fcd2e38160e01b6060820152608081840391015261048c565b92909493919460a084019060018060a01b0316845260209060a06020860152865180915260c0850191602060c08360051b8801019801926000905b838210611cba57505050505084611c9f91846102d2969703604086015261048c565b632ded548b60e11b606084015291608081840391015261048c565b90919293988380611cd760019360bf198c82030186528d5161048c565b9b019201920190939291611c7d565b600460408201805151151580611dfe575b611df0575b8251600090611d13906001600160a01b03166113fa565b604051632d43cbef60e21b815293849182905afa91821561083757600092611dcd575b506020830151919261080e92611db391906001600160a01b031692611da7815197611d946080850196611d8088516040519c8d9363ea9cd3bf60e01b602086015260248501611af2565b0394611607601f19968781018d528c610244565b9251955160405196879460208601611bbc565b03908101835282610244565b604051630556f18360e41b81529384933060048601611c42565b61080e9250611de9611db3913d806000833e6108288183610244565b9250611d36565b611df983611f89565b611cfc565b506020606084015110611cf7565b600460408201805151151580611eea575b611edc575b8251600090611e39906001600160a01b03166113fa565b604051632d43cbef60e21b815293849182905afa91821561083757600092611eb9575b506020830151919261080e92611db391906001600160a01b031692611da7815197611ea66080850196611d8088516040519c8d9363ea9cd3bf60e01b602086015260248501611af2565b9251955160405196879460208601611bff565b61080e9250611ed5611db3913d806000833e6108288183610244565b9250611e5c565b611ee583611f89565b611e22565b506020606084015110611e1d565b91929015611f5a5750815115611f0c575090565b3b15611f155790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b825190915015611f6d5750805190602001fd5b60405162461bcd60e51b815290819061080e90600483016104f9565b6040810190815151600019918282019182116111d6576060611fac838651610d3a565b51910180519384146111d6576001840190526001600160fd1b03831683036111d657611fe49260ff60f81b9060031b1c179251610d3a565b52565b604081018051516000198082019182116111d6576060612008838551610d3a565b51940180519182146111d6576001820190526001600160fd1b038116036111d657611fe49151610d3a565b6040810190815151600019918282019182116111d6576060612056838651610d3a565b51910180519384146111d6576001840190526001600160fd1b03831683036111d657611fe492600160f81b9060031b1c179251610d3a565b604081018051519092916000198083019283116111d65760606120b2848751610d3a565b51920180519182146111d6576001820190526001600160fd1b03811681036111d657611fe49360ff60f81b9060f81b169060031b1c179251610d3a565b60806121199193929301519260ff8451169384916001830182526121138383610d3a565b52610d3a565b5056fea26469706673582212205e3a625ffb5179e185383b2bb38234762b970b23939516dd0e645f19132762f864736f6c63430008190033", + "deployedBytecode": "0x6080604052600436101561001257600080fd5b60003560e01c806301ffc9a71461010d57806315f64386146101085780632b7ac3f31461010357806338bf92e6146100cc5780633f15457f146100fe5780634062b43f146100f95780635bdaa916146100f45780638a596ebe146100ef5780639061b923146100ea578063a8e5fbc0146100e5578063d358df77146100e0578063d6ae3cd5146100db578063de9abe5e146100cc578063f00eebf4146100d6578063f470901a146100d15763fcd2e381146100cc57600080fd5b61050a565b610c9c565b610c50565b610c32565b6109f5565b610967565b610881565b61083c565b610744565b6106a2565b61056e565b61034b565b6102fa565b61012c565b35906001600160e01b03198216820361012757565b600080fd5b346101275760203660031901126101275760043563ffffffff60e01b81168091036101275761018f90639061b92360e01b81149081156101c6575b81156101b5575b81156101a4575b8115610193575b5060405190151581529081906020820190565b0390f35b6301ffc9a760e01b1490503861017c565b633c03bafd60e21b81149150610175565b63452cb75f60e11b8114915061016e565b630afb21c360e11b81149150610167565b634e487b7160e01b600052604160045260246000fd5b604081019081106001600160401b0382111761020857604052565b6101d7565b602081019081106001600160401b0382111761020857604052565b61042081019081106001600160401b0382111761020857604052565b90601f801991011681019081106001600160401b0382111761020857604052565b6001600160401b03811161020857601f01601f191660200190565b92919261028c82610265565b9161029a6040519384610244565b829481845281830111610127578281602093846000960137010152565b9080601f83011215610127578160206102d293359101610280565b90565b906020828203126101275781356001600160401b038111610127576102d292016102b7565b34610127576020366003190112610127576004356001600160401b03811161012757610336600061033160409336906004016102b7565b6111e8565b82519182526001600160a01b03166020820152f35b34610127576000366003190112610127576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b6001600160401b0381116102085760051b60200190565b81601f82011215610127578035916020916103c184610390565b936103cf6040519586610244565b808552838086019160051b8301019280841161012757848301915b8483106103fa5750505050505090565b82356001600160401b03811161012757869161041b848480948901016102b7565b8152019201916103ea565b906040600319830112610127576001600160401b036004358181116101275783610452916004016103a7565b92602435918211610127576102d2916004016102b7565b60005b83811061047c5750506000910152565b818101518382015260200161046c565b906020916104a581518092818552858086019101610469565b601f01601f1916010190565b906020916020815260605180602083015260005b8181106104e6575060409293506000838284010152601f8019910116010190565b60808101518382016040015284016104c5565b9060206102d292818152019061048c565b346101275761051836610426565b5080516001101561056957610547610555604061018f930151604051928391602080840152604083019061048c565b03601f198101835282610244565b60405191829160208352602083019061048c565b610d24565b34610127576000366003190112610127576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b90600182811c921680156105e3575b60208310146105cd57565b634e487b7160e01b600052602260045260246000fd5b91607f16916105c2565b90600091600190600154610600816105b3565b808352926020916001811690811561067d5750600114610621575b50505050565b9293945060016000527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6926000935b85851061066a57505050602092500101903880808061061b565b8054858501840152938201938101610650565b92505050602093945060ff929192191683830152151560051b0101903880808061061b565b346101275760003660031901126101275761018f604051610555816106c6816105ed565b0382610244565b9181601f84011215610127578235916001600160401b038311610127576020838186019501011161012757565b6040600319820112610127576001600160401b03916004358381116101275782610726916004016106cd565b9390939260243591821161012757610740916004016106cd565b9091565b3461012757610769610795600061077261075d366106fa565b969183919301906102d5565b94810190610d4e565b9492939096916040518097819482936322b2358760e01b84528860048501610f86565b03916001600160a01b03165afa92831561083757600093610812575b5082519051908181036107ec576107e4846107de8761054787604051948593602085015260248401610fc9565b306112ad565b602081519101f35b604051632918942560e01b815260048101919091526024810191909152604490fd5b0390fd5b6108309193503d806000833e6108288183610244565b810190610e4b565b91386107b1565b610fbd565b34610127576020366003190112610127576004356001600160401b0381116101275761086c9036906004016106cd565b505061018f604051610555816106c6816105ed565b346101275761033160006108a3610897366106fa565b94929095913691610280565b9290506001600160e01b03196108b98383610fee565b16631d9dabef60e11b8114610953576378e5bf0360e11b811461093657631674750f60e21b81146109195763bc1c58d160e01b146108fe576040518061018f816104b1565b816109149261090c9261101a565b810190611037565b61178e565b5081610930926109289261101a565b81019061105c565b90611689565b508161094d926109459261101a565b810190611046565b90611509565b50816109629261090c9261101a565b61132c565b34610127576000366003190112610127576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b6001600160a01b0381160361012757565b604060031982011261012757600435906001600160401b038211610127576109e7916004016106cd565b90916024356102d2816109ac565b3461012757610a03366109bd565b91610a146000610331368585610280565b506040516302571be360e01b8152600481018290526001600160a01b03602080836024817f000000000000000000000000000000000000000000000000000000000000000086165afa92831561083757600093610c11575b507f00000000000000000000000000000000000000000000000000000000000000008216908383168214610b4d575b505094610b2881610b097f88781081cc340609705af0f96bf3ba64ea267873444e91725bd072f2af0f44d895610af9610b36967f3c68652dbd57659176ef0092991d5753aac3039c3134b7a3eb5689acfaccf62d9b3391161461109b565b6000526000602052604060002090565b80546001600160a01b0319166001600160a01b03909216919091179055565b6040519182918686846110c3565b0390a1610b48604051928392836110ec565b0390a1005b6040516331a9108f60e11b8152600481018690529790935091908390889060249082905afa801561083757610b097f88781081cc340609705af0f96bf3ba64ea267873444e91725bd072f2af0f44d895610af9610b289486947f3c68652dbd57659176ef0092991d5753aac3039c3134b7a3eb5689acfaccf62d9c610b3699600092610be4575b50509750959a5050955050610a9b565b610c039250803d10610c0a575b610bfb8183610244565b810190611855565b3880610bd4565b503d610bf1565b819350610c2b9083923d8611610c0a57610bfb8183610244565b9290610a6c565b34610127576000366003190112610127576020600254604051908152f35b34610127576044610c706000610331610c68366109bd565b503691610280565b60025460405163e0a0507160e01b815260048101919091526001600160a01b0390911660248201529050fd5b3461012757610caa36610426565b5080516001101561056957610547610d03604061018f93015160208151910151906bffffffffffffffffffffffff19918281169160148110610d0f575b50506040805160609290921c6020830152909384925090820190565b604051918291826104f9565b8391925060140360031b1b1616803880610ce7565b634e487b7160e01b600052603260045260246000fd5b80518210156105695760209160051b010190565b9060a082820312610127578135610d64816109ac565b926001600160401b03906020848101358381116101275785019084601f8301121561012757813591610d9583610390565b92610da36040519485610244565b808452828085019160051b83010191878311610127578301905b828210610e0557505050509360408101358381116101275784610de19183016103a7565b93610dee60608301610112565b936080830135908111610127576102d292016102b7565b81358152908301908301610dbd565b90929192610e2181610265565b91610e2f6040519384610244565b829482845282820111610127576020610e49930190610469565b565b9060209081838203126101275782516001600160401b039384821161012757019080601f83011215610127578151610e8281610390565b94604090610e936040519788610244565b828752858088019360051b8601019484861161012757868101935b868510610ec057505050505050505090565b845183811161012757820186603f82011215610127578891610eea88838886809601519101610e14565b815201940193610eae565b90815180825260208080930193019160005b828110610f15575050505090565b835185529381019392810192600101610f07565b90808251908181526020809101926020808460051b8301019501936000915b848310610f585750505050505090565b9091929394958480610f76600193601f198682030187528a5161048c565b9801930193019194939290610f48565b91610faf90610fa16102d29593606086526060860190610ef5565b908482036020860152610f29565b91604081840391015261048c565b6040513d6000823e3d90fd5b9091610fe06102d293604084526040840190610f29565b91602081840391015261048c565b6001600160e01b0319903581811693926004811061100b57505050565b60040360031b82901b16169150565b909291928360041161012757831161012757600401916003190190565b90816020910312610127573590565b9190826040910312610127576020823592013590565b9190604083820312610127578235926020810135906001600160401b03821161012757019080601f83011215610127578160206102d293359101610280565b1561012757565b908060209392818452848401376000828201840152601f01601f1916010190565b916020916110dc919594956040855260408501916110a2565b6001600160a01b03909416910152565b9190611100916040845260408401916110a2565b8181036020928301526001805460009392909161111c836105b3565b8083529260018116908115611195575060011461113b575b5050505090565b9293509060016000527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf692846000945b8386106111815750505050010138808080611134565b80548587018301529401938590820161116b565b60ff191685840152505090151560051b0101905038808080611134565b634e487b7160e01b600052601160045260246000fd5b90600182018092116111d657565b6111b2565b919082018092116111d657565b9190918051831015610569576020838201015160f81c80156112a1579061122d611228836112226112339561121c896111c8565b8661186a565b966111db565b6111c8565b906111e8565b604080516020810193845290810194909452926112538160608101610547565b51902060008181526020819052604090206001600160a01b039061127f905b546001600160a01b031690565b16611288579190565b91506102d2611272836000526000602052604060002090565b50509050600090600090565b906102d291600080604051936112c2856101ed565b601e85527f416464726573733a206c6f772d6c6576656c2063616c6c206661696c65640000602086015260208151910182855af13d15611324573d9161130783610265565b926113156040519485610244565b83523d6000602085013e611ef8565b606091611ef8565b61136b6113756113708361136b61136661137a977f00000000000000000000000000000000000000000000000000000000000000006118c1565b61195d565b6119d4565b611a08565b611a7f565b611382611884565b506060810160209182825110156114f7576004906040906113bf6113b98351603c888201528781526113b3816101ed565b836120ef565b8261208e565b8151946113cb8661020d565b600086528282019481865151151591826114ec575b50506114de575b8151600090611406906001600160a01b03165b6001600160a01b031690565b8451632d43cbef60e21b815295869182905afa938415610837576000946114c1575b50818101516001600160a01b0316948051966080840197885197865198899263ea9cd3bf60e01b87850152602484019261146193611af2565b0393601f199485810189526114769089610244565b516001600160a01b031691519751855198899485019361149594611b28565b0390810185526114a59085610244565b51630556f18360e41b815292839261080e923060048601611c42565b6114d79194503d806000833e6108288183610244565b9238611428565b6114e782611f89565b6113e7565b5110905081386113e0565b604051631601fac760e31b8152600490fd5b8061136b61137561137061136b9461136b611366611547997f00000000000000000000000000000000000000000000000000000000000000006118c1565b60409060048251926115588461020d565b600084528083019081515115158061167b575b61166d575b8351600090611587906001600160a01b03166113fa565b8251632d43cbef60e21b815294859182905afa9283156108375760009361164a575b506020840151929361080e9361163291906001600160a01b03169361162681519861161460808501976115f2895189519d8e9363ea9cd3bf60e01b602086015260248501611af2565b0394611607601f19968d88820190528d610244565b516001600160a01b031690565b92519651865197889460208601611b79565b03908101845283610244565b51630556f18360e41b81529384933060048601611c42565b61080e9350611666611632913d806000833e6108288183610244565b93506115a9565b61167684611f89565b611570565b50602060608501511061156b565b90918161136b6113666116bc937f00000000000000000000000000000000000000000000000000000000000000006118c1565b906116c5611884565b5060206040830180516001815180151580611781575b611773575b01905251511161175a5761136b826000606061172095015261170181612033565b6113756113b96040516113b3816105476020820190600a602083019252565b90611729611884565b506020606083015110156114f7576113b961174491836120ef565b604051906117518261020d565b60008252611ce6565b604051630251ce0160e31b815260206004820152602490fd5b61177c87611f89565b6116e0565b50846060880151106116db565b908161136b6113666117c0937f00000000000000000000000000000000000000000000000000000000000000006118c1565b906117c9611884565b5060206040830180516001815180151580611848575b61183a575b01905251511161175a5761136b826000606061182495015261180581612033565b6113756113b96040516113b38161054760208201906003602083019252565b604051906118318261020d565b60008252611e0c565b61184387611f89565b6117e4565b50846060880151106117df565b9081602091031261012757516102d2816109ac565b908281018082116111d65782511061012757016020012090565b6040519060a082018281106001600160401b0382111761020857604052606060808360008152600060208201528260408201526000838201520152565b6118c9611884565b506040516118d681610228565b602091602082526104009283366020850137604051936118f585610228565b60005b81811061194e5750505060008252600083526040519360a085018581106001600160401b03821117610208576040526001600160a01b039182168552166020840152604083015260006060830152608082015290565b606086820184015282016118f8565b611965611884565b50602060408201805160018151801515806119c7575b6119b9575b01905251511161175a576000606082015261199a81611fe7565b6102d26113b96040516113b38161054760208201906000602083019252565b6119c286611f89565b611980565b508460608701511061197b565b906119dd611884565b506020606083015110156114f7576113b96102d291604051906020820152602081526113b3816101ed565b611a10611884565b5060206040820180516001815180151580611a72575b611a64575b01905251511161175a5760006060820152611a4581612033565b6102d26113b96040516113b38161054760208201906002602083019252565b611a6d86611f89565b611a2b565b5084606087015110611a26565b611a87611884565b50606081016020815110156114f7576040820190815151600019918282019182116111d657611ab7828551610d3a565b519080519384146111d6576001840190526001600160fd1b03831683036111d657611aee92600160fd1b9060031b1c179251610d3a565b5290565b6001600160a01b0390911681526060602082018190526102d2939192611b1a91840190610ef5565b916040818403910152610f29565b92611b506102d29593611b5e9360018060a01b0316865260a0602087015260a0860190610ef5565b908482036040860152610f29565b91637a38480d60e11b6060820152608081840391015261048c565b92611b506102d29593611ba19360018060a01b0316865260a0602087015260a0860190610ef5565b91631c5fc97360e11b6060820152608081840391015261048c565b92611b506102d29593611be49360018060a01b0316865260a0602087015260a0860190610ef5565b91636f4d5f2f60e11b6060820152608081840391015261048c565b92611b506102d29593611c279360018060a01b0316865260a0602087015260a0860190610ef5565b9163fcd2e38160e01b6060820152608081840391015261048c565b92909493919460a084019060018060a01b0316845260209060a06020860152865180915260c0850191602060c08360051b8801019801926000905b838210611cba57505050505084611c9f91846102d2969703604086015261048c565b632ded548b60e11b606084015291608081840391015261048c565b90919293988380611cd760019360bf198c82030186528d5161048c565b9b019201920190939291611c7d565b600460408201805151151580611dfe575b611df0575b8251600090611d13906001600160a01b03166113fa565b604051632d43cbef60e21b815293849182905afa91821561083757600092611dcd575b506020830151919261080e92611db391906001600160a01b031692611da7815197611d946080850196611d8088516040519c8d9363ea9cd3bf60e01b602086015260248501611af2565b0394611607601f19968781018d528c610244565b9251955160405196879460208601611bbc565b03908101835282610244565b604051630556f18360e41b81529384933060048601611c42565b61080e9250611de9611db3913d806000833e6108288183610244565b9250611d36565b611df983611f89565b611cfc565b506020606084015110611cf7565b600460408201805151151580611eea575b611edc575b8251600090611e39906001600160a01b03166113fa565b604051632d43cbef60e21b815293849182905afa91821561083757600092611eb9575b506020830151919261080e92611db391906001600160a01b031692611da7815197611ea66080850196611d8088516040519c8d9363ea9cd3bf60e01b602086015260248501611af2565b9251955160405196879460208601611bff565b61080e9250611ed5611db3913d806000833e6108288183610244565b9250611e5c565b611ee583611f89565b611e22565b506020606084015110611e1d565b91929015611f5a5750815115611f0c575090565b3b15611f155790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b825190915015611f6d5750805190602001fd5b60405162461bcd60e51b815290819061080e90600483016104f9565b6040810190815151600019918282019182116111d6576060611fac838651610d3a565b51910180519384146111d6576001840190526001600160fd1b03831683036111d657611fe49260ff60f81b9060031b1c179251610d3a565b52565b604081018051516000198082019182116111d6576060612008838551610d3a565b51940180519182146111d6576001820190526001600160fd1b038116036111d657611fe49151610d3a565b6040810190815151600019918282019182116111d6576060612056838651610d3a565b51910180519384146111d6576001840190526001600160fd1b03831683036111d657611fe492600160f81b9060031b1c179251610d3a565b604081018051519092916000198083019283116111d65760606120b2848751610d3a565b51920180519182146111d6576001820190526001600160fd1b03811681036111d657611fe49360ff60f81b9060f81b169060031b1c179251610d3a565b60806121199193929301519260ff8451169384916001830182526121138383610d3a565b52610d3a565b5056fea26469706673582212205e3a625ffb5179e185383b2bb38234762b970b23939516dd0e645f19132762f864736f6c63430008190033", "devdoc": { "errors": { "StorageHandledByL2(uint256,address)": [ @@ -527,9 +566,9 @@ "result": "result of the call" } }, - "setTarget(bytes32,address)": { + "setTarget(bytes,address)": { "params": { - "node": "The ENS node to query.", + "name": "The encoded name to query.", "target": "The L2 resolver address to verify against." } }, @@ -545,7 +584,7 @@ "metadata(bytes)": { "notice": "Get metadata about the L1 Resolver" }, - "setTarget(bytes32,address)": { + "setTarget(bytes,address)": { "notice": "Set target address to verify aagainst" } }, diff --git a/packages/l1-contracts/deployments/sepolia/solcInputs/f61b67d309df2633cb65b80f0947946b.json b/packages/l1-contracts/deployments/sepolia/solcInputs/f61b67d309df2633cb65b80f0947946b.json new file mode 100644 index 000000000..c13c25f80 --- /dev/null +++ b/packages/l1-contracts/deployments/sepolia/solcInputs/f61b67d309df2633cb65b80f0947946b.json @@ -0,0 +1,103 @@ +{ + "language": "Solidity", + "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" + }, + "@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/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/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/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/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" + }, + "@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" + }, + "contracts/IAddrSetter.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.25;\n\ninterface IAddrSetter {\n function setAddr(\n bytes calldata name,\n address _addr\n ) external view returns (bytes memory result);\n}\n" + }, + "contracts/IMetadataResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.25;\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 graphqlUrl The GraphQL URL used by the resolver\n *\n */\n function metadata(\n bytes calldata name\n ) external view returns (string memory graphqlUrl);\n\n event MetadataChanged(bytes name, string graphqlUrl);\n}\n" + }, + "contracts/ITargetResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.25;\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.25;\n\nimport {EVMFetcher} from \"./linea-verifier/EVMFetcher.sol\";\nimport {EVMFetchTarget} from \"./linea-verifier/EVMFetchTarget.sol\";\nimport {IEVMVerifier} from \"./linea-verifier/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 {IAddrSetter} from \"./IAddrSetter.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\n\ncontract L1Resolver is\n EVMFetchTarget,\n ITargetResolver,\n IMetadataResolver,\n IExtendedResolver,\n IAddrSetter,\n ERC165\n{\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_ABIS_SLOT = 1;\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 l2ChainId;\n\n event TargetSet(bytes name, address target);\n\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 * @dev EIP-5559 - Error to raise when mutations are being deferred to an L2.\n * @param chainId Chain ID to perform the deferred mutation to.\n * @param contractAddress Contract Address at which the deferred mutation should transact with.\n */\n error StorageHandledByL2(uint256 chainId, address contractAddress);\n\n modifier authorised(bytes32 node) {\n require(isAuthorised(node));\n _;\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 _l2ChainId The chainId at which the resolver resolves data from\n */\n constructor(\n IEVMVerifier _verifier,\n ENS _ens,\n INameWrapper _nameWrapper,\n string memory _graphqlUrl,\n uint256 _l2ChainId\n ) {\n require(\n address(_nameWrapper) != address(0),\n \"Name Wrapper address must be set\"\n );\n require(\n address(_verifier) != address(0),\n \"Verifier address must be set\"\n );\n require(address(_ens) != address(0), \"Registry address must be set\");\n verifier = _verifier;\n ens = _ens;\n nameWrapper = _nameWrapper;\n graphqlUrl = _graphqlUrl;\n l2ChainId = _l2ChainId;\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 emit MetadataChanged(name, graphqlUrl);\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(name, offset + len + 1);\n node = keccak256(abi.encodePacked(node, label));\n if (targets[node] != address(0)) {\n return (node, targets[node]);\n }\n } else {\n return (bytes32(0), address(0));\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(\n bytes calldata name,\n bytes calldata data\n ) 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(\n data[4:],\n (bytes32, uint256)\n );\n return _addr(node, cointype, target);\n }\n if (selector == ITextResolver.text.selector) {\n (bytes32 node, string memory key) = abi.decode(\n data[4:],\n (bytes32, string)\n );\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 /**\n * @dev Resolve and throws an EIP 3559 compliant error\n * @param name DNS encoded ENS name to query\n * @param _addr The actual calldata\n * @return result result of the call\n */\n function setAddr(\n bytes calldata name,\n address _addr\n ) external view returns (bytes memory result) {\n (, address target) = _getTarget(name, 0);\n _writeDeferral(target);\n }\n\n function _addr(\n bytes32 node,\n address target\n ) private view returns (bytes memory) {\n EVMFetcher\n .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\n .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\n .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(\n bytes32 node,\n address target\n ) private view returns (bytes memory) {\n EVMFetcher\n .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 graphqlUrl The GraphQL URL used by the resolver\n */\n function metadata(bytes calldata name) public view returns (string memory) {\n return (graphqlUrl);\n }\n\n function supportsInterface(\n bytes4 interfaceId\n ) public view override returns (bool) {\n return\n interfaceId == type(IExtendedResolver).interfaceId ||\n interfaceId == type(ITargetResolver).interfaceId ||\n interfaceId == type(IMetadataResolver).interfaceId ||\n interfaceId == type(IAddrSetter).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n\n function _writeDeferral(address target) internal view {\n revert StorageHandledByL2(l2ChainId, target);\n }\n}\n" + }, + "contracts/linea-verifier/EVMFetcher.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.25;\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(\n address addr,\n bytes32[] memory commands,\n bytes[] memory constants\n ) 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(\n address sender,\n string[] urls,\n bytes callData,\n bytes4 callbackFunction,\n bytes extraData\n );\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(\n IEVMVerifier verifier,\n address target\n ) 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(\n EVMFetchRequest memory request,\n uint256 baseSlot\n ) 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(\n EVMFetchRequest memory request,\n uint256 baseSlot\n ) 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(\n EVMFetchRequest memory request,\n uint256 el\n ) 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(\n EVMFetchRequest memory request,\n bytes32 el\n ) 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(\n EVMFetchRequest memory request,\n address el\n ) 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(\n EVMFetchRequest memory request,\n bytes memory el\n ) 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(\n EVMFetchRequest memory request,\n string memory el\n ) 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(\n EVMFetchRequest memory request,\n uint8 idx\n ) 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(\n EVMFetchRequest memory request,\n bytes4 callbackId,\n bytes memory callbackData\n ) internal view {\n if (request.commands.length > 0 && request.operationIdx < 32) {\n // Terminate last command\n _addOperation(request, OP_END);\n }\n\n revert OffchainLookup(\n address(this),\n request.verifier.gatewayURLs(),\n abi.encodeCall(\n IEVMGateway.getStorageSlots,\n (request.target, request.commands, request.constants)\n ),\n EVMFetchTarget.getStorageSlotsCallback.selector,\n abi.encode(\n request.verifier,\n request.commands,\n request.constants,\n callbackId,\n callbackData\n )\n );\n }\n\n function _addConstant(\n EVMFetchRequest memory request,\n bytes memory value\n ) 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(\n EVMFetchRequest memory request,\n uint8 op\n ) private pure {\n uint256 commandIdx = request.commands.length - 1;\n request.commands[commandIdx] =\n request.commands[commandIdx] |\n (bytes32(bytes1(op)) >> (8 * request.operationIdx++));\n }\n}\n" + }, + "contracts/linea-verifier/EVMFetchTarget.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.25;\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(\n bytes calldata response,\n bytes calldata extradata\n ) external {\n bytes memory proof = abi.decode(response, (bytes));\n (\n IEVMVerifier verifier,\n bytes32[] memory commands,\n bytes[] memory constants,\n bytes4 callback,\n bytes memory callbackData\n ) = abi.decode(\n extradata,\n (IEVMVerifier, bytes32[], bytes[], bytes4, bytes)\n );\n bytes[] memory values = verifier.getStorageValues(\n commands,\n constants,\n proof\n );\n if (values.length != commands.length) {\n revert ResponseLengthMismatch(values.length, commands.length);\n }\n bytes memory ret = address(this).functionCall(\n abi.encodeWithSelector(callback, values, callbackData)\n );\n assembly {\n return(add(ret, 32), mload(ret))\n }\n }\n}\n" + }, + "contracts/linea-verifier/IEVMVerifier.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.25;\n\ninterface IEVMVerifier {\n function gatewayURLs() external view returns (string[] memory);\n\n function getStorageValues(\n bytes32[] memory commands,\n bytes[] memory constants,\n bytes memory proof\n ) external view returns (bytes[] memory values);\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "viaIR": true, + "evmVersion": "paris", + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/packages/l1-contracts/test/testL1Resolver.spec.ts b/packages/l1-contracts/test/testL1Resolver.spec.ts index 0bc7d806d..69eb4773a 100644 --- a/packages/l1-contracts/test/testL1Resolver.spec.ts +++ b/packages/l1-contracts/test/testL1Resolver.spec.ts @@ -222,10 +222,9 @@ describe("Crosschain Resolver", () => { }); it("should not allow non owner to set target", async () => { - const incorrectnode = ethers.namehash("notowned.eth"); const incorrectname = encodeName("notowned.eth"); try { - await target.setTarget(incorrectnode, l2ResolverAddress); + await target.setTarget(incorrectname, l2ResolverAddress); } catch (e) {} const result = await target.getTarget(incorrectname); @@ -233,13 +232,13 @@ describe("Crosschain Resolver", () => { }); it("should allow owner to set target", async () => { - await target.setTarget(node, signerAddress); + await target.setTarget(encodedname, signerAddress); const result = await target.getTarget(encodeName(baseDomain)); expect(result[1]).to.equal(signerAddress); }); it("subname should get target of its parent", async () => { - await target.setTarget(node, signerAddress); + await target.setTarget(encodedname, signerAddress); const result = await target.getTarget(encodedSubDomain); expect(result[0]).to.equal(subDomainNode); expect(result[1]).to.equal(signerAddress); @@ -256,15 +255,15 @@ describe("Crosschain Resolver", () => { 0, // CAN_DO_EVERYTHING EMPTY_ADDRESS ); - const wrappedtnode = ethers.namehash(`${label}.eth`); - await target.setTarget(wrappedtnode, l2ResolverAddress); + const wrappedtname = encodeName(`${label}.eth`); + await target.setTarget(wrappedtname, l2ResolverAddress); const encodedname = encodeName(`${label}.eth`); const result = await target.getTarget(encodedname); expect(result[1]).to.equal(l2ResolverAddress); }); it("should resolve empty ETH Address", async () => { - await target.setTarget(node, l2ResolverAddress); + await target.setTarget(encodedname, l2ResolverAddress); const addr = "0x0000000000000000000000000000000000000000"; const result = await l2contract["addr(bytes32)"](node); expect(result).to.equal(addr); @@ -280,7 +279,7 @@ describe("Crosschain Resolver", () => { }); it("should resolve ETH Address", async () => { - await target.setTarget(node, l2ResolverAddress); + await target.setTarget(encodedname, l2ResolverAddress); const result = await l2contract["addr(bytes32)"](subDomainNode); expect(ethers.getAddress(result)).to.equal(registrantAddr); await l1Provider.send("evm_mine", []); @@ -297,7 +296,7 @@ describe("Crosschain Resolver", () => { }); it("should resolve non ETH Address", async () => { - await target.setTarget(node, l2ResolverAddress); + await target.setTarget(encodedname, l2ResolverAddress); const addr = "0x76a91462e907b15cbf27d5425399ebf6f0fb50ebb88f1888ac"; const coinType = 0; // BTC await l1Provider.send("evm_mine", []); @@ -313,7 +312,7 @@ describe("Crosschain Resolver", () => { }); it("should resolve text record", async () => { - await target.setTarget(node, l2ResolverAddress); + await target.setTarget(encodedname, l2ResolverAddress); const key = "name"; const value = "test.eth"; await l1Provider.send("evm_mine", []); @@ -330,7 +329,7 @@ describe("Crosschain Resolver", () => { }); it("should resolve contenthash", async () => { - await target.setTarget(node, l2ResolverAddress); + await target.setTarget(encodedname, l2ResolverAddress); const contenthash = "0xe3010170122029f2d17be6139079dc48696d1f582a8530eb9805b561eda517e22a892c7e3f1f"; await l1Provider.send("evm_mine", []);