From 8e45af415debe3656ee6e2ccdde93534580c3e61 Mon Sep 17 00:00:00 2001 From: Julink Date: Wed, 20 Mar 2024 14:33:26 +0100 Subject: [PATCH 1/4] feat: wip --- .../l1-contracts/contracts/L1Resolver.sol | 225 +++++++++++++ packages/l1-contracts/contracts/Verifier.sol | 11 + packages/l1-contracts/hardhat.config.ts | 11 + packages/l1-contracts/package.json | 18 + pnpm-lock.yaml | 312 +++++++++++++----- 5 files changed, 502 insertions(+), 75 deletions(-) create mode 100644 packages/l1-contracts/contracts/L1Resolver.sol create mode 100644 packages/l1-contracts/contracts/Verifier.sol create mode 100644 packages/l1-contracts/hardhat.config.ts create mode 100644 packages/l1-contracts/package.json diff --git a/packages/l1-contracts/contracts/L1Resolver.sol b/packages/l1-contracts/contracts/L1Resolver.sol new file mode 100644 index 000000000..22f146a0f --- /dev/null +++ b/packages/l1-contracts/contracts/L1Resolver.sol @@ -0,0 +1,225 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import {EVMFetcher} from "linea-verifier/contracts/EVMFetcher.sol"; +import {EVMFetchTarget} from "linea-verifier/contracts/EVMFetchTarget.sol"; +import {IEVMVerifier} from "linea-verifier/contracts/IEVMVerifier.sol"; +import "@ensdomains/ens-contracts/contracts/registry/ENS.sol"; +import {INameWrapper} from "@ensdomains/ens-contracts/contracts/wrapper/INameWrapper.sol"; +import {BytesUtils} from "@ensdomains/ens-contracts/contracts/dnssec-oracle/BytesUtils.sol"; +import {IAddrResolver} from "@ensdomains/ens-contracts/contracts/resolvers/profiles/IAddrResolver.sol"; +import {IAddressResolver} from "@ensdomains/ens-contracts/contracts/resolvers/profiles/IAddressResolver.sol"; +import {ITextResolver} from "@ensdomains/ens-contracts/contracts/resolvers/profiles/ITextResolver.sol"; +import {IContentHashResolver} from "@ensdomains/ens-contracts/contracts/resolvers/profiles/IContentHashResolver.sol"; + +contract L1Resolver is EVMFetchTarget { + using EVMFetcher for EVMFetcher.EVMFetchRequest; + using BytesUtils for bytes; + IEVMVerifier immutable verifier; + ENS immutable ens; + INameWrapper immutable nameWrapper; + mapping(bytes32 => address) targets; + uint256 constant COIN_TYPE_ETH = 60; + uint256 constant RECORD_VERSIONS_SLOT = 0; + uint256 constant VERSIONABLE_ABIS_SLOT = 1; + uint256 constant VERSIONABLE_ADDRESSES_SLOT = 2; + uint256 constant VERSIONABLE_HASHES_SLOT = 3; + uint256 constant VERSIONABLE_TEXTS_SLOT = 10; + + event TargetSet(bytes32 indexed node, address target); + + function isAuthorised(bytes32 node) internal view returns (bool) { + // TODO: Add support for + // trustedETHController + // trustedReverseRegistrar + // isApprovedForAll + // isApprovedFor + address owner = ens.owner(node); + if (owner == address(nameWrapper)) { + owner = nameWrapper.ownerOf(uint256(node)); + } + return owner == msg.sender; + } + + modifier authorised(bytes32 node) { + require(isAuthorised(node)); + _; + } + + constructor(IEVMVerifier _verifier, ENS _ens, INameWrapper _nameWrapper) { + require( + address(_nameWrapper) != address(0), + "Name Wrapper address must be set" + ); + require( + address(_verifier) != address(0), + "Verifier address must be set" + ); + require(address(_ens) != address(0), "Registry address must be set"); + verifier = _verifier; + ens = _ens; + nameWrapper = _nameWrapper; + } + + /** + * Set target address to verify aagainst + * @param node The ENS node to query. + * @param target The L2 resolver address to verify against. + */ + function setTarget(bytes32 node, address target) public authorised(node) { + targets[node] = target; + emit TargetSet(node, target); + } + + /** + * @dev Returns the L2 target address that can answer queries for `name`. + * @param name DNS encoded ENS name to query + * @param offset The offset of the label to query recursively. + * @return node The node of the name + * @return target The L2 resolver address to verify against. + */ + function getTarget( + bytes memory name, + uint256 offset + ) public view returns (bytes32 node, address target) { + uint256 len = name.readUint8(offset); + node = bytes32(0); + if (len > 0) { + bytes32 label = name.keccak(offset + 1, len); + (node, target) = getTarget(name, offset + len + 1); + node = keccak256(abi.encodePacked(node, label)); + if (targets[node] != address(0)) { + return (node, targets[node]); + } + } else { + return (bytes32(0), address(0)); + } + return (node, target); + } + + /** + * @dev Resolve and verify a record stored in l2 target address. It supports subname by fetching target recursively to the nearlest parent. + * @param name DNS encoded ENS name to query + * @param data The actual calldata + * @return result result of the call + */ + function resolve( + bytes calldata name, + bytes calldata data + ) external view returns (bytes memory result) { + (, address target) = getTarget(name, 0); + bytes4 selector = bytes4(data); + + if (selector == IAddrResolver.addr.selector) { + bytes32 node = abi.decode(data[4:], (bytes32)); + return _addr(node, target); + } + if (selector == IAddressResolver.addr.selector) { + (bytes32 node, uint256 cointype) = abi.decode( + data[4:], + (bytes32, uint256) + ); + return _addr(node, cointype, target); + } + if (selector == ITextResolver.text.selector) { + (bytes32 node, string memory key) = abi.decode( + data[4:], + (bytes32, string) + ); + return bytes(_text(node, key, target)); + } + if (selector == IContentHashResolver.contenthash.selector) { + bytes32 node = abi.decode(data[4:], (bytes32)); + return _contenthash(node, target); + } + } + + function _addr( + bytes32 node, + address target + ) private view returns (bytes memory) { + EVMFetcher + .newFetchRequest(verifier, target) + .getStatic(RECORD_VERSIONS_SLOT) + .element(node) + .getDynamic(VERSIONABLE_ADDRESSES_SLOT) + .ref(0) + .element(node) + .element(COIN_TYPE_ETH) + .fetch(this.addrCallback.selector, ""); // recordVersions + } + + function addrCallback( + bytes[] memory values, + bytes memory + ) public pure returns (bytes memory) { + return abi.encode(address(bytes20(values[1]))); + } + + function _addr( + bytes32 node, + uint256 coinType, + address target + ) private view returns (bytes memory) { + EVMFetcher + .newFetchRequest(verifier, target) + .getStatic(RECORD_VERSIONS_SLOT) + .element(node) + .getDynamic(VERSIONABLE_ADDRESSES_SLOT) + .ref(0) + .element(node) + .element(coinType) + .fetch(this.addrCoinTypeCallback.selector, ""); + } + + function addrCoinTypeCallback( + bytes[] memory values, + bytes memory + ) public pure returns (bytes memory) { + return abi.encode(values[1]); + } + + function _text( + bytes32 node, + string memory key, + address target + ) private view returns (bytes memory) { + EVMFetcher + .newFetchRequest(verifier, target) + .getStatic(RECORD_VERSIONS_SLOT) + .element(node) + .getDynamic(VERSIONABLE_TEXTS_SLOT) + .ref(0) + .element(node) + .element(key) + .fetch(this.textCallback.selector, ""); + } + + function textCallback( + bytes[] memory values, + bytes memory + ) public pure returns (bytes memory) { + return abi.encode(string(values[1])); + } + + function _contenthash( + bytes32 node, + address target + ) private view returns (bytes memory) { + EVMFetcher + .newFetchRequest(verifier, target) + .getStatic(RECORD_VERSIONS_SLOT) + .element(node) + .getDynamic(VERSIONABLE_HASHES_SLOT) + .ref(0) + .element(node) + .fetch(this.contenthashCallback.selector, ""); + } + + function contenthashCallback( + bytes[] memory values, + bytes memory + ) public pure returns (bytes memory) { + return abi.encode(values[1]); + } +} diff --git a/packages/l1-contracts/contracts/Verifier.sol b/packages/l1-contracts/contracts/Verifier.sol new file mode 100644 index 000000000..9a835b195 --- /dev/null +++ b/packages/l1-contracts/contracts/Verifier.sol @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import {LineaVerifier} from "linea-verifier/contracts/LineaVerifier.sol"; + +contract Verifier is LineaVerifier { + constructor( + string[] memory urls, + address rollup + ) LineaVerifier(urls, rollup) {} +} diff --git a/packages/l1-contracts/hardhat.config.ts b/packages/l1-contracts/hardhat.config.ts new file mode 100644 index 000000000..31082e96d --- /dev/null +++ b/packages/l1-contracts/hardhat.config.ts @@ -0,0 +1,11 @@ +import "@nomicfoundation/hardhat-toolbox"; +import { HardhatUserConfig } from "hardhat/config"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +const config: HardhatUserConfig = { + solidity: "0.8.19", +}; + +export default config; diff --git a/packages/l1-contracts/package.json b/packages/l1-contracts/package.json new file mode 100644 index 000000000..c87470933 --- /dev/null +++ b/packages/l1-contracts/package.json @@ -0,0 +1,18 @@ +{ + "name": "l1-contracts", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [], + "author": "", + "license": "ISC", + "dependencies": { + "@ensdomains/ens-contracts": "^0.0.22", + "dotenv": "^16.0.3", + "hardhat": "^2.22.1", + "linea-verifier": "^1.0.0" + } +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e3892c009..1d3b2a1c3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -54,10 +54,10 @@ importers: specifier: ^0.5.40 version: 0.5.40(ethers@5.7.2) '@openzeppelin/contracts': - specifier: ^4.9.3 + specifier: ^4.9.6 version: 4.9.6 '@openzeppelin/contracts-upgradeable': - specifier: ^4.9.3 + specifier: ^4.9.6 version: 4.9.6 '@openzeppelin/hardhat-upgrades': specifier: ^1.26.0 @@ -269,6 +269,21 @@ importers: specifier: ^2.0.14 version: 2.0.16 + packages/l1-contracts: + dependencies: + '@ensdomains/ens-contracts': + specifier: ^0.0.22 + version: 0.0.22 + dotenv: + specifier: ^16.0.3 + version: 16.4.5 + hardhat: + specifier: ^2.22.1 + version: 2.22.1 + linea-verifier: + specifier: ^1.0.0 + version: link:../linea-verifier + packages/linea-verifier: dependencies: '@openzeppelin/contracts': @@ -2181,6 +2196,15 @@ packages: requiresBuild: true optional: true + /@nomicfoundation/edr-darwin-arm64@0.3.2: + resolution: {integrity: sha512-l6wfSBUUbGJiCENT6272CDI8yoMuf0sZH56H5qz3HnAyVzenkOvmzyF6/lar54m986kdAQqWls4cLvDxiOuLxg==} + engines: {node: '>= 18'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: false + optional: true + /@nomicfoundation/edr-darwin-x64@0.2.1: resolution: {integrity: sha512-ma0SLcjHm5L3nPHcKFJB0jv/gKGSKaxr5Z65rurX/eaYUQJ7YGMsb8er9bSCo9rjzOtxf4FoPj3grL3zGpOj8A==} engines: {node: '>= 18'} @@ -2189,6 +2213,15 @@ packages: requiresBuild: true optional: true + /@nomicfoundation/edr-darwin-x64@0.3.2: + resolution: {integrity: sha512-OboExL7vEw+TRJQl3KkaEKU4K7PTdZPTInZ0fxMAtOpcWp7EKR+dQo68vc/iAOusB3xszHKxt7t+WpisItfdcg==} + engines: {node: '>= 18'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: false + optional: true + /@nomicfoundation/edr-linux-arm64-gnu@0.2.1: resolution: {integrity: sha512-NX3G4pBhRitWrjSGY3HTyCq3wKSm5YqrKVOCNQGl9/jcjSovqxlgzFMiTx4YZCzGntfJ/1om9AI84OWxYJjoDw==} engines: {node: '>= 18'} @@ -2197,6 +2230,15 @@ packages: requiresBuild: true optional: true + /@nomicfoundation/edr-linux-arm64-gnu@0.3.2: + resolution: {integrity: sha512-xtEK+1eg++3pHi6405NDXd80S3CGOFEGQIyVGCwjMGQFOLSzBGGCsrb/0GB4J19zd1o/8ftCd/HjZcbVAWWTLQ==} + engines: {node: '>= 18'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: false + optional: true + /@nomicfoundation/edr-linux-arm64-musl@0.2.1: resolution: {integrity: sha512-gdQ3QHkt9XRkdtOGQ8fMwS11MXdjLeZgLrqoial4V4qtMaamIMMhVczK+VEvUhD8p7G4BVmp6kmkvcsthmndmw==} engines: {node: '>= 18'} @@ -2205,6 +2247,15 @@ packages: requiresBuild: true optional: true + /@nomicfoundation/edr-linux-arm64-musl@0.3.2: + resolution: {integrity: sha512-3cIsskJOXQ1yEVsImmCacY7O03tUTiWrmd54F05PnPFrDLkjbzodQ3b2gUWzfbzUZWl67ZTJd1CvVSzpe7XGzw==} + engines: {node: '>= 18'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: false + optional: true + /@nomicfoundation/edr-linux-x64-gnu@0.2.1: resolution: {integrity: sha512-OqabFY37vji6mYbLD9CvG28lja68czeVw58oWByIhFV3BpBu/cyP1oAbhzk3LieylujabS3Ekpvjw2Tkf0A9RQ==} engines: {node: '>= 18'} @@ -2213,6 +2264,15 @@ packages: requiresBuild: true optional: true + /@nomicfoundation/edr-linux-x64-gnu@0.3.2: + resolution: {integrity: sha512-ouPdphHNsyO7wqwa4hwahC5WqBglK/fIvMmhR/SXNZ9qruIpsA8ZZKIURaHMOv/2h2BbNGcyTX9uEk6+5rK/MQ==} + engines: {node: '>= 18'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: false + optional: true + /@nomicfoundation/edr-linux-x64-musl@0.2.1: resolution: {integrity: sha512-vHfFFK2EPISuQUQge+bdjXamb0EUjfl8srYSog1qfiwyLwLeuSbpyyFzDeITAgPpkkFuedTfJW553K0Hipspyg==} engines: {node: '>= 18'} @@ -2221,6 +2281,15 @@ packages: requiresBuild: true optional: true + /@nomicfoundation/edr-linux-x64-musl@0.3.2: + resolution: {integrity: sha512-sRhwhiPbkpJMOUwXW1FZw9ks6xWyQhIhM0E8o3TXEXKSPKTE6whQLEk1R37iFITaI36vb6rSwLKTU1cb32gCoA==} + engines: {node: '>= 18'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: false + optional: true + /@nomicfoundation/edr-win32-arm64-msvc@0.2.1: resolution: {integrity: sha512-K/mui67RCKxghbSyvhvW3rvyVN1pa9M1Q9APUx1PtWjSSdXDFpqEY1NYsv2syb47Ca8ObJwVMF+LvnB6GvhUOQ==} engines: {node: '>= 10'} @@ -2229,6 +2298,15 @@ packages: requiresBuild: true optional: true + /@nomicfoundation/edr-win32-arm64-msvc@0.3.2: + resolution: {integrity: sha512-IEwVealKfumu1HSSnama26yPuQC/uthRPK5IWtFsQUOGwOXaS1r9Bu7cGYH2jBHl3IT/JbxD4xzPq/2pM9uK0A==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: false + optional: true + /@nomicfoundation/edr-win32-ia32-msvc@0.2.1: resolution: {integrity: sha512-HHK0mXEtjvfjJrJlqcYgQCy3lZIXS1KNl2GaP8bwEIuEwx++XxXs/ThLjPepM1nhCGICij8IGy7p3KrkzRelsw==} engines: {node: '>= 18'} @@ -2237,6 +2315,15 @@ packages: requiresBuild: true optional: true + /@nomicfoundation/edr-win32-ia32-msvc@0.3.2: + resolution: {integrity: sha512-jYMnf6SFgguqROswwdsjJ1wvneD/5c16pVu9OD4DxNqhKNP5bHEw6L2N4DcJ89tpXMpJ6AlOpc0QuwzddiZ3tA==} + engines: {node: '>= 18'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: false + optional: true + /@nomicfoundation/edr-win32-x64-msvc@0.2.1: resolution: {integrity: sha512-FY4eQJdj1/y8ST0RyQycx63yr+lvdYNnUkzgWf4X+vPH1lOhXae+L2NDcNCQlTDAfQcD6yz0bkBUkLrlJ8pTww==} engines: {node: '>= 18'} @@ -2245,6 +2332,15 @@ packages: requiresBuild: true optional: true + /@nomicfoundation/edr-win32-x64-msvc@0.3.2: + resolution: {integrity: sha512-Byn4QuWczRy/DUUQM3WjglgX/jGVUURVFaUsmIhnGg//MPlCLawubBGRqsrMuvaYedlIIJ4I2rgKvZlxdgHrqg==} + engines: {node: '>= 18'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: false + optional: true + /@nomicfoundation/edr@0.2.1: resolution: {integrity: sha512-Dleau3ItHJh2n85G2J6AIPBoLgu/mOWkmrh26z3VsJE2tp/e00hUk/dqz85ncsVcBYEc6/YOn/DomWu0wSF9tQ==} engines: {node: '>= 18'} @@ -2259,6 +2355,21 @@ packages: '@nomicfoundation/edr-win32-ia32-msvc': 0.2.1 '@nomicfoundation/edr-win32-x64-msvc': 0.2.1 + /@nomicfoundation/edr@0.3.2: + resolution: {integrity: sha512-HGWtjibAK1mo4I2A7nJ/fXqe/J9G54OrSPJnnkY2K8TiXotYLShGd9GvHkae3PuFjTJKm6ZgBy7tveJj5yrCfw==} + engines: {node: '>= 18'} + optionalDependencies: + '@nomicfoundation/edr-darwin-arm64': 0.3.2 + '@nomicfoundation/edr-darwin-x64': 0.3.2 + '@nomicfoundation/edr-linux-arm64-gnu': 0.3.2 + '@nomicfoundation/edr-linux-arm64-musl': 0.3.2 + '@nomicfoundation/edr-linux-x64-gnu': 0.3.2 + '@nomicfoundation/edr-linux-x64-musl': 0.3.2 + '@nomicfoundation/edr-win32-arm64-msvc': 0.3.2 + '@nomicfoundation/edr-win32-ia32-msvc': 0.3.2 + '@nomicfoundation/edr-win32-x64-msvc': 0.3.2 + dev: false + /@nomicfoundation/ethereumjs-common@4.0.4: resolution: {integrity: sha512-9Rgb658lcWsjiicr5GzNCjI1llow/7r0k50dLL95OJ+6iZJcVbi15r3Y0xh2cIO+zgX0WIHcbzIu6FeQf9KPrg==} dependencies: @@ -2999,7 +3110,7 @@ packages: /@types/bn.js@5.1.5: resolution: {integrity: sha512-V46N0zwKRF5Q00AZ6hWtN0T8gGmDUaUzLWQvHFo5yThtVwK/VCenFY3wXVbOvNfajEpsTfQM4IN9k/d6gUVX3A==} dependencies: - '@types/node': 20.11.25 + '@types/node': 18.19.22 /@types/body-parser@1.19.5: resolution: {integrity: sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==} @@ -3239,15 +3350,16 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/experimental-utils': 2.34.0(eslint@6.8.0)(typescript@3.9.10) - '@typescript-eslint/parser': 2.34.0(eslint@6.8.0)(typescript@3.9.10) + '@typescript-eslint/experimental-utils': 2.34.0(eslint@6.8.0)(typescript@4.9.5) + '@typescript-eslint/parser': 2.34.0(eslint@6.8.0)(typescript@4.9.5) eslint: 6.8.0 functional-red-black-tree: 1.0.1 regexpp: 3.2.0 - tsutils: 3.21.0(typescript@3.9.10) + tsutils: 3.21.0(typescript@4.9.5) typescript: 3.9.10 transitivePeerDependencies: - supports-color + dev: false /@typescript-eslint/eslint-plugin@2.34.0(@typescript-eslint/parser@2.34.0)(eslint@6.8.0)(typescript@4.9.5): resolution: {integrity: sha512-4zY3Z88rEE99+CNvTbXSyovv2z9PNOVffTWD2W8QF5s2prBQtwN2zadqERcrHpcR7O/+KMI3fcTAmUUhK/iQcQ==} @@ -3269,7 +3381,6 @@ packages: typescript: 4.9.5 transitivePeerDependencies: - supports-color - dev: true /@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0)(eslint@8.57.0)(typescript@5.4.2): resolution: {integrity: sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==} @@ -3328,21 +3439,6 @@ packages: - supports-color dev: false - /@typescript-eslint/experimental-utils@2.34.0(eslint@6.8.0)(typescript@3.9.10): - resolution: {integrity: sha512-eS6FTkq+wuMJ+sgtuNTtcqavWXqsflWcfBnlYhg/nS4aZ1leewkXGbvBhaapn1q6qf4M71bsR1tez5JTRMuqwA==} - engines: {node: ^8.10.0 || ^10.13.0 || >=11.10.1} - peerDependencies: - eslint: '*' - dependencies: - '@types/json-schema': 7.0.15 - '@typescript-eslint/typescript-estree': 2.34.0(typescript@3.9.10) - eslint: 6.8.0 - eslint-scope: 5.1.1 - eslint-utils: 2.1.0 - transitivePeerDependencies: - - supports-color - - typescript - /@typescript-eslint/experimental-utils@2.34.0(eslint@6.8.0)(typescript@4.9.5): resolution: {integrity: sha512-eS6FTkq+wuMJ+sgtuNTtcqavWXqsflWcfBnlYhg/nS4aZ1leewkXGbvBhaapn1q6qf4M71bsR1tez5JTRMuqwA==} engines: {node: ^8.10.0 || ^10.13.0 || >=11.10.1} @@ -3357,7 +3453,6 @@ packages: transitivePeerDependencies: - supports-color - typescript - dev: true /@typescript-eslint/parser@2.34.0(eslint@6.8.0)(typescript@3.9.10): resolution: {integrity: sha512-03ilO0ucSD0EPTw2X4PntSIRFtDPWjrVq7C3/Z3VQHRC7+13YB55rcJI3Jt+YgeHbjUdJPcPa7b23rXCBokuyA==} @@ -3370,13 +3465,14 @@ packages: optional: true dependencies: '@types/eslint-visitor-keys': 1.0.0 - '@typescript-eslint/experimental-utils': 2.34.0(eslint@6.8.0)(typescript@3.9.10) - '@typescript-eslint/typescript-estree': 2.34.0(typescript@3.9.10) + '@typescript-eslint/experimental-utils': 2.34.0(eslint@6.8.0)(typescript@4.9.5) + '@typescript-eslint/typescript-estree': 2.34.0(typescript@4.9.5) eslint: 6.8.0 eslint-visitor-keys: 1.3.0 typescript: 3.9.10 transitivePeerDependencies: - supports-color + dev: false /@typescript-eslint/parser@2.34.0(eslint@6.8.0)(typescript@4.9.5): resolution: {integrity: sha512-03ilO0ucSD0EPTw2X4PntSIRFtDPWjrVq7C3/Z3VQHRC7+13YB55rcJI3Jt+YgeHbjUdJPcPa7b23rXCBokuyA==} @@ -3396,7 +3492,6 @@ packages: typescript: 4.9.5 transitivePeerDependencies: - supports-color - dev: true /@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.4.2): resolution: {integrity: sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==} @@ -3437,6 +3532,7 @@ packages: typescript: 5.4.2 transitivePeerDependencies: - supports-color + dev: false /@typescript-eslint/scope-manager@5.62.0: resolution: {integrity: sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==} @@ -3452,6 +3548,7 @@ packages: dependencies: '@typescript-eslint/types': 7.1.1 '@typescript-eslint/visitor-keys': 7.1.1 + dev: false /@typescript-eslint/type-utils@5.62.0(eslint@8.57.0)(typescript@5.4.2): resolution: {integrity: sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==} @@ -3501,26 +3598,7 @@ packages: /@typescript-eslint/types@7.1.1: resolution: {integrity: sha512-KhewzrlRMrgeKm1U9bh2z5aoL4s7K3tK5DwHDn8MHv0yQfWFz/0ZR6trrIHHa5CsF83j/GgHqzdbzCXJ3crx0Q==} engines: {node: ^16.0.0 || >=18.0.0} - - /@typescript-eslint/typescript-estree@2.34.0(typescript@3.9.10): - resolution: {integrity: sha512-OMAr+nJWKdlVM9LOqCqh3pQQPwxHAN7Du8DR6dmwCrAmxtiXQnhHJ6tBNtf+cggqfo51SG/FCwnKhXCIM7hnVg==} - engines: {node: ^8.10.0 || ^10.13.0 || >=11.10.1} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - debug: 4.3.4(supports-color@8.1.1) - eslint-visitor-keys: 1.3.0 - glob: 7.2.3 - is-glob: 4.0.3 - lodash: 4.17.21 - semver: 7.6.0 - tsutils: 3.21.0(typescript@3.9.10) - typescript: 3.9.10 - transitivePeerDependencies: - - supports-color + dev: false /@typescript-eslint/typescript-estree@2.34.0(typescript@4.9.5): resolution: {integrity: sha512-OMAr+nJWKdlVM9LOqCqh3pQQPwxHAN7Du8DR6dmwCrAmxtiXQnhHJ6tBNtf+cggqfo51SG/FCwnKhXCIM7hnVg==} @@ -3541,7 +3619,6 @@ packages: typescript: 4.9.5 transitivePeerDependencies: - supports-color - dev: true /@typescript-eslint/typescript-estree@5.62.0(typescript@5.4.2): resolution: {integrity: sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==} @@ -3584,6 +3661,7 @@ packages: typescript: 5.4.2 transitivePeerDependencies: - supports-color + dev: false /@typescript-eslint/utils@5.62.0(eslint@8.57.0)(typescript@5.4.2): resolution: {integrity: sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==} @@ -3638,6 +3716,7 @@ packages: dependencies: '@typescript-eslint/types': 7.1.1 eslint-visitor-keys: 3.4.3 + dev: false /@ungap/structured-clone@1.2.0: resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} @@ -4101,7 +4180,6 @@ packages: resolve: 1.22.8 transitivePeerDependencies: - supports-color - dev: true /babel-eslint@10.1.0(eslint@8.57.0): resolution: {integrity: sha512-ifWaTHQ0ce+448CYop8AdrQiBsGrnC+bMgfyKFdi6EsPLTAWG+QfyDeM6OH+FmWnKvEq5NnBMLvlBUPKQZoDSg==} @@ -4119,6 +4197,7 @@ packages: resolve: 1.22.8 transitivePeerDependencies: - supports-color + dev: false /babel-jest@25.5.1(@babel/core@7.24.0): resolution: {integrity: sha512-9dA9+GmMjIzgPnYtkhBg73gOo/RHqPmLruP3BaGL4KEX3Dwz6pI8auSN8G8+iuEG90+GSswyKvslN+JYSaacaQ==} @@ -5636,16 +5715,16 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/eslint-plugin': 2.34.0(@typescript-eslint/parser@2.34.0)(eslint@6.8.0)(typescript@3.9.10) - '@typescript-eslint/parser': 2.34.0(eslint@6.8.0)(typescript@3.9.10) - babel-eslint: 10.1.0(eslint@8.57.0) + '@typescript-eslint/eslint-plugin': 2.34.0(@typescript-eslint/parser@2.34.0)(eslint@6.8.0)(typescript@4.9.5) + '@typescript-eslint/parser': 2.34.0(eslint@6.8.0)(typescript@4.9.5) + babel-eslint: 10.1.0(eslint@6.8.0) confusing-browser-globals: 1.0.11 eslint: 6.8.0 - eslint-plugin-flowtype: 3.13.0(eslint@8.57.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.1.1)(eslint@8.57.0) - eslint-plugin-jsx-a11y: 6.8.0(eslint@8.57.0) - eslint-plugin-react: 7.34.0(eslint@8.57.0) - eslint-plugin-react-hooks: 2.5.1(eslint@8.57.0) + eslint-plugin-flowtype: 3.13.0(eslint@6.8.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@2.34.0)(eslint@6.8.0) + eslint-plugin-jsx-a11y: 6.8.0(eslint@6.8.0) + eslint-plugin-react: 7.34.0(eslint@6.8.0) + eslint-plugin-react-hooks: 2.5.1(eslint@6.8.0) typescript: 3.9.10 /eslint-import-resolver-node@0.3.9: @@ -5657,6 +5736,34 @@ packages: transitivePeerDependencies: - supports-color + /eslint-module-utils@2.8.1(@typescript-eslint/parser@2.34.0)(eslint-import-resolver-node@0.3.9)(eslint@6.8.0): + resolution: {integrity: sha512-rXDXR3h7cs7dy9RNpUlQf80nX31XWJEyGq1tRMo+6GsO5VmTe4UTwtmonAD4ZkAsrfMVDA2wlGJ3790Ys+D49Q==} + engines: {node: '>=4'} + peerDependencies: + '@typescript-eslint/parser': '*' + eslint: '*' + eslint-import-resolver-node: '*' + eslint-import-resolver-typescript: '*' + eslint-import-resolver-webpack: '*' + peerDependenciesMeta: + '@typescript-eslint/parser': + optional: true + eslint: + optional: true + eslint-import-resolver-node: + optional: true + eslint-import-resolver-typescript: + optional: true + eslint-import-resolver-webpack: + optional: true + dependencies: + '@typescript-eslint/parser': 2.34.0(eslint@6.8.0)(typescript@4.9.5) + debug: 3.2.7 + eslint: 6.8.0 + eslint-import-resolver-node: 0.3.9 + transitivePeerDependencies: + - supports-color + /eslint-module-utils@2.8.1(@typescript-eslint/parser@7.1.1)(eslint-import-resolver-node@0.3.9)(eslint@8.57.0): resolution: {integrity: sha512-rXDXR3h7cs7dy9RNpUlQf80nX31XWJEyGq1tRMo+6GsO5VmTe4UTwtmonAD4ZkAsrfMVDA2wlGJ3790Ys+D49Q==} engines: {node: '>=4'} @@ -5684,6 +5791,7 @@ packages: eslint-import-resolver-node: 0.3.9 transitivePeerDependencies: - supports-color + dev: false /eslint-plugin-flowtype@3.13.0(eslint@6.8.0): resolution: {integrity: sha512-bhewp36P+t7cEV0b6OdmoRWJCBYRiHFlqPZAG1oS3SF+Y0LQkeDvFSM4oxoxvczD1OdONCXMlJfQFiWLcV9urw==} @@ -5693,7 +5801,6 @@ packages: dependencies: eslint: 6.8.0 lodash: 4.17.21 - dev: true /eslint-plugin-flowtype@3.13.0(eslint@8.57.0): resolution: {integrity: sha512-bhewp36P+t7cEV0b6OdmoRWJCBYRiHFlqPZAG1oS3SF+Y0LQkeDvFSM4oxoxvczD1OdONCXMlJfQFiWLcV9urw==} @@ -5703,6 +5810,7 @@ packages: dependencies: eslint: 8.57.0 lodash: 4.17.21 + dev: false /eslint-plugin-import@2.29.1(@typescript-eslint/parser@2.34.0)(eslint@6.8.0): resolution: {integrity: sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==} @@ -5714,7 +5822,7 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 2.34.0(eslint@6.8.0)(typescript@3.9.10) + '@typescript-eslint/parser': 2.34.0(eslint@6.8.0)(typescript@4.9.5) array-includes: 3.1.7 array.prototype.findlastindex: 1.2.4 array.prototype.flat: 1.3.2 @@ -5723,7 +5831,7 @@ packages: doctrine: 2.1.0 eslint: 6.8.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.1.1)(eslint-import-resolver-node@0.3.9)(eslint@8.57.0) + eslint-module-utils: 2.8.1(@typescript-eslint/parser@2.34.0)(eslint-import-resolver-node@0.3.9)(eslint@6.8.0) hasown: 2.0.1 is-core-module: 2.13.1 is-glob: 4.0.3 @@ -5737,7 +5845,6 @@ packages: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color - dev: true /eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.1.1)(eslint@8.57.0): resolution: {integrity: sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==} @@ -5772,6 +5879,7 @@ packages: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color + dev: false /eslint-plugin-json-files@2.2.0(eslint@8.57.0): resolution: {integrity: sha512-7ETNwGWMtlAqtAIfwrNSm/X8RsHrZcV78YFa/EyYjavFWaVFhi/fsZBjnj4yIf1G0Rbx5f2t+sd037hVPK20WQ==} @@ -5810,7 +5918,6 @@ packages: minimatch: 3.1.2 object.entries: 1.1.7 object.fromentries: 2.0.7 - dev: true /eslint-plugin-jsx-a11y@6.8.0(eslint@8.57.0): resolution: {integrity: sha512-Hdh937BS3KdwwbBaKd5+PLCOmYY6U4f2h9Z2ktwtNKvIdIEu137rjYbcb9ApSbVJfWxANNuiKTD/9tOKjK9qOA==} @@ -5835,6 +5942,7 @@ packages: minimatch: 3.1.2 object.entries: 1.1.7 object.fromentries: 2.0.7 + dev: false /eslint-plugin-prettier@3.4.1(eslint-config-prettier@6.15.0)(eslint@6.8.0)(prettier@1.19.1): resolution: {integrity: sha512-htg25EUYUeIhKHXjOinK4BgCcDwtLHjqaxCDsMy5nbnUMkKFvIhMVCp+5GFUXQ4Nr8lBsPqtGAqBenbpFqAA2g==} @@ -5876,7 +5984,6 @@ packages: eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 dependencies: eslint: 6.8.0 - dev: true /eslint-plugin-react-hooks@2.5.1(eslint@8.57.0): resolution: {integrity: sha512-Y2c4b55R+6ZzwtTppKwSmK/Kar8AdLiC2f9NADCuxbcTgPPg41Gyqa6b9GppgXSvCtkRw43ZE86CT5sejKC6/g==} @@ -5885,6 +5992,7 @@ packages: eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 dependencies: eslint: 8.57.0 + dev: false /eslint-plugin-react@7.34.0(eslint@6.8.0): resolution: {integrity: sha512-MeVXdReleBTdkz/bvcQMSnCXGi+c9kvy51IpinjnJgutl3YTHWsDdke7Z1ufZpGfDG8xduBDKyjtB9JH1eBKIQ==} @@ -5911,7 +6019,6 @@ packages: resolve: 2.0.0-next.5 semver: 6.3.1 string.prototype.matchall: 4.0.10 - dev: true /eslint-plugin-react@7.34.0(eslint@8.57.0): resolution: {integrity: sha512-MeVXdReleBTdkz/bvcQMSnCXGi+c9kvy51IpinjnJgutl3YTHWsDdke7Z1ufZpGfDG8xduBDKyjtB9JH1eBKIQ==} @@ -5938,6 +6045,7 @@ packages: resolve: 2.0.0-next.5 semver: 6.3.1 string.prototype.matchall: 4.0.10 + dev: false /eslint-scope@5.1.1: resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} @@ -7075,7 +7183,7 @@ packages: solc: 0.7.3(debug@4.3.4) source-map-support: 0.5.21 stacktrace-parser: 0.1.10 - ts-node: 10.9.2(@types/node@12.0.0)(typescript@5.4.2) + ts-node: 10.9.2(@types/node@20.11.25)(typescript@5.4.2) tsort: 0.0.1 typescript: 5.4.2 undici: 5.28.3 @@ -7087,6 +7195,68 @@ packages: - supports-color - utf-8-validate + /hardhat@2.22.1: + resolution: {integrity: sha512-cTWYIJc5jQ132XUI8oRI/TO9L6oavPoJRCTRU9sIjkVxvkxz0Axz0K83Z3BEdJTqBQ2W84ZRoTekti84kBwCjg==} + hasBin: true + peerDependencies: + ts-node: '*' + typescript: '*' + peerDependenciesMeta: + ts-node: + optional: true + typescript: + optional: true + dependencies: + '@ethersproject/abi': 5.7.0 + '@metamask/eth-sig-util': 4.0.1 + '@nomicfoundation/edr': 0.3.2 + '@nomicfoundation/ethereumjs-common': 4.0.4 + '@nomicfoundation/ethereumjs-tx': 5.0.4 + '@nomicfoundation/ethereumjs-util': 9.0.4 + '@nomicfoundation/solidity-analyzer': 0.1.1 + '@sentry/node': 5.30.0 + '@types/bn.js': 5.1.5 + '@types/lru-cache': 5.1.1 + adm-zip: 0.4.16 + aggregate-error: 3.1.0 + ansi-escapes: 4.3.2 + boxen: 5.1.2 + chalk: 2.4.2 + chokidar: 3.6.0 + ci-info: 2.0.0 + debug: 4.3.4(supports-color@8.1.1) + enquirer: 2.4.1 + env-paths: 2.2.1 + ethereum-cryptography: 1.2.0 + ethereumjs-abi: 0.6.8 + find-up: 2.1.0 + fp-ts: 1.19.3 + fs-extra: 7.0.1 + glob: 7.2.0 + immutable: 4.3.5 + io-ts: 1.10.4 + keccak: 3.0.4 + lodash: 4.17.21 + mnemonist: 0.38.5 + mocha: 10.3.0 + p-map: 4.0.0 + raw-body: 2.5.2 + resolve: 1.17.0 + semver: 6.3.1 + solc: 0.7.3(debug@4.3.4) + source-map-support: 0.5.21 + stacktrace-parser: 0.1.10 + tsort: 0.0.1 + undici: 5.28.3 + uuid: 8.3.2 + ws: 7.5.9 + transitivePeerDependencies: + - bufferutil + - c-kzg + - supports-color + - utf-8-validate + dev: false + /has-bigints@1.0.2: resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} @@ -8622,6 +8792,7 @@ packages: engines: {node: '>=16 || 14 >=14.17'} dependencies: brace-expansion: 2.0.1 + dev: false /minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} @@ -10693,6 +10864,7 @@ packages: typescript: '>=4.2.0' dependencies: typescript: 5.4.2 + dev: false /ts-command-line-args@2.5.1: resolution: {integrity: sha512-H69ZwTw3rFHb5WYpQya40YAX2/w7Ut75uUECbgBIsLmM+BNuYnxsltfyyLMxy6sEeKxgijLTnQtLd0nKd6+IYw==} @@ -10760,6 +10932,7 @@ packages: typescript: 5.4.2 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 + dev: false /ts-node@10.9.2(@types/node@18.19.22)(typescript@4.9.5): resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} @@ -10821,7 +10994,6 @@ packages: typescript: 5.4.2 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 - dev: true /tsconfig-paths@3.15.0: resolution: {integrity: sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==} @@ -10991,15 +11163,6 @@ packages: /tsort@0.0.1: resolution: {integrity: sha512-Tyrf5mxF8Ofs1tNoxA13lFeZ2Zrbd6cKbuH3V+MQ5sb6DtBj5FjrXVsRWT8YvNAQTqNoz66dz1WsbigI22aEnw==} - /tsutils@3.21.0(typescript@3.9.10): - resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} - engines: {node: '>= 6'} - peerDependencies: - typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' - dependencies: - tslib: 1.14.1 - typescript: 3.9.10 - /tsutils@3.21.0(typescript@4.9.5): resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} engines: {node: '>= 6'} @@ -11008,7 +11171,6 @@ packages: dependencies: tslib: 1.14.1 typescript: 4.9.5 - dev: true /tsutils@3.21.0(typescript@5.4.2): resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} From 4e38e70d5f53b5afc8acc64f955461c344a51259 Mon Sep 17 00:00:00 2001 From: julink-eth Date: Thu, 21 Mar 2024 15:07:08 +0100 Subject: [PATCH 2/4] feat: adapted before all section in test file --- packages/contracts/.env.example | 18 - packages/contracts/.eslintignore | 23 - packages/contracts/.eslintrc.js | 38 - packages/contracts/.gitignore | 26 - packages/contracts/.prettierignore | 22 - packages/contracts/.prettierrc.yaml | 16 - packages/contracts/.solcover.js | 3 - packages/contracts/.solhint.json | 19 - packages/contracts/README.md | 97 --- packages/contracts/abi/ENSRegistry.json | 202 ------ .../contracts/l1/LineaResolverStub.sol | 226 ------ packages/contracts/contracts/l1/lib/Mimc.sol | 679 ------------------ .../contracts/l1/lib/SparseMerkleProof.sol | 215 ------ .../contracts/contracts/l2/LineaResolver.sol | 195 ----- .../contracts/contracts/mocks/FakeRollup.sol | 13 - packages/contracts/hardhat.config.ts | 67 -- packages/contracts/package.json | 60 -- packages/contracts/scripts/constants.ts | 11 - packages/contracts/scripts/copy.ts | 13 - packages/contracts/scripts/deployL1.ts | 78 -- packages/contracts/scripts/deployL2.ts | 41 -- packages/contracts/test/LineaResolver.ts | 217 ------ packages/contracts/test/LineaResolverStub.ts | 146 ---- packages/contracts/test/mocks/proof.ts | 44 -- packages/contracts/tsconfig.json | 12 - packages/gateway/contracts/RollupMock.sol | 2 +- packages/gateway/contracts/TestL1.sol | 2 +- packages/gateway/contracts/TestL2.sol | 2 +- .../gateway/contracts/TestLineaVerifier.sol | 2 +- packages/gateway/hardhat.config.ts | 14 +- packages/l1-contracts/.mocharc.json | 7 + .../l1-contracts/contracts/L1Resolver.sol | 2 +- .../l1-contracts/contracts/RollupMock.sol | 15 + packages/l1-contracts/contracts/Verifier.sol | 2 +- .../delegatableResolvers/BytesUtils.sol | 400 +++++++++++ .../DelegatableResolver.sol | 134 ++++ .../DelegatableResolverFactory.sol | 33 + .../IDelegatableResolver.sol | 18 + .../delegatableResolvers/IMulticallable.sol | 13 + .../delegatableResolvers/Multicallable.sol | 53 ++ .../delegatableResolvers/RRUtils.sol | 433 +++++++++++ .../delegatableResolvers/ResolverBase.sol | 34 + .../profiles/ABIResolver.sol | 69 ++ .../profiles/AddrResolver.sol | 88 +++ .../profiles/ContentHashResolver.sol | 42 ++ .../profiles/DNSResolver.sol | 208 ++++++ .../profiles/ExtendedResolver.sol | 19 + .../profiles/IABIResolver.sol | 19 + .../profiles/IAddrResolver.sol | 16 + .../profiles/IAddressResolver.sol | 18 + .../profiles/IContentHashResolver.sol | 13 + .../profiles/IDNSRecordResolver.sol | 27 + .../profiles/IDNSZoneResolver.sol | 18 + .../profiles/IExtendedDNSResolver.sol | 10 + .../profiles/IExtendedResolver.sol | 9 + .../profiles/IInterfaceResolver.sol | 25 + .../profiles/INameResolver.sol | 14 + .../profiles/IPubkeyResolver.sol | 15 + .../profiles/ITextResolver.sol | 22 + .../profiles/IVersionableResolver.sol | 8 + .../profiles/InterfaceResolver.sol | 85 +++ .../profiles/NameResolver.sol | 42 ++ .../profiles/PubkeyResolver.sol | 54 ++ .../profiles/TextResolver.sol | 46 ++ packages/l1-contracts/contracts/deps.sol | 8 + packages/l1-contracts/hardhat.config.ts | 15 +- packages/l1-contracts/package.json | 24 +- .../l1-contracts/test/testL1Resolver.spec.ts | 377 ++++++++++ packages/l1-contracts/tsconfig.json | 25 + .../contracts/EVMFetchTarget.sol | 2 +- .../linea-verifier/contracts/EVMFetcher.sol | 2 +- .../linea-verifier/contracts/IEVMVerifier.sol | 2 +- .../contracts/LineaProofHelper.sol | 2 +- .../contracts/LineaVerifier.sol | 2 +- .../linea-verifier/contracts/lib/Mimc.sol | 2 +- .../contracts/lib/SparseMerkleProof.sol | 2 +- pnpm-lock.yaml | 437 ++++++++++- 77 files changed, 2898 insertions(+), 2516 deletions(-) delete mode 100644 packages/contracts/.env.example delete mode 100644 packages/contracts/.eslintignore delete mode 100644 packages/contracts/.eslintrc.js delete mode 100644 packages/contracts/.gitignore delete mode 100644 packages/contracts/.prettierignore delete mode 100644 packages/contracts/.prettierrc.yaml delete mode 100644 packages/contracts/.solcover.js delete mode 100644 packages/contracts/.solhint.json delete mode 100644 packages/contracts/README.md delete mode 100644 packages/contracts/abi/ENSRegistry.json delete mode 100644 packages/contracts/contracts/l1/LineaResolverStub.sol delete mode 100644 packages/contracts/contracts/l1/lib/Mimc.sol delete mode 100644 packages/contracts/contracts/l1/lib/SparseMerkleProof.sol delete mode 100644 packages/contracts/contracts/l2/LineaResolver.sol delete mode 100644 packages/contracts/contracts/mocks/FakeRollup.sol delete mode 100644 packages/contracts/hardhat.config.ts delete mode 100644 packages/contracts/package.json delete mode 100644 packages/contracts/scripts/constants.ts delete mode 100644 packages/contracts/scripts/copy.ts delete mode 100644 packages/contracts/scripts/deployL1.ts delete mode 100644 packages/contracts/scripts/deployL2.ts delete mode 100644 packages/contracts/test/LineaResolver.ts delete mode 100644 packages/contracts/test/LineaResolverStub.ts delete mode 100644 packages/contracts/test/mocks/proof.ts delete mode 100644 packages/contracts/tsconfig.json create mode 100644 packages/l1-contracts/.mocharc.json create mode 100644 packages/l1-contracts/contracts/RollupMock.sol create mode 100644 packages/l1-contracts/contracts/delegatableResolvers/BytesUtils.sol create mode 100644 packages/l1-contracts/contracts/delegatableResolvers/DelegatableResolver.sol create mode 100644 packages/l1-contracts/contracts/delegatableResolvers/DelegatableResolverFactory.sol create mode 100644 packages/l1-contracts/contracts/delegatableResolvers/IDelegatableResolver.sol create mode 100644 packages/l1-contracts/contracts/delegatableResolvers/IMulticallable.sol create mode 100644 packages/l1-contracts/contracts/delegatableResolvers/Multicallable.sol create mode 100644 packages/l1-contracts/contracts/delegatableResolvers/RRUtils.sol create mode 100644 packages/l1-contracts/contracts/delegatableResolvers/ResolverBase.sol create mode 100644 packages/l1-contracts/contracts/delegatableResolvers/profiles/ABIResolver.sol create mode 100644 packages/l1-contracts/contracts/delegatableResolvers/profiles/AddrResolver.sol create mode 100644 packages/l1-contracts/contracts/delegatableResolvers/profiles/ContentHashResolver.sol create mode 100644 packages/l1-contracts/contracts/delegatableResolvers/profiles/DNSResolver.sol create mode 100644 packages/l1-contracts/contracts/delegatableResolvers/profiles/ExtendedResolver.sol create mode 100644 packages/l1-contracts/contracts/delegatableResolvers/profiles/IABIResolver.sol create mode 100644 packages/l1-contracts/contracts/delegatableResolvers/profiles/IAddrResolver.sol create mode 100644 packages/l1-contracts/contracts/delegatableResolvers/profiles/IAddressResolver.sol create mode 100644 packages/l1-contracts/contracts/delegatableResolvers/profiles/IContentHashResolver.sol create mode 100644 packages/l1-contracts/contracts/delegatableResolvers/profiles/IDNSRecordResolver.sol create mode 100644 packages/l1-contracts/contracts/delegatableResolvers/profiles/IDNSZoneResolver.sol create mode 100644 packages/l1-contracts/contracts/delegatableResolvers/profiles/IExtendedDNSResolver.sol create mode 100644 packages/l1-contracts/contracts/delegatableResolvers/profiles/IExtendedResolver.sol create mode 100644 packages/l1-contracts/contracts/delegatableResolvers/profiles/IInterfaceResolver.sol create mode 100644 packages/l1-contracts/contracts/delegatableResolvers/profiles/INameResolver.sol create mode 100644 packages/l1-contracts/contracts/delegatableResolvers/profiles/IPubkeyResolver.sol create mode 100644 packages/l1-contracts/contracts/delegatableResolvers/profiles/ITextResolver.sol create mode 100644 packages/l1-contracts/contracts/delegatableResolvers/profiles/IVersionableResolver.sol create mode 100644 packages/l1-contracts/contracts/delegatableResolvers/profiles/InterfaceResolver.sol create mode 100644 packages/l1-contracts/contracts/delegatableResolvers/profiles/NameResolver.sol create mode 100644 packages/l1-contracts/contracts/delegatableResolvers/profiles/PubkeyResolver.sol create mode 100644 packages/l1-contracts/contracts/delegatableResolvers/profiles/TextResolver.sol create mode 100644 packages/l1-contracts/contracts/deps.sol create mode 100644 packages/l1-contracts/test/testL1Resolver.spec.ts create mode 100644 packages/l1-contracts/tsconfig.json diff --git a/packages/contracts/.env.example b/packages/contracts/.env.example deleted file mode 100644 index 3377314dd..000000000 --- a/packages/contracts/.env.example +++ /dev/null @@ -1,18 +0,0 @@ -# L1 -L1_PROVIDER_URL=https://goerli.infura.io/v3/ -L1_ENS_DOMAIN=lineatest.eth -GATEWAY_URL=http://localhost:8080/{sender}/{data}.json - -# # L2 -L2_PROVIDER_URL=https://linea-goerli.infura.io/v3/ -L2_ENS_SUBDOMAIN_TEST=test.lineatest.eth -L2_RESOLVER_NFT_NAME=Lineatest -L2_RESOLVER_NFT_SYMBOL=LTST -L2_RESOLVER_NFT_BASE_URI=http://localhost:3000/metadata/ -L2_RESOLVER_ADDRESS= - -# Keys -PRIVATE_KEY= -ETHERSCAN_API_KEY= -LINEASCAN_API_KEY= - diff --git a/packages/contracts/.eslintignore b/packages/contracts/.eslintignore deleted file mode 100644 index 4e1bfd2d8..000000000 --- a/packages/contracts/.eslintignore +++ /dev/null @@ -1,23 +0,0 @@ -# directories -**/.coverage_artifacts -**/.coverage_cache -**/.coverage_contracts -**/artifacts -**/build -**/cache -**/coverage -**/dist -**/node_modules -**/types - -# files -*.env -*.log -.pnp.* -coverage.json -npm-debug.log* -yarn-debug.log* -yarn-error.log* -gasReporterOutput.json -package.json -.eslintrc.js \ No newline at end of file diff --git a/packages/contracts/.eslintrc.js b/packages/contracts/.eslintrc.js deleted file mode 100644 index 99c934070..000000000 --- a/packages/contracts/.eslintrc.js +++ /dev/null @@ -1,38 +0,0 @@ -module.exports = { - root: true, - extends: "eslint:recommended", - env: { - node: true, - jest: true, - }, - // One configuration for TS files and their rules, a second configuration to json files (package.json) to enforce - // usage of explicit package dependency - overrides: [ - { - files: ["*.ts", "*.js"], - extends: ["plugin:@typescript-eslint/recommended", "plugin:prettier/recommended"], - parserOptions: { - project: "tsconfig.json", - tsconfigRootDir: __dirname, - sourceType: "module", - }, - rules: { - "@typescript-eslint/no-inferrable-types": "off", - }, - }, - // - { - files: ["package.json"], - plugins: ["json-files"], - extends: [ - // Enables eslint-plugin-prettier and eslint-config-prettier. - // This will display Prettier errors as ESLint errors. - // This should always be the last configuration in the extends array. - "plugin:prettier/recommended", - ], - rules: { - "json-files/restrict-ranges": ["error", { versionHint: "pin" }], - }, - }, - ], -}; diff --git a/packages/contracts/.gitignore b/packages/contracts/.gitignore deleted file mode 100644 index 061a94fb5..000000000 --- a/packages/contracts/.gitignore +++ /dev/null @@ -1,26 +0,0 @@ -node_modules -.env -coverage -coverage.json -typechain -typechain-types - -# Hardhat files -cache -artifacts - - -node_modules -.env -coverage -coverage.json -typechain -typechain-types - -# Hardhat files -cache -artifacts - - -# OpenZeppelin -.openzeppelin \ No newline at end of file diff --git a/packages/contracts/.prettierignore b/packages/contracts/.prettierignore deleted file mode 100644 index f97c67360..000000000 --- a/packages/contracts/.prettierignore +++ /dev/null @@ -1,22 +0,0 @@ -# directories -**/.coverage_artifacts -**/.coverage_cache -**/.coverage_contracts -**/artifacts -**/build -**/cache -**/coverage -**/dist -**/node_modules -**/types -**/typechain-types - -# files -*.env -*.log -.pnp.* -coverage.json -npm-debug.log* -yarn-debug.log* -yarn-error.log* -gasReporterOutput.json \ No newline at end of file diff --git a/packages/contracts/.prettierrc.yaml b/packages/contracts/.prettierrc.yaml deleted file mode 100644 index e620912da..000000000 --- a/packages/contracts/.prettierrc.yaml +++ /dev/null @@ -1,16 +0,0 @@ -bracketSpacing: true -endOfLine: auto -importOrder: ["", "^[./]"] -importOrderParserPlugins: ["typescript"] -importOrderSeparation: true -importOrderSortSpecifiers: true -printWidth: 160 -singleQuote: false -tabWidth: 2 -trailingComma: all - -overrides: - - files: "*.sol" - options: - tabWidth: 2 - printWidth: 80 diff --git a/packages/contracts/.solcover.js b/packages/contracts/.solcover.js deleted file mode 100644 index a4e31a1fd..000000000 --- a/packages/contracts/.solcover.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - skipFiles: [], -}; diff --git a/packages/contracts/.solhint.json b/packages/contracts/.solhint.json deleted file mode 100644 index 14055916f..000000000 --- a/packages/contracts/.solhint.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "extends": "solhint:recommended", - "plugins": ["prettier"], - "rules": { - "constructor-syntax": "error", - "func-visibility": ["error", { "ignoreConstructors": true }], - "no-empty-blocks": "off", - "not-rely-on-time": "off", - "prettier/prettier": [ - "error", - { - "endOfLine": "auto" - } - ], - "quotes": ["off", "double"], - "reason-string": ["warn", { "maxLength": 64 }], - "compiler-version": ["off", "0.8.19"] - } -} diff --git a/packages/contracts/README.md b/packages/contracts/README.md deleted file mode 100644 index 468e2b7d4..000000000 --- a/packages/contracts/README.md +++ /dev/null @@ -1,97 +0,0 @@ -# Linea ENS Resolver - -## Documentation - -Linea ENS Resolver allows to resolve ENS domains on Linea. - -Deployment documentation available in [README.md](./../../README.md) - -## Install - -### Packages - -To install packages, execute: - -```shell -yarn -``` - -## Development - -### Compile - -To compile smart contracts, execute: - -```shell -yarn hardhat compile -``` - -### Testing - -To run tests, execute: - -```shell -yarn test -``` - -or - -```shell -npx hardhat test -``` - -To run tests on only one file, execute: - -```shell -npx hardhat test test/L1USDCBridge.ts -``` - -### Test coverage - -This project uses the Hardhat plugin [solidity-coverage](https://github.com/sc-forks/solidity-coverage/blob/master/HARDHAT_README.md) to assess the overall coverage of the unit tests. -To generate a boilerplate report, use the following command: - -```shell -yarn coverage -``` - -or - -```shell -npx hardhat coverage --solcoverjs ./.solcover.js -``` - -The report will be generated in the `coverage` folder at the root of the repository. To visualize it in your web browser, you can use the `coverage/index.html` file. -Note: the second command line might not work if the folder `coverage` already exists. If you encounter an issue, please delete the whole `coverage` folder and let hardhat-coverage regenerate a new one. - -### Contract verification on Etherscan - -```shell - npx hardhat verify --network NETWORK DEPLOYED_CONTRACT_ADDRESS "Constructor argument 1" "Constructor argument 2" -``` - -### Lint Solidity - -```bash -yarn lint:sol -``` - -### Lint TypeScript - -```bash -yarn lint:ts -``` - -### Prettier - -Check format code: - -```bash -yarn prettier:check -``` - -Format code: - -```bash -yarn prettier -``` diff --git a/packages/contracts/abi/ENSRegistry.json b/packages/contracts/abi/ENSRegistry.json deleted file mode 100644 index f380ca8c2..000000000 --- a/packages/contracts/abi/ENSRegistry.json +++ /dev/null @@ -1,202 +0,0 @@ -[ - { - "inputs": [{ "internalType": "contract ENS", "name": "_old", "type": "address" }], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "operator", "type": "address" }, - { "indexed": false, "internalType": "bool", "name": "approved", "type": "bool" } - ], - "name": "ApprovalForAll", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "bytes32", "name": "node", "type": "bytes32" }, - { "indexed": true, "internalType": "bytes32", "name": "label", "type": "bytes32" }, - { "indexed": false, "internalType": "address", "name": "owner", "type": "address" } - ], - "name": "NewOwner", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "bytes32", "name": "node", "type": "bytes32" }, - { "indexed": false, "internalType": "address", "name": "resolver", "type": "address" } - ], - "name": "NewResolver", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "bytes32", "name": "node", "type": "bytes32" }, - { "indexed": false, "internalType": "uint64", "name": "ttl", "type": "uint64" } - ], - "name": "NewTTL", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "bytes32", "name": "node", "type": "bytes32" }, - { "indexed": false, "internalType": "address", "name": "owner", "type": "address" } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": true, - "inputs": [ - { "internalType": "address", "name": "owner", "type": "address" }, - { "internalType": "address", "name": "operator", "type": "address" } - ], - "name": "isApprovedForAll", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "old", - "outputs": [{ "internalType": "contract ENS", "name": "", "type": "address" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [{ "internalType": "bytes32", "name": "node", "type": "bytes32" }], - "name": "owner", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [{ "internalType": "bytes32", "name": "node", "type": "bytes32" }], - "name": "recordExists", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [{ "internalType": "bytes32", "name": "node", "type": "bytes32" }], - "name": "resolver", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "internalType": "address", "name": "operator", "type": "address" }, - { "internalType": "bool", "name": "approved", "type": "bool" } - ], - "name": "setApprovalForAll", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "internalType": "bytes32", "name": "node", "type": "bytes32" }, - { "internalType": "address", "name": "owner", "type": "address" } - ], - "name": "setOwner", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "internalType": "bytes32", "name": "node", "type": "bytes32" }, - { "internalType": "address", "name": "owner", "type": "address" }, - { "internalType": "address", "name": "resolver", "type": "address" }, - { "internalType": "uint64", "name": "ttl", "type": "uint64" } - ], - "name": "setRecord", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "internalType": "bytes32", "name": "node", "type": "bytes32" }, - { "internalType": "address", "name": "resolver", "type": "address" } - ], - "name": "setResolver", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "internalType": "bytes32", "name": "node", "type": "bytes32" }, - { "internalType": "bytes32", "name": "label", "type": "bytes32" }, - { "internalType": "address", "name": "owner", "type": "address" } - ], - "name": "setSubnodeOwner", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "internalType": "bytes32", "name": "node", "type": "bytes32" }, - { "internalType": "bytes32", "name": "label", "type": "bytes32" }, - { "internalType": "address", "name": "owner", "type": "address" }, - { "internalType": "address", "name": "resolver", "type": "address" }, - { "internalType": "uint64", "name": "ttl", "type": "uint64" } - ], - "name": "setSubnodeRecord", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "internalType": "bytes32", "name": "node", "type": "bytes32" }, - { "internalType": "uint64", "name": "ttl", "type": "uint64" } - ], - "name": "setTTL", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [{ "internalType": "bytes32", "name": "node", "type": "bytes32" }], - "name": "ttl", - "outputs": [{ "internalType": "uint64", "name": "", "type": "uint64" }], - "payable": false, - "stateMutability": "view", - "type": "function" - } -] diff --git a/packages/contracts/contracts/l1/LineaResolverStub.sol b/packages/contracts/contracts/l1/LineaResolverStub.sol deleted file mode 100644 index 1c0e47b08..000000000 --- a/packages/contracts/contracts/l1/LineaResolverStub.sol +++ /dev/null @@ -1,226 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.19; - -import { SparseMerkleProof } from "./lib/SparseMerkleProof.sol"; - -import "hardhat/console.sol"; - -uint256 constant LAST_LEAF_INDEX = 41; - -struct L2StateProof { - bytes[] accountProof; - bytes[] tokenIdProof; - bytes[] addressProof; - uint256 accountLeafIndex; - uint256 tokenIdLeafIndex; - uint256 addressLeafIndex; - bytes accountValue; - bytes32 tokenIdValue; - bytes32 addressValue; - uint256 l2blockNumber; -} - -interface IResolverService { - function resolve( - bytes calldata name, - bytes calldata data - ) external view returns (L2StateProof memory proof); -} - -interface IExtendedResolver { - function resolve( - bytes memory name, - bytes memory data - ) external view returns (bytes memory); -} - -interface ISupportsInterface { - function supportsInterface(bytes4 interfaceID) external pure returns (bool); -} - -interface IRollup { - function stateRootHashes( - uint256 l2blockNumber - ) external view returns (bytes32); -} - -abstract contract SupportsInterface is ISupportsInterface { - function supportsInterface( - bytes4 interfaceID - ) public pure virtual override returns (bool) { - return interfaceID == type(ISupportsInterface).interfaceId; - } -} - -contract LineaResolverStub is IExtendedResolver, SupportsInterface { - string[] public gateways; - address public l2resolver; - address public rollup; - - error OffchainLookup( - address sender, - string[] urls, - bytes callData, - bytes4 callbackFunction, - bytes extraData - ); - - /** - * @dev The Linea Resolver on L1 will use the gateway passed as parameter to resolve - * the node, it needs to the resolver address on L2 to verify the returned result - * as well as the linea rollup address - * @param _gateways the urls to call to get the address from the resolver on L2 - * @param _l2resolver the address of the resolver on L2 - * @param _rollup the address of the linea rollup contract - */ - constructor(string[] memory _gateways, address _l2resolver, address _rollup) { - gateways = _gateways; - l2resolver = _l2resolver; - rollup = _rollup; - } - - /** - * Resolves a name, as specified by ENSIP 10. - * @param name The DNS-encoded name to resolve. - * @param data The ABI encoded data for the underlying resolution function (Eg, addr(bytes32), text(bytes32,string), etc). - * @return The return data, ABI encoded identically to the underlying function. - */ - function resolve( - bytes calldata name, - bytes calldata data - ) external view override returns (bytes memory) { - bytes memory callData = abi.encodeWithSelector( - IResolverService.resolve.selector, - name, - data - ); - - revert OffchainLookup( - address(this), - gateways, - callData, - LineaResolverStub.resolveWithProof.selector, - data - ); - } - - /** - * Callback used by CCIP read compatible clients to verify and parse the response. - */ - function resolveWithProof( - bytes calldata response, - bytes calldata extraData - ) external view returns (bytes memory) { - // We only resolve if the addr(bytes32) is called otherwise we simply return an empty response - bytes4 signature = bytes4(extraData[0:4]); - - if (signature != bytes4(0x3b3b57de)) { - return ""; - } - - // This is the hash name of the domain name - bytes32 node = abi.decode(extraData[4:], (bytes32)); - - L2StateProof memory proof = abi.decode(response, (L2StateProof)); - - bytes32 stateRoot = IRollup(rollup).stateRootHashes(proof.l2blockNumber); - // step 1: check that the right state root was used to calculate the proof - require( - stateRoot != bytes32(0), - "LineaResolverStub: invalid state root" - ); - - // step 2: verify the account proof - // the index slot 251 is for 'mapping(bytes32 => uint256) public addresses' in the L2 resolver - // the index slot 103 is for 'mapping(uint256 => address) private _owners' in the L2 resolver - - bool accountProofVerified = SparseMerkleProof.verifyProof( - proof.accountProof, - proof.accountLeafIndex, - stateRoot - ); - - require(accountProofVerified, "LineaResolverStub: invalid account proof"); - - // Verify the account value - bytes32 hAccountValue = SparseMerkleProof.hashAccountValue( - proof.accountValue - ); - - SparseMerkleProof.Leaf memory accountLeaf = SparseMerkleProof.getLeaf( - proof.accountProof[41] - ); - - require( - accountLeaf.hValue == hAccountValue, - "LineaResolverStub: account value invalid" - ); - - // Get the account to verify the storage values - SparseMerkleProof.Account memory account = SparseMerkleProof.getAccount( - proof.accountValue - ); - - // Calculate the tokenId storage slot to use as key - bytes32 tokenIdSlot = keccak256(abi.encode(node,251)); - - // Verify the tokenId key and value - verifyKeyValue( - account, - proof.tokenIdLeafIndex, - proof.tokenIdProof, - proof.tokenIdValue, - tokenIdSlot - ); - - // Calculate the owner storage slot to use as key - bytes32 ownerSlot = keccak256(abi.encode(proof.tokenIdValue,103)); - - // Verify the address key and value - verifyKeyValue( - account, - proof.addressLeafIndex, - proof.addressProof, - proof.addressValue, - ownerSlot - ); - - return abi.encode(proof.addressValue); - } - - function verifyKeyValue( - SparseMerkleProof.Account memory account, - uint256 leafIndex, - bytes[] memory proof, - bytes32 value, - bytes32 key - ) private pure { - bool storageProofVerified = SparseMerkleProof.verifyProof( - proof, - leafIndex, - account.storageRoot - ); - - require(storageProofVerified, "LineaResolverStub: invalid storage proof"); - - SparseMerkleProof.Leaf memory storageLeaf = SparseMerkleProof.getLeaf( - proof[LAST_LEAF_INDEX] - ); - - // Verify the key - bytes32 hKey = SparseMerkleProof.hashStorageValue(key); - require(storageLeaf.hKey == hKey, "LineaResolverStub: key invalid"); - - // Verify the storage value - bytes32 hValue = SparseMerkleProof.hashStorageValue(value); - require(storageLeaf.hValue == hValue, "LineaResolverStub: value invalid"); - } - - function supportsInterface( - bytes4 interfaceID - ) public pure override returns (bool) { - return - interfaceID == type(IExtendedResolver).interfaceId || - super.supportsInterface(interfaceID); - } -} diff --git a/packages/contracts/contracts/l1/lib/Mimc.sol b/packages/contracts/contracts/l1/lib/Mimc.sol deleted file mode 100644 index 0cd651efc..000000000 --- a/packages/contracts/contracts/l1/lib/Mimc.sol +++ /dev/null @@ -1,679 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 - -// Copyright 2023 Consensys Software Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by gnark DO NOT EDIT -pragma solidity 0.8.19; - -library Mimc { - uint256 constant FR_FIELD = - 8444461749428370424248824938781546531375899335154063827935233455917409239041; - - function hash(bytes calldata _msg) external pure returns (bytes32 mimcHash) { - assembly { - let chunks := div(add(_msg.length, 0x1f), 0x20) - - for { - let i := 0 - } lt(i, sub(chunks, 1)) { - i := add(i, 1) - } { - let offset := add(_msg.offset, mul(i, 0x20)) - let chunk := calldataload(offset) - - let r := encrypt(mimcHash, chunk) - mimcHash := addmod(addmod(mimcHash, r, FR_FIELD), chunk, FR_FIELD) - } - - let offset := add(_msg.offset, mul(sub(chunks, 1), 0x20)) - let lastChunk := calldataload(offset) - - if iszero(eq(mod(_msg.length, 0x20), 0)) { - let remaining := mod(_msg.length, 0x20) - lastChunk := shr(mul(sub(0x20, remaining), 0x8), lastChunk) - } - - let r := encrypt(mimcHash, lastChunk) - mimcHash := addmod(addmod(mimcHash, r, FR_FIELD), lastChunk, FR_FIELD) - - function encrypt(h, chunk) -> output { - let frField := FR_FIELD - let tmpSum := 0 - - tmpSum := addmod( - addmod(chunk, h, frField), - 6780559962679281898511952483033644312910028090361101779689089025541625982996, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 2327326745520207001136649348523057964841679868424949608370212081331899020358, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 6201177823658417253260885485467023993767823924255470286063250782233002635405, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 3401276671970505639801802718275229999176446092725813928949571059366811327963, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 796636033841689627732941016044857384234234277501564259311815186813195010627, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 159507412325830262114089631199386481336725966652415909300570415682233424809, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 1669348614406363339435491723584591316524711695667693315027811919444714635748, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 2220664510675218580883672035712942523468288190837741520497926350441362544422, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 1294712289478715410717626660893541311126892630747701030449280341780183665665, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 6758843230175145783288330173723849603007070607311612566540600202723911987180, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 6271650829101108787041306415787253036818921034903891854433479166754956001513, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 8037654458661109859150348337922011363549131313762043865209663327750426111866, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 2450972517788523786981910980516860147992539249204314270739451472218657823669, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 2707650969937705465351357815756127556801434183777713569980595073268026256128, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 7874262417209200618473337039194351886630571503697269268624099887104149796259, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 3089899920017810079637556867207463807565125948241456751227734590626249857937, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 8231877132811199596376758288825197494440517476607659739835166243301765860904, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 4889925300033981791993403687473437637164964770774352761851347729331041993593, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 506118690894045980182310960875885680782486421163823930266542078948815948062, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 4773308728424659273056201947330432214661646691949138677097247858746575076542, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 6610301125072219342086627276930551094394509958433369744427479834611436778066, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 8062913614098409973923064402439991628739389434149534836396892159147794104642, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 2576406140423312875091927795739341819101209176346955562285186911769083519728, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 6247267546819369987508590432055536928557259658317014243676640822343115627202, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 2354620213005699835215298236574714075068230025566107498090395819138978823906, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 1012123997779098542887516673253442986051441272786218052382513879552027657616, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 220252773286234814215172180118321537145064642853938490221604200051823270477, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 2306037967476458159399202685728266972768173510335885477997450635969358782263, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 5906000615460106310157278190403974694555979202144571560620360962365001056276, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 8029952345415718287377564183334920026617762793749604843629313086537726648143, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 6806091261750378774545720021859645013630360296898036304733359077422908323188, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 3791365032107216523624488143755156784159183778414385385850652127088602339940, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 7713951866326004273632564650741019619975760271948208739458822610304231437565, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 2159153222189174173490067225063044363535871059524538695070191871847470955412, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 3459892854150586819083449948613048924207735017129514254460829121652786324530, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 8165919441562399076732808928206069494664474480220235797297111305840352207764, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 5067127638759272574597184239140007718698192996511162583428330546781376830321, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 7564926180046670501077982861476967417487855218354401587881011340975488196742, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 4793316512087044382791577380686883286681140325373390439122763061600650301139, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 12025027725022723723984202199185080936456585195449250668991990971241927925, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 5056480146405086811789505170440731715530475328844870175949109998024731067467, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 3850822128034659558863504800917443538100103152464488164345952697508772708155, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 5490569542353168488797150359760203713598401616662275350850844170956899716180, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 6809916892509991991280249336166027496157481609693382555884367500846199028644, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 6102228360565846712478499570512196976845845959851353003471378423251561935785, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 7957411254301481793006532646538815862020547208300835763521138686017052464640, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 7577948604138385646013244290592520699579040577712519004775644201729392063846, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 6025758357861563690691793181574484773095829890586160167641973490103511417496, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 2004214547184552249779883547311284063339374005887218065319674453115808726850, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 1316449090346410801845183915381769525990226349513436734911941391785200212382, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 4556285572033080226119128815763547597118327635770271287655822355222839175285, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 2369904002063218534853867482545647755243877244064168179905450676831047307618, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 7451702566176584025980909730992154118931318734166468698682947787653334803016, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 1329300832483899103910420486510886619321904846687482243968569167489052205690, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 3238521361072472828313630322811653086792441312858682853521070248794222258735, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 3475214489590830586915334473771293324307275731565327099797069845161869229357, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 4274287601159036159363576568654710230919275259553081321690187920135177947814, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 6938336600682072955973769075275160235517201022692151378695173193891386346405, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 3998198747256139339077883878547228988120873864712400941893285440315291004215, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 6699213631756936754252081929574788294275116402464654263316543921533804167968, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 6962236729635042756258761323749531146700535903704299930132981735734543600942, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - tmpSum := addmod( - addmod(output, h, frField), - 6961288456480688271133399693659146309378114560595485436408179085016705585674, - frField - ) - output := mulmod(tmpSum, tmpSum, frField) - output := mulmod(output, output, frField) - output := mulmod(output, output, frField) - output := mulmod(mulmod(output, output, frField), tmpSum, frField) - - output := addmod(output, h, frField) - } - } - } -} diff --git a/packages/contracts/contracts/l1/lib/SparseMerkleProof.sol b/packages/contracts/contracts/l1/lib/SparseMerkleProof.sol deleted file mode 100644 index 5dc80c118..000000000 --- a/packages/contracts/contracts/l1/lib/SparseMerkleProof.sol +++ /dev/null @@ -1,215 +0,0 @@ -// SPDX-License-Identifier: AGPL-3.0 -pragma solidity 0.8.19; - -import { Mimc } from "./Mimc.sol"; - -library SparseMerkleProof { - using Mimc for *; - - struct Account { - uint64 nonce; - uint256 balance; - bytes32 storageRoot; - bytes32 mimcCodeHash; - bytes32 keccakCodeHash; - uint64 codeSize; - } - - struct Leaf { - uint256 prev; - uint256 next; - bytes32 hKey; - bytes32 hValue; - } - - error WrongBytesLength(uint256 expectedLength, uint256 bytesLength); - - uint256 internal constant TREE_DEPTH = 40; - - /** - * @notice Format input and verify sparse merkle proof - * @param _rawProof Raw sparse merkle tree proof - * @param _leafIndex Index of the leaf - * @param _root Sparse merkle root - */ - function verifyProof( - bytes[] calldata _rawProof, - uint256 _leafIndex, - bytes32 _root - ) external pure returns (bool) { - ( - bytes32 nextFreeNode, - bytes32 leafHash, - bytes32[] memory proof - ) = _formatProof(_rawProof); - return _verify(proof, leafHash, _leafIndex, _root, nextFreeNode); - } - - /** - * @notice Hash a value using MIMC hash - * @param _input Value to hash - * @return {bytes32} Mimc hash - */ - function mimcHash(bytes calldata _input) external pure returns (bytes32) { - return Mimc.hash(_input); - } - - /** - * @notice Get leaf - * @param _encodedLeaf Encoded leaf bytes (prev, next, hKey, hValue) - * @return Leaf Formatted leaf struct - */ - function getLeaf( - bytes calldata _encodedLeaf - ) external pure returns (Leaf memory) { - return _parseLeaf(_encodedLeaf); - } - - /** - * @notice Get account - * @param _encodedAccountValue Encoded account value bytes (nonce, balance, storageRoot, mimcCodeHash, keccakCodeHash, codeSize) - * @return Account Formatted account struct - */ - function getAccount( - bytes calldata _encodedAccountValue - ) external pure returns (Account memory) { - return _parseAccount(_encodedAccountValue); - } - - /** - * @notice Hash account value - * @param _value Encoded account value bytes (nonce, balance, storageRoot, mimcCodeHash, keccakCodeHash, codeSize) - * @return {bytes32} Account value hash - */ - function hashAccountValue( - bytes calldata _value - ) external pure returns (bytes32) { - Account memory account = _parseAccount(_value); - (bytes32 msb, bytes32 lsb) = _splitBytes32(account.keccakCodeHash); - return - Mimc.hash( - abi.encode( - account.nonce, - account.balance, - account.storageRoot, - account.mimcCodeHash, - lsb, - msb, - account.codeSize - ) - ); - } - - /** - * @notice Hash storage value - * @param _value Encoded storage value bytes - * @return {bytes32} Storage value hash - */ - function hashStorageValue(bytes32 _value) external pure returns (bytes32) { - (bytes32 msb, bytes32 lsb) = _splitBytes32(_value); - return Mimc.hash(abi.encodePacked(lsb, msb)); - } - - /** - * @notice Parse leaf value - * @param _encodedLeaf Encoded leaf bytes (prev, next, hKey, hValue) - * @return {Leaf} Formatted leaf struct - */ - function _parseLeaf( - bytes calldata _encodedLeaf - ) private pure returns (Leaf memory) { - if (_encodedLeaf.length < 128) { - revert WrongBytesLength(128, _encodedLeaf.length); - } - return abi.decode(_encodedLeaf, (Leaf)); - } - - /** - * @notice Parse account value - * @param _value Encoded account value bytes (nonce, balance, storageRoot, mimcCodeHash, keccakCodeHash, codeSize) - * @return {Account} Formatted account struct - */ - function _parseAccount( - bytes calldata _value - ) private pure returns (Account memory) { - if (_value.length < 192) { - revert WrongBytesLength(192, _value.length); - } - return abi.decode(_value, (Account)); - } - - /** - * @notice Split bytes32 into two bytes32 taking most significant bits and least significant bits - * @param _b bytes to split - * @return msb Most significant bits - * @return lsb Least significant bits - */ - function _splitBytes32( - bytes32 _b - ) private pure returns (bytes32 msb, bytes32 lsb) { - assembly { - msb := shr(128, _b) - lsb := and(_b, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) - } - } - - /** - * @notice Format proof - * @param _rawProof Non formatted proof array - * @return (bytes32, bytes32, bytes32[]) NextFreeNode, leafHash and formatted proof array - */ - function _formatProof( - bytes[] calldata _rawProof - ) private pure returns (bytes32, bytes32, bytes32[] memory) { - uint256 rawProofLength = _rawProof.length; - - bytes32[] memory proof = new bytes32[](rawProofLength - 2); - bytes32 nextFreeNode = bytes32(_rawProof[0][:32]); - bytes32 leafHash = Mimc.hash(_rawProof[rawProofLength - 1]); - - for (uint i = 1; i < rawProofLength - 1; ) { - proof[rawProofLength - 2 - i] = Mimc.hash(_rawProof[i]); - unchecked { - ++i; - } - } - - return (nextFreeNode, leafHash, proof); - } - - /** - * @notice Verify sparse merkle proof - * @param _proof Sparse merkle tree proof - * @param _leafHash Leaf hash - * @param _leafIndex Index of the leaf - * @param _root Sparse merkle root - * @param _nextFreeNode Next free node - */ - function _verify( - bytes32[] memory _proof, - bytes32 _leafHash, - uint256 _leafIndex, - bytes32 _root, - bytes32 _nextFreeNode - ) private pure returns (bool) { - bytes32 computedHash = _leafHash; - uint256 currentIndex = _leafIndex; - - for (uint256 height; height < TREE_DEPTH; ) { - if ((currentIndex >> height) & 1 == 1) - computedHash = Mimc.hash( - abi.encodePacked(_proof[height], computedHash) - ); - else - computedHash = Mimc.hash( - abi.encodePacked(computedHash, _proof[height]) - ); - - unchecked { - ++height; - } - } - - return Mimc.hash(abi.encodePacked(_nextFreeNode, computedHash)) == _root; - } -} diff --git a/packages/contracts/contracts/l2/LineaResolver.sol b/packages/contracts/contracts/l2/LineaResolver.sol deleted file mode 100644 index e7cae505a..000000000 --- a/packages/contracts/contracts/l2/LineaResolver.sol +++ /dev/null @@ -1,195 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.18; - -import { ERC721EnumerableUpgradeable } from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol"; -import { Strings } from "@openzeppelin/contracts/utils/Strings.sol"; -import { Counters } from "@openzeppelin/contracts/utils/Counters.sol"; -import { OwnableUpgradeable } from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; -import { NameEncoder } from "@ensdomains/ens-contracts/contracts/utils/NameEncoder.sol"; - -/** -@title LineaResolver -@dev A Solidity contract that implements an ERC721 token for resolving Ethereum domain names to addresses. -@author ConsenSys -*/ -contract LineaResolver is ERC721EnumerableUpgradeable, OwnableUpgradeable { - // Mapping to store Ethereum domain names (as bytes32) and their corresponding addresses (as uint256) - mapping(bytes32 => uint256) public addresses; - // Mapping to store token IDs (as uint256) and their corresponding domain name (as string) - mapping(uint256 => string) public tokenDomains; - // Counter to keep track of token IDs for minting new tokens - using Counters for Counters.Counter; - Counters.Counter private _tokenIds; - // Private string variable to store the base URI for the token URI generation - string private _baseTokenURI; - - // Fees to send to mint a sub domain, initial set to 0.001 ETH - uint256 public baseFee; - - uint256 private constant BASE_FEE = 1e15; - - /** - * @dev Emitted when the address associated with a specific node is changed. - * @param node The bytes32 value representing the node whose address is being changed. - * @param a The new address that is being associated with the node. - */ - event AddrChanged(bytes32 indexed node, address a); - - /// @dev Disable constructor for safety - /// @custom:oz-upgrades-unsafe-allow constructor - constructor() { - _disableInitializers(); - } - - /** - * @dev Function to initialize the ERC721 contract with the given name, symbol, and base URI. - * @notice This constructor function is used to initialize the ERC721 contract with the given name, symbol, and base URI. - * @param _name The name of the ERC721 token. - * @param _symbol The symbol of the ERC721 token. - * @param baseURI The base URI for the token URI. - */ - function initialize( - string memory _name, - string memory _symbol, - string memory baseURI - ) external initializer { - __ERC721_init(_name, _symbol); - __Ownable_init(); - _baseTokenURI = baseURI; - _tokenIds.increment(); - baseFee = BASE_FEE; - } - - /** - * @dev Mints a new subdomain token for the given name and address. - * @notice This function is used to mint a new subdomain token for the given name and address. - * @param name The name of the subdomain to mint. - * @param _addr The address associated with the subdomain. - */ - function mintSubdomain(string memory name, address _addr) external payable { - require(msg.value >= baseFee, "LineaResolver: insufficient fees"); - - (, bytes32 node) = NameEncoder.dnsEncodeName(name); - - string memory domain = _toLower(name); - uint256 newItemId = _tokenIds.current(); - - require(addresses[node] == 0, "Sub-domain has already been registered"); - require(bytes(domain).length != 0, "Sub-domain cannot be null"); - - addresses[node] = newItemId; - tokenDomains[newItemId] = domain; - - emit AddrChanged(node, _addr); - _mint(_addr, newItemId); // mint the new token with the current _tokenIds - - _tokenIds.increment(); // increment tokenIds - } - - /** - * @dev Resolves an Ethereum domain. - * @notice This function is used to resolve an Ethereum domain. - * @param node The ENS node to resolve. - * @return The address associated with the resolved ENS node, or address(0) if not found. - */ - function resolve(bytes32 node) external view returns (address) { - uint256 _tokenId = addresses[node]; - if (!_exists(_tokenId)) { - return address(0); - } - return ownerOf(_tokenId); - } - - function exists(uint256 _tokenId) external view returns (bool) { - return _exists(_tokenId); - } - - /** - * @dev Sets the base token URI. - * @notice This function is used to set the base URI for token metadata of an ERC721 contract. - * @param baseURI The new base URI for token metadata. - * @return The updated base token URI. - */ - function setBaseTokenURI( - string memory baseURI - ) external onlyOwner returns (string memory) { - require(bytes(baseURI).length != 0, "Base URI cannot be empty"); - _baseTokenURI = baseURI; - return _baseTokenURI; - } - - /** - * @dev Sets the base fee to mint a sub domain - * @param newBaseFee the new base fee used to send to mint a sub domain - */ - function setBaseFee(uint256 newBaseFee) external onlyOwner { - baseFee = newBaseFee; - } - - /** - * @dev Retrieves the token URI for a specific ERC721 token. - * @notice This function retrieves the token URI associated with the specified ERC721 token ID. - * @param tokenId The ID of the ERC721 token to retrieve the token URI for. - * @return The token URI associated with the specified ERC721 token ID. - */ - function tokenURI( - uint256 tokenId - ) public view override returns (string memory) { - _requireMinted(tokenId); - - string memory _tokenURI = Strings.toString(tokenId); - string memory base = _baseTokenURI; - - // If there is no base URI, return the token URI. - if (bytes(base).length == 0) { - return _tokenURI; - } - // Concatenate the baseURI and tokenURI (via abi.encodePacked). - return string(abi.encodePacked(base, _tokenURI)); - } - - /** - * @dev Retrieves the name associated with a specific ERC721 token. - * @notice This function retrieves the name associated with the specified ERC721 token ID. - * @param tokenId The ID of the ERC721 token to retrieve the name for. - * @return The name associated with the specified ERC721 token ID. - */ - function tokenName(uint256 tokenId) public view returns (string memory) { - return tokenDomains[tokenId]; - } - - /** - * @dev Burns a specific ERC721 token. - * @notice This function is used to burn a specific ERC721 token by its token ID. - * @param tokenId The ID of the ERC721 token to be burned. - */ - function burn(uint256 tokenId) external { - require( - _isApprovedOrOwner(_msgSender(), tokenId), - "Caller is not owner or approved" - ); - _burn(tokenId); - delete tokenDomains[tokenId]; - } - - /** - * @dev Converts a string to lowercase. - * @notice This function takes an input string and converts it to lowercase. - * @param str The input string to be converted to lowercase. - * @return The lowercase version of the input string. - */ - function _toLower(string memory str) internal pure returns (string memory) { - bytes memory bStr = bytes(str); - bytes memory bLower = new bytes(bStr.length); - for (uint i = 0; i < bStr.length; i++) { - // Uppercase character... - if ((uint8(bStr[i]) >= 65) && (uint8(bStr[i]) <= 90)) { - // So we add 32 to make it lowercase - bLower[i] = bytes1(uint8(bStr[i]) + 32); - } else { - bLower[i] = bStr[i]; - } - } - return string(bLower); - } -} diff --git a/packages/contracts/contracts/mocks/FakeRollup.sol b/packages/contracts/contracts/mocks/FakeRollup.sol deleted file mode 100644 index 05063c3c7..000000000 --- a/packages/contracts/contracts/mocks/FakeRollup.sol +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.18; - -/** -@title FakeRollup -@dev A mock version of the Linea Rollup contract for the unit tests -@author ConsenSys -*/ -contract FakeRollup { - // root hash of the current rollup state - bytes32 public stateRootHash = - 0x06263c3a0a8795755e30ec09dea189b3bb8e6e93c0037c9cce5c14ac24b992ec; -} diff --git a/packages/contracts/hardhat.config.ts b/packages/contracts/hardhat.config.ts deleted file mode 100644 index b7c05bcb5..000000000 --- a/packages/contracts/hardhat.config.ts +++ /dev/null @@ -1,67 +0,0 @@ -import * as dotenv from "dotenv"; - -import { HardhatUserConfig } from "hardhat/config"; -import "@nomicfoundation/hardhat-toolbox"; -import "solidity-coverage"; -import "@openzeppelin/hardhat-upgrades"; -import "hardhat-storage-layout"; - -const hardhatPrivateKey = "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"; - -dotenv.config(); - -const config: HardhatUserConfig = { - solidity: { - compilers: [ - { - version: "0.8.19", - settings: { - optimizer: { - enabled: true, - runs: 200, - }, - }, - }, - { - version: "0.8.18", - settings: { - optimizer: { - enabled: true, - runs: 200, - }, - }, - }, - ], - }, - networks: { - goerli: { - url: process.env.L1_PROVIDER_URL, - accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [], - }, - goerliLinea: { - url: process.env.L2_PROVIDER_URL, - accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [], - }, - localhost: { - accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY, hardhatPrivateKey] : [], - }, - }, - etherscan: { - apiKey: { - goerli: process.env.ETHERSCAN_API_KEY ?? "", - goerliLinea: process.env.LINEASCAN_API_KEY ?? "", - }, - customChains: [ - { - network: "goerliLinea", - chainId: 59140, - urls: { - apiURL: "https://api-goerli.lineascan.build/api", - browserURL: "https://goerli.lineascan.build/", - }, - }, - ], - }, -}; - -export default config; diff --git a/packages/contracts/package.json b/packages/contracts/package.json deleted file mode 100644 index d98a27873..000000000 --- a/packages/contracts/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "linea-resolver", - "version": "0.0.1", - "description": "Linea Resolver for ENS", - "main": "index.js", - "author": "Consensys", - "license": "MIT", - "scripts": { - "test": "npx hardhat test", - "coverage": "npx hardhat coverage --solcoverjs ./.solcover.js", - "lint": "yarn lint:sol && yarn lint:ts && yarn prettier:check", - "lint:sol": "solhint --config ./.solhint.json --max-warnings 0 \"contracts/**/*.sol\"", - "lint:ts": "eslint ./ ", - "prettier": "prettier --config ./.prettierrc.yaml --write \"**/*.{js,json,md,sol,ts,yaml,yml}\"", - "prettier:check": "prettier --check --config ./.prettierrc.yaml \"**/*.{js,json,md,sol,ts,yaml,yml}\"", - "compile": "hardhat compile" - }, - "devDependencies": { - "@ethersproject/abi": "^5.4.7", - "@ethersproject/providers": "^5.4.7", - "@nomicfoundation/hardhat-chai-matchers": "^1.0.0", - "@nomicfoundation/hardhat-network-helpers": "^1.0.8", - "@nomicfoundation/hardhat-toolbox": "^2.0.0", - "@nomiclabs/hardhat-ethers": "^2.0.0", - "@nomiclabs/hardhat-etherscan": "^3.0.0", - "@typechain/ethers-v5": "^10.1.0", - "@typechain/hardhat": "^6.1.2", - "@types/chai": "^4.2.0", - "@types/mocha": ">=9.1.0", - "@types/node": ">=12.0.0", - "@typescript-eslint/eslint-plugin": "^5.57.0", - "@typescript-eslint/parser": "^5.57.0", - "chai": "^4.2.0", - "eslint": "^8.37.0", - "eslint-config-prettier": "^8.8.0", - "eslint-plugin-json-files": "^2.1.0", - "eslint-plugin-prettier": "^4.2.1", - "ethers": "^5.4.7", - "hardhat": "^2.12.7", - "hardhat-gas-reporter": "^1.0.9", - "prettier": "^2.8.4", - "prettier-plugin-solidity": "^1.1.3", - "solhint": "^3.4.1", - "solhint-plugin-prettier": "^0.0.5", - "solidity-coverage": "^0.8.3", - "ts-node": ">=8.0.0", - "typechain": "^8.1.0", - "typescript": ">=4.5.0" - }, - "dependencies": { - "@ensdomains/ens-contracts": "^0.0.22", - "@eth-optimism/contracts": "^0.5.40", - "@openzeppelin/contracts": "^4.9.6", - "@openzeppelin/contracts-upgradeable": "^4.9.6", - "@openzeppelin/hardhat-upgrades": "^1.26.0", - "dotenv": "^16.0.3", - "hardhat-storage-layout": "^0.1.7", - "linea-resolver-gateway": "^1.0.0" - } -} \ No newline at end of file diff --git a/packages/contracts/scripts/constants.ts b/packages/contracts/scripts/constants.ts deleted file mode 100644 index b2d22867d..000000000 --- a/packages/contracts/scripts/constants.ts +++ /dev/null @@ -1,11 +0,0 @@ -export const REGISTRY_ADDRESS = { - goerli: "0x114D4603199df73e7D157787f8778E21fCd13066", - hardhat: "0x114D4603199df73e7D157787f8778E21fCd13066", - localhost: "0x114D4603199df73e7D157787f8778E21fCd13066", -}; - -export const ROLLUP_ADDRESS = { - goerli: "0x70BaD09280FD342D02fe64119779BC1f0791BAC2", - hardhat: "0x70BaD09280FD342D02fe64119779BC1f0791BAC2", - localhost: "0x70BaD09280FD342D02fe64119779BC1f0791BAC2", -}; diff --git a/packages/contracts/scripts/copy.ts b/packages/contracts/scripts/copy.ts deleted file mode 100644 index 2ae74af98..000000000 --- a/packages/contracts/scripts/copy.ts +++ /dev/null @@ -1,13 +0,0 @@ -import * as fs from "fs"; -import * as path from "path"; - -export const copyAbiToGateway = () => { - const fromDir = path.join(__dirname, "../artifacts/contracts/l1/LineaResolverStub.sol"); - const toDir = path.join(__dirname, "../../gateway/abi"); - - const jsonFile = fs.readFileSync(path.join(fromDir, "IResolverService.json"), { - encoding: "utf8", - }); - - fs.writeFileSync(path.join(toDir, "IResolverService.json"), jsonFile); -}; diff --git a/packages/contracts/scripts/deployL1.ts b/packages/contracts/scripts/deployL1.ts deleted file mode 100644 index 059f843ce..000000000 --- a/packages/contracts/scripts/deployL1.ts +++ /dev/null @@ -1,78 +0,0 @@ -import { ethers, network, run } from "hardhat"; -import { REGISTRY_ADDRESS, ROLLUP_ADDRESS } from "./constants"; -import ensRegistryAbi from "../abi/ENSRegistry.json"; -import { copyAbiToGateway } from "./copy"; - -const HARDHAT_NETWORK_CHAIN_ID = 31337; - -let L2_RESOLVER_ADDRESS: string; -async function main() { - const [owner, hardhatAccount] = await ethers.getSigners(); - const chainId = await owner.getChainId(); - - // If on localhost we can send ETH to the owner so that we make sure we have enough for deployment - if (chainId === HARDHAT_NETWORK_CHAIN_ID) { - await hardhatAccount.sendTransaction({ value: ethers.utils.parseEther("100"), to: owner.address }); - } - - if (process.env.L2_RESOLVER_ADDRESS) { - L2_RESOLVER_ADDRESS = process.env.L2_RESOLVER_ADDRESS; - } else { - throw "Set L2_RESOLVER_ADDRESS="; - } - - // Deploy Linea Resolver Stub to L1 - const gatewayUrl = process.env.GATEWAY_URL ? process.env.GATEWAY_URL : "http://localhost:8080/{sender}/{data}.json"; - const rollupAddr = ROLLUP_ADDRESS[network.name as keyof typeof ROLLUP_ADDRESS]; - - const Mimc = await ethers.getContractFactory("Mimc"); - const mimc = await Mimc.deploy(); - - const SparseMerkleProof = await ethers.getContractFactory("SparseMerkleProof", { - libraries: { - Mimc: mimc.address, - }, - }); - const sparseMerkleProof = await SparseMerkleProof.deploy(); - - const LineaResolverStub = await ethers.getContractFactory("LineaResolverStub", { - libraries: { - SparseMerkleProof: sparseMerkleProof.address, - }, - }); - const lineaResolverStub = await LineaResolverStub.deploy([gatewayUrl], L2_RESOLVER_ADDRESS, rollupAddr); - await lineaResolverStub.deployed(); - console.log(`LineaResolverStub deployed to ${lineaResolverStub.address}`); - const registryAddr = REGISTRY_ADDRESS[network.name as keyof typeof REGISTRY_ADDRESS]; - const registry = await new ethers.Contract(registryAddr, ensRegistryAbi, owner); - const name = process.env.L1_ENS_DOMAIN ? process.env.L1_ENS_DOMAIN : "lineatest.eth"; - const node = ethers.utils.namehash(name); - const tx = await registry.setResolver(node, lineaResolverStub.address); - await tx.wait(); - console.log("L1 ENS name:", name, ", set to LineaResolverStub: ", lineaResolverStub.address); - - // Copy the Abi to the gateway folder - copyAbiToGateway(); - - if (chainId !== HARDHAT_NETWORK_CHAIN_ID) { - // Only verify on "live" blockchain - setTimeout(async () => { - console.log("Verify on Etherscan"); - try { - await run("verify:verify", { - address: lineaResolverStub.address, - constructorArguments: [[gatewayUrl], L2_RESOLVER_ADDRESS, rollupAddr], - }); - } catch (error) { - console.error(error.message); - } - }, 20000); - } -} - -// We recommend this pattern to be able to use async/await everywhere -// and properly handle errors. -main().catch((error) => { - console.error(error); - process.exitCode = 1; -}); diff --git a/packages/contracts/scripts/deployL2.ts b/packages/contracts/scripts/deployL2.ts deleted file mode 100644 index 778f2957e..000000000 --- a/packages/contracts/scripts/deployL2.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { ethers, run, upgrades } from "hardhat"; - -async function main() { - const [owner] = await ethers.getSigners(); - const chainId = await owner.getChainId(); - - // Deploy Linea Resolver to L2 - const LineaResolver = await ethers.getContractFactory("LineaResolver"); - const nftName = process.env.L2_RESOLVER_NFT_NAME; - const symbol = process.env.L2_RESOLVER_NFT_SYMBOL; - const baseUri = process.env.L2_RESOLVER_NFT_BASE_URI; - const lineaResolver = await upgrades.deployProxy(LineaResolver, [nftName, symbol, baseUri]); - await lineaResolver.deployed(); - console.log(`LineaResolver deployed to, L2_RESOLVER_ADDRESS: ${lineaResolver.address}`); - // Test with subdomain with default "test.lineatest.eth", assuming we still control lineatest.eth on L1 - const name = process.env.L2_ENS_SUBDOMAIN_TEST; - const tx = await lineaResolver.mintSubdomain(name, owner.address, { value: ethers.utils.parseEther("0.001") }); - await tx.wait(); - console.log(`Subdomain minted: ${process.env.L2_ENS_SUBDOMAIN_TEST}`); - - if (chainId !== 31337) { - // Only verify on "live" blockchain - setTimeout(async () => { - console.log("Verify on Lineascan"); - try { - await run("verify:verify", { - address: lineaResolver.address, - }); - } catch (error) { - console.error(error.message); - } - }, 30000); - } -} - -// We recommend this pattern to be able to use async/await everywhere -// and properly handle errors. -main().catch((error) => { - console.error(error); - process.exitCode = 1; -}); diff --git a/packages/contracts/test/LineaResolver.ts b/packages/contracts/test/LineaResolver.ts deleted file mode 100644 index 090546694..000000000 --- a/packages/contracts/test/LineaResolver.ts +++ /dev/null @@ -1,217 +0,0 @@ -import { loadFixture } from "@nomicfoundation/hardhat-network-helpers"; -import { ethers, upgrades } from "hardhat"; -import { expect } from "chai"; -import { constants } from "ethers"; - -describe("LineaResolver", function () { - async function deployContractsFixture() { - const [owner, unknown] = await ethers.getSigners(); - - const baseFee = 1000000000000000; - const domain = "julink.lineatest.eth"; - const hash = ethers.utils.namehash(domain); - - const undefinedDomain = "undefined.lineatest.eth"; - const undefinedHash = ethers.utils.namehash(undefinedDomain); - - // Deploy Resolver - const LineaResolver = await ethers.getContractFactory("LineaResolver"); - const nftName = "Lineatest"; - const symbol = "LTST"; - const baseUri = "http://localhost:3000/metadata/"; - const lineaResolver = await upgrades.deployProxy(LineaResolver, [nftName, symbol, baseUri]); - await lineaResolver.deployed(); - - // Mint domain - await lineaResolver.mintSubdomain(domain, owner.address, { value: baseFee }); - - return { - owner, - unknown, - domain, - baseUri, - lineaResolver, - hash, - undefinedHash, - baseFee, - }; - } - - describe("mintSubdomain", async () => { - it("Should format the domain to lowercase", async function () { - const { lineaResolver, owner, baseFee } = await loadFixture(deployContractsFixture); - - const domain = "JULINK42.lineatest.eth"; - await lineaResolver.mintSubdomain(domain, owner.address, { value: baseFee }); - const name = await lineaResolver.tokenName(2); - - expect(name).to.be.equal(domain.toLowerCase()); - }); - - it("Should revert if the fees are too low", async function () { - const { lineaResolver, owner, baseFee } = await loadFixture(deployContractsFixture); - - const domain = "JULINK42.lineatest.eth"; - const tooLowFee = baseFee - 1; - - await expect(lineaResolver.mintSubdomain(domain, owner.address, { value: tooLowFee })).to.be.revertedWith("LineaResolver: insufficient fees"); - }); - - it("Should not be able to mint twice the same sub domain", async function () { - const { lineaResolver, owner, baseFee, domain } = await loadFixture(deployContractsFixture); - - await expect(lineaResolver.mintSubdomain(domain, owner.address, { value: baseFee })).to.be.revertedWith("Sub-domain has already been registered"); - }); - - it("Should not be able to mint an empty domain", async function () { - const { lineaResolver, owner, baseFee } = await loadFixture(deployContractsFixture); - - await expect(lineaResolver.mintSubdomain("", owner.address, { value: baseFee })).to.be.revertedWith("Sub-domain cannot be null"); - }); - }); - - describe("resolve", async () => { - it("Should be able to resolve an address given a hashname", async function () { - const { lineaResolver, hash, owner } = await loadFixture(deployContractsFixture); - - expect(await lineaResolver.resolve(hash)).to.be.equal(owner.address); - }); - - it("Resolve should send address(0) if the hash has not been minted", async function () { - const { lineaResolver, undefinedHash } = await loadFixture(deployContractsFixture); - - expect(await lineaResolver.resolve(undefinedHash)).to.be.equal(constants.AddressZero); - }); - }); - - describe("exists", async () => { - it("Should be able to check if an tokenId exists", async function () { - const { lineaResolver } = await loadFixture(deployContractsFixture); - - expect(await lineaResolver.exists(1)).to.be.equal(true); - expect(await lineaResolver.exists(10)).to.be.equal(false); - }); - }); - - describe("setBaseTokenURI", async () => { - it("Should be able to change the base URI for tokens", async function () { - const newBaseUri = "http://localhost:3001/metadata/"; - const tokenId = 1; - const { lineaResolver } = await loadFixture(deployContractsFixture); - - await lineaResolver.setBaseTokenURI(newBaseUri); - const tokenURI = await lineaResolver.tokenURI(tokenId); - - expect(tokenURI).to.be.equal(new URL(tokenId.toString(), newBaseUri).toString()); - }); - - it("Should revert if Base URI is empty", async function () { - const { lineaResolver } = await loadFixture(deployContractsFixture); - - await expect(lineaResolver.setBaseTokenURI("")).to.be.revertedWith("Base URI cannot be empty"); - }); - - it("Should not be able to be called by non-owner", async function () { - const { lineaResolver, unknown } = await loadFixture(deployContractsFixture); - const newBaseUri = "http://localhost:3001/metadata/"; - - await expect(lineaResolver.connect(unknown).setBaseTokenURI(newBaseUri)).to.be.revertedWith("Ownable: caller is not the owner"); - }); - }); - - describe("tokenURI", async () => { - it("Should return token uri", async function () { - const tokenId = 1; - const { lineaResolver, baseUri } = await loadFixture(deployContractsFixture); - - const expectedUri = new URL(tokenId.toString(), baseUri).toString(); - const tokenUri = await lineaResolver.tokenURI(tokenId); - - await expect(tokenUri).to.be.equal(expectedUri); - }); - - it("Should revert if token does not exists", async function () { - const tokenId = 0; - const { lineaResolver } = await loadFixture(deployContractsFixture); - - await expect(lineaResolver.tokenURI(tokenId)).to.be.revertedWith("ERC721: invalid token ID"); - }); - - it("Should return only tokenId when Base URI is empty", async function () { - const { domain, owner, baseFee } = await loadFixture(deployContractsFixture); - - // Deploy Resolver - const LineaResolver = await ethers.getContractFactory("LineaResolver"); - const nftName = "Lineatest"; - const symbol = "LTST"; - const baseUri = ""; - const lineaResolver = await upgrades.deployProxy(LineaResolver, [nftName, symbol, baseUri]); - await lineaResolver.deployed(); - - const tokenId = 1; - // Mint domain - await lineaResolver.mintSubdomain(domain, owner.address, { value: baseFee }); - - const tokenUri = await lineaResolver.tokenURI(tokenId); - - await expect(tokenUri).to.be.equal(tokenId.toString()); - }); - }); - - describe("tokenName", async () => { - it("Should return token name", async function () { - const tokenId = 1; - const { lineaResolver, domain } = await loadFixture(deployContractsFixture); - - const name = await lineaResolver.tokenName(tokenId); - - await expect(name).to.be.equal(domain); - }); - }); - - describe("setBaseFee", async () => { - it("Should change the base fee", async function () { - const newbaseFee = 2000000000000000; - const { lineaResolver, baseFee } = await loadFixture(deployContractsFixture); - - expect(await lineaResolver.baseFee()).to.equal(baseFee); - await lineaResolver.setBaseFee(newbaseFee); - const fee = await lineaResolver.baseFee(); - - await expect(fee).to.be.equal(newbaseFee); - }); - - it("Should revert if caller is not owner", async function () { - const newbaseFee = 2000000000000000; - const { lineaResolver, unknown } = await loadFixture(deployContractsFixture); - - await expect(lineaResolver.connect(unknown).setBaseFee(newbaseFee)).to.be.revertedWith("Ownable: caller is not the owner"); - }); - }); - - describe("burn", async () => { - it("Should burn a token", async function () { - const tokenId = 1; - const { lineaResolver } = await loadFixture(deployContractsFixture); - - await lineaResolver.burn(tokenId); - - await expect(lineaResolver.ownerOf(tokenId)).to.be.revertedWith("ERC721: invalid token ID"); - }); - - it("Should revert if not token owner", async function () { - const tokenId = 1; - const { lineaResolver, unknown } = await loadFixture(deployContractsFixture); - - await expect(lineaResolver.connect(unknown).burn(tokenId)).to.be.revertedWith("Caller is not owner or approved"); - }); - - it("Should not be able to burn a token twice", async function () { - const tokenId = 1; - const { lineaResolver } = await loadFixture(deployContractsFixture); - - await expect(lineaResolver.burn(tokenId)).to.not.be.reverted; - await expect(lineaResolver.burn(tokenId)).to.be.revertedWith("ERC721: invalid token ID"); - }); - }); -}); diff --git a/packages/contracts/test/LineaResolverStub.ts b/packages/contracts/test/LineaResolverStub.ts deleted file mode 100644 index 493f36423..000000000 --- a/packages/contracts/test/LineaResolverStub.ts +++ /dev/null @@ -1,146 +0,0 @@ -import { loadFixture } from "@nomicfoundation/hardhat-network-helpers"; -import { ethers } from "hardhat"; -import { expect } from "chai"; -import { defaultAbiCoder } from "@ethersproject/abi"; -// We use mocked results from the gateway and L2 resolver for the unit tests -import { DOMAIN_NAME, EXPECTED_RESOLVE_WITH_PROOF_RESULT, GATEWAY_URL, L2_RESOLVER_ADDRESS, MOCKED_PROOF, MOCKED_PROOF_UNDEFINED } from "./mocks/proof"; - -describe("LineaResolverStub", function () { - async function deployContractsFixture() { - const [owner] = await ethers.getSigners(); - - const gateways = [GATEWAY_URL]; - const hash = ethers.utils.namehash(DOMAIN_NAME); - - const undefinedDomain = "undefined.lineatest.eth"; - const undefinedHash = ethers.utils.namehash(undefinedDomain); - - // Deploy FakeRollup - const FakeRollup = await ethers.getContractFactory("FakeRollup"); - const fakeRollup = await FakeRollup.deploy(); - await fakeRollup.deployed(); - - // Deploy ResolverStub - const LineaResolverStub = await ethers.getContractFactory("LineaResolverStub"); - const lineaResolverStub = await LineaResolverStub.deploy(gateways, L2_RESOLVER_ADDRESS, fakeRollup.address); - await lineaResolverStub.deployed(); - - return { - owner, - lineaResolverStub, - hash, - undefinedHash, - gateways, - }; - } - - describe("initialization", async () => { - it("The contract should have been deployed correctly", async function () { - const { lineaResolverStub } = await loadFixture(deployContractsFixture); - - expect(await lineaResolverStub.gateways(0)).to.be.equal(GATEWAY_URL); - expect(await lineaResolverStub.l2resolver()).to.be.equal(L2_RESOLVER_ADDRESS); - }); - }); - - describe("resolveWithProof", async () => { - it("Should return the expected address", async function () { - const { lineaResolverStub, hash } = await loadFixture(deployContractsFixture); - // We prefix with the function signature 'addr(bytes32)' as bytes4 - const extraData = `0x3b3b57de${hash.slice(2)}`; - const result = await lineaResolverStub.resolveWithProof( - defaultAbiCoder.encode(["(bytes32,bytes,bytes,bytes32,bytes,bytes)"], [Object.values(MOCKED_PROOF)]), - extraData, - ); - expect(result).to.equal(EXPECTED_RESOLVE_WITH_PROOF_RESULT); - }); - - it("Should revert if hash does not match the proof", async function () { - const { lineaResolverStub, undefinedHash } = await loadFixture(deployContractsFixture); - const extraData = `0x3b3b57de${undefinedHash.slice(2)}`; - await expect( - lineaResolverStub.resolveWithProof(defaultAbiCoder.encode(["(bytes32,bytes,bytes,bytes32,bytes,bytes)"], [Object.values(MOCKED_PROOF)]), extraData), - ).to.be.revertedWith("Invalid large internal hash"); - }); - - it("Should return empty bytes if the function signature is not the one expected", async function () { - const { lineaResolverStub, undefinedHash } = await loadFixture(deployContractsFixture); - const extraData = `0x00000000${undefinedHash.slice(2)}`; - const result = await lineaResolverStub.resolveWithProof( - defaultAbiCoder.encode(["(bytes32,bytes,bytes,bytes32,bytes,bytes)"], [Object.values(MOCKED_PROOF)]), - extraData, - ); - expect(result).to.be.equal("0x"); - }); - - it("Should return empty bytes if the domain does not exists but the proof is correct", async function () { - const { lineaResolverStub, undefinedHash } = await loadFixture(deployContractsFixture); - const extraData = `0x3b3b57de${undefinedHash.slice(2)}`; - const result = await lineaResolverStub.resolveWithProof( - defaultAbiCoder.encode(["(bytes32,bytes,bytes,bytes32,bytes,bytes)"], [Object.values(MOCKED_PROOF_UNDEFINED)]), - extraData, - ); - expect(result).to.be.equal("0x"); - }); - - it("Should revert when blockHash is not valid", async function () { - const { lineaResolverStub, hash } = await loadFixture(deployContractsFixture); - const extraData = `0x3b3b57de${hash.slice(2)}`; - const proofWithInvalidBlockHash = { ...MOCKED_PROOF }; - proofWithInvalidBlockHash.blockHash = "0x94ea534b47baee0ba1b851ea15ffd0435de5389022baf665d5f59dac55c140b1"; - await expect( - lineaResolverStub.resolveWithProof( - defaultAbiCoder.encode(["(bytes32,bytes,bytes,bytes32,bytes,bytes)"], [Object.values(proofWithInvalidBlockHash)]), - extraData, - ), - ).to.revertedWith("LineaResolverStub: blockHash encodedBlockArray mismatch"); - }); - - // it("Should revert if the given state root is invalid", async function () { - // const { lineaResolverStub, hash } = await loadFixture(deployContractsFixture); - // const extraData = `0x3b3b57de${hash.slice(2)}`; - // await expect( - // lineaResolverStub.resolveWithProof( - // defaultAbiCoder.encode(["(bytes32,bytes,bytes,bytes32,bytes,bytes)"], [Object.values(MOCKED_PROOF_INVALID_STATE_ROOT)]), - // extraData, - // ), - // ).to.revertedWith("LineaResolverStub: invalid state root"); - // }); - }); - - describe("resolve", async () => { - it("Should revert with OffchainLookup when calling resolve", async function () { - const { lineaResolverStub, hash } = await loadFixture(deployContractsFixture); - const extraData = `0x3b3b57de${hash.slice(2)}`; - const encodedName = ethers.utils.dnsEncode(DOMAIN_NAME); - try { - await lineaResolverStub.resolve(encodedName, extraData); - } catch (error) { - expect(error.errorName).to.equal("OffchainLookup"); - } - }); - }); - - describe("supportsInterface", async () => { - it("should return true for valid interfaceId", async () => { - const { lineaResolverStub } = await loadFixture(deployContractsFixture); - const anotherInterfaceId = "0x9061b923"; - const result = await lineaResolverStub.supportsInterface(anotherInterfaceId); - expect(result).to.be.equal(true); - }); - - it("should return true for valid interfaceId for the abstract SupportsInterface contract", async () => { - const { lineaResolverStub } = await loadFixture(deployContractsFixture); - const anotherInterfaceId = "0x01ffc9a7"; - const result = await lineaResolverStub.supportsInterface(anotherInterfaceId); - expect(result).to.be.equal(true); - }); - - it("should return false for invalid interfaceId", async () => { - const { lineaResolverStub } = await loadFixture(deployContractsFixture); - const invalidInterfaceId = "0x89abcdef"; - const result = await lineaResolverStub.supportsInterface(invalidInterfaceId); - expect(result).to.be.equal(false); - }); - }); -}); diff --git a/packages/contracts/test/mocks/proof.ts b/packages/contracts/test/mocks/proof.ts deleted file mode 100644 index efd0602d4..000000000 --- a/packages/contracts/test/mocks/proof.ts +++ /dev/null @@ -1,44 +0,0 @@ -export const MOCKED_PROOF = { - blockHash: "0x62e34bf5241fcd5867d8636a2df3da85112418b000e1ee694f55adba2d2a61ef", - encodedBlockArray: - "0xf9025fa0ba9dd3c24267ac8c69dd8c6d04e81d0531219bdb64c965eb9477f796f1a97aa6a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a006263c3a0a8795755e30ec09dea189b3bb8e6e93c0037c9cce5c14ac24b992eca076b2e766f6f9d71208f0135294693bfbdfeafa306cffa8ab9dfeb0ff25b0d23da0abd6d4f2796c2d68f23ec70ef84dfc480557aa525c57d41cb0e7e2c350525a5bb901000411004c81008002000220818024009868001000001002108047302104300e001000000880219002021121040c0838450228002898810603000022080024194000210004218020019400000808202411800298204042004a000020021140000a0a04004082ca0e01000038061410484002008090ba800406df442030a1100040001000c106020c088511a8002260010090000880080080048246100bc8b809012201158b0001060204400400400408004022a0072008a0000030000c000404040000020300200d5304502408210420100413000020050391000001026708210280512c00c042240040001008068299006120b2000110000c801000822250020002830c69948403a2c94084014425f5846477179ab861d883010b04846765746888676f312e31392e38856c696e757800000000000000c6213a998bbf8c73ad42b9a2ffd41756079d7c757f5afc09f34106701545336f35ef0a70f22fee18424802dac8e37109cf692a5269791e01cad2bcb2ad05c80d00a0000000000000000000000000000000000000000000000000000000000000000088000000000000000008", - accountProof: - "0xf90b4eb90214f90211a074bf02cfc45b2fa921a057b8c3434824a3b75cc4a365a1461baf15d8a76a3b2ca00a4e4372a8a249a722f1bda70b40b09375ffacaaf99bc8dd6ae5b2de05e91449a0f8dbdb380b33b51b95666a6f1f41944ebf5041992a8655bacc781b50cbcecfd6a0b3e08f0eab1f0e020a67ed36678b42e2877c841f272193f45991b77162185de3a0d73defc3e7b7b6379d46129ae363ade7d2419d6e19342e53b8592e846953fbafa0cb1bc88dc451890d752054cf404fca48751cdfb0195f20c2dbae94c69b4931c6a0939c2f27c11e15ceec59009ae30db4f8bd9335f5af6014ca4c333451b3c3184aa049326916e81c8e00c09686392eb31823a3bd053c52731d0b712307574494bb5aa04206dd491423eb844ee41e22680653d6ac7efc288ca28cad5ea1977268cae8bca0cd7805123ac6248174b72d90192def2f80c86968e16a9e8e449995f2923df862a060eceaed5b0a254d29b720c72986873fd5aaa060ad248dc2498ca833fc65ef06a09b3b6afa5d8b2d29471c8fa621f75930bb60c608958ace806d7f336b9c60bd11a0aa521eb1ef710f456f2fabe3421432e7bda4bd47033a036a7ea0f147d6c52124a01e09ecce431eaff4e8be5d26854799bc074c5854ad939807cf51c791668748b0a0e26b24546343934f70de7cd57501052387eb23d6230c7281f33899b7e2db8bd0a0595a26b6eee03eaf8ee15db05240d4297394d702f1965e4b7a548699512b3e0680b90214f90211a0da701846e02dbc7ae1e07ecbe37f1cf0a6bb65988a52baa7758cbba1c1687751a004a532c19b76d259a297ad30270f9ff5bddc5ee76f311e360078dd37e13f714da05197c7441bb7b23c38d0e9aefce0795be3472071b63b5f77279d62903f60cbf9a0136d77bc3c8c84d3f5551336daa5080f23cd26a56278842d7d61dd09865f363ea09e2399041f300246dccd79fb18bf05e449b23916f33b0e76944195c7066d6a3aa087c19d545e63a4597461e45133924775a53b94fcec2ad4750f12e4270678ed48a03aa61407c254133b9af66b5f5558b3317e0ae897de20406c5fb557d677a1fb3ea033bf7018bd72d09bf1dd6499a428ad8a70dbba19f26e1f24c46e7e3f9acbb457a072161190358126a6dab3fe1c4dc3b1660ad24cf3f828efd66f400c201d3303c6a0bcf19035111cab89f6d4e5d4c4bccac37b82b6be83eb2a6a2ece61aa20e40b4aa08d53f07bdacd5e0ab26775ca2ed72c5544798faed03b337b5c8d557f030ccb3fa05f92a9fe916552504a07b8bbc4bbad06675cb0ced34798fe858dc8fbbe62a426a0d83cdcf61d14701261c670c97a9989fd450283370badd02c15ebfef22ffe92eea0dda13ef6594492f3ba14575e819e896c97d4a3c97065a3dff0756de4bea4d869a089c26746e5ca57177115a67dbe4d079c0859f5bdd9756cd9a1e5a661cd590fcfa0545da93adf29a516869e66039b068d7824d242c746e5c075394224b92752017480b90214f90211a0d02022a72eecff5229b94100c8d22f8316edd2d70ebc7a84f4f5c2ae47bdb856a091e2088548ad9e34e971b59fac908a7c784fc4e4cebe1e720bb792868e9d8f8ba0a63e4f5037e7736830e1f7311d479d81f6a874544c74f1859ca24390a51e4c00a014192908dffa9e5a14d2818b4155b14c23e63e72f3702ff19be7bec63323b543a0af16d035ac24f39f825c2b08b3943d1511108a88a5ec5d2845a8d0f85da9c1d1a0a52cc6ab95af39f1a71738b158127837508bbd647aa8757859e923baaa338609a0325e9831e88f9945941f57b3f2d0582d7322a70fa5a31ff18e70d3de66315722a04c0530420b15e20a83a6e268ac56e2a3b2f2314c6bdb681205f6317c07124b09a0690e81d6631b49847fb2baacca66a65224a53825bf7b07d1bd64367292b1ec91a028567ca443e727a33ec34cb1c54507d07fd610851012dca84036d97369651473a0724a5da0c9c3cc19df9d7ed1fcf9b18ecc6ab5d86724fbc65bebc459a8973867a046d8562aab8eced82bf559625d101f6ce67ada4db8f561650b2c39d03a860fd6a05c19f42b365e40a46e8cef116ec53f672a9c8ecd4d3ae111882c7a26682d6b62a0b0e05e4b6dac3e91842eb66a6db72b9821e16d335d9458218388d61320db8072a0c198d81e8ed9e80bac3f2d84dfe5d7d7e369e5ee28dfe13599a16474ddad937fa087ca915b4f854fba5d915e6b46a9b8ea92b37c9c341f98767b87b7b2a0425a5b80b90214f90211a0d4eae198c44064a436ead1c857455bc3b595165ca8c146399c67905d3d33eb98a06fad337ee856d93606fb470ed3c46766b4c0a59b9175e23a9bbe776a2db3eb96a07e69d9d50e99c1622899046cd9235b53afa783d657fa9aeda625b08a4997188ea0221b9c941ef62dccf476505a98bf356d8272920d9cb113b83cd04db315c87ce7a0498c3da72b517dc340db878e53c100b973366f6eb8a6c0e9c5e2ae807302b33ba0c554fb2d25d75d0bec915787736444cf3144aac8a8642f87776bb917c1b578fda034a9d010b3264a6503ceba74ebf3053e59ddc7c8c9b19f1a8e669babe2093ea1a0f6f5b7ca74865d8f026b80ab67e88ee8f163724916a87f721171f8f375b89b72a05031ce378d37742e1b86737ffc43a2012431db926c56d88bf31d54ed539d6269a012c8ef62d8de7a525da61afe9ab8bd948fcb9b484f4bfbac4c6cbda1334c9a1ea07cfbca561e5915824fe7b05458102227bd05f970cfa619549424c6dc9501b51ea0a9338395957f397ff450be9936727d8309180f40b196500ce68566e837e03b85a00e28a4c7f0914bb782c74dab80c5ca087f0e94b8a489006e3dd92d4826b8f905a04251c522d64b106fcf7128c21ade77ec59b0bc489d905c2f0759ec25a6397825a00f6478137a0d56493c2f97aa5446cf5dea2314b0a3e896031c3a9d56b35db127a045877afb494ec4ef70e01481e1286c2872ef79af26acc50b305f9557c2157c7780b90194f90191a0f6608ca635729f8a8fea7deb8db6b20680b3e3df8737962f7764089260605ec080a0e2297604db344d9f9d58c705754ce7e855954470c7190788c091ba5b1802095aa01e8a6173cf1cf5ba3ce28bb339c47db4958f31503ae357e1e2dc70edf6cc6736a00016d451997205bba7d8c5f3eed64d94ebbd0d0c0b3fb0e9cea70962c67d1b7e80a0e481236766f65a01130fbc6c01bc4ad18db894e2d7c3d954999d6211c60ce462a0fefcc869443b19280265136a4864bbc892fbbec93c69105ecc7c6304e86179e4a0721df254e3b160850e99408850436e9c4f9ed1ed1d4d469427ca473fbc679304a0aac307350a9815413d15315a7fd6f35ed8f5c652080b46307cfa25a8b2003db8a00519b72f3123f0ba4018e33a552788cb24eab9b9f07a84898c1bdcc35b8b679ea047d5589419c52b1d66c8a365c714d6ff76b1240f5ed6b832297e4969485ced4f80a0f300df3e0f16b62724b8397bd436b18d22d8c26fc1f5a8cdbb001972a567a3fa80a02c442ff97c3c16d7f245f4356c5b57240227cc06780d6301b12d45aadac3ce5a80b893f891a0702621860a8694557023ce1f9841f7267d3f83327131915e4ab59258c1532480a0646ba8f69363840a3e833adf0f11d997e0876df2b378fadd110a468c1df316d28080808080808080a0447c20f9174108b35b26e6ae5d379dcb59666e143f1b488a8aea8bbd67ba0f0180a0eb27ac68e04742b53b00d3455cdabaa02ea780434ce5976e5156f67ea1b143c780808080b853f851808080808080a074ae376c5bf9ca418e1b1d945a38c691b18aeb8b8249d10af0dbb45057d32d3080808080808080a0bf40a050bc213927e66c0ff6053d6938dc5e26358f0c5aca783e46fa4ab889188080b86ff86d9d327788b3596eb995f8670853aeb7b0f0e073efbc9b9a6b24a54882fce4b84df84b0187038d7ea4c68000a0160159008a07e44095baa225f58e4f838ada9d3f620bd21a68cc005256747b9fa04d9be648c5bf39973670d9f8b481d5d0b971e6a2db2deccc6b98cde21c5dd83e", - stateRoot: "0x06263c3a0a8795755e30ec09dea189b3bb8e6e93c0037c9cce5c14ac24b992ec", - tokenIdStorageProof: - "0xf9019bb90174f901718080a04fc5f13ab2f9ba0c2da88b0151ab0e7cf4d85d08cca45ccd923c6ab76323eb2880a055023796ff2dd458613b29e60f044a03f4a1aa024ff806a6a863e5bf4a87333ea048b38baaa54b803768cc7ded6093605c5c5b846147e6bafc1ea121c16842cda7a0dcc579620f2566f065ad1031bd8782115dffd44f86613913d74ba04ebb48dc50a07df8c660d04c72bfab868fd6662bfc520d0cc678bab02c4646c9e305da55565ea0cc28ed9e85e9f1963e3f59487889370164c0dc339b3677d00e205d663045e990a011c85c4b2e8006a79da0e1b01ce22b75b94761f65665c1aaf900d33f9dcbd3a1a0ac7adf259785bfb25862f1275da301bcf5a045fc0e957cbfac4fb4372dfdd11ea0b355f93b3fd6a9b7487a49615f440cb2ef08d8e69518da514115388e032c2c5880a03b14da15a8834e6eb99236c20b0af7c2975163c64353e2ed804d67e9a13ec37ca0d74b37da21a0412edc00332b5cd1079056c11db7c6a28e14ba66acabd8ea0d7f8080a3e2a03df95047d61a3fea1a1de07355967c1731facbb810f6ccde0e76e7d11613bf5901", - ownerStorageProof: - "0xf901b1b90174f901718080a04fc5f13ab2f9ba0c2da88b0151ab0e7cf4d85d08cca45ccd923c6ab76323eb2880a055023796ff2dd458613b29e60f044a03f4a1aa024ff806a6a863e5bf4a87333ea048b38baaa54b803768cc7ded6093605c5c5b846147e6bafc1ea121c16842cda7a0dcc579620f2566f065ad1031bd8782115dffd44f86613913d74ba04ebb48dc50a07df8c660d04c72bfab868fd6662bfc520d0cc678bab02c4646c9e305da55565ea0cc28ed9e85e9f1963e3f59487889370164c0dc339b3677d00e205d663045e990a011c85c4b2e8006a79da0e1b01ce22b75b94761f65665c1aaf900d33f9dcbd3a1a0ac7adf259785bfb25862f1275da301bcf5a045fc0e957cbfac4fb4372dfdd11ea0b355f93b3fd6a9b7487a49615f440cb2ef08d8e69518da514115388e032c2c5880a03b14da15a8834e6eb99236c20b0af7c2975163c64353e2ed804d67e9a13ec37ca0d74b37da21a0412edc00332b5cd1079056c11db7c6a28e14ba66acabd8ea0d7f8080b838f7a0359b37c07c33320381d4e4c96378d671e24d99280083cfb1f14934ad8f71343f9594f110a41f75edeb224227747b64be7f6a7f140abc", -}; - -export const MOCKED_PROOF_UNDEFINED = { - blockHash: "0x62e34bf5241fcd5867d8636a2df3da85112418b000e1ee694f55adba2d2a61ef", - encodedBlockArray: - "0xf9025fa0ba9dd3c24267ac8c69dd8c6d04e81d0531219bdb64c965eb9477f796f1a97aa6a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a006263c3a0a8795755e30ec09dea189b3bb8e6e93c0037c9cce5c14ac24b992eca076b2e766f6f9d71208f0135294693bfbdfeafa306cffa8ab9dfeb0ff25b0d23da0abd6d4f2796c2d68f23ec70ef84dfc480557aa525c57d41cb0e7e2c350525a5bb901000411004c81008002000220818024009868001000001002108047302104300e001000000880219002021121040c0838450228002898810603000022080024194000210004218020019400000808202411800298204042004a000020021140000a0a04004082ca0e01000038061410484002008090ba800406df442030a1100040001000c106020c088511a8002260010090000880080080048246100bc8b809012201158b0001060204400400400408004022a0072008a0000030000c000404040000020300200d5304502408210420100413000020050391000001026708210280512c00c042240040001008068299006120b2000110000c801000822250020002830c69948403a2c94084014425f5846477179ab861d883010b04846765746888676f312e31392e38856c696e757800000000000000c6213a998bbf8c73ad42b9a2ffd41756079d7c757f5afc09f34106701545336f35ef0a70f22fee18424802dac8e37109cf692a5269791e01cad2bcb2ad05c80d00a0000000000000000000000000000000000000000000000000000000000000000088000000000000000008", - accountProof: - "0xf90b4eb90214f90211a074bf02cfc45b2fa921a057b8c3434824a3b75cc4a365a1461baf15d8a76a3b2ca00a4e4372a8a249a722f1bda70b40b09375ffacaaf99bc8dd6ae5b2de05e91449a0f8dbdb380b33b51b95666a6f1f41944ebf5041992a8655bacc781b50cbcecfd6a0b3e08f0eab1f0e020a67ed36678b42e2877c841f272193f45991b77162185de3a0d73defc3e7b7b6379d46129ae363ade7d2419d6e19342e53b8592e846953fbafa0cb1bc88dc451890d752054cf404fca48751cdfb0195f20c2dbae94c69b4931c6a0939c2f27c11e15ceec59009ae30db4f8bd9335f5af6014ca4c333451b3c3184aa049326916e81c8e00c09686392eb31823a3bd053c52731d0b712307574494bb5aa04206dd491423eb844ee41e22680653d6ac7efc288ca28cad5ea1977268cae8bca0cd7805123ac6248174b72d90192def2f80c86968e16a9e8e449995f2923df862a060eceaed5b0a254d29b720c72986873fd5aaa060ad248dc2498ca833fc65ef06a09b3b6afa5d8b2d29471c8fa621f75930bb60c608958ace806d7f336b9c60bd11a0aa521eb1ef710f456f2fabe3421432e7bda4bd47033a036a7ea0f147d6c52124a01e09ecce431eaff4e8be5d26854799bc074c5854ad939807cf51c791668748b0a0e26b24546343934f70de7cd57501052387eb23d6230c7281f33899b7e2db8bd0a0595a26b6eee03eaf8ee15db05240d4297394d702f1965e4b7a548699512b3e0680b90214f90211a0da701846e02dbc7ae1e07ecbe37f1cf0a6bb65988a52baa7758cbba1c1687751a004a532c19b76d259a297ad30270f9ff5bddc5ee76f311e360078dd37e13f714da05197c7441bb7b23c38d0e9aefce0795be3472071b63b5f77279d62903f60cbf9a0136d77bc3c8c84d3f5551336daa5080f23cd26a56278842d7d61dd09865f363ea09e2399041f300246dccd79fb18bf05e449b23916f33b0e76944195c7066d6a3aa087c19d545e63a4597461e45133924775a53b94fcec2ad4750f12e4270678ed48a03aa61407c254133b9af66b5f5558b3317e0ae897de20406c5fb557d677a1fb3ea033bf7018bd72d09bf1dd6499a428ad8a70dbba19f26e1f24c46e7e3f9acbb457a072161190358126a6dab3fe1c4dc3b1660ad24cf3f828efd66f400c201d3303c6a0bcf19035111cab89f6d4e5d4c4bccac37b82b6be83eb2a6a2ece61aa20e40b4aa08d53f07bdacd5e0ab26775ca2ed72c5544798faed03b337b5c8d557f030ccb3fa05f92a9fe916552504a07b8bbc4bbad06675cb0ced34798fe858dc8fbbe62a426a0d83cdcf61d14701261c670c97a9989fd450283370badd02c15ebfef22ffe92eea0dda13ef6594492f3ba14575e819e896c97d4a3c97065a3dff0756de4bea4d869a089c26746e5ca57177115a67dbe4d079c0859f5bdd9756cd9a1e5a661cd590fcfa0545da93adf29a516869e66039b068d7824d242c746e5c075394224b92752017480b90214f90211a0d02022a72eecff5229b94100c8d22f8316edd2d70ebc7a84f4f5c2ae47bdb856a091e2088548ad9e34e971b59fac908a7c784fc4e4cebe1e720bb792868e9d8f8ba0a63e4f5037e7736830e1f7311d479d81f6a874544c74f1859ca24390a51e4c00a014192908dffa9e5a14d2818b4155b14c23e63e72f3702ff19be7bec63323b543a0af16d035ac24f39f825c2b08b3943d1511108a88a5ec5d2845a8d0f85da9c1d1a0a52cc6ab95af39f1a71738b158127837508bbd647aa8757859e923baaa338609a0325e9831e88f9945941f57b3f2d0582d7322a70fa5a31ff18e70d3de66315722a04c0530420b15e20a83a6e268ac56e2a3b2f2314c6bdb681205f6317c07124b09a0690e81d6631b49847fb2baacca66a65224a53825bf7b07d1bd64367292b1ec91a028567ca443e727a33ec34cb1c54507d07fd610851012dca84036d97369651473a0724a5da0c9c3cc19df9d7ed1fcf9b18ecc6ab5d86724fbc65bebc459a8973867a046d8562aab8eced82bf559625d101f6ce67ada4db8f561650b2c39d03a860fd6a05c19f42b365e40a46e8cef116ec53f672a9c8ecd4d3ae111882c7a26682d6b62a0b0e05e4b6dac3e91842eb66a6db72b9821e16d335d9458218388d61320db8072a0c198d81e8ed9e80bac3f2d84dfe5d7d7e369e5ee28dfe13599a16474ddad937fa087ca915b4f854fba5d915e6b46a9b8ea92b37c9c341f98767b87b7b2a0425a5b80b90214f90211a0d4eae198c44064a436ead1c857455bc3b595165ca8c146399c67905d3d33eb98a06fad337ee856d93606fb470ed3c46766b4c0a59b9175e23a9bbe776a2db3eb96a07e69d9d50e99c1622899046cd9235b53afa783d657fa9aeda625b08a4997188ea0221b9c941ef62dccf476505a98bf356d8272920d9cb113b83cd04db315c87ce7a0498c3da72b517dc340db878e53c100b973366f6eb8a6c0e9c5e2ae807302b33ba0c554fb2d25d75d0bec915787736444cf3144aac8a8642f87776bb917c1b578fda034a9d010b3264a6503ceba74ebf3053e59ddc7c8c9b19f1a8e669babe2093ea1a0f6f5b7ca74865d8f026b80ab67e88ee8f163724916a87f721171f8f375b89b72a05031ce378d37742e1b86737ffc43a2012431db926c56d88bf31d54ed539d6269a012c8ef62d8de7a525da61afe9ab8bd948fcb9b484f4bfbac4c6cbda1334c9a1ea07cfbca561e5915824fe7b05458102227bd05f970cfa619549424c6dc9501b51ea0a9338395957f397ff450be9936727d8309180f40b196500ce68566e837e03b85a00e28a4c7f0914bb782c74dab80c5ca087f0e94b8a489006e3dd92d4826b8f905a04251c522d64b106fcf7128c21ade77ec59b0bc489d905c2f0759ec25a6397825a00f6478137a0d56493c2f97aa5446cf5dea2314b0a3e896031c3a9d56b35db127a045877afb494ec4ef70e01481e1286c2872ef79af26acc50b305f9557c2157c7780b90194f90191a0f6608ca635729f8a8fea7deb8db6b20680b3e3df8737962f7764089260605ec080a0e2297604db344d9f9d58c705754ce7e855954470c7190788c091ba5b1802095aa01e8a6173cf1cf5ba3ce28bb339c47db4958f31503ae357e1e2dc70edf6cc6736a00016d451997205bba7d8c5f3eed64d94ebbd0d0c0b3fb0e9cea70962c67d1b7e80a0e481236766f65a01130fbc6c01bc4ad18db894e2d7c3d954999d6211c60ce462a0fefcc869443b19280265136a4864bbc892fbbec93c69105ecc7c6304e86179e4a0721df254e3b160850e99408850436e9c4f9ed1ed1d4d469427ca473fbc679304a0aac307350a9815413d15315a7fd6f35ed8f5c652080b46307cfa25a8b2003db8a00519b72f3123f0ba4018e33a552788cb24eab9b9f07a84898c1bdcc35b8b679ea047d5589419c52b1d66c8a365c714d6ff76b1240f5ed6b832297e4969485ced4f80a0f300df3e0f16b62724b8397bd436b18d22d8c26fc1f5a8cdbb001972a567a3fa80a02c442ff97c3c16d7f245f4356c5b57240227cc06780d6301b12d45aadac3ce5a80b893f891a0702621860a8694557023ce1f9841f7267d3f83327131915e4ab59258c1532480a0646ba8f69363840a3e833adf0f11d997e0876df2b378fadd110a468c1df316d28080808080808080a0447c20f9174108b35b26e6ae5d379dcb59666e143f1b488a8aea8bbd67ba0f0180a0eb27ac68e04742b53b00d3455cdabaa02ea780434ce5976e5156f67ea1b143c780808080b853f851808080808080a074ae376c5bf9ca418e1b1d945a38c691b18aeb8b8249d10af0dbb45057d32d3080808080808080a0bf40a050bc213927e66c0ff6053d6938dc5e26358f0c5aca783e46fa4ab889188080b86ff86d9d327788b3596eb995f8670853aeb7b0f0e073efbc9b9a6b24a54882fce4b84df84b0187038d7ea4c68000a0160159008a07e44095baa225f58e4f838ada9d3f620bd21a68cc005256747b9fa04d9be648c5bf39973670d9f8b481d5d0b971e6a2db2deccc6b98cde21c5dd83e", - stateRoot: "0x06263c3a0a8795755e30ec09dea189b3bb8e6e93c0037c9cce5c14ac24b992ec", - tokenIdStorageProof: - "0xf901ccb90174f901718080a04fc5f13ab2f9ba0c2da88b0151ab0e7cf4d85d08cca45ccd923c6ab76323eb2880a055023796ff2dd458613b29e60f044a03f4a1aa024ff806a6a863e5bf4a87333ea048b38baaa54b803768cc7ded6093605c5c5b846147e6bafc1ea121c16842cda7a0dcc579620f2566f065ad1031bd8782115dffd44f86613913d74ba04ebb48dc50a07df8c660d04c72bfab868fd6662bfc520d0cc678bab02c4646c9e305da55565ea0cc28ed9e85e9f1963e3f59487889370164c0dc339b3677d00e205d663045e990a011c85c4b2e8006a79da0e1b01ce22b75b94761f65665c1aaf900d33f9dcbd3a1a0ac7adf259785bfb25862f1275da301bcf5a045fc0e957cbfac4fb4372dfdd11ea0b355f93b3fd6a9b7487a49615f440cb2ef08d8e69518da514115388e032c2c5880a03b14da15a8834e6eb99236c20b0af7c2975163c64353e2ed804d67e9a13ec37ca0d74b37da21a0412edc00332b5cd1079056c11db7c6a28e14ba66acabd8ea0d7f8080b853f851a0fd6d905a2dbd6a3d736026ee592bc681a81c032f8b8d9600cce5c9044e9b28798080808080808080808080a000068b3c5299def5fa9becc34d1f0a41f46f4502cdb88f4b2aed35fadd12526780808080", - ownerStorageProof: - "0xf90177b90174f901718080a04fc5f13ab2f9ba0c2da88b0151ab0e7cf4d85d08cca45ccd923c6ab76323eb2880a055023796ff2dd458613b29e60f044a03f4a1aa024ff806a6a863e5bf4a87333ea048b38baaa54b803768cc7ded6093605c5c5b846147e6bafc1ea121c16842cda7a0dcc579620f2566f065ad1031bd8782115dffd44f86613913d74ba04ebb48dc50a07df8c660d04c72bfab868fd6662bfc520d0cc678bab02c4646c9e305da55565ea0cc28ed9e85e9f1963e3f59487889370164c0dc339b3677d00e205d663045e990a011c85c4b2e8006a79da0e1b01ce22b75b94761f65665c1aaf900d33f9dcbd3a1a0ac7adf259785bfb25862f1275da301bcf5a045fc0e957cbfac4fb4372dfdd11ea0b355f93b3fd6a9b7487a49615f440cb2ef08d8e69518da514115388e032c2c5880a03b14da15a8834e6eb99236c20b0af7c2975163c64353e2ed804d67e9a13ec37ca0d74b37da21a0412edc00332b5cd1079056c11db7c6a28e14ba66acabd8ea0d7f8080", -}; - -export const MOCKED_PROOF_INVALID_STATE_ROOT = { - blockHash: "0xf250d4956bbd7fcf0835619b1663080e52f8f1406edad5418c0c5eedbf2a4405", - encodedBlockArray: - "0xf90272a009d91c407f6a40d23374b4b012541deabd36694740f7ba70537686d15a8c92e3a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a0ab36c666794b65d5c1471284de085714d5e4c9bc53725b586d884d5f6019b251a072d66fd498058fa29ded928f81916a7228cf7f47cf53f6823633099d39bdc667a02f0203944e89072aba3f32117b503e804805436e6508f35885e60a9aaae579e5b901000000000000080000000000000000000001080000021000000080900000000100000000000000002000000000000000000000000000002000000010000020000000800000000000080000000d000000400001000000000000000000008000000000500000020080000000010000000800000000800000000000000090400800400000000000000000000008000400000000002001000000002000000000000000020a0001010040000001000002000000000000010000000000010000000000000000000200000000002004000000000000000000000028008000111000042000001020000000000000002050020000000110900000400040a00400020000000002830493e08401c9c380832ce2028464186a36b875d883010b00846765746888676f312e31392e35856c696e7578000000000000004d517aef039a48b3b6bf921e210b7551c8e37107b17ee6f950a75d04d5e1b3c784913cac825a913979db704f3f118cec894a1fc451958ca86b27f7f2165e46c504015d84cbeda065cedc1d162d2277787f14a33400a0000000000000000000000000000000000000000000000000000000000000000088000000000000000007", - accountProof: - "0xf90891b90214f90211a03015f1cdd20a6c93702876fa26b9bc1cc6d1b5deb1d8802b5e0ac2742b994e87a0bcb5b96251b5fa0c323ae06590b70bac47906d0fe7fceb8640cac319d07eb549a02c7b6d2bc77ab50c71fc1a9f19dc630692fd0b9be7cd849243a87107b3766ee9a0e8125879ee12e235c96b4b17d3eca4f42d44711de58ab2bc93925c0ca7e1ce9ba08e5e6dec344730dd923dedf4ef753f50105e88617d1d0ef5312e35eb610dba57a0077ef94fc4ab42bc74064b1a00bef68dbffee62bd06dd49b621ad10d3ca4e26ea0b57f5d17b3c1a35b4b54232e201b846126e4af05e71f5bd95c9bece331971a9ea0fcfa9ad3ed26b610ad67ddcc846f798269941f3583580b0525894e132c62a270a02bc82d8e8a79442d340f1d4eb0f674b08f7ce4b86a44476c64382f7e3ebb103ea0aba4d9019d345d8a096c4cf5e7384d6a678f0c7e4394706419e36cae39ce51dca0e4b905ee19e9449549068d1c6f6afc026232556531434853a8c35543ddd20dbca096124ebb0a40abbe8b059850a2f0131dbc00e04a3bc0d331000903c0fd696eaaa06b864428fa516756a2ce71222be0b2bec631d05b9f38fe811aa992827881bcdea0b7d0bd197f4f83fae5b9c07d47078b9554e0041d7da0fa738adc24f224ddfb27a032a7b98a4bcfe84d35bbc916a16db2d767cbed11de6d906d12f8df996e1a31e1a036ef2f5cb05510a2db3ec41371444c261473c13abd5fc73d12ada1089ca3432980b90214f90211a0041a4f5532f8ec5eea89525017014a7a3ba0ce54527030310578d07e83364f75a092a204ef3067026e92d28fb3b6db6b540cb784713ad2048a9d5495678a6cfdc8a03c848252530e8930c70a16bf7b8f12651a2ff503d29cb02e3b23122ca84c5666a0d2487682399a322f267aa41d2f72065fd870f9e3ce93c4ccb88395bd392c6ca0a08b2c68f81fa9e3ddb1f0e9ffd04cd8d7d54138d187b3b8777eb44d61beb7a72ca0864b1e6afd88b137d85768e9a52ed506e6030b1ceaf1305f4ab6bf169ae450bda0ab5a4ce5e1bf332a26417e68e1e5bd7701e8d9010e19f6a93bd82335a66b5403a0db0d3347c0883988f29f4947f17d2f36992be92a746eb125104c0dad31cdce9ba04d93773364d0baebe1efd0ae5a882158f9e3bc86d15b73f050115bb4aab6e0fba09e861aece63f9ccb332fdf745ed38f673224bc7a029f2a10f85dd9a8196029b1a07aa22d6e31dba3ba59c36e98a305468a0a76ed325cdadd91f1c49ad626793fc5a00790dfc36bd6509d7052e9bc2f89314ec06a0fa864748b973de7a23b04b1b978a0aef81b4c1147c222f64d0bbae012ea568d3bcb272c5ac3960a97fe996204aa4fa0f83d0e9c03831c35012a05f5c641fe7b557ae3ddcb543af724b2c55ae5911ea2a07d8d4b6410cc5adada66c15329e43fb02da424cb87b94e53f82877ae9469c727a0a06c293c119b61c0280945da786157724a5441abaec938b0a4fdaa7d0097f7ad80b90214f90211a006a60435c5e9967ef148e389bc1f93fc5e16d966a56705c8afec273322767996a0e94d386c214eb9f24a91d6fb1f38c58052356cead2d85622df96d59975c11bd1a098acd79259f5d6c73da60f7fd7859fd78685a493226f962d2721a244a275ab45a0c4dcec340ba872e1e3b9f335d7b88450afe5ebf591a274308154a9760c5e1788a052fd0e3b0c57cd525876cf82fa64a59badf319682f679ccf4932b41ef0cc86daa0bf53484765c331f2962638dd4bce75f8e8af291cbceed33ab5939267ad5d27cea0da294477a35634382809d776f87002cf82e5b8daac53e4404ba303dd44266ac7a012e3655b07befa15ea2e28f3fff7b946d7c22785bb7f29aad0ad8b9fc953b546a06459b4eda0e622270f33e8ba06953d3951b1541cb850aaaa35f26a1bc1e30b07a0cec13f7bafab88909356ec53e3e9b5591c907b9ac0a5756b7c4cbcee7c8ed540a085bbe0e979fec807e176322fdba092f07785650768ede56c8b86775ab721537ba08ee785286d931d84c3f8e3fccb8b42233c49e7fb749559a84c023606c942d194a0c664f21fb57a7a3d962446c8f7f20f2f27530035071b8845377342ae65343e7fa02b41af96c2d18b79a905a7a8714218cbb3e6bf3bd13a021a3621068acaf3ab2aa0155263a0593fb9e4c96cd230f2c0d67c65297b7248bba082a46cfc549e528751a07b0747f9c7df005bf36da55ede75f58133e817032910dc5c19268f3fcb7740c280b901d4f901d1a02cdba158b2b7c973b3a2dbe894c6bfe70444462473da23884d315b31eb497fb6a04746e6419323138556bfd0cb3b8257dd7b7db3b04a7fcf6fda0d3eff69ee2248a07b99a901b65ce87e3fb09554da0f0bee3af3d05d76285646cd15897bc358158ba02e07e2934f65264698f9746a6de331696e5904a6a1c0f4a984f7f54a87eacde0a0fdfea228343914af697fd12326c29b1602a1127c264a71b8b1473da909571293a0fe6f9e92f3f08e82ad5a8ffc37434217638d1572ee46956e78c576cf4ec54dc1a08dab9ed9fe083043e148878ade420ea724e678673634fc993edf1996580629a8a059a786a8608420d7138b8f920bb20ed146a8a13a5acfb9f7bcb4a3fc05badceea0c53469c9c5150cd8cf6bda65e967afbcb7606a70673a12f40f7e4f6754318384a0294f9f41d23b15c3f72e1269120d4b2235bcc3afcdb627a65b3be51e8cfaaa8f80a05602c6d7a2b559b102ec13317682ca366797ead1575ef7382a80c1dd3ab85e50a0276d59125c2e30e0ac6216e049f15272fbe8afadb65eff8c4f684f367ecf39ef80a0edba17f97d10f7012c71b80745a9400382b829d0447ba9c462321770fe181103a09b49b59b6b6e00a3be31f703f48dc04de674ffa2880a6de3c379176f8dbd376e80b873f87180a0de2be07b9b6bfd4a778ea4e34ae53fb0558fd2b5c3de91ec119e43ed37f7869f8080808080808080a0d96e240f4b8e298a6516bb57c331fc3c684969cea07731e3ed83c74467ec17388080a0a194bca99baa71dd2a815e54f850ca7cd9468352d465b9aabaeb59a89a1aa5eb808080", - stateRoot: "0xab36c666794b65d5c1471284de085714d5e4c9bc53725b586d884d5f6019b251", - tokenIdStorageProof: "0xc0", - ownerStorageProof: "0xc0", -}; - -export const L2_RESOLVER_ADDRESS = "0x2EcF0F417D534b99f64777bF0cabCC651739B314"; - -export const DOMAIN_NAME = "julink.lineatest.eth"; - -export const GATEWAY_URL = "http://localhost:8080"; - -export const EXPECTED_RESOLVE_WITH_PROOF_RESULT = "0x000000000000000000000000f110a41f75edeb224227747b64be7f6a7f140abc"; diff --git a/packages/contracts/tsconfig.json b/packages/contracts/tsconfig.json deleted file mode 100644 index 5327256e8..000000000 --- a/packages/contracts/tsconfig.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "compilerOptions": { - "target": "es2020", - "module": "commonjs", - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, - "strict": true, - "skipLibCheck": true, - "useUnknownInCatchVariables": false, - "resolveJsonModule": true - } -} diff --git a/packages/gateway/contracts/RollupMock.sol b/packages/gateway/contracts/RollupMock.sol index 95ed9c6fc..59a663bbb 100644 --- a/packages/gateway/contracts/RollupMock.sol +++ b/packages/gateway/contracts/RollupMock.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.19; +pragma solidity ^0.8.25; contract RollupMock { function currentL2BlockNumber() public pure returns (uint256) { diff --git a/packages/gateway/contracts/TestL1.sol b/packages/gateway/contracts/TestL1.sol index 305bdb386..781eb8331 100644 --- a/packages/gateway/contracts/TestL1.sol +++ b/packages/gateway/contracts/TestL1.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.19; +pragma solidity ^0.8.25; import {EVMFetcher} from "linea-verifier/contracts/EVMFetcher.sol"; import {EVMFetchTarget} from "linea-verifier/contracts/EVMFetchTarget.sol"; diff --git a/packages/gateway/contracts/TestL2.sol b/packages/gateway/contracts/TestL2.sol index db6ada399..6894e5b9a 100644 --- a/packages/gateway/contracts/TestL2.sol +++ b/packages/gateway/contracts/TestL2.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.19; +pragma solidity ^0.8.25; contract TestL2 { uint256 latest; // Slot 0 diff --git a/packages/gateway/contracts/TestLineaVerifier.sol b/packages/gateway/contracts/TestLineaVerifier.sol index 7d2b7fdc1..eacdab648 100644 --- a/packages/gateway/contracts/TestLineaVerifier.sol +++ b/packages/gateway/contracts/TestLineaVerifier.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.19; +pragma solidity ^0.8.25; import {LineaVerifier} from "linea-verifier/contracts/LineaVerifier.sol"; diff --git a/packages/gateway/hardhat.config.ts b/packages/gateway/hardhat.config.ts index 31082e96d..300f0e206 100644 --- a/packages/gateway/hardhat.config.ts +++ b/packages/gateway/hardhat.config.ts @@ -5,7 +5,19 @@ import * as dotenv from "dotenv"; dotenv.config(); const config: HardhatUserConfig = { - solidity: "0.8.19", + solidity: { + compilers: [ + { + version: "0.8.25", + settings: { + optimizer: { + enabled: true, + runs: 200, + }, + }, + }, + ], + }, }; export default config; diff --git a/packages/l1-contracts/.mocharc.json b/packages/l1-contracts/.mocharc.json new file mode 100644 index 000000000..48586d7d7 --- /dev/null +++ b/packages/l1-contracts/.mocharc.json @@ -0,0 +1,7 @@ +{ + "require": "ts-node/register", + "loader": "ts-node/esm", + "extensions": ["ts", "tsx"], + "spec": ["test/**/*.spec.*"], + "watch-files": ["src"] +} diff --git a/packages/l1-contracts/contracts/L1Resolver.sol b/packages/l1-contracts/contracts/L1Resolver.sol index 22f146a0f..8d46f7d07 100644 --- a/packages/l1-contracts/contracts/L1Resolver.sol +++ b/packages/l1-contracts/contracts/L1Resolver.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.19; +pragma solidity ^0.8.25; import {EVMFetcher} from "linea-verifier/contracts/EVMFetcher.sol"; import {EVMFetchTarget} from "linea-verifier/contracts/EVMFetchTarget.sol"; diff --git a/packages/l1-contracts/contracts/RollupMock.sol b/packages/l1-contracts/contracts/RollupMock.sol new file mode 100644 index 000000000..59a663bbb --- /dev/null +++ b/packages/l1-contracts/contracts/RollupMock.sol @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.25; + +contract RollupMock { + function currentL2BlockNumber() public pure returns (uint256) { + return 4120264; + } + + function stateRootHashes( + uint256 blockNumber + ) public pure returns (bytes32) { + return + 0x03d0b763f587ee91006fda775636a2d190d9e3037807a39aa566c5f13ba73965; + } +} diff --git a/packages/l1-contracts/contracts/Verifier.sol b/packages/l1-contracts/contracts/Verifier.sol index 9a835b195..1554e9825 100644 --- a/packages/l1-contracts/contracts/Verifier.sol +++ b/packages/l1-contracts/contracts/Verifier.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.19; +pragma solidity ^0.8.25; import {LineaVerifier} from "linea-verifier/contracts/LineaVerifier.sol"; diff --git a/packages/l1-contracts/contracts/delegatableResolvers/BytesUtils.sol b/packages/l1-contracts/contracts/delegatableResolvers/BytesUtils.sol new file mode 100644 index 000000000..96344ce57 --- /dev/null +++ b/packages/l1-contracts/contracts/delegatableResolvers/BytesUtils.sol @@ -0,0 +1,400 @@ +pragma solidity ^0.8.4; + +library BytesUtils { + error OffsetOutOfBoundsError(uint256 offset, uint256 length); + + /* + * @dev Returns the keccak-256 hash of a byte range. + * @param self The byte string to hash. + * @param offset The position to start hashing at. + * @param len The number of bytes to hash. + * @return The hash of the byte range. + */ + function keccak( + bytes memory self, + uint256 offset, + uint256 len + ) internal pure returns (bytes32 ret) { + require(offset + len <= self.length); + assembly { + ret := keccak256(add(add(self, 32), offset), len) + } + } + + /* + * @dev Returns a positive number if `other` comes lexicographically after + * `self`, a negative number if it comes before, or zero if the + * contents of the two bytes are equal. + * @param self The first bytes to compare. + * @param other The second bytes to compare. + * @return The result of the comparison. + */ + function compare( + bytes memory self, + bytes memory other + ) internal pure returns (int256) { + return compare(self, 0, self.length, other, 0, other.length); + } + + /* + * @dev Returns a positive number if `other` comes lexicographically after + * `self`, a negative number if it comes before, or zero if the + * contents of the two bytes are equal. Comparison is done per-rune, + * on unicode codepoints. + * @param self The first bytes to compare. + * @param offset The offset of self. + * @param len The length of self. + * @param other The second bytes to compare. + * @param otheroffset The offset of the other string. + * @param otherlen The length of the other string. + * @return The result of the comparison. + */ + function compare( + bytes memory self, + uint256 offset, + uint256 len, + bytes memory other, + uint256 otheroffset, + uint256 otherlen + ) internal pure returns (int256) { + if (offset + len > self.length) { + revert OffsetOutOfBoundsError(offset + len, self.length); + } + if (otheroffset + otherlen > other.length) { + revert OffsetOutOfBoundsError(otheroffset + otherlen, other.length); + } + + uint256 shortest = len; + if (otherlen < len) shortest = otherlen; + + uint256 selfptr; + uint256 otherptr; + + assembly { + selfptr := add(self, add(offset, 32)) + otherptr := add(other, add(otheroffset, 32)) + } + for (uint256 idx = 0; idx < shortest; idx += 32) { + uint256 a; + uint256 b; + assembly { + a := mload(selfptr) + b := mload(otherptr) + } + if (a != b) { + // Mask out irrelevant bytes and check again + uint256 mask; + if (shortest - idx >= 32) { + mask = type(uint256).max; + } else { + mask = ~(2 ** (8 * (idx + 32 - shortest)) - 1); + } + int256 diff = int256(a & mask) - int256(b & mask); + if (diff != 0) return diff; + } + selfptr += 32; + otherptr += 32; + } + + return int256(len) - int256(otherlen); + } + + /* + * @dev Returns true if the two byte ranges are equal. + * @param self The first byte range to compare. + * @param offset The offset into the first byte range. + * @param other The second byte range to compare. + * @param otherOffset The offset into the second byte range. + * @param len The number of bytes to compare + * @return True if the byte ranges are equal, false otherwise. + */ + function equals( + bytes memory self, + uint256 offset, + bytes memory other, + uint256 otherOffset, + uint256 len + ) internal pure returns (bool) { + return keccak(self, offset, len) == keccak(other, otherOffset, len); + } + + /* + * @dev Returns true if the two byte ranges are equal with offsets. + * @param self The first byte range to compare. + * @param offset The offset into the first byte range. + * @param other The second byte range to compare. + * @param otherOffset The offset into the second byte range. + * @return True if the byte ranges are equal, false otherwise. + */ + function equals( + bytes memory self, + uint256 offset, + bytes memory other, + uint256 otherOffset + ) internal pure returns (bool) { + return + keccak(self, offset, self.length - offset) == + keccak(other, otherOffset, other.length - otherOffset); + } + + /* + * @dev Compares a range of 'self' to all of 'other' and returns True iff + * they are equal. + * @param self The first byte range to compare. + * @param offset The offset into the first byte range. + * @param other The second byte range to compare. + * @return True if the byte ranges are equal, false otherwise. + */ + function equals( + bytes memory self, + uint256 offset, + bytes memory other + ) internal pure returns (bool) { + return + self.length == offset + other.length && + equals(self, offset, other, 0, other.length); + } + + /* + * @dev Returns true if the two byte ranges are equal. + * @param self The first byte range to compare. + * @param other The second byte range to compare. + * @return True if the byte ranges are equal, false otherwise. + */ + function equals( + bytes memory self, + bytes memory other + ) internal pure returns (bool) { + return + self.length == other.length && + equals(self, 0, other, 0, self.length); + } + + /* + * @dev Returns the 8-bit number at the specified index of self. + * @param self The byte string. + * @param idx The index into the bytes + * @return The specified 8 bits of the string, interpreted as an integer. + */ + function readUint8( + bytes memory self, + uint256 idx + ) internal pure returns (uint8 ret) { + return uint8(self[idx]); + } + + /* + * @dev Returns the 16-bit number at the specified index of self. + * @param self The byte string. + * @param idx The index into the bytes + * @return The specified 16 bits of the string, interpreted as an integer. + */ + function readUint16( + bytes memory self, + uint256 idx + ) internal pure returns (uint16 ret) { + require(idx + 2 <= self.length); + assembly { + ret := and(mload(add(add(self, 2), idx)), 0xFFFF) + } + } + + /* + * @dev Returns the 32-bit number at the specified index of self. + * @param self The byte string. + * @param idx The index into the bytes + * @return The specified 32 bits of the string, interpreted as an integer. + */ + function readUint32( + bytes memory self, + uint256 idx + ) internal pure returns (uint32 ret) { + require(idx + 4 <= self.length); + assembly { + ret := and(mload(add(add(self, 4), idx)), 0xFFFFFFFF) + } + } + + /* + * @dev Returns the 32 byte value at the specified index of self. + * @param self The byte string. + * @param idx The index into the bytes + * @return The specified 32 bytes of the string. + */ + function readBytes32( + bytes memory self, + uint256 idx + ) internal pure returns (bytes32 ret) { + require(idx + 32 <= self.length); + assembly { + ret := mload(add(add(self, 32), idx)) + } + } + + /* + * @dev Returns the 32 byte value at the specified index of self. + * @param self The byte string. + * @param idx The index into the bytes + * @return The specified 32 bytes of the string. + */ + function readBytes20( + bytes memory self, + uint256 idx + ) internal pure returns (bytes20 ret) { + require(idx + 20 <= self.length); + assembly { + ret := and( + mload(add(add(self, 32), idx)), + 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000 + ) + } + } + + /* + * @dev Returns the n byte value at the specified index of self. + * @param self The byte string. + * @param idx The index into the bytes. + * @param len The number of bytes. + * @return The specified 32 bytes of the string. + */ + function readBytesN( + bytes memory self, + uint256 idx, + uint256 len + ) internal pure returns (bytes32 ret) { + require(len <= 32); + require(idx + len <= self.length); + assembly { + let mask := not(sub(exp(256, sub(32, len)), 1)) + ret := and(mload(add(add(self, 32), idx)), mask) + } + } + + function memcpy(uint256 dest, uint256 src, uint256 len) private pure { + // Copy word-length chunks while possible + for (; len >= 32; len -= 32) { + assembly { + mstore(dest, mload(src)) + } + dest += 32; + src += 32; + } + + // Copy remaining bytes + unchecked { + uint256 mask = (256 ** (32 - len)) - 1; + assembly { + let srcpart := and(mload(src), not(mask)) + let destpart := and(mload(dest), mask) + mstore(dest, or(destpart, srcpart)) + } + } + } + + /* + * @dev Copies a substring into a new byte string. + * @param self The byte string to copy from. + * @param offset The offset to start copying at. + * @param len The number of bytes to copy. + */ + function substring( + bytes memory self, + uint256 offset, + uint256 len + ) internal pure returns (bytes memory) { + require(offset + len <= self.length); + + bytes memory ret = new bytes(len); + uint256 dest; + uint256 src; + + assembly { + dest := add(ret, 32) + src := add(add(self, 32), offset) + } + memcpy(dest, src, len); + + return ret; + } + + // Maps characters from 0x30 to 0x7A to their base32 values. + // 0xFF represents invalid characters in that range. + bytes constant base32HexTable = + hex"00010203040506070809FFFFFFFFFFFFFF0A0B0C0D0E0F101112131415161718191A1B1C1D1E1FFFFFFFFFFFFFFFFFFFFF0A0B0C0D0E0F101112131415161718191A1B1C1D1E1F"; + + /** + * @dev Decodes unpadded base32 data of up to one word in length. + * @param self The data to decode. + * @param off Offset into the string to start at. + * @param len Number of characters to decode. + * @return The decoded data, left aligned. + */ + function base32HexDecodeWord( + bytes memory self, + uint256 off, + uint256 len + ) internal pure returns (bytes32) { + require(len <= 52); + + uint256 ret = 0; + uint8 decoded; + for (uint256 i = 0; i < len; i++) { + bytes1 char = self[off + i]; + require(char >= 0x30 && char <= 0x7A); + decoded = uint8(base32HexTable[uint256(uint8(char)) - 0x30]); + require(decoded <= 0x20); + if (i == len - 1) { + break; + } + ret = (ret << 5) | decoded; + } + + uint256 bitlen = len * 5; + if (len % 8 == 0) { + // Multiple of 8 characters, no padding + ret = (ret << 5) | decoded; + } else if (len % 8 == 2) { + // Two extra characters - 1 byte + ret = (ret << 3) | (decoded >> 2); + bitlen -= 2; + } else if (len % 8 == 4) { + // Four extra characters - 2 bytes + ret = (ret << 1) | (decoded >> 4); + bitlen -= 4; + } else if (len % 8 == 5) { + // Five extra characters - 3 bytes + ret = (ret << 4) | (decoded >> 1); + bitlen -= 1; + } else if (len % 8 == 7) { + // Seven extra characters - 4 bytes + ret = (ret << 2) | (decoded >> 3); + bitlen -= 3; + } else { + revert(); + } + + return bytes32(ret << (256 - bitlen)); + } + + /** + * @dev Finds the first occurrence of the byte `needle` in `self`. + * @param self The string to search + * @param off The offset to start searching at + * @param len The number of bytes to search + * @param needle The byte to search for + * @return The offset of `needle` in `self`, or 2**256-1 if it was not found. + */ + function find( + bytes memory self, + uint256 off, + uint256 len, + bytes1 needle + ) internal pure returns (uint256) { + for (uint256 idx = off; idx < off + len; idx++) { + if (self[idx] == needle) { + return idx; + } + } + return type(uint256).max; + } +} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/DelegatableResolver.sol b/packages/l1-contracts/contracts/delegatableResolvers/DelegatableResolver.sol new file mode 100644 index 000000000..92b0f3a7c --- /dev/null +++ b/packages/l1-contracts/contracts/delegatableResolvers/DelegatableResolver.sol @@ -0,0 +1,134 @@ +pragma solidity >=0.8.4; +import "./profiles/ABIResolver.sol"; +import "./profiles/AddrResolver.sol"; +import "./profiles/ContentHashResolver.sol"; +import "./profiles/DNSResolver.sol"; +import "./profiles/InterfaceResolver.sol"; +import "./profiles/NameResolver.sol"; +import "./profiles/PubkeyResolver.sol"; +import "./profiles/TextResolver.sol"; +import "./profiles/ExtendedResolver.sol"; +import "./Multicallable.sol"; +import "./IDelegatableResolver.sol"; +import {Clone} from "clones-with-immutable-args/src/Clone.sol"; + +/** + * A delegated resolver that allows the resolver owner to add an operator to update records of a node on behalf of the owner. + * address. + */ +contract DelegatableResolver is + Clone, + Multicallable, + ABIResolver, + AddrResolver, + ContentHashResolver, + DNSResolver, + InterfaceResolver, + NameResolver, + PubkeyResolver, + TextResolver, + ExtendedResolver +{ + using BytesUtils for bytes; + + // Logged when an operator is added or removed. + event Approval( + bytes32 indexed node, + address indexed operator, + bytes name, + bool approved + ); + + error NotAuthorized(bytes32 node); + + //node => (delegate => isAuthorised) + mapping(bytes32 => mapping(address => bool)) operators; + + /* + * Check to see if the operator has been approved by the owner for the node. + * @param name The ENS node to query + * @param offset The offset of the label to query recursively. Start from the 0 position and kepp adding the length of each label as it traverse. The function exits when len is 0. + * @param operator The address of the operator to query + * @return node The node of the name passed as an argument + * @return authorized The boolean state of whether the operator is approved to update record of the name + */ + function getAuthorisedNode( + bytes memory name, + uint256 offset, + address operator + ) public view returns (bytes32 node, bool authorized) { + uint256 len = name.readUint8(offset); + node = bytes32(0); + if (len > 0) { + bytes32 label = name.keccak(offset + 1, len); + (node, authorized) = getAuthorisedNode( + name, + offset + len + 1, + operator + ); + node = keccak256(abi.encodePacked(node, label)); + } else { + return ( + node, + authorized || operators[node][operator] || owner() == operator + ); + } + return (node, authorized || operators[node][operator]); + } + + /** + * @dev Approve an operator to be able to updated records on a node. + */ + function approve( + bytes memory name, + address operator, + bool approved + ) external { + (bytes32 node, bool authorized) = getAuthorisedNode( + name, + 0, + msg.sender + ); + if (!authorized) { + revert NotAuthorized(node); + } + operators[node][operator] = approved; + emit Approval(node, operator, name, approved); + } + + /* + * Returns the owner address passed set by the Factory + * @return address The owner address + */ + function owner() public view returns (address) { + return _getArgAddress(0); + } + + function isAuthorised(bytes32 node) internal view override returns (bool) { + return msg.sender == owner() || operators[node][msg.sender]; + } + + function supportsInterface( + bytes4 interfaceID + ) + public + view + virtual + override( + Multicallable, + ABIResolver, + AddrResolver, + ContentHashResolver, + DNSResolver, + InterfaceResolver, + NameResolver, + PubkeyResolver, + TextResolver + ) + returns (bool) + { + return + interfaceID == type(IDelegatableResolver).interfaceId || + super.supportsInterface(interfaceID); + } +} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/DelegatableResolverFactory.sol b/packages/l1-contracts/contracts/delegatableResolvers/DelegatableResolverFactory.sol new file mode 100644 index 000000000..1d4dbbea2 --- /dev/null +++ b/packages/l1-contracts/contracts/delegatableResolvers/DelegatableResolverFactory.sol @@ -0,0 +1,33 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.17; + +import "./DelegatableResolver.sol"; +import {ClonesWithImmutableArgs} from "clones-with-immutable-args/src/ClonesWithImmutableArgs.sol"; + +/** + * A resolver factory that creates a dedicated resolver for each user + */ + +contract DelegatableResolverFactory { + using ClonesWithImmutableArgs for address; + + DelegatableResolver public implementation; + event NewDelegatableResolver(address resolver, address owner); + + constructor(DelegatableResolver _implementation) { + implementation = _implementation; + } + + /* + * Create the unique address unique to the owner + * @param address The address of the resolver owner + * @return address The address of the newly created Resolver + */ + function create( + address owner + ) external returns (DelegatableResolver clone) { + bytes memory data = abi.encodePacked(owner); + clone = DelegatableResolver(address(implementation).clone2(data)); + emit NewDelegatableResolver(address(clone), owner); + } +} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/IDelegatableResolver.sol b/packages/l1-contracts/contracts/delegatableResolvers/IDelegatableResolver.sol new file mode 100644 index 000000000..f01b0c35b --- /dev/null +++ b/packages/l1-contracts/contracts/delegatableResolvers/IDelegatableResolver.sol @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.4; + +interface IDelegatableResolver { + function approve( + bytes memory name, + address operator, + bool approved + ) external; + + function getAuthorisedNode( + bytes memory name, + uint256 offset, + address operator + ) external returns (bytes32 node, bool authorized); + + function owner() external view returns (address); +} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/IMulticallable.sol b/packages/l1-contracts/contracts/delegatableResolvers/IMulticallable.sol new file mode 100644 index 000000000..9f51fb4c6 --- /dev/null +++ b/packages/l1-contracts/contracts/delegatableResolvers/IMulticallable.sol @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.4; + +interface IMulticallable { + function multicall( + bytes[] calldata data + ) external returns (bytes[] memory results); + + function multicallWithNodeCheck( + bytes32, + bytes[] calldata data + ) external returns (bytes[] memory results); +} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/Multicallable.sol b/packages/l1-contracts/contracts/delegatableResolvers/Multicallable.sol new file mode 100644 index 000000000..6200430ea --- /dev/null +++ b/packages/l1-contracts/contracts/delegatableResolvers/Multicallable.sol @@ -0,0 +1,53 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.4; + +import "./IMulticallable.sol"; +import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; + +abstract contract Multicallable is IMulticallable, ERC165 { + function _multicall( + bytes32 nodehash, + bytes[] calldata data + ) internal returns (bytes[] memory results) { + results = new bytes[](data.length); + for (uint256 i = 0; i < data.length; i++) { + if (nodehash != bytes32(0)) { + bytes32 txNamehash = bytes32(data[i][4:36]); + require( + txNamehash == nodehash, + "multicall: All records must have a matching namehash" + ); + } + (bool success, bytes memory result) = address(this).delegatecall( + data[i] + ); + require(success); + results[i] = result; + } + return results; + } + + // This function provides an extra security check when called + // from priviledged contracts (such as EthRegistrarController) + // that can set records on behalf of the node owners + function multicallWithNodeCheck( + bytes32 nodehash, + bytes[] calldata data + ) external returns (bytes[] memory results) { + return _multicall(nodehash, data); + } + + function multicall( + bytes[] calldata data + ) public override returns (bytes[] memory results) { + return _multicall(bytes32(0), data); + } + + function supportsInterface( + bytes4 interfaceID + ) public view virtual override returns (bool) { + return + interfaceID == type(IMulticallable).interfaceId || + super.supportsInterface(interfaceID); + } +} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/RRUtils.sol b/packages/l1-contracts/contracts/delegatableResolvers/RRUtils.sol new file mode 100644 index 000000000..20fbf15f0 --- /dev/null +++ b/packages/l1-contracts/contracts/delegatableResolvers/RRUtils.sol @@ -0,0 +1,433 @@ +pragma solidity ^0.8.4; + +import "./BytesUtils.sol"; +import "@ensdomains/buffer/contracts/Buffer.sol"; + +/** + * @dev RRUtils is a library that provides utilities for parsing DNS resource records. + */ +library RRUtils { + using BytesUtils for *; + using Buffer for *; + + /** + * @dev Returns the number of bytes in the DNS name at 'offset' in 'self'. + * @param self The byte array to read a name from. + * @param offset The offset to start reading at. + * @return The length of the DNS name at 'offset', in bytes. + */ + function nameLength( + bytes memory self, + uint256 offset + ) internal pure returns (uint256) { + uint256 idx = offset; + while (true) { + assert(idx < self.length); + uint256 labelLen = self.readUint8(idx); + idx += labelLen + 1; + if (labelLen == 0) { + break; + } + } + return idx - offset; + } + + /** + * @dev Returns a DNS format name at the specified offset of self. + * @param self The byte array to read a name from. + * @param offset The offset to start reading at. + * @return ret The name. + */ + function readName( + bytes memory self, + uint256 offset + ) internal pure returns (bytes memory ret) { + uint256 len = nameLength(self, offset); + return self.substring(offset, len); + } + + /** + * @dev Returns the number of labels in the DNS name at 'offset' in 'self'. + * @param self The byte array to read a name from. + * @param offset The offset to start reading at. + * @return The number of labels in the DNS name at 'offset', in bytes. + */ + function labelCount( + bytes memory self, + uint256 offset + ) internal pure returns (uint256) { + uint256 count = 0; + while (true) { + assert(offset < self.length); + uint256 labelLen = self.readUint8(offset); + offset += labelLen + 1; + if (labelLen == 0) { + break; + } + count += 1; + } + return count; + } + + uint256 constant RRSIG_TYPE = 0; + uint256 constant RRSIG_ALGORITHM = 2; + uint256 constant RRSIG_LABELS = 3; + uint256 constant RRSIG_TTL = 4; + uint256 constant RRSIG_EXPIRATION = 8; + uint256 constant RRSIG_INCEPTION = 12; + uint256 constant RRSIG_KEY_TAG = 16; + uint256 constant RRSIG_SIGNER_NAME = 18; + + struct SignedSet { + uint16 typeCovered; + uint8 algorithm; + uint8 labels; + uint32 ttl; + uint32 expiration; + uint32 inception; + uint16 keytag; + bytes signerName; + bytes data; + bytes name; + } + + function readSignedSet( + bytes memory data + ) internal pure returns (SignedSet memory self) { + self.typeCovered = data.readUint16(RRSIG_TYPE); + self.algorithm = data.readUint8(RRSIG_ALGORITHM); + self.labels = data.readUint8(RRSIG_LABELS); + self.ttl = data.readUint32(RRSIG_TTL); + self.expiration = data.readUint32(RRSIG_EXPIRATION); + self.inception = data.readUint32(RRSIG_INCEPTION); + self.keytag = data.readUint16(RRSIG_KEY_TAG); + self.signerName = readName(data, RRSIG_SIGNER_NAME); + self.data = data.substring( + RRSIG_SIGNER_NAME + self.signerName.length, + data.length - RRSIG_SIGNER_NAME - self.signerName.length + ); + } + + function rrs( + SignedSet memory rrset + ) internal pure returns (RRIterator memory) { + return iterateRRs(rrset.data, 0); + } + + /** + * @dev An iterator over resource records. + */ + struct RRIterator { + bytes data; + uint256 offset; + uint16 dnstype; + uint16 class; + uint32 ttl; + uint256 rdataOffset; + uint256 nextOffset; + } + + /** + * @dev Begins iterating over resource records. + * @param self The byte string to read from. + * @param offset The offset to start reading at. + * @return ret An iterator object. + */ + function iterateRRs( + bytes memory self, + uint256 offset + ) internal pure returns (RRIterator memory ret) { + ret.data = self; + ret.nextOffset = offset; + next(ret); + } + + /** + * @dev Returns true iff there are more RRs to iterate. + * @param iter The iterator to check. + * @return True iff the iterator has finished. + */ + function done(RRIterator memory iter) internal pure returns (bool) { + return iter.offset >= iter.data.length; + } + + /** + * @dev Moves the iterator to the next resource record. + * @param iter The iterator to advance. + */ + function next(RRIterator memory iter) internal pure { + iter.offset = iter.nextOffset; + if (iter.offset >= iter.data.length) { + return; + } + + // Skip the name + uint256 off = iter.offset + nameLength(iter.data, iter.offset); + + // Read type, class, and ttl + iter.dnstype = iter.data.readUint16(off); + off += 2; + iter.class = iter.data.readUint16(off); + off += 2; + iter.ttl = iter.data.readUint32(off); + off += 4; + + // Read the rdata + uint256 rdataLength = iter.data.readUint16(off); + off += 2; + iter.rdataOffset = off; + iter.nextOffset = off + rdataLength; + } + + /** + * @dev Returns the name of the current record. + * @param iter The iterator. + * @return A new bytes object containing the owner name from the RR. + */ + function name(RRIterator memory iter) internal pure returns (bytes memory) { + return + iter.data.substring( + iter.offset, + nameLength(iter.data, iter.offset) + ); + } + + /** + * @dev Returns the rdata portion of the current record. + * @param iter The iterator. + * @return A new bytes object containing the RR's RDATA. + */ + function rdata( + RRIterator memory iter + ) internal pure returns (bytes memory) { + return + iter.data.substring( + iter.rdataOffset, + iter.nextOffset - iter.rdataOffset + ); + } + + uint256 constant DNSKEY_FLAGS = 0; + uint256 constant DNSKEY_PROTOCOL = 2; + uint256 constant DNSKEY_ALGORITHM = 3; + uint256 constant DNSKEY_PUBKEY = 4; + + struct DNSKEY { + uint16 flags; + uint8 protocol; + uint8 algorithm; + bytes publicKey; + } + + function readDNSKEY( + bytes memory data, + uint256 offset, + uint256 length + ) internal pure returns (DNSKEY memory self) { + self.flags = data.readUint16(offset + DNSKEY_FLAGS); + self.protocol = data.readUint8(offset + DNSKEY_PROTOCOL); + self.algorithm = data.readUint8(offset + DNSKEY_ALGORITHM); + self.publicKey = data.substring( + offset + DNSKEY_PUBKEY, + length - DNSKEY_PUBKEY + ); + } + + uint256 constant DS_KEY_TAG = 0; + uint256 constant DS_ALGORITHM = 2; + uint256 constant DS_DIGEST_TYPE = 3; + uint256 constant DS_DIGEST = 4; + + struct DS { + uint16 keytag; + uint8 algorithm; + uint8 digestType; + bytes digest; + } + + function readDS( + bytes memory data, + uint256 offset, + uint256 length + ) internal pure returns (DS memory self) { + self.keytag = data.readUint16(offset + DS_KEY_TAG); + self.algorithm = data.readUint8(offset + DS_ALGORITHM); + self.digestType = data.readUint8(offset + DS_DIGEST_TYPE); + self.digest = data.substring(offset + DS_DIGEST, length - DS_DIGEST); + } + + function isSubdomainOf( + bytes memory self, + bytes memory other + ) internal pure returns (bool) { + uint256 off = 0; + uint256 counts = labelCount(self, 0); + uint256 othercounts = labelCount(other, 0); + + while (counts > othercounts) { + off = progress(self, off); + counts--; + } + + return self.equals(off, other, 0); + } + + function compareNames( + bytes memory self, + bytes memory other + ) internal pure returns (int256) { + if (self.equals(other)) { + return 0; + } + + uint256 off; + uint256 otheroff; + uint256 prevoff; + uint256 otherprevoff; + uint256 counts = labelCount(self, 0); + uint256 othercounts = labelCount(other, 0); + + // Keep removing labels from the front of the name until both names are equal length + while (counts > othercounts) { + prevoff = off; + off = progress(self, off); + counts--; + } + + while (othercounts > counts) { + otherprevoff = otheroff; + otheroff = progress(other, otheroff); + othercounts--; + } + + // Compare the last nonequal labels to each other + while (counts > 0 && !self.equals(off, other, otheroff)) { + prevoff = off; + off = progress(self, off); + otherprevoff = otheroff; + otheroff = progress(other, otheroff); + counts -= 1; + } + + if (off == 0) { + return -1; + } + if (otheroff == 0) { + return 1; + } + + return + self.compare( + prevoff + 1, + self.readUint8(prevoff), + other, + otherprevoff + 1, + other.readUint8(otherprevoff) + ); + } + + /** + * @dev Compares two serial numbers using RFC1982 serial number math. + */ + function serialNumberGte( + uint32 i1, + uint32 i2 + ) internal pure returns (bool) { + unchecked { + return int32(i1) - int32(i2) >= 0; + } + } + + function progress( + bytes memory body, + uint256 off + ) internal pure returns (uint256) { + return off + 1 + body.readUint8(off); + } + + /** + * @dev Computes the keytag for a chunk of data. + * @param data The data to compute a keytag for. + * @return The computed key tag. + */ + function computeKeytag(bytes memory data) internal pure returns (uint16) { + /* This function probably deserves some explanation. + * The DNSSEC keytag function is a checksum that relies on summing up individual bytes + * from the input string, with some mild bitshifting. Here's a Naive solidity implementation: + * + * function computeKeytag(bytes memory data) internal pure returns (uint16) { + * uint ac; + * for (uint i = 0; i < data.length; i++) { + * ac += i & 1 == 0 ? uint16(data.readUint8(i)) << 8 : data.readUint8(i); + * } + * return uint16(ac + (ac >> 16)); + * } + * + * The EVM, with its 256 bit words, is exceedingly inefficient at doing byte-by-byte operations; + * the code above, on reasonable length inputs, consumes over 100k gas. But we can make the EVM's + * large words work in our favour. + * + * The code below works by treating the input as a series of 256 bit words. It first masks out + * even and odd bytes from each input word, adding them to two separate accumulators `ac1` and `ac2`. + * The bytes are separated by empty bytes, so as long as no individual sum exceeds 2^16-1, we're + * effectively summing 16 different numbers with each EVM ADD opcode. + * + * Once it's added up all the inputs, it has to add all the 16 bit values in `ac1` and `ac2` together. + * It does this using the same trick - mask out every other value, shift to align them, add them together. + * After the first addition on both accumulators, there's enough room to add the two accumulators together, + * and the remaining sums can be done just on ac1. + */ + unchecked { + require(data.length <= 8192, "Long keys not permitted"); + uint256 ac1; + uint256 ac2; + for (uint256 i = 0; i < data.length + 31; i += 32) { + uint256 word; + assembly { + word := mload(add(add(data, 32), i)) + } + if (i + 32 > data.length) { + uint256 unused = 256 - (data.length - i) * 8; + word = (word >> unused) << unused; + } + ac1 += + (word & + 0xFF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00) >> + 8; + ac2 += (word & + 0x00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF); + } + ac1 = + (ac1 & + 0x0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF) + + ((ac1 & + 0xFFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000) >> + 16); + ac2 = + (ac2 & + 0x0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF) + + ((ac2 & + 0xFFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000) >> + 16); + ac1 = (ac1 << 8) + ac2; + ac1 = + (ac1 & + 0x00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF) + + ((ac1 & + 0xFFFFFFFF00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF00000000) >> + 32); + ac1 = + (ac1 & + 0x0000000000000000FFFFFFFFFFFFFFFF0000000000000000FFFFFFFFFFFFFFFF) + + ((ac1 & + 0xFFFFFFFFFFFFFFFF0000000000000000FFFFFFFFFFFFFFFF0000000000000000) >> + 64); + ac1 = + (ac1 & + 0x00000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) + + (ac1 >> 128); + ac1 += (ac1 >> 16) & 0xFFFF; + return uint16(ac1); + } + } +} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/ResolverBase.sol b/packages/l1-contracts/contracts/delegatableResolvers/ResolverBase.sol new file mode 100644 index 000000000..3eb8ba73f --- /dev/null +++ b/packages/l1-contracts/contracts/delegatableResolvers/ResolverBase.sol @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.4; + +import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; +import "./profiles/IVersionableResolver.sol"; + +abstract contract ResolverBase is ERC165, IVersionableResolver { + mapping(bytes32 => uint64) public recordVersions; + + function isAuthorised(bytes32 node) internal view virtual returns (bool); + + modifier authorised(bytes32 node) { + require(isAuthorised(node)); + _; + } + + /** + * Increments the record version associated with an ENS node. + * May only be called by the owner of that node in the ENS registry. + * @param node The node to update. + */ + function clearRecords(bytes32 node) public virtual authorised(node) { + recordVersions[node]++; + emit VersionChanged(node, recordVersions[node]); + } + + function supportsInterface( + bytes4 interfaceID + ) public view virtual override returns (bool) { + return + interfaceID == type(IVersionableResolver).interfaceId || + super.supportsInterface(interfaceID); + } +} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/profiles/ABIResolver.sol b/packages/l1-contracts/contracts/delegatableResolvers/profiles/ABIResolver.sol new file mode 100644 index 000000000..8af733276 --- /dev/null +++ b/packages/l1-contracts/contracts/delegatableResolvers/profiles/ABIResolver.sol @@ -0,0 +1,69 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.4; + +import "./IABIResolver.sol"; +import "../ResolverBase.sol"; + +abstract contract ABIResolver is IABIResolver, ResolverBase { + mapping(uint64 => mapping(bytes32 => mapping(uint256 => bytes))) versionable_abis; + + /** + * Sets the ABI associated with an ENS node. + * Nodes may have one ABI of each content type. To remove an ABI, set it to + * the empty string. + * @param node The node to update. + * @param contentType The content type of the ABI + * @param data The ABI data. + */ + function setABI( + bytes32 node, + uint256 contentType, + bytes calldata data + ) external virtual authorised(node) { + // Content types must be powers of 2 + require(((contentType - 1) & contentType) == 0); + + versionable_abis[recordVersions[node]][node][contentType] = data; + emit ABIChanged(node, contentType); + } + + /** + * Returns the ABI associated with an ENS node. + * Defined in EIP205. + * @param node The ENS node to query + * @param contentTypes A bitwise OR of the ABI formats accepted by the caller. + * @return contentType The content type of the return value + * @return data The ABI data + */ + function ABI( + bytes32 node, + uint256 contentTypes + ) external view virtual override returns (uint256, bytes memory) { + mapping(uint256 => bytes) storage abiset = versionable_abis[ + recordVersions[node] + ][node]; + + for ( + uint256 contentType = 1; + contentType <= contentTypes; + contentType <<= 1 + ) { + if ( + (contentType & contentTypes) != 0 && + abiset[contentType].length > 0 + ) { + return (contentType, abiset[contentType]); + } + } + + return (0, bytes("")); + } + + function supportsInterface( + bytes4 interfaceID + ) public view virtual override returns (bool) { + return + interfaceID == type(IABIResolver).interfaceId || + super.supportsInterface(interfaceID); + } +} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/profiles/AddrResolver.sol b/packages/l1-contracts/contracts/delegatableResolvers/profiles/AddrResolver.sol new file mode 100644 index 000000000..92a6efec2 --- /dev/null +++ b/packages/l1-contracts/contracts/delegatableResolvers/profiles/AddrResolver.sol @@ -0,0 +1,88 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.4; + +import "../ResolverBase.sol"; +import "./IAddrResolver.sol"; +import "./IAddressResolver.sol"; + +abstract contract AddrResolver is + IAddrResolver, + IAddressResolver, + ResolverBase +{ + uint256 private constant COIN_TYPE_ETH = 60; + + mapping(uint64 => mapping(bytes32 => mapping(uint256 => bytes))) versionable_addresses; + + /** + * Sets the address associated with an ENS node. + * May only be called by the owner of that node in the ENS registry. + * @param node The node to update. + * @param a The address to set. + */ + function setAddr( + bytes32 node, + address a + ) external virtual authorised(node) { + setAddr(node, COIN_TYPE_ETH, addressToBytes(a)); + } + + /** + * Returns the address associated with an ENS node. + * @param node The ENS node to query. + * @return The associated address. + */ + function addr( + bytes32 node + ) public view virtual override returns (address payable) { + bytes memory a = addr(node, COIN_TYPE_ETH); + if (a.length == 0) { + return payable(0); + } + return bytesToAddress(a); + } + + function setAddr( + bytes32 node, + uint256 coinType, + bytes memory a + ) public virtual authorised(node) { + emit AddressChanged(node, coinType, a); + if (coinType == COIN_TYPE_ETH) { + emit AddrChanged(node, bytesToAddress(a)); + } + versionable_addresses[recordVersions[node]][node][coinType] = a; + } + + function addr( + bytes32 node, + uint256 coinType + ) public view virtual override returns (bytes memory) { + return versionable_addresses[recordVersions[node]][node][coinType]; + } + + function supportsInterface( + bytes4 interfaceID + ) public view virtual override returns (bool) { + return + interfaceID == type(IAddrResolver).interfaceId || + interfaceID == type(IAddressResolver).interfaceId || + super.supportsInterface(interfaceID); + } + + function bytesToAddress( + bytes memory b + ) internal pure returns (address payable a) { + require(b.length == 20); + assembly { + a := div(mload(add(b, 32)), exp(256, 12)) + } + } + + function addressToBytes(address a) internal pure returns (bytes memory b) { + b = new bytes(20); + assembly { + mstore(add(b, 32), mul(a, exp(256, 12))) + } + } +} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/profiles/ContentHashResolver.sol b/packages/l1-contracts/contracts/delegatableResolvers/profiles/ContentHashResolver.sol new file mode 100644 index 000000000..57ade4bc8 --- /dev/null +++ b/packages/l1-contracts/contracts/delegatableResolvers/profiles/ContentHashResolver.sol @@ -0,0 +1,42 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.4; + +import "../ResolverBase.sol"; +import "./IContentHashResolver.sol"; + +abstract contract ContentHashResolver is IContentHashResolver, ResolverBase { + mapping(uint64 => mapping(bytes32 => bytes)) versionable_hashes; + + /** + * Sets the contenthash associated with an ENS node. + * May only be called by the owner of that node in the ENS registry. + * @param node The node to update. + * @param hash The contenthash to set + */ + function setContenthash( + bytes32 node, + bytes calldata hash + ) external virtual authorised(node) { + versionable_hashes[recordVersions[node]][node] = hash; + emit ContenthashChanged(node, hash); + } + + /** + * Returns the contenthash associated with an ENS node. + * @param node The ENS node to query. + * @return The associated contenthash. + */ + function contenthash( + bytes32 node + ) external view virtual override returns (bytes memory) { + return versionable_hashes[recordVersions[node]][node]; + } + + function supportsInterface( + bytes4 interfaceID + ) public view virtual override returns (bool) { + return + interfaceID == type(IContentHashResolver).interfaceId || + super.supportsInterface(interfaceID); + } +} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/profiles/DNSResolver.sol b/packages/l1-contracts/contracts/delegatableResolvers/profiles/DNSResolver.sol new file mode 100644 index 000000000..f679e971b --- /dev/null +++ b/packages/l1-contracts/contracts/delegatableResolvers/profiles/DNSResolver.sol @@ -0,0 +1,208 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.4; + +import "../ResolverBase.sol"; +import "../RRUtils.sol"; +import "./IDNSRecordResolver.sol"; +import "./IDNSZoneResolver.sol"; + +abstract contract DNSResolver is + IDNSRecordResolver, + IDNSZoneResolver, + ResolverBase +{ + using RRUtils for *; + using BytesUtils for bytes; + + // Zone hashes for the domains. + // A zone hash is an EIP-1577 content hash in binary format that should point to a + // resource containing a single zonefile. + // node => contenthash + mapping(uint64 => mapping(bytes32 => bytes)) private versionable_zonehashes; + + // The records themselves. Stored as binary RRSETs + // node => version => name => resource => data + mapping(uint64 => mapping(bytes32 => mapping(bytes32 => mapping(uint16 => bytes)))) + private versionable_records; + + // Count of number of entries for a given name. Required for DNS resolvers + // when resolving wildcards. + // node => version => name => number of records + mapping(uint64 => mapping(bytes32 => mapping(bytes32 => uint16))) + private versionable_nameEntriesCount; + + /** + * Set one or more DNS records. Records are supplied in wire-format. + * Records with the same node/name/resource must be supplied one after the + * other to ensure the data is updated correctly. For example, if the data + * was supplied: + * a.example.com IN A 1.2.3.4 + * a.example.com IN A 5.6.7.8 + * www.example.com IN CNAME a.example.com. + * then this would store the two A records for a.example.com correctly as a + * single RRSET, however if the data was supplied: + * a.example.com IN A 1.2.3.4 + * www.example.com IN CNAME a.example.com. + * a.example.com IN A 5.6.7.8 + * then this would store the first A record, the CNAME, then the second A + * record which would overwrite the first. + * + * @param node the namehash of the node for which to set the records + * @param data the DNS wire format records to set + */ + function setDNSRecords( + bytes32 node, + bytes calldata data + ) external virtual authorised(node) { + uint16 resource = 0; + uint256 offset = 0; + bytes memory name; + bytes memory value; + bytes32 nameHash; + uint64 version = recordVersions[node]; + // Iterate over the data to add the resource records + for ( + RRUtils.RRIterator memory iter = data.iterateRRs(0); + !iter.done(); + iter.next() + ) { + if (resource == 0) { + resource = iter.dnstype; + name = iter.name(); + nameHash = keccak256(abi.encodePacked(name)); + value = bytes(iter.rdata()); + } else { + bytes memory newName = iter.name(); + if (resource != iter.dnstype || !name.equals(newName)) { + setDNSRRSet( + node, + name, + resource, + data, + offset, + iter.offset - offset, + value.length == 0, + version + ); + resource = iter.dnstype; + offset = iter.offset; + name = newName; + nameHash = keccak256(name); + value = bytes(iter.rdata()); + } + } + } + if (name.length > 0) { + setDNSRRSet( + node, + name, + resource, + data, + offset, + data.length - offset, + value.length == 0, + version + ); + } + } + + /** + * Obtain a DNS record. + * @param node the namehash of the node for which to fetch the record + * @param name the keccak-256 hash of the fully-qualified name for which to fetch the record + * @param resource the ID of the resource as per https://en.wikipedia.org/wiki/List_of_DNS_record_types + * @return the DNS record in wire format if present, otherwise empty + */ + function dnsRecord( + bytes32 node, + bytes32 name, + uint16 resource + ) public view virtual override returns (bytes memory) { + return versionable_records[recordVersions[node]][node][name][resource]; + } + + /** + * Check if a given node has records. + * @param node the namehash of the node for which to check the records + * @param name the namehash of the node for which to check the records + */ + function hasDNSRecords( + bytes32 node, + bytes32 name + ) public view virtual returns (bool) { + return (versionable_nameEntriesCount[recordVersions[node]][node][ + name + ] != 0); + } + + /** + * setZonehash sets the hash for the zone. + * May only be called by the owner of that node in the ENS registry. + * @param node The node to update. + * @param hash The zonehash to set + */ + function setZonehash( + bytes32 node, + bytes calldata hash + ) external virtual authorised(node) { + uint64 currentRecordVersion = recordVersions[node]; + bytes memory oldhash = versionable_zonehashes[currentRecordVersion][ + node + ]; + versionable_zonehashes[currentRecordVersion][node] = hash; + emit DNSZonehashChanged(node, oldhash, hash); + } + + /** + * zonehash obtains the hash for the zone. + * @param node The ENS node to query. + * @return The associated contenthash. + */ + function zonehash( + bytes32 node + ) external view virtual override returns (bytes memory) { + return versionable_zonehashes[recordVersions[node]][node]; + } + + function supportsInterface( + bytes4 interfaceID + ) public view virtual override returns (bool) { + return + interfaceID == type(IDNSRecordResolver).interfaceId || + interfaceID == type(IDNSZoneResolver).interfaceId || + super.supportsInterface(interfaceID); + } + + function setDNSRRSet( + bytes32 node, + bytes memory name, + uint16 resource, + bytes memory data, + uint256 offset, + uint256 size, + bool deleteRecord, + uint64 version + ) private { + bytes32 nameHash = keccak256(name); + bytes memory rrData = data.substring(offset, size); + if (deleteRecord) { + if ( + versionable_records[version][node][nameHash][resource].length != + 0 + ) { + versionable_nameEntriesCount[version][node][nameHash]--; + } + delete (versionable_records[version][node][nameHash][resource]); + emit DNSRecordDeleted(node, name, resource); + } else { + if ( + versionable_records[version][node][nameHash][resource].length == + 0 + ) { + versionable_nameEntriesCount[version][node][nameHash]++; + } + versionable_records[version][node][nameHash][resource] = rrData; + emit DNSRecordChanged(node, name, resource, rrData); + } + } +} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/profiles/ExtendedResolver.sol b/packages/l1-contracts/contracts/delegatableResolvers/profiles/ExtendedResolver.sol new file mode 100644 index 000000000..e3159c343 --- /dev/null +++ b/packages/l1-contracts/contracts/delegatableResolvers/profiles/ExtendedResolver.sol @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.4; + +contract ExtendedResolver { + function resolve( + bytes memory /* name */, + bytes memory data + ) external view returns (bytes memory) { + (bool success, bytes memory result) = address(this).staticcall(data); + if (success) { + return result; + } else { + // Revert with the reason provided by the call + assembly { + revert(add(result, 0x20), mload(result)) + } + } + } +} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/profiles/IABIResolver.sol b/packages/l1-contracts/contracts/delegatableResolvers/profiles/IABIResolver.sol new file mode 100644 index 000000000..c8b4b2660 --- /dev/null +++ b/packages/l1-contracts/contracts/delegatableResolvers/profiles/IABIResolver.sol @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.4; + +interface IABIResolver { + event ABIChanged(bytes32 indexed node, uint256 indexed contentType); + + /** + * Returns the ABI associated with an ENS node. + * Defined in EIP205. + * @param node The ENS node to query + * @param contentTypes A bitwise OR of the ABI formats accepted by the caller. + * @return contentType The content type of the return value + * @return data The ABI data + */ + function ABI( + bytes32 node, + uint256 contentTypes + ) external view returns (uint256, bytes memory); +} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/profiles/IAddrResolver.sol b/packages/l1-contracts/contracts/delegatableResolvers/profiles/IAddrResolver.sol new file mode 100644 index 000000000..6ae6628d1 --- /dev/null +++ b/packages/l1-contracts/contracts/delegatableResolvers/profiles/IAddrResolver.sol @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.4; + +/** + * Interface for the legacy (ETH-only) addr function. + */ +interface IAddrResolver { + event AddrChanged(bytes32 indexed node, address a); + + /** + * Returns the address associated with an ENS node. + * @param node The ENS node to query. + * @return The associated address. + */ + function addr(bytes32 node) external view returns (address payable); +} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/profiles/IAddressResolver.sol b/packages/l1-contracts/contracts/delegatableResolvers/profiles/IAddressResolver.sol new file mode 100644 index 000000000..28e838648 --- /dev/null +++ b/packages/l1-contracts/contracts/delegatableResolvers/profiles/IAddressResolver.sol @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.4; + +/** + * Interface for the new (multicoin) addr function. + */ +interface IAddressResolver { + event AddressChanged( + bytes32 indexed node, + uint256 coinType, + bytes newAddress + ); + + function addr( + bytes32 node, + uint256 coinType + ) external view returns (bytes memory); +} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/profiles/IContentHashResolver.sol b/packages/l1-contracts/contracts/delegatableResolvers/profiles/IContentHashResolver.sol new file mode 100644 index 000000000..64b50ddf0 --- /dev/null +++ b/packages/l1-contracts/contracts/delegatableResolvers/profiles/IContentHashResolver.sol @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.4; + +interface IContentHashResolver { + event ContenthashChanged(bytes32 indexed node, bytes hash); + + /** + * Returns the contenthash associated with an ENS node. + * @param node The ENS node to query. + * @return The associated contenthash. + */ + function contenthash(bytes32 node) external view returns (bytes memory); +} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/profiles/IDNSRecordResolver.sol b/packages/l1-contracts/contracts/delegatableResolvers/profiles/IDNSRecordResolver.sol new file mode 100644 index 000000000..ac849dcaa --- /dev/null +++ b/packages/l1-contracts/contracts/delegatableResolvers/profiles/IDNSRecordResolver.sol @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.4; + +interface IDNSRecordResolver { + // DNSRecordChanged is emitted whenever a given node/name/resource's RRSET is updated. + event DNSRecordChanged( + bytes32 indexed node, + bytes name, + uint16 resource, + bytes record + ); + // DNSRecordDeleted is emitted whenever a given node/name/resource's RRSET is deleted. + event DNSRecordDeleted(bytes32 indexed node, bytes name, uint16 resource); + + /** + * Obtain a DNS record. + * @param node the namehash of the node for which to fetch the record + * @param name the keccak-256 hash of the fully-qualified name for which to fetch the record + * @param resource the ID of the resource as per https://en.wikipedia.org/wiki/List_of_DNS_record_types + * @return the DNS record in wire format if present, otherwise empty + */ + function dnsRecord( + bytes32 node, + bytes32 name, + uint16 resource + ) external view returns (bytes memory); +} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/profiles/IDNSZoneResolver.sol b/packages/l1-contracts/contracts/delegatableResolvers/profiles/IDNSZoneResolver.sol new file mode 100644 index 000000000..b4caad566 --- /dev/null +++ b/packages/l1-contracts/contracts/delegatableResolvers/profiles/IDNSZoneResolver.sol @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.4; + +interface IDNSZoneResolver { + // DNSZonehashChanged is emitted whenever a given node's zone hash is updated. + event DNSZonehashChanged( + bytes32 indexed node, + bytes lastzonehash, + bytes zonehash + ); + + /** + * zonehash obtains the hash for the zone. + * @param node The ENS node to query. + * @return The associated contenthash. + */ + function zonehash(bytes32 node) external view returns (bytes memory); +} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/profiles/IExtendedDNSResolver.sol b/packages/l1-contracts/contracts/delegatableResolvers/profiles/IExtendedDNSResolver.sol new file mode 100644 index 000000000..f59a07ebc --- /dev/null +++ b/packages/l1-contracts/contracts/delegatableResolvers/profiles/IExtendedDNSResolver.sol @@ -0,0 +1,10 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.4; + +interface IExtendedDNSResolver { + function resolve( + bytes memory name, + bytes memory data, + bytes memory context + ) external view returns (bytes memory); +} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/profiles/IExtendedResolver.sol b/packages/l1-contracts/contracts/delegatableResolvers/profiles/IExtendedResolver.sol new file mode 100644 index 000000000..c5fbb217d --- /dev/null +++ b/packages/l1-contracts/contracts/delegatableResolvers/profiles/IExtendedResolver.sol @@ -0,0 +1,9 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.4; + +interface IExtendedResolver { + function resolve( + bytes memory name, + bytes memory data + ) external view returns (bytes memory); +} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/profiles/IInterfaceResolver.sol b/packages/l1-contracts/contracts/delegatableResolvers/profiles/IInterfaceResolver.sol new file mode 100644 index 000000000..3e7fd9505 --- /dev/null +++ b/packages/l1-contracts/contracts/delegatableResolvers/profiles/IInterfaceResolver.sol @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.4; + +interface IInterfaceResolver { + event InterfaceChanged( + bytes32 indexed node, + bytes4 indexed interfaceID, + address implementer + ); + + /** + * Returns the address of a contract that implements the specified interface for this name. + * If an implementer has not been set for this interfaceID and name, the resolver will query + * the contract at `addr()`. If `addr()` is set, a contract exists at that address, and that + * contract implements EIP165 and returns `true` for the specified interfaceID, its address + * will be returned. + * @param node The ENS node to query. + * @param interfaceID The EIP 165 interface ID to check for. + * @return The address that implements this interface, or 0 if the interface is unsupported. + */ + function interfaceImplementer( + bytes32 node, + bytes4 interfaceID + ) external view returns (address); +} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/profiles/INameResolver.sol b/packages/l1-contracts/contracts/delegatableResolvers/profiles/INameResolver.sol new file mode 100644 index 000000000..639d3284b --- /dev/null +++ b/packages/l1-contracts/contracts/delegatableResolvers/profiles/INameResolver.sol @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.4; + +interface INameResolver { + event NameChanged(bytes32 indexed node, string name); + + /** + * Returns the name associated with an ENS node, for reverse records. + * Defined in EIP181. + * @param node The ENS node to query. + * @return The associated name. + */ + function name(bytes32 node) external view returns (string memory); +} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/profiles/IPubkeyResolver.sol b/packages/l1-contracts/contracts/delegatableResolvers/profiles/IPubkeyResolver.sol new file mode 100644 index 000000000..db8cd53f5 --- /dev/null +++ b/packages/l1-contracts/contracts/delegatableResolvers/profiles/IPubkeyResolver.sol @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.4; + +interface IPubkeyResolver { + event PubkeyChanged(bytes32 indexed node, bytes32 x, bytes32 y); + + /** + * Returns the SECP256k1 public key associated with an ENS node. + * Defined in EIP 619. + * @param node The ENS node to query + * @return x The X coordinate of the curve point for the public key. + * @return y The Y coordinate of the curve point for the public key. + */ + function pubkey(bytes32 node) external view returns (bytes32 x, bytes32 y); +} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/profiles/ITextResolver.sol b/packages/l1-contracts/contracts/delegatableResolvers/profiles/ITextResolver.sol new file mode 100644 index 000000000..85a809712 --- /dev/null +++ b/packages/l1-contracts/contracts/delegatableResolvers/profiles/ITextResolver.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.4; + +interface ITextResolver { + event TextChanged( + bytes32 indexed node, + string indexed indexedKey, + string key, + string value + ); + + /** + * Returns the text data associated with an ENS node and key. + * @param node The ENS node to query. + * @param key The text data key to query. + * @return The associated text data. + */ + function text( + bytes32 node, + string calldata key + ) external view returns (string memory); +} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/profiles/IVersionableResolver.sol b/packages/l1-contracts/contracts/delegatableResolvers/profiles/IVersionableResolver.sol new file mode 100644 index 000000000..01c074aec --- /dev/null +++ b/packages/l1-contracts/contracts/delegatableResolvers/profiles/IVersionableResolver.sol @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.4; + +interface IVersionableResolver { + event VersionChanged(bytes32 indexed node, uint64 newVersion); + + function recordVersions(bytes32 node) external view returns (uint64); +} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/profiles/InterfaceResolver.sol b/packages/l1-contracts/contracts/delegatableResolvers/profiles/InterfaceResolver.sol new file mode 100644 index 000000000..da0aeac39 --- /dev/null +++ b/packages/l1-contracts/contracts/delegatableResolvers/profiles/InterfaceResolver.sol @@ -0,0 +1,85 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.4; + +import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; +import "../ResolverBase.sol"; +import "./AddrResolver.sol"; +import "./IInterfaceResolver.sol"; + +abstract contract InterfaceResolver is IInterfaceResolver, AddrResolver { + mapping(uint64 => mapping(bytes32 => mapping(bytes4 => address))) versionable_interfaces; + + /** + * Sets an interface associated with a name. + * Setting the address to 0 restores the default behaviour of querying the contract at `addr()` for interface support. + * @param node The node to update. + * @param interfaceID The EIP 165 interface ID. + * @param implementer The address of a contract that implements this interface for this node. + */ + function setInterface( + bytes32 node, + bytes4 interfaceID, + address implementer + ) external virtual authorised(node) { + versionable_interfaces[recordVersions[node]][node][ + interfaceID + ] = implementer; + emit InterfaceChanged(node, interfaceID, implementer); + } + + /** + * Returns the address of a contract that implements the specified interface for this name. + * If an implementer has not been set for this interfaceID and name, the resolver will query + * the contract at `addr()`. If `addr()` is set, a contract exists at that address, and that + * contract implements EIP165 and returns `true` for the specified interfaceID, its address + * will be returned. + * @param node The ENS node to query. + * @param interfaceID The EIP 165 interface ID to check for. + * @return The address that implements this interface, or 0 if the interface is unsupported. + */ + function interfaceImplementer( + bytes32 node, + bytes4 interfaceID + ) external view virtual override returns (address) { + address implementer = versionable_interfaces[recordVersions[node]][ + node + ][interfaceID]; + if (implementer != address(0)) { + return implementer; + } + + address a = addr(node); + if (a == address(0)) { + return address(0); + } + + (bool success, bytes memory returnData) = a.staticcall( + abi.encodeWithSignature( + "supportsInterface(bytes4)", + type(IERC165).interfaceId + ) + ); + if (!success || returnData.length < 32 || returnData[31] == 0) { + // EIP 165 not supported by target + return address(0); + } + + (success, returnData) = a.staticcall( + abi.encodeWithSignature("supportsInterface(bytes4)", interfaceID) + ); + if (!success || returnData.length < 32 || returnData[31] == 0) { + // Specified interface not supported by target + return address(0); + } + + return a; + } + + function supportsInterface( + bytes4 interfaceID + ) public view virtual override returns (bool) { + return + interfaceID == type(IInterfaceResolver).interfaceId || + super.supportsInterface(interfaceID); + } +} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/profiles/NameResolver.sol b/packages/l1-contracts/contracts/delegatableResolvers/profiles/NameResolver.sol new file mode 100644 index 000000000..a2452ea7f --- /dev/null +++ b/packages/l1-contracts/contracts/delegatableResolvers/profiles/NameResolver.sol @@ -0,0 +1,42 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.4; + +import "../ResolverBase.sol"; +import "./INameResolver.sol"; + +abstract contract NameResolver is INameResolver, ResolverBase { + mapping(uint64 => mapping(bytes32 => string)) versionable_names; + + /** + * Sets the name associated with an ENS node, for reverse records. + * May only be called by the owner of that node in the ENS registry. + * @param node The node to update. + */ + function setName( + bytes32 node, + string calldata newName + ) external virtual authorised(node) { + versionable_names[recordVersions[node]][node] = newName; + emit NameChanged(node, newName); + } + + /** + * Returns the name associated with an ENS node, for reverse records. + * Defined in EIP181. + * @param node The ENS node to query. + * @return The associated name. + */ + function name( + bytes32 node + ) external view virtual override returns (string memory) { + return versionable_names[recordVersions[node]][node]; + } + + function supportsInterface( + bytes4 interfaceID + ) public view virtual override returns (bool) { + return + interfaceID == type(INameResolver).interfaceId || + super.supportsInterface(interfaceID); + } +} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/profiles/PubkeyResolver.sol b/packages/l1-contracts/contracts/delegatableResolvers/profiles/PubkeyResolver.sol new file mode 100644 index 000000000..7d22d546a --- /dev/null +++ b/packages/l1-contracts/contracts/delegatableResolvers/profiles/PubkeyResolver.sol @@ -0,0 +1,54 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.4; + +import "../ResolverBase.sol"; +import "./IPubkeyResolver.sol"; + +abstract contract PubkeyResolver is IPubkeyResolver, ResolverBase { + struct PublicKey { + bytes32 x; + bytes32 y; + } + + mapping(uint64 => mapping(bytes32 => PublicKey)) versionable_pubkeys; + + /** + * Sets the SECP256k1 public key associated with an ENS node. + * @param node The ENS node to query + * @param x the X coordinate of the curve point for the public key. + * @param y the Y coordinate of the curve point for the public key. + */ + function setPubkey( + bytes32 node, + bytes32 x, + bytes32 y + ) external virtual authorised(node) { + versionable_pubkeys[recordVersions[node]][node] = PublicKey(x, y); + emit PubkeyChanged(node, x, y); + } + + /** + * Returns the SECP256k1 public key associated with an ENS node. + * Defined in EIP 619. + * @param node The ENS node to query + * @return x The X coordinate of the curve point for the public key. + * @return y The Y coordinate of the curve point for the public key. + */ + function pubkey( + bytes32 node + ) external view virtual override returns (bytes32 x, bytes32 y) { + uint64 currentRecordVersion = recordVersions[node]; + return ( + versionable_pubkeys[currentRecordVersion][node].x, + versionable_pubkeys[currentRecordVersion][node].y + ); + } + + function supportsInterface( + bytes4 interfaceID + ) public view virtual override returns (bool) { + return + interfaceID == type(IPubkeyResolver).interfaceId || + super.supportsInterface(interfaceID); + } +} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/profiles/TextResolver.sol b/packages/l1-contracts/contracts/delegatableResolvers/profiles/TextResolver.sol new file mode 100644 index 000000000..7f4d90618 --- /dev/null +++ b/packages/l1-contracts/contracts/delegatableResolvers/profiles/TextResolver.sol @@ -0,0 +1,46 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.4; + +import "../ResolverBase.sol"; +import "./ITextResolver.sol"; + +abstract contract TextResolver is ITextResolver, ResolverBase { + mapping(uint64 => mapping(bytes32 => mapping(string => string))) versionable_texts; + + /** + * Sets the text data associated with an ENS node and key. + * May only be called by the owner of that node in the ENS registry. + * @param node The node to update. + * @param key The key to set. + * @param value The text data value to set. + */ + function setText( + bytes32 node, + string calldata key, + string calldata value + ) external virtual authorised(node) { + versionable_texts[recordVersions[node]][node][key] = value; + emit TextChanged(node, key, key, value); + } + + /** + * Returns the text data associated with an ENS node and key. + * @param node The ENS node to query. + * @param key The text data key to query. + * @return The associated text data. + */ + function text( + bytes32 node, + string calldata key + ) external view virtual override returns (string memory) { + return versionable_texts[recordVersions[node]][node][key]; + } + + function supportsInterface( + bytes4 interfaceID + ) public view virtual override returns (bool) { + return + interfaceID == type(ITextResolver).interfaceId || + super.supportsInterface(interfaceID); + } +} diff --git a/packages/l1-contracts/contracts/deps.sol b/packages/l1-contracts/contracts/deps.sol new file mode 100644 index 000000000..a968a7a7f --- /dev/null +++ b/packages/l1-contracts/contracts/deps.sol @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: MIT + +import "@ensdomains/ens-contracts/contracts/registry/ENSRegistry.sol"; +import "@ensdomains/ens-contracts/contracts/wrapper/NameWrapper.sol"; +import "@ensdomains/ens-contracts/contracts/ethregistrar/BaseRegistrarImplementation.sol"; +import "@ensdomains/ens-contracts/contracts/wrapper/StaticMetadataService.sol"; +import {ReverseRegistrar} from "@ensdomains/ens-contracts/contracts/reverseRegistrar/ReverseRegistrar.sol"; +import {PublicResolver} from "@ensdomains/ens-contracts/contracts/resolvers/PublicResolver.sol"; diff --git a/packages/l1-contracts/hardhat.config.ts b/packages/l1-contracts/hardhat.config.ts index 31082e96d..7633670d8 100644 --- a/packages/l1-contracts/hardhat.config.ts +++ b/packages/l1-contracts/hardhat.config.ts @@ -5,7 +5,20 @@ import * as dotenv from "dotenv"; dotenv.config(); const config: HardhatUserConfig = { - solidity: "0.8.19", + solidity: { + compilers: [ + { + version: "0.8.25", + settings: { + optimizer: { + enabled: true, + runs: 200, + }, + viaIR: true, + }, + }, + ], + }, }; export default config; diff --git a/packages/l1-contracts/package.json b/packages/l1-contracts/package.json index c87470933..d4b89008d 100644 --- a/packages/l1-contracts/package.json +++ b/packages/l1-contracts/package.json @@ -4,15 +4,31 @@ "description": "", "main": "index.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "test": "mocha test/testL1Resolver.spec.ts --timeout 10000 --exit", + "compile": "hardhat compile", + "clean": "rm -fr artifacts cache node_modules typechain-types" }, "keywords": [], "author": "", "license": "ISC", "dependencies": { - "@ensdomains/ens-contracts": "^0.0.22", + "@chainlink/ccip-read-server": "^0.2.1", + "@ensdomains/buffer": "^0.1.1", + "@ensdomains/ens-contracts": "^1.1.4", + "@nomicfoundation/hardhat-ethers": "^3.0.0", + "@nomicfoundation/hardhat-toolbox": "^5.0.0", + "@openzeppelin/contracts": "^4.1.0", + "chai": "^4.2.0", + "clones-with-immutable-args": "Arachnid/clones-with-immutable-args#feature/create2", + "dns-packet": "^5.6.1", "dotenv": "^16.0.3", + "ethers": "^6.11.1", "hardhat": "^2.22.1", - "linea-verifier": "^1.0.0" + "linea-resolver-gateway": "^1.0.0", + "linea-verifier": "^1.0.0", + "mocha": "^10.3.0", + "supertest": "^6.3.3", + "ts-node": "^10.9.2", + "tslib": "^2.6.2" } -} +} \ No newline at end of file diff --git a/packages/l1-contracts/test/testL1Resolver.spec.ts b/packages/l1-contracts/test/testL1Resolver.spec.ts new file mode 100644 index 000000000..594425e3f --- /dev/null +++ b/packages/l1-contracts/test/testL1Resolver.spec.ts @@ -0,0 +1,377 @@ +import { makeL2Gateway } from "linea-resolver-gateway"; +import { Server } from "@chainlink/ccip-read-server"; +import { HardhatEthersProvider } from "@nomicfoundation/hardhat-ethers/internal/hardhat-ethers-provider"; +import type { HardhatEthersHelpers } from "@nomicfoundation/hardhat-ethers/types"; +import { expect } from "chai"; +import { + BrowserProvider, + Contract, + JsonRpcProvider, + Signer, + ethers as ethersT, +} from "ethers"; +import { FetchRequest } from "ethers"; +import { ethers } from "hardhat"; +import { EthereumProvider } from "hardhat/types"; +import request from "supertest"; +import packet from "dns-packet"; +const labelhash = (label) => ethers.keccak256(ethers.toUtf8Bytes(label)); +const encodeName = (name) => "0x" + packet.name.encode(name).toString("hex"); +const name = "foo.eth"; +const node = ethers.namehash(name); +const encodedname = encodeName(name); + +const EMPTY_ADDRESS = "0x0000000000000000000000000000000000000000"; +const EMPTY_BYTES32 = + "0x0000000000000000000000000000000000000000000000000000000000000000"; + +type ethersObj = typeof ethersT & + Omit & { + provider: Omit & { + _hardhatProvider: EthereumProvider; + }; + }; + +declare module "hardhat/types/runtime" { + const ethers: ethersObj; + interface HardhatRuntimeEnvironment { + ethers: ethersObj; + } +} + +describe("Crosschain Resolver", () => { + let l1Provider: BrowserProvider; + let l2Provider: JsonRpcProvider; + let signer: Signer; + let verifier: Contract; + let target: Contract; + let l2contract: Contract; + let ens: Contract; + let wrapper: Contract; + let baseRegistrar: Contract; + let signerAddress, resolverAddress, wrapperAddress; + + before(async () => { + // Hack to get a 'real' ethers provider from hardhat. The default `HardhatProvider` + // doesn't support CCIP-read. + l1Provider = new ethers.BrowserProvider(ethers.provider._hardhatProvider); + l2Provider = new ethers.JsonRpcProvider( + process.env.L2_PROVIDER_URL, + 59140, + { + staticNetwork: true, + } + ); + // provider.on("debug", (x: any) => console.log(JSON.stringify(x, undefined, 2))); + signer = await l1Provider.getSigner(0); + signerAddress = await signer.getAddress(); + + const Rollup = await ethers.getContractFactory("RollupMock", signer); + const rollup = await Rollup.deploy(); + + const gateway = makeL2Gateway( + l1Provider as unknown as JsonRpcProvider, + l2Provider, + await rollup.getAddress() + ); + const server = new Server(); + gateway.add(server); + const app = server.makeApp("/"); + const getUrl = FetchRequest.createGetUrlFunc(); + ethers.FetchRequest.registerGetUrl(async (req: FetchRequest) => { + if (req.url != "test:") return getUrl(req); + + const r = request(app).post("/"); + if (req.hasBody()) { + r.set("Content-Type", "application/json").send( + ethers.toUtf8String(req.body) + ); + } + const response = await r; + return { + statusCode: response.statusCode, + statusMessage: response.ok ? "OK" : response.statusCode.toString(), + body: ethers.toUtf8Bytes(JSON.stringify(response.body)), + headers: { + "Content-Type": "application/json", + }, + }; + }); + const ensFactory = await ethers.getContractFactory("ENSRegistry", signer); + ens = await ensFactory.deploy(); + const ensAddress = await ens.getAddress(); + const baseRegistrarFactory = await ethers.getContractFactory( + "BaseRegistrarImplementation", + signer + ); + baseRegistrar = await baseRegistrarFactory.deploy( + ensAddress, + ethers.namehash("eth") + ); + const baseRegistrarAddress = await baseRegistrar.getAddress(); + await baseRegistrar.addController(signerAddress); + const metaDataserviceFactory = await ethers.getContractFactory( + "StaticMetadataService", + signer + ); + const metaDataservice = await metaDataserviceFactory.deploy( + "https://ens.domains" + ); + const metaDataserviceAddress = await metaDataservice.getAddress(); + const reverseRegistrarFactory = await ethers.getContractFactory( + "ReverseRegistrar", + signer + ); + const reverseRegistrar = await reverseRegistrarFactory.deploy(ensAddress); + const reverseRegistrarAddress = await reverseRegistrar.getAddress(); + await ens.setSubnodeOwner( + EMPTY_BYTES32, + labelhash("reverse"), + signerAddress + ); + await ens.setSubnodeOwner( + ethers.namehash("reverse"), + labelhash("addr"), + reverseRegistrarAddress + ); + await ens.setSubnodeOwner( + EMPTY_BYTES32, + labelhash("eth"), + baseRegistrarAddress + ); + await baseRegistrar.register(labelhash("foo"), signerAddress, 100000000); + const publicResolverFactory = await ethers.getContractFactory( + "PublicResolver", + signer + ); + const publicResolver = await publicResolverFactory.deploy( + ensAddress, + "0x0000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000", + reverseRegistrarAddress + ); + const publicResolverAddress = await publicResolver.getAddress(); + await reverseRegistrar.setDefaultResolver(publicResolverAddress); + + const wrapperFactory = await ethers.getContractFactory( + "NameWrapper", + signer + ); + await l1Provider.send("evm_mine", []); + wrapper = await wrapperFactory.deploy( + ensAddress, + baseRegistrarAddress, + metaDataserviceAddress + ); + wrapperAddress = await wrapper.getAddress(); + const impl = await ethers.getContractFactory("DelegatableResolver", signer); + const implContract = await impl.deploy(); + const testL2Factory = await ethers.getContractFactory( + "DelegatableResolverFactory", + signer + ); + const l2factoryContract = await testL2Factory.deploy( + await implContract.getAddress() + ); + const tx = await l2factoryContract.create(await signer.getAddress()); + await l1Provider.send("evm_mine", []); + await tx.wait(); + const logs = await l2factoryContract.queryFilter("NewDelegatableResolver"); + const [resolver] = logs[0].topics; + resolverAddress = resolver; + + const Mimc = await ethers.getContractFactory("Mimc", signer); + const mimc = await Mimc.deploy(); + + const SparseMerkleProof = await ethers.getContractFactory( + "SparseMerkleProof", + { libraries: { Mimc: await mimc.getAddress() }, signer } + ); + const sparseMerkleProof = await SparseMerkleProof.deploy(); + + const verifierFactory = await ethers.getContractFactory("Verifier", { + libraries: { + SparseMerkleProof: await sparseMerkleProof.getAddress(), + }, + signer, + }); + verifier = await verifierFactory.deploy( + ["test:"], + await rollup.getAddress() + ); + + const l1ResolverFactory = await ethers.getContractFactory( + "L1Resolver", + signer + ); + const verifierAddress = await verifier.getAddress(); + target = await l1ResolverFactory.deploy( + verifierAddress, + ensAddress, + wrapperAddress + ); + // Mine an empty block so we have something to prove against + await l1Provider.send("evm_mine", []); + l2contract = impl.attach(resolverAddress); + }); + + it("should not allow non owner to set target", async () => { + const incorrectnode = ethers.namehash("notowned.eth"); + const incorrectname = encodeName("notowned.eth"); + // For some reason expect().to.be.reverted isn't working + // Throwing Error: missing revert data (action="estimateGas"... + try { + await target.setTarget(incorrectnode, resolverAddress); + } catch (e) {} + + const result = await target.getTarget(incorrectname, 0); + expect(result[1]).to.equal(EMPTY_ADDRESS); + }); + + it("should allow owner to set target", async () => { + await target.setTarget(node, signerAddress); + const result = await target.getTarget(encodeName(name), 0); + expect(result[1]).to.equal(signerAddress); + }); + + it("subname should get target of its parent", async () => { + const subname = "d.foo.eth"; + const encodedsubname = encodeName(subname); + const subnode = ethers.namehash(subname); + await target.setTarget(node, signerAddress); + const result = await target.getTarget(encodedsubname, 0); + expect(result[0]).to.equal(subnode); + expect(result[1]).to.equal(signerAddress); + }); + + it("should allow wrapped owner to set target", async () => { + const label = "wrapped"; + const tokenId = labelhash(label); + await baseRegistrar.setApprovalForAll(wrapperAddress, true); + await baseRegistrar.register(tokenId, signerAddress, 100000000); + await wrapper.wrapETH2LD( + label, + signerAddress, + 0, // CAN_DO_EVERYTHING + EMPTY_ADDRESS + ); + const wrappedtnode = ethers.namehash(`${label}.eth`); + await target.setTarget(wrappedtnode, resolverAddress); + const encodedname = encodeName(`${label}.eth`); + const result = await target.getTarget(encodedname, 0); + expect(result[1]).to.equal(resolverAddress); + }); + + it("should resolve empty ETH Address", async () => { + await target.setTarget(node, resolverAddress); + const addr = "0x0000000000000000000000000000000000000000"; + await l2contract.clearRecords(node); + const result = await l2contract["addr(bytes32)"](node); + expect(ethers.getAddress(result)).to.equal(addr); + await l1Provider.send("evm_mine", []); + + const i = new ethers.Interface(["function addr(bytes32) returns(address)"]); + const calldata = i.encodeFunctionData("addr", [node]); + const result2 = await target.resolve(encodedname, calldata, { + enableCcipRead: true, + }); + const decoded = i.decodeFunctionResult("addr", result2); + expect(decoded[0]).to.equal(addr); + }); + + it("should resolve ETH Address", async () => { + await target.setTarget(node, resolverAddress); + const addr = "0x5A384227B65FA093DEC03Ec34e111Db80A040615"; + await l2contract.clearRecords(node); + await l2contract["setAddr(bytes32,address)"](node, addr); + const result = await l2contract["addr(bytes32)"](node); + expect(ethers.getAddress(result)).to.equal(addr); + await l1Provider.send("evm_mine", []); + + const i = new ethers.Interface(["function addr(bytes32) returns(address)"]); + const calldata = i.encodeFunctionData("addr", [node]); + const result2 = await target.resolve(encodedname, calldata, { + enableCcipRead: true, + }); + const decoded = i.decodeFunctionResult("addr", result2); + expect(decoded[0]).to.equal(addr); + }); + + it("should resolve ETH Address for subname", async () => { + await target.setTarget(node, resolverAddress); + const addr = "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"; + await l2contract.clearRecords(node); + const subname = "d.foo.eth"; + const subnode = ethers.namehash(subname); + const encodedsubname = encodeName(subname); + await l2contract["setAddr(bytes32,address)"](subnode, addr); + const result = await l2contract["addr(bytes32)"](subnode); + expect(ethers.getAddress(result)).to.equal(addr); + await l1Provider.send("evm_mine", []); + const i = new ethers.Interface(["function addr(bytes32) returns(address)"]); + const calldata = i.encodeFunctionData("addr", [subnode]); + + const result2 = await target.resolve(encodedsubname, calldata, { + enableCcipRead: true, + }); + const decoded = i.decodeFunctionResult("addr", result2); + expect(decoded[0]).to.equal(addr); + }); + + it("should resolve non ETH Address", async () => { + await target.setTarget(node, resolverAddress); + const addr = "0x76a91462e907b15cbf27d5425399ebf6f0fb50ebb88f1888ac"; + const coinType = 0; // BTC + await l2contract.clearRecords(node); + await l2contract["setAddr(bytes32,uint256,bytes)"](node, coinType, addr); + await l1Provider.send("evm_mine", []); + + const i = new ethers.Interface([ + "function addr(bytes32,uint256) returns(bytes)", + ]); + const calldata = i.encodeFunctionData("addr", [node, coinType]); + const result2 = await target.resolve(encodedname, calldata, { + enableCcipRead: true, + }); + const decoded = i.decodeFunctionResult("addr", result2); + expect(decoded[0]).to.equal(addr); + }); + + it("should resolve text record", async () => { + await target.setTarget(node, resolverAddress); + const key = "name"; + const value = "nick.eth"; + await l2contract.clearRecords(node); + await l2contract.setText(node, key, value); + await l1Provider.send("evm_mine", []); + + const i = new ethers.Interface([ + "function text(bytes32,string) returns(string)", + ]); + const calldata = i.encodeFunctionData("text", [node, key]); + const result2 = await target.resolve(encodedname, calldata, { + enableCcipRead: true, + }); + const decoded = i.decodeFunctionResult("text", result2); + expect(decoded[0]).to.equal(value); + }); + + it("should test contenthash", async () => { + await target.setTarget(node, resolverAddress); + const contenthash = + "0xe3010170122029f2d17be6139079dc48696d1f582a8530eb9805b561eda517e22a892c7e3f1f"; + await l2contract.clearRecords(node); + await l2contract.setContenthash(node, contenthash); + await l1Provider.send("evm_mine", []); + + const i = new ethers.Interface([ + "function contenthash(bytes32) returns(bytes)", + ]); + const calldata = i.encodeFunctionData("contenthash", [node]); + const result2 = await target.resolve(encodedname, calldata, { + enableCcipRead: true, + }); + const decoded = i.decodeFunctionResult("contenthash", result2); + expect(decoded[0]).to.equal(contenthash); + }); +}); diff --git a/packages/l1-contracts/tsconfig.json b/packages/l1-contracts/tsconfig.json new file mode 100644 index 000000000..08f1a72cc --- /dev/null +++ b/packages/l1-contracts/tsconfig.json @@ -0,0 +1,25 @@ +{ + "include": ["test"], + "compilerOptions": { + "module": "esnext", + "lib": ["dom", "esnext"], + "importHelpers": true, + "declaration": true, + "sourceMap": true, + "rootDir": "./test", + "noUnusedLocals": true, + "noUnusedParameters": true, + "moduleResolution": "node", + "jsx": "react", + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "noEmit": true, + "resolveJsonModule": true + }, + "ts-node": { + "compilerOptions": { + "module": "commonjs" + } + } +} diff --git a/packages/linea-verifier/contracts/EVMFetchTarget.sol b/packages/linea-verifier/contracts/EVMFetchTarget.sol index 43750c551..a294860b9 100644 --- a/packages/linea-verifier/contracts/EVMFetchTarget.sol +++ b/packages/linea-verifier/contracts/EVMFetchTarget.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: MIT -pragma solidity ^0.8.19; +pragma solidity ^0.8.25; import {IEVMVerifier} from "./IEVMVerifier.sol"; import {Address} from "@openzeppelin/contracts/utils/Address.sol"; diff --git a/packages/linea-verifier/contracts/EVMFetcher.sol b/packages/linea-verifier/contracts/EVMFetcher.sol index 717731833..e58af761f 100644 --- a/packages/linea-verifier/contracts/EVMFetcher.sol +++ b/packages/linea-verifier/contracts/EVMFetcher.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: MIT -pragma solidity ^0.8.19; +pragma solidity ^0.8.25; import {IEVMVerifier} from "./IEVMVerifier.sol"; import {EVMFetchTarget} from "./EVMFetchTarget.sol"; diff --git a/packages/linea-verifier/contracts/IEVMVerifier.sol b/packages/linea-verifier/contracts/IEVMVerifier.sol index fb516d85b..5a6fee372 100644 --- a/packages/linea-verifier/contracts/IEVMVerifier.sol +++ b/packages/linea-verifier/contracts/IEVMVerifier.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: MIT -pragma solidity ^0.8.19; +pragma solidity ^0.8.25; interface IEVMVerifier { function gatewayURLs() external view returns (string[] memory); diff --git a/packages/linea-verifier/contracts/LineaProofHelper.sol b/packages/linea-verifier/contracts/LineaProofHelper.sol index d61e08456..e52148043 100644 --- a/packages/linea-verifier/contracts/LineaProofHelper.sol +++ b/packages/linea-verifier/contracts/LineaProofHelper.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.19; +pragma solidity ^0.8.25; import {SparseMerkleProof} from "./lib/SparseMerkleProof.sol"; uint256 constant LAST_LEAF_INDEX = 41; diff --git a/packages/linea-verifier/contracts/LineaVerifier.sol b/packages/linea-verifier/contracts/LineaVerifier.sol index bb6d81a6d..a7b8a309e 100644 --- a/packages/linea-verifier/contracts/LineaVerifier.sol +++ b/packages/linea-verifier/contracts/LineaVerifier.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.19; +pragma solidity ^0.8.25; import {IEVMVerifier} from "./IEVMVerifier.sol"; import {StorageProofStruct, AccountProofStruct, LineaProofHelper} from "./LineaProofHelper.sol"; diff --git a/packages/linea-verifier/contracts/lib/Mimc.sol b/packages/linea-verifier/contracts/lib/Mimc.sol index 702ea64ee..848e516b7 100644 --- a/packages/linea-verifier/contracts/lib/Mimc.sol +++ b/packages/linea-verifier/contracts/lib/Mimc.sol @@ -15,7 +15,7 @@ // limitations under the License. // Code generated by gnark DO NOT EDIT -pragma solidity 0.8.19; +pragma solidity 0.8.25; library Mimc { uint256 constant FR_FIELD = diff --git a/packages/linea-verifier/contracts/lib/SparseMerkleProof.sol b/packages/linea-verifier/contracts/lib/SparseMerkleProof.sol index 3dfdd00ae..232fad565 100644 --- a/packages/linea-verifier/contracts/lib/SparseMerkleProof.sol +++ b/packages/linea-verifier/contracts/lib/SparseMerkleProof.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPL-3.0 -pragma solidity 0.8.19; +pragma solidity 0.8.25; import {Mimc} from "./Mimc.sol"; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1d3b2a1c3..488d66e06 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -271,18 +271,60 @@ importers: packages/l1-contracts: dependencies: + '@chainlink/ccip-read-server': + specifier: ^0.2.1 + version: 0.2.1 + '@ensdomains/buffer': + specifier: ^0.1.1 + version: 0.1.1 '@ensdomains/ens-contracts': - specifier: ^0.0.22 - version: 0.0.22 + specifier: ^1.1.4 + version: 1.1.4 + '@nomicfoundation/hardhat-ethers': + specifier: ^3.0.0 + version: 3.0.5(ethers@6.11.1)(hardhat@2.22.1) + '@nomicfoundation/hardhat-toolbox': + specifier: ^5.0.0 + version: 5.0.0(@nomicfoundation/hardhat-chai-matchers@2.0.6)(@nomicfoundation/hardhat-ethers@3.0.5)(@nomicfoundation/hardhat-ignition-ethers@0.15.0)(@nomicfoundation/hardhat-network-helpers@1.0.10)(@nomicfoundation/hardhat-verify@2.0.5)(@typechain/ethers-v6@0.5.1)(@typechain/hardhat@9.1.0)(@types/chai@4.3.12)(@types/mocha@10.0.6)(@types/node@18.19.22)(chai@4.4.1)(ethers@6.11.1)(hardhat-gas-reporter@1.0.10)(hardhat@2.22.1)(solidity-coverage@0.8.11)(ts-node@10.9.2)(typechain@8.3.2)(typescript@5.4.3) + '@openzeppelin/contracts': + specifier: ^4.1.0 + version: 4.9.6 + chai: + specifier: ^4.2.0 + version: 4.4.1 + clones-with-immutable-args: + specifier: Arachnid/clones-with-immutable-args#feature/create2 + version: github.com/Arachnid/clones-with-immutable-args/23768824cdc037f361f7065538b8f949cae9d3d1 + dns-packet: + specifier: ^5.6.1 + version: 5.6.1 dotenv: specifier: ^16.0.3 version: 16.4.5 + ethers: + specifier: ^6.11.1 + version: 6.11.1 hardhat: specifier: ^2.22.1 - version: 2.22.1 + version: 2.22.1(ts-node@10.9.2)(typescript@5.4.3) + linea-resolver-gateway: + specifier: ^1.0.0 + version: link:../gateway linea-verifier: specifier: ^1.0.0 version: link:../linea-verifier + mocha: + specifier: ^10.3.0 + version: 10.3.0 + supertest: + specifier: ^6.3.3 + version: 6.3.4 + ts-node: + specifier: ^10.9.2 + version: 10.9.2(@types/node@18.19.22)(typescript@5.4.3) + tslib: + specifier: ^2.6.2 + version: 2.6.2 packages/linea-verifier: dependencies: @@ -1504,6 +1546,15 @@ packages: dns-packet: 5.6.1 dev: false + /@ensdomains/ens-contracts@1.1.4: + resolution: {integrity: sha512-kjdcjaznMtE2lwjAVTX2irs8mgNgJCVuB5hnhFhiMaO8dR/tlHQ5UhtZjhSYRhkZd0hLXYrMkXp6thnwpG+ltg==} + dependencies: + '@ensdomains/buffer': 0.1.1 + '@ensdomains/solsha1': 0.0.3 + '@openzeppelin/contracts': 4.9.6 + dns-packet: 5.6.1 + dev: false + /@ensdomains/solsha1@0.0.3: resolution: {integrity: sha512-uhuG5LzRt/UJC0Ux83cE2rCKwSleRePoYdQVcqPN1wyf3/ekMzT/KZUF9+v7/AG5w9jlMLCQkUM50vfjr0Yu9Q==} dependencies: @@ -1636,6 +1687,16 @@ packages: '@ethersproject/logger': 5.7.0 '@ethersproject/properties': 5.7.0 + /@ethersproject/address@5.6.1: + resolution: {integrity: sha512-uOgF0kS5MJv9ZvCz7x6T2EXJSzotiybApn4XlOgoTX0xdtyVIJ7pF+6cGPxiEq/dpBiTfMiw7Yc81JcwhSYA0Q==} + dependencies: + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/keccak256': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/rlp': 5.7.0 + dev: false + /@ethersproject/address@5.7.0: resolution: {integrity: sha512-9wYhYt7aghVGo758POM5nqcOMaE168Q6aRLJZwUmiqSrAungkG74gSSeKEIR7ukixesdRZGPgVqme6vmxs1fkA==} dependencies: @@ -2445,6 +2506,24 @@ packages: ordinal: 1.0.3 dev: false + /@nomicfoundation/hardhat-chai-matchers@2.0.6(@nomicfoundation/hardhat-ethers@3.0.5)(chai@4.4.1)(ethers@6.11.1)(hardhat@2.22.1): + resolution: {integrity: sha512-Te1Uyo9oJcTCF0Jy9dztaLpshmlpjLf2yPtWXlXuLjMt3RRSmJLm/+rKVTW6gfadAEs12U/it6D0ZRnnRGiICQ==} + peerDependencies: + '@nomicfoundation/hardhat-ethers': ^3.0.0 + chai: ^4.2.0 + ethers: ^6.1.0 + hardhat: ^2.9.4 + dependencies: + '@nomicfoundation/hardhat-ethers': 3.0.5(ethers@6.11.1)(hardhat@2.22.1) + '@types/chai-as-promised': 7.1.8 + chai: 4.4.1 + chai-as-promised: 7.1.1(chai@4.4.1) + deep-eql: 4.1.3 + ethers: 6.11.1 + hardhat: 2.22.1(ts-node@10.9.2)(typescript@5.4.3) + ordinal: 1.0.3 + dev: false + /@nomicfoundation/hardhat-ethers@3.0.5(ethers@6.11.1)(hardhat@2.21.0): resolution: {integrity: sha512-RNFe8OtbZK6Ila9kIlHp0+S80/0Bu/3p41HUpaRIoHLm6X3WekTd83vob3rE54Duufu1edCiBDxspBzi2rxHHw==} peerDependencies: @@ -2459,6 +2538,56 @@ packages: - supports-color dev: false + /@nomicfoundation/hardhat-ethers@3.0.5(ethers@6.11.1)(hardhat@2.22.1): + resolution: {integrity: sha512-RNFe8OtbZK6Ila9kIlHp0+S80/0Bu/3p41HUpaRIoHLm6X3WekTd83vob3rE54Duufu1edCiBDxspBzi2rxHHw==} + peerDependencies: + ethers: ^6.1.0 + hardhat: ^2.0.0 + dependencies: + debug: 4.3.4(supports-color@8.1.1) + ethers: 6.11.1 + hardhat: 2.22.1(ts-node@10.9.2)(typescript@5.4.3) + lodash.isequal: 4.5.0 + transitivePeerDependencies: + - supports-color + dev: false + + /@nomicfoundation/hardhat-ignition-ethers@0.15.0(@nomicfoundation/hardhat-ethers@3.0.5)(@nomicfoundation/hardhat-ignition@0.15.0)(@nomicfoundation/ignition-core@0.15.0)(ethers@6.11.1)(hardhat@2.22.1): + resolution: {integrity: sha512-KmMNUc/jptfwdPA9ukQf+Ajon+m2vLBjDL2ze7d/vQdrS+fDxmoVwmbbEk4GOjianZcwgQOWD9dEWaj04QiowA==} + peerDependencies: + '@nomicfoundation/hardhat-ethers': ^3.0.4 + '@nomicfoundation/hardhat-ignition': ^0.15.0 + '@nomicfoundation/ignition-core': ^0.15.0 + ethers: ^6.7.0 + hardhat: ^2.18.0 + dependencies: + '@nomicfoundation/hardhat-ethers': 3.0.5(ethers@6.11.1)(hardhat@2.22.1) + '@nomicfoundation/hardhat-ignition': 0.15.0(@nomicfoundation/hardhat-verify@2.0.5)(hardhat@2.22.1) + '@nomicfoundation/ignition-core': 0.15.0 + ethers: 6.11.1 + hardhat: 2.22.1(ts-node@10.9.2)(typescript@5.4.3) + dev: false + + /@nomicfoundation/hardhat-ignition@0.15.0(@nomicfoundation/hardhat-verify@2.0.5)(hardhat@2.22.1): + resolution: {integrity: sha512-GbAe90O22uM67U/JnffXX+mBMn0HqCKSH+D98Tb5uWqR1N/M00cB3yY8OdqzVai7I6SuIKTc91mPdvtWt8R3MA==} + peerDependencies: + '@nomicfoundation/hardhat-verify': ^2.0.1 + hardhat: ^2.18.0 + dependencies: + '@nomicfoundation/hardhat-verify': 2.0.5(hardhat@2.22.1) + '@nomicfoundation/ignition-core': 0.15.0 + '@nomicfoundation/ignition-ui': 0.15.0 + chalk: 4.1.2 + debug: 4.3.4(supports-color@8.1.1) + fs-extra: 10.1.0 + hardhat: 2.22.1(ts-node@10.9.2)(typescript@5.4.3) + prompts: 2.4.2 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + dev: false + /@nomicfoundation/hardhat-network-helpers@1.0.10(hardhat@2.21.0): resolution: {integrity: sha512-R35/BMBlx7tWN5V6d/8/19QCwEmIdbnA4ZrsuXgvs8i2qFx5i7h6mH5pBS4Pwi4WigLH+upl6faYusrNPuzMrQ==} peerDependencies: @@ -2467,6 +2596,15 @@ packages: ethereumjs-util: 7.1.5 hardhat: 2.21.0(ts-node@10.9.2)(typescript@5.4.2) + /@nomicfoundation/hardhat-network-helpers@1.0.10(hardhat@2.22.1): + resolution: {integrity: sha512-R35/BMBlx7tWN5V6d/8/19QCwEmIdbnA4ZrsuXgvs8i2qFx5i7h6mH5pBS4Pwi4WigLH+upl6faYusrNPuzMrQ==} + peerDependencies: + hardhat: ^2.9.5 + dependencies: + ethereumjs-util: 7.1.5 + hardhat: 2.22.1(ts-node@10.9.2)(typescript@5.4.3) + dev: false + /@nomicfoundation/hardhat-toolbox@2.0.2(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2)(@nomicfoundation/hardhat-chai-matchers@1.0.6)(@nomicfoundation/hardhat-network-helpers@1.0.10)(@nomiclabs/hardhat-ethers@2.2.3)(@nomiclabs/hardhat-etherscan@3.1.8)(@typechain/ethers-v5@10.2.1)(@typechain/hardhat@6.1.6)(@types/chai@4.3.12)(@types/mocha@10.0.6)(@types/node@20.11.25)(chai@4.4.1)(ethers@5.7.2)(hardhat-gas-reporter@1.0.10)(hardhat@2.21.0)(solidity-coverage@0.8.11)(ts-node@10.9.2)(typechain@8.3.2)(typescript@5.4.2): resolution: {integrity: sha512-vnN1AzxbvpSx9pfdRHbUzTRIXpMLPXnUlkW855VaDk6N1pwRaQ2gNzEmFAABk4lWf11E00PKwFd/q27HuwYrYg==} peerDependencies: @@ -2551,6 +2689,48 @@ packages: typescript: 5.4.2 dev: false + /@nomicfoundation/hardhat-toolbox@5.0.0(@nomicfoundation/hardhat-chai-matchers@2.0.6)(@nomicfoundation/hardhat-ethers@3.0.5)(@nomicfoundation/hardhat-ignition-ethers@0.15.0)(@nomicfoundation/hardhat-network-helpers@1.0.10)(@nomicfoundation/hardhat-verify@2.0.5)(@typechain/ethers-v6@0.5.1)(@typechain/hardhat@9.1.0)(@types/chai@4.3.12)(@types/mocha@10.0.6)(@types/node@18.19.22)(chai@4.4.1)(ethers@6.11.1)(hardhat-gas-reporter@1.0.10)(hardhat@2.22.1)(solidity-coverage@0.8.11)(ts-node@10.9.2)(typechain@8.3.2)(typescript@5.4.3): + resolution: {integrity: sha512-FnUtUC5PsakCbwiVNsqlXVIWG5JIb5CEZoSXbJUsEBun22Bivx2jhF1/q9iQbzuaGpJKFQyOhemPB2+XlEE6pQ==} + peerDependencies: + '@nomicfoundation/hardhat-chai-matchers': ^2.0.0 + '@nomicfoundation/hardhat-ethers': ^3.0.0 + '@nomicfoundation/hardhat-ignition-ethers': ^0.15.0 + '@nomicfoundation/hardhat-network-helpers': ^1.0.0 + '@nomicfoundation/hardhat-verify': ^2.0.0 + '@typechain/ethers-v6': ^0.5.0 + '@typechain/hardhat': ^9.0.0 + '@types/chai': ^4.2.0 + '@types/mocha': '>=9.1.0' + '@types/node': '>=18.0.0' + chai: ^4.2.0 + ethers: ^6.4.0 + hardhat: ^2.11.0 + hardhat-gas-reporter: ^1.0.8 + solidity-coverage: ^0.8.1 + ts-node: '>=8.0.0' + typechain: ^8.3.0 + typescript: '>=4.5.0' + dependencies: + '@nomicfoundation/hardhat-chai-matchers': 2.0.6(@nomicfoundation/hardhat-ethers@3.0.5)(chai@4.4.1)(ethers@6.11.1)(hardhat@2.22.1) + '@nomicfoundation/hardhat-ethers': 3.0.5(ethers@6.11.1)(hardhat@2.22.1) + '@nomicfoundation/hardhat-ignition-ethers': 0.15.0(@nomicfoundation/hardhat-ethers@3.0.5)(@nomicfoundation/hardhat-ignition@0.15.0)(@nomicfoundation/ignition-core@0.15.0)(ethers@6.11.1)(hardhat@2.22.1) + '@nomicfoundation/hardhat-network-helpers': 1.0.10(hardhat@2.22.1) + '@nomicfoundation/hardhat-verify': 2.0.5(hardhat@2.22.1) + '@typechain/ethers-v6': 0.5.1(ethers@6.11.1)(typechain@8.3.2)(typescript@5.4.3) + '@typechain/hardhat': 9.1.0(@typechain/ethers-v6@0.5.1)(ethers@6.11.1)(hardhat@2.22.1)(typechain@8.3.2) + '@types/chai': 4.3.12 + '@types/mocha': 10.0.6 + '@types/node': 18.19.22 + chai: 4.4.1 + ethers: 6.11.1 + hardhat: 2.22.1(ts-node@10.9.2)(typescript@5.4.3) + hardhat-gas-reporter: 1.0.10(hardhat@2.22.1) + solidity-coverage: 0.8.11(hardhat@2.22.1) + ts-node: 10.9.2(@types/node@18.19.22)(typescript@5.4.3) + typechain: 8.3.2(typescript@5.4.3) + typescript: 5.4.3 + dev: false + /@nomicfoundation/hardhat-verify@1.1.1(hardhat@2.21.0): resolution: {integrity: sha512-9QsTYD7pcZaQFEA3tBb/D/oCStYDiEVDN7Dxeo/4SCyHRSm86APypxxdOMEPlGmXsAvd+p1j/dTODcpxb8aztA==} peerDependencies: @@ -2570,6 +2750,46 @@ packages: - supports-color dev: false + /@nomicfoundation/hardhat-verify@2.0.5(hardhat@2.22.1): + resolution: {integrity: sha512-Tg4zu8RkWpyADSFIgF4FlJIUEI4VkxcvELsmbJn2OokbvH2SnUrqKmw0BBfDrtvP0hhmx8wsnrRKP5DV/oTyTA==} + peerDependencies: + hardhat: ^2.0.4 + dependencies: + '@ethersproject/abi': 5.7.0 + '@ethersproject/address': 5.7.0 + cbor: 8.1.0 + chalk: 2.4.2 + debug: 4.3.4(supports-color@8.1.1) + hardhat: 2.22.1(ts-node@10.9.2)(typescript@5.4.3) + lodash.clonedeep: 4.5.0 + semver: 6.3.1 + table: 6.8.1 + undici: 5.28.3 + transitivePeerDependencies: + - supports-color + dev: false + + /@nomicfoundation/ignition-core@0.15.0: + resolution: {integrity: sha512-d/h8jgJHY4xIroHqdaGeTkTqjQeuzmU759AOn1Fg88cuxVhS7JM22ZI0bQWyLNSMsVstHBIo+lSMIsvm9jBF2w==} + dependencies: + '@ethersproject/address': 5.6.1 + cbor: 9.0.2 + debug: 4.3.4(supports-color@8.1.1) + ethers: 6.11.1 + fs-extra: 10.1.0 + immer: 10.0.2 + lodash: 4.17.21 + ndjson: 2.0.0 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + dev: false + + /@nomicfoundation/ignition-ui@0.15.0: + resolution: {integrity: sha512-RBvvQ0e8RcEc/LoSzNTPVKZZ5vEwlmxt7PXG278+6DqCrOqxqmh6W9PtK/4mwwvnTeBqds+8j81jDf6vJbOVBQ==} + dev: false + /@nomicfoundation/solidity-analyzer-darwin-arm64@0.1.1: resolution: {integrity: sha512-KcTodaQw8ivDZyF+D76FokN/HdpgGpfjc/gFCImdLUyqB6eSWVaZPazMbeAjmfhx3R0zm/NYVzxwAokFKgrc0w==} engines: {node: '>= 10'} @@ -3043,6 +3263,20 @@ packages: typescript: 5.4.2 dev: false + /@typechain/ethers-v6@0.5.1(ethers@6.11.1)(typechain@8.3.2)(typescript@5.4.3): + resolution: {integrity: sha512-F+GklO8jBWlsaVV+9oHaPh5NJdd6rAKN4tklGfInX1Q7h0xPgVLP39Jl3eCulPB5qexI71ZFHwbljx4ZXNfouA==} + peerDependencies: + ethers: 6.x + typechain: ^8.3.2 + typescript: '>=4.7.0' + dependencies: + ethers: 6.11.1 + lodash: 4.17.21 + ts-essentials: 7.0.3(typescript@5.4.3) + typechain: 8.3.2(typescript@5.4.3) + typescript: 5.4.3 + dev: false + /@typechain/hardhat@6.1.6(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2)(@typechain/ethers-v5@10.2.1)(ethers@5.7.2)(hardhat@2.21.0)(typechain@8.3.2): resolution: {integrity: sha512-BiVnegSs+ZHVymyidtK472syodx1sXYlYJJixZfRstHVGYTi8V1O7QG4nsjyb0PC/LORcq7sfBUcHto1y6UgJA==} peerDependencies: @@ -3077,6 +3311,21 @@ packages: typechain: 8.3.2(typescript@5.4.2) dev: false + /@typechain/hardhat@9.1.0(@typechain/ethers-v6@0.5.1)(ethers@6.11.1)(hardhat@2.22.1)(typechain@8.3.2): + resolution: {integrity: sha512-mtaUlzLlkqTlfPwB3FORdejqBskSnh+Jl8AIJGjXNAQfRQ4ofHADPl1+oU7Z3pAJzmZbUXII8MhOLQltcHgKnA==} + peerDependencies: + '@typechain/ethers-v6': ^0.5.1 + ethers: ^6.1.0 + hardhat: ^2.9.9 + typechain: ^8.3.2 + dependencies: + '@typechain/ethers-v6': 0.5.1(ethers@6.11.1)(typechain@8.3.2)(typescript@5.4.3) + ethers: 6.11.1 + fs-extra: 9.1.0 + hardhat: 2.22.1(ts-node@10.9.2)(typescript@5.4.3) + typechain: 8.3.2(typescript@5.4.3) + dev: false + /@types/babel__core@7.20.5: resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==} dependencies: @@ -3105,7 +3354,7 @@ packages: /@types/bn.js@4.11.6: resolution: {integrity: sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==} dependencies: - '@types/node': 20.11.25 + '@types/node': 18.19.22 /@types/bn.js@5.1.5: resolution: {integrity: sha512-V46N0zwKRF5Q00AZ6hWtN0T8gGmDUaUzLWQvHFo5yThtVwK/VCenFY3wXVbOvNfajEpsTfQM4IN9k/d6gUVX3A==} @@ -3116,7 +3365,7 @@ packages: resolution: {integrity: sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==} dependencies: '@types/connect': 3.4.38 - '@types/node': 18.15.13 + '@types/node': 18.19.22 dev: true /@types/chai-as-promised@7.1.8: @@ -3130,12 +3379,12 @@ packages: /@types/concat-stream@1.6.1: resolution: {integrity: sha512-eHE4cQPoj6ngxBZMvVf6Hw7Mh4jMW4U9lpGmS5GBPB9RYxlFg+CHaVN7ErNY4W9XfLIEn20b4VDYaIrbq0q4uA==} dependencies: - '@types/node': 18.15.13 + '@types/node': 20.11.25 /@types/connect@3.4.38: resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==} dependencies: - '@types/node': 18.15.13 + '@types/node': 18.19.22 dev: true /@types/cookiejar@2.1.5: @@ -3154,7 +3403,7 @@ packages: /@types/express-serve-static-core@4.17.43: resolution: {integrity: sha512-oaYtiBirUOPQGSWNGPWnzyAFJ0BP3cwvN4oWZQY+zUBwpVIGsKUkpBpSztp74drYcjavs7SKFZ4DX1V2QeN8rg==} dependencies: - '@types/node': 18.15.13 + '@types/node': 18.19.22 '@types/qs': 6.9.12 '@types/range-parser': 1.2.7 '@types/send': 0.17.4 @@ -3172,13 +3421,13 @@ packages: /@types/form-data@0.0.33: resolution: {integrity: sha512-8BSvG1kGm83cyJITQMZSulnl6QV8jqAGreJsc5tPu1Jq0vTSOiY/k24Wx82JRpWwZSqrala6sd5rWi6aNXvqcw==} dependencies: - '@types/node': 18.15.13 + '@types/node': 20.11.25 /@types/glob@7.2.0: resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==} dependencies: '@types/minimatch': 5.1.2 - '@types/node': 18.15.13 + '@types/node': 20.11.25 /@types/graceful-fs@4.1.9: resolution: {integrity: sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==} @@ -3244,6 +3493,7 @@ packages: /@types/node@18.15.13: resolution: {integrity: sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q==} + dev: false /@types/node@18.19.22: resolution: {integrity: sha512-p3pDIfuMg/aXBmhkyanPshdfJuX5c5+bQjYLIikPLXAUycEogij/c50n/C+8XOA5L93cU4ZRXtn+dNQGi0IZqQ==} @@ -3267,7 +3517,7 @@ packages: /@types/pbkdf2@3.1.2: resolution: {integrity: sha512-uRwJqmiXmh9++aSu1VNEn3iIxWOhd8AHXNSdlaLfdAAdSTY9jYVeGWnzejM3dvrkbqE3/hyQkQQ29IFATEGlew==} dependencies: - '@types/node': 20.11.25 + '@types/node': 18.19.22 /@types/prettier@1.19.1: resolution: {integrity: sha512-5qOlnZscTn4xxM5MeGXAMOsIOIKIbh9e85zJWfBRVPlRMEVawzoPhINYbRGkBZCI8LxvBe7tJCdWiarA99OZfQ==} @@ -3290,7 +3540,7 @@ packages: /@types/secp256k1@4.0.6: resolution: {integrity: sha512-hHxJU6PAEUn0TP4S/ZOzuTUvJWuZ6eIKeNKb5RBpODvSl6hp1Wrw4s7ATY50rklRCScUDpHzVA/DQdSjJ3UoYQ==} dependencies: - '@types/node': 20.11.25 + '@types/node': 18.19.22 /@types/semver@7.5.8: resolution: {integrity: sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==} @@ -3299,7 +3549,7 @@ packages: resolution: {integrity: sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==} dependencies: '@types/mime': 1.3.5 - '@types/node': 18.15.13 + '@types/node': 18.19.22 dev: true /@types/serve-static@1.15.5: @@ -3307,7 +3557,7 @@ packages: dependencies: '@types/http-errors': 2.0.4 '@types/mime': 3.0.4 - '@types/node': 18.15.13 + '@types/node': 18.19.22 dev: true /@types/stack-utils@1.0.1: @@ -3318,7 +3568,7 @@ packages: dependencies: '@types/cookiejar': 2.1.5 '@types/methods': 1.1.4 - '@types/node': 18.15.13 + '@types/node': 18.19.22 dev: true /@types/supertest@2.0.16: @@ -6798,6 +7048,15 @@ packages: path-is-absolute: 1.0.1 rimraf: 2.7.1 + /fs-extra@10.1.0: + resolution: {integrity: sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==} + engines: {node: '>=12'} + dependencies: + graceful-fs: 4.2.11 + jsonfile: 6.1.0 + universalify: 2.0.1 + dev: false + /fs-extra@7.0.1: resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==} engines: {node: '>=6 <7 || >=8'} @@ -7123,6 +7382,22 @@ packages: - debug - utf-8-validate + /hardhat-gas-reporter@1.0.10(hardhat@2.22.1): + resolution: {integrity: sha512-02N4+So/fZrzJ88ci54GqwVA3Zrf0C9duuTyGt0CFRIh/CdNwbnTgkXkRfojOMLBQ+6t+lBIkgbsOtqMvNwikA==} + peerDependencies: + hardhat: ^2.0.2 + dependencies: + array-uniq: 1.0.3 + eth-gas-reporter: 0.2.27 + hardhat: 2.22.1(ts-node@10.9.2)(typescript@5.4.3) + sha1: 1.1.1 + transitivePeerDependencies: + - '@codechecks/client' + - bufferutil + - debug + - utf-8-validate + dev: false + /hardhat-storage-layout@0.1.7(hardhat@2.21.0): resolution: {integrity: sha512-q723g2iQnJpRdMC6Y8fbh/stG6MLHKNxa5jq/ohjtD5znOlOzQ6ojYuInY8V4o4WcPyG3ty4hzHYunLf66/1+A==} peerDependencies: @@ -7195,7 +7470,7 @@ packages: - supports-color - utf-8-validate - /hardhat@2.22.1: + /hardhat@2.22.1(ts-node@10.9.2)(typescript@5.4.3): resolution: {integrity: sha512-cTWYIJc5jQ132XUI8oRI/TO9L6oavPoJRCTRU9sIjkVxvkxz0Axz0K83Z3BEdJTqBQ2W84ZRoTekti84kBwCjg==} hasBin: true peerDependencies: @@ -7246,7 +7521,9 @@ packages: solc: 0.7.3(debug@4.3.4) source-map-support: 0.5.21 stacktrace-parser: 0.1.10 + ts-node: 10.9.2(@types/node@18.19.22)(typescript@5.4.3) tsort: 0.0.1 + typescript: 5.4.3 undici: 5.28.3 uuid: 8.3.2 ws: 7.5.9 @@ -7444,6 +7721,10 @@ packages: resolution: {integrity: sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==} engines: {node: '>= 4'} + /immer@10.0.2: + resolution: {integrity: sha512-Rx3CqeqQ19sxUtYV9CU911Vhy8/721wRFnJv3REVGWUmoAcIwzifTsdmJte/MV+0/XpM35LZdQMBGkRIoLPwQA==} + dev: false + /immutable@4.3.5: resolution: {integrity: sha512-8eabxkth9gZatlwl5TBuJnCsoTADlL6ftEr7A4qgdaTsPyreilDSnUk57SO+jfKcNtxPa22U5KK6DSeAYhpBJw==} @@ -8899,6 +9180,18 @@ packages: /natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + /ndjson@2.0.0: + resolution: {integrity: sha512-nGl7LRGrzugTtaFcJMhLbpzJM6XdivmbkdlaGcrk/LXg2KL/YBC6z1g70xh0/al+oFuVFP8N8kiWRucmeEH/qQ==} + engines: {node: '>=10'} + hasBin: true + dependencies: + json-stringify-safe: 5.0.1 + minimist: 1.2.8 + readable-stream: 3.6.2 + split2: 3.2.2 + through2: 4.0.2 + dev: false + /negotiator@0.6.3: resolution: {integrity: sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==} engines: {node: '>= 0.6'} @@ -10348,6 +10641,34 @@ packages: shelljs: 0.8.5 web3-utils: 1.10.4 + /solidity-coverage@0.8.11(hardhat@2.22.1): + resolution: {integrity: sha512-yy0Yk+olovBbXn0Me8BWULmmv7A69ZKkP5aTOJGOO8u61Tu2zS989erfjtFlUjDnfWtxRAVkd8BsQD704yLWHw==} + hasBin: true + peerDependencies: + hardhat: ^2.11.0 + dependencies: + '@ethersproject/abi': 5.7.0 + '@solidity-parser/parser': 0.18.0 + chalk: 2.4.2 + death: 1.1.0 + difflib: 0.2.4 + fs-extra: 8.1.0 + ghost-testrpc: 0.0.2 + global-modules: 2.0.0 + globby: 10.0.2 + hardhat: 2.22.1(ts-node@10.9.2)(typescript@5.4.3) + jsonschema: 1.4.1 + lodash: 4.17.21 + mocha: 10.3.0 + node-emoji: 1.11.0 + pify: 4.0.1 + recursive-readdir: 2.2.3 + sc-istanbul: 0.4.6 + semver: 7.6.0 + shelljs: 0.8.5 + web3-utils: 1.10.4 + dev: false + /sort-object-keys@1.1.3: resolution: {integrity: sha512-855pvK+VkU7PaKYPc+Jjnmt4EzejQHyhhF33q31qG8x7maDzkeFhAAThdCYay11CISO+qAMwjOBP+fPZe0IPyg==} dev: true @@ -10439,6 +10760,12 @@ packages: dependencies: extend-shallow: 3.0.2 + /split2@3.2.2: + resolution: {integrity: sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg==} + dependencies: + readable-stream: 3.6.2 + dev: false + /sprintf-js@1.0.3: resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} @@ -10774,6 +11101,12 @@ packages: /throat@5.0.0: resolution: {integrity: sha512-fcwX4mndzpLQKBS1DVYhGAcYaYt7vsHNIvQV+WXMvnow5cgjPphq5CaayLaGsjRdSCKZFNGt7/GYAuXaNOiYCA==} + /through2@4.0.2: + resolution: {integrity: sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==} + dependencies: + readable-stream: 3.6.2 + dev: false + /through@2.3.8: resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} @@ -10882,6 +11215,14 @@ packages: dependencies: typescript: 5.4.2 + /ts-essentials@7.0.3(typescript@5.4.3): + resolution: {integrity: sha512-8+gr5+lqO3G84KdiTSMRLtuyJ+nTBVRKuCrK4lidMPdVeEp0uqC875uE5NMcaA7YYMN7XsNiFQuMvasF8HT/xQ==} + peerDependencies: + typescript: '>=3.7.0' + dependencies: + typescript: 5.4.3 + dev: false + /ts-jest@25.5.1(jest@25.5.4)(typescript@3.9.10): resolution: {integrity: sha512-kHEUlZMK8fn8vkxDjwbHlxXRB9dHYpyzqKIGDNxbzs+Rz+ssNDSDNusEK8Fk/sDd4xE6iKoQLfFkFVaskmTJyw==} engines: {node: '>= 8'} @@ -10965,6 +11306,37 @@ packages: yn: 3.1.1 dev: false + /ts-node@10.9.2(@types/node@18.19.22)(typescript@5.4.3): + resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} + hasBin: true + peerDependencies: + '@swc/core': '>=1.2.50' + '@swc/wasm': '>=1.2.50' + '@types/node': '*' + typescript: '>=2.7' + peerDependenciesMeta: + '@swc/core': + optional: true + '@swc/wasm': + optional: true + dependencies: + '@cspotcode/source-map-support': 0.8.1 + '@tsconfig/node10': 1.0.9 + '@tsconfig/node12': 1.0.11 + '@tsconfig/node14': 1.0.3 + '@tsconfig/node16': 1.0.4 + '@types/node': 18.19.22 + acorn: 8.11.3 + acorn-walk: 8.3.2 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.2 + make-error: 1.3.6 + typescript: 5.4.3 + v8-compile-cache-lib: 3.0.1 + yn: 3.1.1 + dev: false + /ts-node@10.9.2(@types/node@20.11.25)(typescript@5.4.2): resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} hasBin: true @@ -11260,6 +11632,27 @@ packages: transitivePeerDependencies: - supports-color + /typechain@8.3.2(typescript@5.4.3): + resolution: {integrity: sha512-x/sQYr5w9K7yv3es7jo4KTX05CLxOf7TRWwoHlrjRh8H82G64g+k7VuWPJlgMo6qrjfCulOdfBjiaDtmhFYD/Q==} + hasBin: true + peerDependencies: + typescript: '>=4.3.0' + dependencies: + '@types/prettier': 2.7.3 + debug: 4.3.4(supports-color@8.1.1) + fs-extra: 7.0.1 + glob: 7.1.7 + js-sha3: 0.8.0 + lodash: 4.17.21 + mkdirp: 1.0.4 + prettier: 2.8.8 + ts-command-line-args: 2.5.1 + ts-essentials: 7.0.3(typescript@5.4.3) + typescript: 5.4.3 + transitivePeerDependencies: + - supports-color + dev: false + /typed-array-buffer@1.0.2: resolution: {integrity: sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==} engines: {node: '>= 0.4'} @@ -11323,6 +11716,12 @@ packages: engines: {node: '>=14.17'} hasBin: true + /typescript@5.4.3: + resolution: {integrity: sha512-KrPd3PKaCLr78MalgiwJnA25Nm8HAmdwN3mYUYZgG/wizIo9EainNVQI9/yDavtVFRN2h3k8uf3GLHuhDMgEHg==} + engines: {node: '>=14.17'} + hasBin: true + dev: false + /typical@4.0.0: resolution: {integrity: sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==} engines: {node: '>=8'} @@ -11811,3 +12210,9 @@ packages: /yocto-queue@0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} + + github.com/Arachnid/clones-with-immutable-args/23768824cdc037f361f7065538b8f949cae9d3d1: + resolution: {tarball: https://codeload.github.com/Arachnid/clones-with-immutable-args/tar.gz/23768824cdc037f361f7065538b8f949cae9d3d1} + name: clones-with-immutable-args + version: 1.1.0 + dev: false From ea03dec4a0b80375a183ec9914d46a5d6cca0da7 Mon Sep 17 00:00:00 2001 From: Julink Date: Mon, 25 Mar 2024 17:18:56 +0100 Subject: [PATCH 3/4] feat: wip --- .gitignore | 4 +- .../l1-contracts/contracts/RollupMock.sol | 2 +- .../l1-contracts/test/testL1Resolver.spec.ts | 63 +- pnpm-lock.yaml | 1297 +++++------------ 4 files changed, 404 insertions(+), 962 deletions(-) diff --git a/.gitignore b/.gitignore index a99c12ece..9c18d308e 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,6 @@ node_modules # hardhat artifacts cache -typechain-types \ No newline at end of file +typechain-types + +.env \ No newline at end of file diff --git a/packages/l1-contracts/contracts/RollupMock.sol b/packages/l1-contracts/contracts/RollupMock.sol index 59a663bbb..79e49f239 100644 --- a/packages/l1-contracts/contracts/RollupMock.sol +++ b/packages/l1-contracts/contracts/RollupMock.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.25; contract RollupMock { function currentL2BlockNumber() public pure returns (uint256) { - return 4120264; + return 20720; } function stateRootHashes( diff --git a/packages/l1-contracts/test/testL1Resolver.spec.ts b/packages/l1-contracts/test/testL1Resolver.spec.ts index 594425e3f..5726dc9ed 100644 --- a/packages/l1-contracts/test/testL1Resolver.spec.ts +++ b/packages/l1-contracts/test/testL1Resolver.spec.ts @@ -1,7 +1,7 @@ import { makeL2Gateway } from "linea-resolver-gateway"; import { Server } from "@chainlink/ccip-read-server"; import { HardhatEthersProvider } from "@nomicfoundation/hardhat-ethers/internal/hardhat-ethers-provider"; -import type { HardhatEthersHelpers } from "@nomicfoundation/hardhat-ethers/types"; +import { HardhatEthersHelpers } from "@nomicfoundation/hardhat-ethers/types"; import { expect } from "chai"; import { BrowserProvider, @@ -17,7 +17,7 @@ import request from "supertest"; import packet from "dns-packet"; const labelhash = (label) => ethers.keccak256(ethers.toUtf8Bytes(label)); const encodeName = (name) => "0x" + packet.name.encode(name).toString("hex"); -const name = "foo.eth"; +const name = "linea.eth"; const node = ethers.namehash(name); const encodedname = encodeName(name); @@ -49,9 +49,16 @@ describe("Crosschain Resolver", () => { let ens: Contract; let wrapper: Contract; let baseRegistrar: Contract; - let signerAddress, resolverAddress, wrapperAddress; + let signerAddress, l2ResolverAddress, wrapperAddress; before(async () => { + if (!process.env.L2_PROVIDER_URL) { + throw "No L2_PROVIDER_URL found in env file"; + } + if (!process.env.L2_RESOLVER_ADDRESS) { + throw "No L2_RESOLVER_ADDRESS found in env file"; + } + // Hack to get a 'real' ethers provider from hardhat. The default `HardhatProvider` // doesn't support CCIP-read. l1Provider = new ethers.BrowserProvider(ethers.provider._hardhatProvider); @@ -70,7 +77,7 @@ describe("Crosschain Resolver", () => { const rollup = await Rollup.deploy(); const gateway = makeL2Gateway( - l1Provider as unknown as JsonRpcProvider, + (l1Provider as unknown) as JsonRpcProvider, l2Provider, await rollup.getAddress() ); @@ -139,7 +146,7 @@ describe("Crosschain Resolver", () => { labelhash("eth"), baseRegistrarAddress ); - await baseRegistrar.register(labelhash("foo"), signerAddress, 100000000); + await baseRegistrar.register(labelhash("linea"), signerAddress, 100000000); const publicResolverFactory = await ethers.getContractFactory( "PublicResolver", signer @@ -164,21 +171,8 @@ describe("Crosschain Resolver", () => { metaDataserviceAddress ); wrapperAddress = await wrapper.getAddress(); - const impl = await ethers.getContractFactory("DelegatableResolver", signer); - const implContract = await impl.deploy(); - const testL2Factory = await ethers.getContractFactory( - "DelegatableResolverFactory", - signer - ); - const l2factoryContract = await testL2Factory.deploy( - await implContract.getAddress() - ); - const tx = await l2factoryContract.create(await signer.getAddress()); - await l1Provider.send("evm_mine", []); - await tx.wait(); - const logs = await l2factoryContract.queryFilter("NewDelegatableResolver"); - const [resolver] = logs[0].topics; - resolverAddress = resolver; + const impl = await ethers.getContractFactory("PublicResolver", signer); + l2ResolverAddress = process.env.L2_RESOLVER_ADDRESS; const Mimc = await ethers.getContractFactory("Mimc", signer); const mimc = await Mimc.deploy(); @@ -212,7 +206,11 @@ describe("Crosschain Resolver", () => { ); // Mine an empty block so we have something to prove against await l1Provider.send("evm_mine", []); - l2contract = impl.attach(resolverAddress); + l2contract = new ethers.Contract( + l2ResolverAddress, + impl.interface, + l2Provider + ); }); it("should not allow non owner to set target", async () => { @@ -221,7 +219,7 @@ describe("Crosschain Resolver", () => { // For some reason expect().to.be.reverted isn't working // Throwing Error: missing revert data (action="estimateGas"... try { - await target.setTarget(incorrectnode, resolverAddress); + await target.setTarget(incorrectnode, l2ResolverAddress); } catch (e) {} const result = await target.getTarget(incorrectname, 0); @@ -235,7 +233,7 @@ describe("Crosschain Resolver", () => { }); it("subname should get target of its parent", async () => { - const subname = "d.foo.eth"; + const subname = "d.linea.eth"; const encodedsubname = encodeName(subname); const subnode = ethers.namehash(subname); await target.setTarget(node, signerAddress); @@ -256,16 +254,15 @@ describe("Crosschain Resolver", () => { EMPTY_ADDRESS ); const wrappedtnode = ethers.namehash(`${label}.eth`); - await target.setTarget(wrappedtnode, resolverAddress); + await target.setTarget(wrappedtnode, l2ResolverAddress); const encodedname = encodeName(`${label}.eth`); const result = await target.getTarget(encodedname, 0); - expect(result[1]).to.equal(resolverAddress); + expect(result[1]).to.equal(l2ResolverAddress); }); - it("should resolve empty ETH Address", async () => { - await target.setTarget(node, resolverAddress); + it.only("should resolve empty ETH Address", async () => { + await target.setTarget(node, l2ResolverAddress); const addr = "0x0000000000000000000000000000000000000000"; - await l2contract.clearRecords(node); const result = await l2contract["addr(bytes32)"](node); expect(ethers.getAddress(result)).to.equal(addr); await l1Provider.send("evm_mine", []); @@ -280,7 +277,7 @@ describe("Crosschain Resolver", () => { }); it("should resolve ETH Address", async () => { - await target.setTarget(node, resolverAddress); + await target.setTarget(node, l2ResolverAddress); const addr = "0x5A384227B65FA093DEC03Ec34e111Db80A040615"; await l2contract.clearRecords(node); await l2contract["setAddr(bytes32,address)"](node, addr); @@ -298,7 +295,7 @@ describe("Crosschain Resolver", () => { }); it("should resolve ETH Address for subname", async () => { - await target.setTarget(node, resolverAddress); + await target.setTarget(node, l2ResolverAddress); const addr = "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"; await l2contract.clearRecords(node); const subname = "d.foo.eth"; @@ -319,7 +316,7 @@ describe("Crosschain Resolver", () => { }); it("should resolve non ETH Address", async () => { - await target.setTarget(node, resolverAddress); + await target.setTarget(node, l2ResolverAddress); const addr = "0x76a91462e907b15cbf27d5425399ebf6f0fb50ebb88f1888ac"; const coinType = 0; // BTC await l2contract.clearRecords(node); @@ -338,7 +335,7 @@ describe("Crosschain Resolver", () => { }); it("should resolve text record", async () => { - await target.setTarget(node, resolverAddress); + await target.setTarget(node, l2ResolverAddress); const key = "name"; const value = "nick.eth"; await l2contract.clearRecords(node); @@ -357,7 +354,7 @@ describe("Crosschain Resolver", () => { }); it("should test contenthash", async () => { - await target.setTarget(node, resolverAddress); + await target.setTarget(node, l2ResolverAddress); const contenthash = "0xe3010170122029f2d17be6139079dc48696d1f582a8530eb9805b561eda517e22a892c7e3f1f"; await l2contract.clearRecords(node); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 488d66e06..ba342e394 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -45,124 +45,6 @@ importers: specifier: ^4.9.4 version: 4.9.5 - packages/contracts: - dependencies: - '@ensdomains/ens-contracts': - specifier: ^0.0.22 - version: 0.0.22 - '@eth-optimism/contracts': - specifier: ^0.5.40 - version: 0.5.40(ethers@5.7.2) - '@openzeppelin/contracts': - specifier: ^4.9.6 - version: 4.9.6 - '@openzeppelin/contracts-upgradeable': - specifier: ^4.9.6 - version: 4.9.6 - '@openzeppelin/hardhat-upgrades': - specifier: ^1.26.0 - version: 1.28.0(@nomiclabs/hardhat-ethers@2.2.3)(@nomiclabs/hardhat-etherscan@3.1.8)(ethers@5.7.2)(hardhat@2.21.0) - dotenv: - specifier: ^16.0.3 - version: 16.4.5 - hardhat-storage-layout: - specifier: ^0.1.7 - version: 0.1.7(hardhat@2.21.0) - linea-resolver-gateway: - specifier: ^1.0.0 - version: link:../gateway - devDependencies: - '@ethersproject/abi': - specifier: ^5.4.7 - version: 5.7.0 - '@ethersproject/providers': - specifier: ^5.4.7 - version: 5.7.2 - '@nomicfoundation/hardhat-chai-matchers': - specifier: ^1.0.0 - version: 1.0.6(@nomiclabs/hardhat-ethers@2.2.3)(chai@4.4.1)(ethers@5.7.2)(hardhat@2.21.0) - '@nomicfoundation/hardhat-network-helpers': - specifier: ^1.0.8 - version: 1.0.10(hardhat@2.21.0) - '@nomicfoundation/hardhat-toolbox': - specifier: ^2.0.0 - version: 2.0.2(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2)(@nomicfoundation/hardhat-chai-matchers@1.0.6)(@nomicfoundation/hardhat-network-helpers@1.0.10)(@nomiclabs/hardhat-ethers@2.2.3)(@nomiclabs/hardhat-etherscan@3.1.8)(@typechain/ethers-v5@10.2.1)(@typechain/hardhat@6.1.6)(@types/chai@4.3.12)(@types/mocha@10.0.6)(@types/node@20.11.25)(chai@4.4.1)(ethers@5.7.2)(hardhat-gas-reporter@1.0.10)(hardhat@2.21.0)(solidity-coverage@0.8.11)(ts-node@10.9.2)(typechain@8.3.2)(typescript@5.4.2) - '@nomiclabs/hardhat-ethers': - specifier: ^2.0.0 - version: 2.2.3(ethers@5.7.2)(hardhat@2.21.0) - '@nomiclabs/hardhat-etherscan': - specifier: ^3.0.0 - version: 3.1.8(hardhat@2.21.0) - '@typechain/ethers-v5': - specifier: ^10.1.0 - version: 10.2.1(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2)(ethers@5.7.2)(typechain@8.3.2)(typescript@5.4.2) - '@typechain/hardhat': - specifier: ^6.1.2 - version: 6.1.6(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2)(@typechain/ethers-v5@10.2.1)(ethers@5.7.2)(hardhat@2.21.0)(typechain@8.3.2) - '@types/chai': - specifier: ^4.2.0 - version: 4.3.12 - '@types/mocha': - specifier: '>=9.1.0' - version: 10.0.6 - '@types/node': - specifier: '>=12.0.0' - version: 20.11.25 - '@typescript-eslint/eslint-plugin': - specifier: ^5.57.0 - version: 5.62.0(@typescript-eslint/parser@5.62.0)(eslint@8.57.0)(typescript@5.4.2) - '@typescript-eslint/parser': - specifier: ^5.57.0 - version: 5.62.0(eslint@8.57.0)(typescript@5.4.2) - chai: - specifier: ^4.2.0 - version: 4.4.1 - eslint: - specifier: ^8.37.0 - version: 8.57.0 - eslint-config-prettier: - specifier: ^8.8.0 - version: 8.10.0(eslint@8.57.0) - eslint-plugin-json-files: - specifier: ^2.1.0 - version: 2.2.0(eslint@8.57.0) - eslint-plugin-prettier: - specifier: ^4.2.1 - version: 4.2.1(eslint-config-prettier@8.10.0)(eslint@8.57.0)(prettier@2.8.8) - ethers: - specifier: ^5.4.7 - version: 5.7.2 - hardhat: - specifier: ^2.12.7 - version: 2.21.0(ts-node@10.9.2)(typescript@5.4.2) - hardhat-gas-reporter: - specifier: ^1.0.9 - version: 1.0.10(hardhat@2.21.0) - prettier: - specifier: ^2.8.4 - version: 2.8.8 - prettier-plugin-solidity: - specifier: ^1.1.3 - version: 1.3.1(prettier@2.8.8) - solhint: - specifier: ^3.4.1 - version: 3.6.2(typescript@5.4.2) - solhint-plugin-prettier: - specifier: ^0.0.5 - version: 0.0.5(prettier-plugin-solidity@1.3.1)(prettier@2.8.8) - solidity-coverage: - specifier: ^0.8.3 - version: 0.8.11(hardhat@2.21.0) - ts-node: - specifier: '>=8.0.0' - version: 10.9.2(@types/node@20.11.25)(typescript@5.4.2) - typechain: - specifier: ^8.1.0 - version: 8.3.2(typescript@5.4.2) - typescript: - specifier: '>=4.5.0' - version: 5.4.2 - packages/gateway: dependencies: '@chainlink/ccip-read-server': @@ -340,6 +222,7 @@ packages: /@aashutoshrathi/word-wrap@1.2.6: resolution: {integrity: sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==} engines: {node: '>=0.10.0'} + dev: false /@adraffy/ens-normalize@1.10.1: resolution: {integrity: sha512-96Z2IP3mYmF1Xg2cDm8f1gWGf/HUVedQ3FMifV4kG/PQ4yEP51xDtRAEfhVNt5f/uzpNkZHwWQuUcu6D6K+Ekw==} @@ -352,36 +235,6 @@ packages: '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 - /@aws-crypto/sha256-js@1.2.2: - resolution: {integrity: sha512-Nr1QJIbW/afYYGzYvrF70LtaHrIRtd4TNAglX8BvlfxJLZ45SAmueIKYl5tWoNBPzp65ymXGFK0Bb1vZUpuc9g==} - dependencies: - '@aws-crypto/util': 1.2.2 - '@aws-sdk/types': 3.523.0 - tslib: 1.14.1 - dev: false - - /@aws-crypto/util@1.2.2: - resolution: {integrity: sha512-H8PjG5WJ4wz0UXAFXeJjWCW1vkvIJ3qUUD+rGRwJ2/hj+xT58Qle2MTql/2MGzkU+1JLAFuR6aJpLAjHwhmwwg==} - dependencies: - '@aws-sdk/types': 3.523.0 - '@aws-sdk/util-utf8-browser': 3.259.0 - tslib: 1.14.1 - dev: false - - /@aws-sdk/types@3.523.0: - resolution: {integrity: sha512-AqGIu4u+SxPiUuNBp2acCVcq80KDUFjxe6e3cMTvKWTzCbrVk1AXv0dAaJnCmdkWIha6zJDWxpIk/aL4EGhZ9A==} - engines: {node: '>=14.0.0'} - dependencies: - '@smithy/types': 2.11.0 - tslib: 2.6.2 - dev: false - - /@aws-sdk/util-utf8-browser@3.259.0: - resolution: {integrity: sha512-UvFa/vR+e19XookZF8RzFZBrw2EUkQWxiBW0yYQAhvk3C+QVGl0H3ouca8LDBlBfQKXwmW3huo/59H8rwb1wJw==} - dependencies: - tslib: 2.6.2 - dev: false - /@babel/code-frame@7.23.5: resolution: {integrity: sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==} engines: {node: '>=6.9.0'} @@ -1524,6 +1377,7 @@ packages: engines: {node: '>=12'} dependencies: '@jridgewell/trace-mapping': 0.3.9 + dev: false /@dabh/diagnostics@2.0.3: resolution: {integrity: sha512-hrlQOIi7hAfzsMqlGSFyVucrx38O+j6wiGOf//H2ecvIEqYN4ADBSS2iLMh5UFyDunCNniUIPk/q3riFv45xRA==} @@ -1537,15 +1391,6 @@ packages: resolution: {integrity: sha512-92SfSiNS8XorgU7OUBHo/i1ZU7JV7iz/6bKuLPNVsMxV79/eI7fJR6jfJJc40zAHjs3ha+Xo965Idomlq3rqnw==} dev: false - /@ensdomains/ens-contracts@0.0.22: - resolution: {integrity: sha512-kNu7pp68/5KfJ5wkswnUS4NfI9Ek4zGi0nnNSmGf1WXs6BHU9NYRVR6NnoVzb1B+cZ658e1v2srTtvmBYYIYzg==} - dependencies: - '@ensdomains/buffer': 0.1.1 - '@ensdomains/solsha1': 0.0.3 - '@openzeppelin/contracts': 4.9.6 - dns-packet: 5.6.1 - dev: false - /@ensdomains/ens-contracts@1.1.4: resolution: {integrity: sha512-kjdcjaznMtE2lwjAVTX2irs8mgNgJCVuB5hnhFhiMaO8dR/tlHQ5UhtZjhSYRhkZd0hLXYrMkXp6thnwpG+ltg==} dependencies: @@ -1578,10 +1423,12 @@ packages: dependencies: eslint: 8.57.0 eslint-visitor-keys: 3.4.3 + dev: false /@eslint-community/regexpp@4.10.0: resolution: {integrity: sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + dev: false /@eslint/eslintrc@2.1.4: resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} @@ -1598,53 +1445,18 @@ packages: strip-json-comments: 3.1.1 transitivePeerDependencies: - supports-color + dev: false /@eslint/js@8.57.0: resolution: {integrity: sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - - /@eth-optimism/contracts@0.5.40(ethers@5.7.2): - resolution: {integrity: sha512-MrzV0nvsymfO/fursTB7m/KunkPsCndltVgfdHaT1Aj5Vi6R/doKIGGkOofHX+8B6VMZpuZosKCMQ5lQuqjt8w==} - peerDependencies: - ethers: ^5 - dependencies: - '@eth-optimism/core-utils': 0.12.0 - '@ethersproject/abstract-provider': 5.7.0 - '@ethersproject/abstract-signer': 5.7.0 - ethers: 5.7.2 - transitivePeerDependencies: - - bufferutil - - utf-8-validate - dev: false - - /@eth-optimism/core-utils@0.12.0: - resolution: {integrity: sha512-qW+7LZYCz7i8dRa7SRlUKIo1VBU8lvN0HeXCxJR+z+xtMzMQpPds20XJNCMclszxYQHkXY00fOT6GvFw9ZL6nw==} - dependencies: - '@ethersproject/abi': 5.7.0 - '@ethersproject/abstract-provider': 5.7.0 - '@ethersproject/address': 5.7.0 - '@ethersproject/bignumber': 5.7.0 - '@ethersproject/bytes': 5.7.0 - '@ethersproject/constants': 5.7.0 - '@ethersproject/contracts': 5.7.0 - '@ethersproject/hash': 5.7.0 - '@ethersproject/keccak256': 5.7.0 - '@ethersproject/properties': 5.7.0 - '@ethersproject/providers': 5.7.2 - '@ethersproject/rlp': 5.7.0 - '@ethersproject/transactions': 5.7.0 - '@ethersproject/web': 5.7.1 - bufio: 1.2.1 - chai: 4.4.1 - transitivePeerDependencies: - - bufferutil - - utf-8-validate dev: false /@ethereumjs/rlp@4.0.1: resolution: {integrity: sha512-tqsQiBQDQdmPWE1xkkBq4rlSW5QZpLOUJ5RJh2/9fug+q9tnUhuZoVLk7s0scUIKTOzEtR72DFBXI4WiZcMpvw==} engines: {node: '>=14'} hasBin: true + dev: false /@ethereumjs/util@8.1.0: resolution: {integrity: sha512-zQ0IqbdX8FZ9aw11vP+dZkKDkS+kgIvQPHnSAXzP9pLu+Rfu3D3XEeLbicvoXJTYnhZiPmsZUxgdzXwNKxRPbA==} @@ -1653,6 +1465,7 @@ packages: '@ethereumjs/rlp': 4.0.1 ethereum-cryptography: 2.1.3 micro-ftch: 0.3.1 + dev: false /@ethersproject/abi@5.7.0: resolution: {integrity: sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA==} @@ -1666,6 +1479,7 @@ packages: '@ethersproject/logger': 5.7.0 '@ethersproject/properties': 5.7.0 '@ethersproject/strings': 5.7.0 + dev: false /@ethersproject/abstract-provider@5.7.0: resolution: {integrity: sha512-R41c9UkchKCpAqStMYUpdunjo3pkEvZC3FAwZn5S5MGbXoMQOHIdHItezTETxAO5bevtMApSyEhn9+CHcDsWBw==} @@ -1677,6 +1491,7 @@ packages: '@ethersproject/properties': 5.7.0 '@ethersproject/transactions': 5.7.0 '@ethersproject/web': 5.7.1 + dev: false /@ethersproject/abstract-signer@5.7.0: resolution: {integrity: sha512-a16V8bq1/Cz+TGCkE2OPMTOUDLS3grCpdjoJCYNnVBbdYEMSgKrU0+B90s8b6H+ByYTBZN7a3g76jdIJi7UfKQ==} @@ -1686,6 +1501,7 @@ packages: '@ethersproject/bytes': 5.7.0 '@ethersproject/logger': 5.7.0 '@ethersproject/properties': 5.7.0 + dev: false /@ethersproject/address@5.6.1: resolution: {integrity: sha512-uOgF0kS5MJv9ZvCz7x6T2EXJSzotiybApn4XlOgoTX0xdtyVIJ7pF+6cGPxiEq/dpBiTfMiw7Yc81JcwhSYA0Q==} @@ -1705,17 +1521,20 @@ packages: '@ethersproject/keccak256': 5.7.0 '@ethersproject/logger': 5.7.0 '@ethersproject/rlp': 5.7.0 + dev: false /@ethersproject/base64@5.7.0: resolution: {integrity: sha512-Dr8tcHt2mEbsZr/mwTPIQAf3Ai0Bks/7gTw9dSqk1mQvhW3XvRlmDJr/4n+wg1JmCl16NZue17CDh8xb/vZ0sQ==} dependencies: '@ethersproject/bytes': 5.7.0 + dev: false /@ethersproject/basex@5.7.0: resolution: {integrity: sha512-ywlh43GwZLv2Voc2gQVTKBoVQ1mti3d8HK5aMxsfu/nRDnMmNqaSJ3r3n85HBByT8OpoY96SXM1FogC533T4zw==} dependencies: '@ethersproject/bytes': 5.7.0 '@ethersproject/properties': 5.7.0 + dev: false /@ethersproject/bignumber@5.7.0: resolution: {integrity: sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw==} @@ -1723,16 +1542,19 @@ packages: '@ethersproject/bytes': 5.7.0 '@ethersproject/logger': 5.7.0 bn.js: 5.2.1 + dev: false /@ethersproject/bytes@5.7.0: resolution: {integrity: sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A==} dependencies: '@ethersproject/logger': 5.7.0 + dev: false /@ethersproject/constants@5.7.0: resolution: {integrity: sha512-DHI+y5dBNvkpYUMiRQyxRBYBefZkJfo70VUkUAsRjcPs47muV9evftfZ0PJVCXYbAiCgght0DtcF9srFQmIgWA==} dependencies: '@ethersproject/bignumber': 5.7.0 + dev: false /@ethersproject/contracts@5.7.0: resolution: {integrity: sha512-5GJbzEU3X+d33CdfPhcyS+z8MzsTrBGk/sc+G+59+tPa9yFkl6HQ9D6L0QMgNTA9q8dT0XKxxkyp883XsQvbbg==} @@ -1747,6 +1569,7 @@ packages: '@ethersproject/logger': 5.7.0 '@ethersproject/properties': 5.7.0 '@ethersproject/transactions': 5.7.0 + dev: false /@ethersproject/hash@5.7.0: resolution: {integrity: sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g==} @@ -1760,6 +1583,7 @@ packages: '@ethersproject/logger': 5.7.0 '@ethersproject/properties': 5.7.0 '@ethersproject/strings': 5.7.0 + dev: false /@ethersproject/hdnode@5.7.0: resolution: {integrity: sha512-OmyYo9EENBPPf4ERhR7oj6uAtUAhYGqOnIS+jE5pTXvdKBS99ikzq1E7Iv0ZQZ5V36Lqx1qZLeak0Ra16qpeOg==} @@ -1776,6 +1600,7 @@ packages: '@ethersproject/strings': 5.7.0 '@ethersproject/transactions': 5.7.0 '@ethersproject/wordlists': 5.7.0 + dev: false /@ethersproject/json-wallets@5.7.0: resolution: {integrity: sha512-8oee5Xgu6+RKgJTkvEMl2wDgSPSAQ9MB/3JYjFV9jlKvcYHUXZC+cQp0njgmxdHkYWn8s6/IqIZYm0YWCjO/0g==} @@ -1793,31 +1618,37 @@ packages: '@ethersproject/transactions': 5.7.0 aes-js: 3.0.0 scrypt-js: 3.0.1 + dev: false /@ethersproject/keccak256@5.7.0: resolution: {integrity: sha512-2UcPboeL/iW+pSg6vZ6ydF8tCnv3Iu/8tUmLLzWWGzxWKFFqOBQFLo6uLUv6BDrLgCDfN28RJ/wtByx+jZ4KBg==} dependencies: '@ethersproject/bytes': 5.7.0 js-sha3: 0.8.0 + dev: false /@ethersproject/logger@5.7.0: resolution: {integrity: sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig==} + dev: false /@ethersproject/networks@5.7.1: resolution: {integrity: sha512-n/MufjFYv3yFcUyfhnXotyDlNdFb7onmkSy8aQERi2PjNcnWQ66xXxa3XlS8nCcA8aJKJjIIMNJTC7tu80GwpQ==} dependencies: '@ethersproject/logger': 5.7.0 + dev: false /@ethersproject/pbkdf2@5.7.0: resolution: {integrity: sha512-oR/dBRZR6GTyaofd86DehG72hY6NpAjhabkhxgr3X2FpJtJuodEl2auADWBZfhDHgVCbu3/H/Ocq2uC6dpNjjw==} dependencies: '@ethersproject/bytes': 5.7.0 '@ethersproject/sha2': 5.7.0 + dev: false /@ethersproject/properties@5.7.0: resolution: {integrity: sha512-J87jy8suntrAkIZtecpxEPxY//szqr1mlBaYlQ0r4RCaiD2hjheqF9s1LVE8vVuJCXisjIP+JgtK/Do54ej4Sw==} dependencies: '@ethersproject/logger': 5.7.0 + dev: false /@ethersproject/providers@5.7.2: resolution: {integrity: sha512-g34EWZ1WWAVgr4aptGlVBF8mhl3VWjv+8hoAnzStu8Ah22VHBsuGzP17eb6xDVRzw895G4W7vvx60lFFur/1Rg==} @@ -1845,18 +1676,21 @@ packages: transitivePeerDependencies: - bufferutil - utf-8-validate + dev: false /@ethersproject/random@5.7.0: resolution: {integrity: sha512-19WjScqRA8IIeWclFme75VMXSBvi4e6InrUNuaR4s5pTF2qNhcGdCUwdxUVGtDDqC00sDLCO93jPQoDUH4HVmQ==} dependencies: '@ethersproject/bytes': 5.7.0 '@ethersproject/logger': 5.7.0 + dev: false /@ethersproject/rlp@5.7.0: resolution: {integrity: sha512-rBxzX2vK8mVF7b0Tol44t5Tb8gomOHkj5guL+HhzQ1yBh/ydjGnpw6at+X6Iw0Kp3OzzzkcKp8N9r0W4kYSs9w==} dependencies: '@ethersproject/bytes': 5.7.0 '@ethersproject/logger': 5.7.0 + dev: false /@ethersproject/sha2@5.7.0: resolution: {integrity: sha512-gKlH42riwb3KYp0reLsFTokByAKoJdgFCwI+CCiX/k+Jm2mbNs6oOaCjYQSlI1+XBVejwH2KrmCbMAT/GnRDQw==} @@ -1864,6 +1698,7 @@ packages: '@ethersproject/bytes': 5.7.0 '@ethersproject/logger': 5.7.0 hash.js: 1.1.7 + dev: false /@ethersproject/signing-key@5.7.0: resolution: {integrity: sha512-MZdy2nL3wO0u7gkB4nA/pEf8lu1TlFswPNmy8AiYkfKTdO6eXBJyUdmHO/ehm/htHw9K/qF8ujnTyUAD+Ry54Q==} @@ -1874,6 +1709,7 @@ packages: bn.js: 5.2.1 elliptic: 6.5.4 hash.js: 1.1.7 + dev: false /@ethersproject/solidity@5.7.0: resolution: {integrity: sha512-HmabMd2Dt/raavyaGukF4XxizWKhKQ24DoLtdNbBmNKUOPqwjsKQSdV9GQtj9CBEea9DlzETlVER1gYeXXBGaA==} @@ -1884,6 +1720,7 @@ packages: '@ethersproject/logger': 5.7.0 '@ethersproject/sha2': 5.7.0 '@ethersproject/strings': 5.7.0 + dev: false /@ethersproject/strings@5.7.0: resolution: {integrity: sha512-/9nu+lj0YswRNSH0NXYqrh8775XNyEdUQAuf3f+SmOrnVewcJ5SBNAjF7lpgehKi4abvNNXyf+HX86czCdJ8Mg==} @@ -1891,6 +1728,7 @@ packages: '@ethersproject/bytes': 5.7.0 '@ethersproject/constants': 5.7.0 '@ethersproject/logger': 5.7.0 + dev: false /@ethersproject/transactions@5.7.0: resolution: {integrity: sha512-kmcNicCp1lp8qanMTC3RIikGgoJ80ztTyvtsFvCYpSCfkjhD0jZ2LOrnbcuxuToLIUYYf+4XwD1rP+B/erDIhQ==} @@ -1904,6 +1742,7 @@ packages: '@ethersproject/properties': 5.7.0 '@ethersproject/rlp': 5.7.0 '@ethersproject/signing-key': 5.7.0 + dev: false /@ethersproject/units@5.7.0: resolution: {integrity: sha512-pD3xLMy3SJu9kG5xDGI7+xhTEmGXlEqXU4OfNapmfnxLVY4EMSSRp7j1k7eezutBPH7RBN/7QPnwR7hzNlEFeg==} @@ -1911,6 +1750,7 @@ packages: '@ethersproject/bignumber': 5.7.0 '@ethersproject/constants': 5.7.0 '@ethersproject/logger': 5.7.0 + dev: false /@ethersproject/wallet@5.7.0: resolution: {integrity: sha512-MhmXlJXEJFBFVKrDLB4ZdDzxcBxQ3rLyCkhNqVu3CDYvR97E+8r01UgrI+TI99Le+aYm/in/0vp86guJuM7FCA==} @@ -1930,6 +1770,7 @@ packages: '@ethersproject/signing-key': 5.7.0 '@ethersproject/transactions': 5.7.0 '@ethersproject/wordlists': 5.7.0 + dev: false /@ethersproject/web@5.7.1: resolution: {integrity: sha512-Gueu8lSvyjBWL4cYsWsjh6MtMwM0+H4HvqFPZfB6dV8ctbP9zFAO73VG1cMWae0FLPCtz0peKPpZY8/ugJJX2w==} @@ -1939,6 +1780,7 @@ packages: '@ethersproject/logger': 5.7.0 '@ethersproject/properties': 5.7.0 '@ethersproject/strings': 5.7.0 + dev: false /@ethersproject/wordlists@5.7.0: resolution: {integrity: sha512-S2TFNJNfHWVHNE6cNDjbVlZ6MgE17MIxMbMg2zv3wn+3XSJGosL1m9ZVv3GXCf/2ymSsQ+hRI5IzoMJTG6aoVA==} @@ -1948,10 +1790,12 @@ packages: '@ethersproject/logger': 5.7.0 '@ethersproject/properties': 5.7.0 '@ethersproject/strings': 5.7.0 + dev: false /@fastify/busboy@2.1.1: resolution: {integrity: sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==} engines: {node: '>=14'} + dev: false /@humanwhocodes/config-array@0.11.14: resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} @@ -1962,18 +1806,16 @@ packages: minimatch: 3.1.2 transitivePeerDependencies: - supports-color + dev: false /@humanwhocodes/module-importer@1.0.1: resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} engines: {node: '>=12.22'} - - /@humanwhocodes/momoa@2.0.4: - resolution: {integrity: sha512-RE815I4arJFtt+FVeU1Tgp9/Xvecacji8w/V6XtXsWWH/wz/eNkNbhb+ny/+PlVZjV0rxQpRSQKNKE3lcktHEA==} - engines: {node: '>=10.10.0'} - dev: true + dev: false /@humanwhocodes/object-schema@2.0.2: resolution: {integrity: sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==} + dev: false /@istanbuljs/load-nyc-config@1.1.0: resolution: {integrity: sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==} @@ -2190,6 +2032,7 @@ packages: dependencies: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.4.15 + dev: false /@leichtgewicht/ip-codec@2.0.4: resolution: {integrity: sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A==} @@ -2204,6 +2047,7 @@ packages: ethjs-util: 0.1.6 tweetnacl: 1.0.3 tweetnacl-util: 0.15.1 + dev: false /@noble/curves@1.2.0: resolution: {integrity: sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==} @@ -2215,9 +2059,11 @@ packages: resolution: {integrity: sha512-t01iSXPuN+Eqzb4eBX0S5oubSqXbK/xXa1Ne18Hj8f9pStxztHCE2gfboSp/dZRLSqfuLpRK2nDXDK+W9puocA==} dependencies: '@noble/hashes': 1.3.3 + dev: false /@noble/hashes@1.2.0: resolution: {integrity: sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ==} + dev: false /@noble/hashes@1.3.2: resolution: {integrity: sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==} @@ -2227,9 +2073,11 @@ packages: /@noble/hashes@1.3.3: resolution: {integrity: sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==} engines: {node: '>= 16'} + dev: false /@noble/secp256k1@1.7.1: resolution: {integrity: sha512-hOUk6AyBFmqVrv7k5WAw/LpszxVbj9gGN4JRkIX52fdFAj1UA61KXmZDvqVEm+pOyec3+fIeZB02LYa/pWOArw==} + dev: false /@nodelib/fs.scandir@2.1.5: resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} @@ -2255,6 +2103,7 @@ packages: cpu: [arm64] os: [darwin] requiresBuild: true + dev: false optional: true /@nomicfoundation/edr-darwin-arm64@0.3.2: @@ -2272,6 +2121,7 @@ packages: cpu: [x64] os: [darwin] requiresBuild: true + dev: false optional: true /@nomicfoundation/edr-darwin-x64@0.3.2: @@ -2289,6 +2139,7 @@ packages: cpu: [arm64] os: [linux] requiresBuild: true + dev: false optional: true /@nomicfoundation/edr-linux-arm64-gnu@0.3.2: @@ -2306,6 +2157,7 @@ packages: cpu: [arm64] os: [linux] requiresBuild: true + dev: false optional: true /@nomicfoundation/edr-linux-arm64-musl@0.3.2: @@ -2323,6 +2175,7 @@ packages: cpu: [x64] os: [linux] requiresBuild: true + dev: false optional: true /@nomicfoundation/edr-linux-x64-gnu@0.3.2: @@ -2340,6 +2193,7 @@ packages: cpu: [x64] os: [linux] requiresBuild: true + dev: false optional: true /@nomicfoundation/edr-linux-x64-musl@0.3.2: @@ -2357,6 +2211,7 @@ packages: cpu: [arm64] os: [win32] requiresBuild: true + dev: false optional: true /@nomicfoundation/edr-win32-arm64-msvc@0.3.2: @@ -2374,6 +2229,7 @@ packages: cpu: [ia32] os: [win32] requiresBuild: true + dev: false optional: true /@nomicfoundation/edr-win32-ia32-msvc@0.3.2: @@ -2391,6 +2247,7 @@ packages: cpu: [x64] os: [win32] requiresBuild: true + dev: false optional: true /@nomicfoundation/edr-win32-x64-msvc@0.3.2: @@ -2415,6 +2272,7 @@ packages: '@nomicfoundation/edr-win32-arm64-msvc': 0.2.1 '@nomicfoundation/edr-win32-ia32-msvc': 0.2.1 '@nomicfoundation/edr-win32-x64-msvc': 0.2.1 + dev: false /@nomicfoundation/edr@0.3.2: resolution: {integrity: sha512-HGWtjibAK1mo4I2A7nJ/fXqe/J9G54OrSPJnnkY2K8TiXotYLShGd9GvHkae3PuFjTJKm6ZgBy7tveJj5yrCfw==} @@ -2437,11 +2295,13 @@ packages: '@nomicfoundation/ethereumjs-util': 9.0.4 transitivePeerDependencies: - c-kzg + dev: false /@nomicfoundation/ethereumjs-rlp@5.0.4: resolution: {integrity: sha512-8H1S3s8F6QueOc/X92SdrA4RDenpiAEqMg5vJH99kcQaCy/a3Q6fgseo75mgWlbanGJXSlAPtnCeG9jvfTYXlw==} engines: {node: '>=18'} hasBin: true + dev: false /@nomicfoundation/ethereumjs-tx@5.0.4: resolution: {integrity: sha512-Xjv8wAKJGMrP1f0n2PeyfFCCojHd7iS3s/Ab7qzF1S64kxZ8Z22LCMynArYsVqiFx6rzYy548HNVEyI+AYN/kw==} @@ -2456,6 +2316,7 @@ packages: '@nomicfoundation/ethereumjs-rlp': 5.0.4 '@nomicfoundation/ethereumjs-util': 9.0.4 ethereum-cryptography: 0.1.3 + dev: false /@nomicfoundation/ethereumjs-util@9.0.4: resolution: {integrity: sha512-sLOzjnSrlx9Bb9EFNtHzK/FJFsfg2re6bsGqinFinH1gCqVfz9YYlXiMWwDM4C/L4ywuHFCYwfKTVr/QHQcU0Q==} @@ -2468,25 +2329,7 @@ packages: dependencies: '@nomicfoundation/ethereumjs-rlp': 5.0.4 ethereum-cryptography: 0.1.3 - - /@nomicfoundation/hardhat-chai-matchers@1.0.6(@nomiclabs/hardhat-ethers@2.2.3)(chai@4.4.1)(ethers@5.7.2)(hardhat@2.21.0): - resolution: {integrity: sha512-f5ZMNmabZeZegEfuxn/0kW+mm7+yV7VNDxLpMOMGXWFJ2l/Ct3QShujzDRF9cOkK9Ui/hbDeOWGZqyQALDXVCQ==} - peerDependencies: - '@nomiclabs/hardhat-ethers': ^2.0.0 - chai: ^4.2.0 - ethers: ^5.0.0 - hardhat: ^2.9.4 - dependencies: - '@ethersproject/abi': 5.7.0 - '@nomiclabs/hardhat-ethers': 2.2.3(ethers@5.7.2)(hardhat@2.21.0) - '@types/chai-as-promised': 7.1.8 - chai: 4.4.1 - chai-as-promised: 7.1.1(chai@4.4.1) - deep-eql: 4.1.3 - ethers: 5.7.2 - hardhat: 2.21.0(ts-node@10.9.2)(typescript@5.4.2) - ordinal: 1.0.3 - dev: true + dev: false /@nomicfoundation/hardhat-chai-matchers@2.0.6(@nomicfoundation/hardhat-ethers@3.0.5)(chai@4.4.1)(ethers@6.11.1)(hardhat@2.21.0): resolution: {integrity: sha512-Te1Uyo9oJcTCF0Jy9dztaLpshmlpjLf2yPtWXlXuLjMt3RRSmJLm/+rKVTW6gfadAEs12U/it6D0ZRnnRGiICQ==} @@ -2595,6 +2438,7 @@ packages: dependencies: ethereumjs-util: 7.1.5 hardhat: 2.21.0(ts-node@10.9.2)(typescript@5.4.2) + dev: false /@nomicfoundation/hardhat-network-helpers@1.0.10(hardhat@2.22.1): resolution: {integrity: sha512-R35/BMBlx7tWN5V6d/8/19QCwEmIdbnA4ZrsuXgvs8i2qFx5i7h6mH5pBS4Pwi4WigLH+upl6faYusrNPuzMrQ==} @@ -2605,50 +2449,6 @@ packages: hardhat: 2.22.1(ts-node@10.9.2)(typescript@5.4.3) dev: false - /@nomicfoundation/hardhat-toolbox@2.0.2(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2)(@nomicfoundation/hardhat-chai-matchers@1.0.6)(@nomicfoundation/hardhat-network-helpers@1.0.10)(@nomiclabs/hardhat-ethers@2.2.3)(@nomiclabs/hardhat-etherscan@3.1.8)(@typechain/ethers-v5@10.2.1)(@typechain/hardhat@6.1.6)(@types/chai@4.3.12)(@types/mocha@10.0.6)(@types/node@20.11.25)(chai@4.4.1)(ethers@5.7.2)(hardhat-gas-reporter@1.0.10)(hardhat@2.21.0)(solidity-coverage@0.8.11)(ts-node@10.9.2)(typechain@8.3.2)(typescript@5.4.2): - resolution: {integrity: sha512-vnN1AzxbvpSx9pfdRHbUzTRIXpMLPXnUlkW855VaDk6N1pwRaQ2gNzEmFAABk4lWf11E00PKwFd/q27HuwYrYg==} - peerDependencies: - '@ethersproject/abi': ^5.4.7 - '@ethersproject/providers': ^5.4.7 - '@nomicfoundation/hardhat-chai-matchers': ^1.0.0 - '@nomicfoundation/hardhat-network-helpers': ^1.0.0 - '@nomiclabs/hardhat-ethers': ^2.0.0 - '@nomiclabs/hardhat-etherscan': ^3.0.0 - '@typechain/ethers-v5': ^10.1.0 - '@typechain/hardhat': ^6.1.2 - '@types/chai': ^4.2.0 - '@types/mocha': '>=9.1.0' - '@types/node': '>=12.0.0' - chai: ^4.2.0 - ethers: ^5.4.7 - hardhat: ^2.11.0 - hardhat-gas-reporter: ^1.0.8 - solidity-coverage: ^0.8.1 - ts-node: '>=8.0.0' - typechain: ^8.1.0 - typescript: '>=4.5.0' - dependencies: - '@ethersproject/abi': 5.7.0 - '@ethersproject/providers': 5.7.2 - '@nomicfoundation/hardhat-chai-matchers': 1.0.6(@nomiclabs/hardhat-ethers@2.2.3)(chai@4.4.1)(ethers@5.7.2)(hardhat@2.21.0) - '@nomicfoundation/hardhat-network-helpers': 1.0.10(hardhat@2.21.0) - '@nomiclabs/hardhat-ethers': 2.2.3(ethers@5.7.2)(hardhat@2.21.0) - '@nomiclabs/hardhat-etherscan': 3.1.8(hardhat@2.21.0) - '@typechain/ethers-v5': 10.2.1(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2)(ethers@5.7.2)(typechain@8.3.2)(typescript@5.4.2) - '@typechain/hardhat': 6.1.6(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2)(@typechain/ethers-v5@10.2.1)(ethers@5.7.2)(hardhat@2.21.0)(typechain@8.3.2) - '@types/chai': 4.3.12 - '@types/mocha': 10.0.6 - '@types/node': 20.11.25 - chai: 4.4.1 - ethers: 5.7.2 - hardhat: 2.21.0(ts-node@10.9.2)(typescript@5.4.2) - hardhat-gas-reporter: 1.0.10(hardhat@2.21.0) - solidity-coverage: 0.8.11(hardhat@2.21.0) - ts-node: 10.9.2(@types/node@20.11.25)(typescript@5.4.2) - typechain: 8.3.2(typescript@5.4.2) - typescript: 5.4.2 - dev: true - /@nomicfoundation/hardhat-toolbox@3.0.0(@nomicfoundation/hardhat-chai-matchers@2.0.6)(@nomicfoundation/hardhat-ethers@3.0.5)(@nomicfoundation/hardhat-network-helpers@1.0.10)(@nomicfoundation/hardhat-verify@1.1.1)(@typechain/ethers-v6@0.4.3)(@typechain/hardhat@8.0.3)(@types/chai@4.3.12)(@types/mocha@10.0.6)(@types/node@12.0.0)(chai@4.4.1)(ethers@6.11.1)(hardhat-gas-reporter@1.0.10)(hardhat@2.21.0)(solidity-coverage@0.8.11)(ts-node@10.9.2)(typechain@8.3.2)(typescript@5.4.2): resolution: {integrity: sha512-MsteDXd0UagMksqm9KvcFG6gNKYNa3GGNCy73iQ6bEasEgg2v8Qjl6XA5hjs8o5UD5A3153B6W2BIVJ8SxYUtA==} peerDependencies: @@ -2796,6 +2596,7 @@ packages: cpu: [arm64] os: [darwin] requiresBuild: true + dev: false optional: true /@nomicfoundation/solidity-analyzer-darwin-x64@0.1.1: @@ -2804,6 +2605,7 @@ packages: cpu: [x64] os: [darwin] requiresBuild: true + dev: false optional: true /@nomicfoundation/solidity-analyzer-freebsd-x64@0.1.1: @@ -2812,6 +2614,7 @@ packages: cpu: [x64] os: [freebsd] requiresBuild: true + dev: false optional: true /@nomicfoundation/solidity-analyzer-linux-arm64-gnu@0.1.1: @@ -2820,6 +2623,7 @@ packages: cpu: [arm64] os: [linux] requiresBuild: true + dev: false optional: true /@nomicfoundation/solidity-analyzer-linux-arm64-musl@0.1.1: @@ -2828,6 +2632,7 @@ packages: cpu: [arm64] os: [linux] requiresBuild: true + dev: false optional: true /@nomicfoundation/solidity-analyzer-linux-x64-gnu@0.1.1: @@ -2836,6 +2641,7 @@ packages: cpu: [x64] os: [linux] requiresBuild: true + dev: false optional: true /@nomicfoundation/solidity-analyzer-linux-x64-musl@0.1.1: @@ -2844,6 +2650,7 @@ packages: cpu: [x64] os: [linux] requiresBuild: true + dev: false optional: true /@nomicfoundation/solidity-analyzer-win32-arm64-msvc@0.1.1: @@ -2852,6 +2659,7 @@ packages: cpu: [arm64] os: [win32] requiresBuild: true + dev: false optional: true /@nomicfoundation/solidity-analyzer-win32-ia32-msvc@0.1.1: @@ -2860,6 +2668,7 @@ packages: cpu: [ia32] os: [win32] requiresBuild: true + dev: false optional: true /@nomicfoundation/solidity-analyzer-win32-x64-msvc@0.1.1: @@ -2868,6 +2677,7 @@ packages: cpu: [x64] os: [win32] requiresBuild: true + dev: false optional: true /@nomicfoundation/solidity-analyzer@0.1.1: @@ -2884,115 +2694,12 @@ packages: '@nomicfoundation/solidity-analyzer-win32-arm64-msvc': 0.1.1 '@nomicfoundation/solidity-analyzer-win32-ia32-msvc': 0.1.1 '@nomicfoundation/solidity-analyzer-win32-x64-msvc': 0.1.1 - - /@nomiclabs/hardhat-ethers@2.2.3(ethers@5.7.2)(hardhat@2.21.0): - resolution: {integrity: sha512-YhzPdzb612X591FOe68q+qXVXGG2ANZRvDo0RRUtimev85rCrAlv/TLMEZw5c+kq9AbzocLTVX/h2jVIFPL9Xg==} - peerDependencies: - ethers: ^5.0.0 - hardhat: ^2.0.0 - dependencies: - ethers: 5.7.2 - hardhat: 2.21.0(ts-node@10.9.2)(typescript@5.4.2) - - /@nomiclabs/hardhat-etherscan@3.1.8(hardhat@2.21.0): - resolution: {integrity: sha512-v5F6IzQhrsjHh6kQz4uNrym49brK9K5bYCq2zQZ729RYRaifI9hHbtmK+KkIVevfhut7huQFEQ77JLRMAzWYjQ==} - deprecated: The @nomiclabs/hardhat-etherscan package is deprecated, please use @nomicfoundation/hardhat-verify instead - peerDependencies: - hardhat: ^2.0.4 - dependencies: - '@ethersproject/abi': 5.7.0 - '@ethersproject/address': 5.7.0 - cbor: 8.1.0 - chalk: 2.4.2 - debug: 4.3.4(supports-color@8.1.1) - fs-extra: 7.0.1 - hardhat: 2.21.0(ts-node@10.9.2)(typescript@5.4.2) - lodash: 4.17.21 - semver: 6.3.1 - table: 6.8.1 - undici: 5.28.3 - transitivePeerDependencies: - - supports-color - - /@openzeppelin/contracts-upgradeable@4.9.6: - resolution: {integrity: sha512-m4iHazOsOCv1DgM7eD7GupTJ+NFVujRZt1wzddDPSVGpWdKq1SKkla5htKG7+IS4d2XOCtzkUNwRZ7Vq5aEUMA==} dev: false /@openzeppelin/contracts@4.9.6: resolution: {integrity: sha512-xSmezSupL+y9VkHZJGDoCBpmnB2ogM13ccaYDWqJTfS3dbuHkgjuwDFUmaFauBCboQMGB/S5UqUl2y54X99BmA==} dev: false - /@openzeppelin/defender-base-client@1.54.1(debug@4.3.4): - resolution: {integrity: sha512-DRGz/7KN3ZQwu28YWMOaojrC7jjPkz/uCwkC8/C8B11qwZhA5qIVvyhYHhhFOCl0J84+E3TNdvkPD2q3p2WaJw==} - dependencies: - amazon-cognito-identity-js: 6.3.12 - async-retry: 1.3.3 - axios: 1.6.7(debug@4.3.4) - lodash: 4.17.21 - node-fetch: 2.7.0 - transitivePeerDependencies: - - debug - - encoding - dev: false - - /@openzeppelin/hardhat-upgrades@1.28.0(@nomiclabs/hardhat-ethers@2.2.3)(@nomiclabs/hardhat-etherscan@3.1.8)(ethers@5.7.2)(hardhat@2.21.0): - resolution: {integrity: sha512-7sb/Jf+X+uIufOBnmHR0FJVWuxEs2lpxjJnLNN6eCJCP8nD0v+Ot5lTOW2Qb/GFnh+fLvJtEkhkowz4ZQ57+zQ==} - hasBin: true - peerDependencies: - '@nomiclabs/hardhat-ethers': ^2.0.0 - '@nomiclabs/hardhat-etherscan': ^3.1.0 - '@nomiclabs/harhdat-etherscan': '*' - ethers: ^5.0.5 - hardhat: ^2.0.2 - peerDependenciesMeta: - '@nomiclabs/harhdat-etherscan': - optional: true - dependencies: - '@nomiclabs/hardhat-ethers': 2.2.3(ethers@5.7.2)(hardhat@2.21.0) - '@nomiclabs/hardhat-etherscan': 3.1.8(hardhat@2.21.0) - '@openzeppelin/defender-base-client': 1.54.1(debug@4.3.4) - '@openzeppelin/platform-deploy-client': 0.8.0(debug@4.3.4) - '@openzeppelin/upgrades-core': 1.32.5 - chalk: 4.1.2 - debug: 4.3.4(supports-color@8.1.1) - ethers: 5.7.2 - hardhat: 2.21.0(ts-node@10.9.2)(typescript@5.4.2) - proper-lockfile: 4.1.2 - transitivePeerDependencies: - - encoding - - supports-color - dev: false - - /@openzeppelin/platform-deploy-client@0.8.0(debug@4.3.4): - resolution: {integrity: sha512-POx3AsnKwKSV/ZLOU/gheksj0Lq7Is1q2F3pKmcFjGZiibf+4kjGxr4eSMrT+2qgKYZQH1ZLQZ+SkbguD8fTvA==} - deprecated: '@openzeppelin/platform-deploy-client is deprecated. Please use @openzeppelin/defender-sdk-deploy-client' - dependencies: - '@ethersproject/abi': 5.7.0 - '@openzeppelin/defender-base-client': 1.54.1(debug@4.3.4) - axios: 0.21.4(debug@4.3.4) - lodash: 4.17.21 - node-fetch: 2.7.0 - transitivePeerDependencies: - - debug - - encoding - dev: false - - /@openzeppelin/upgrades-core@1.32.5: - resolution: {integrity: sha512-R0wprsyJ4xWiRW05kaTfZZkRVpG2g0af3/hpjE7t2mX0Eb2n40MQLokTwqIk4LDzpp910JfLSpB0vBuZ6WNPog==} - hasBin: true - dependencies: - cbor: 9.0.2 - chalk: 4.1.2 - compare-versions: 6.1.0 - debug: 4.3.4(supports-color@8.1.1) - ethereumjs-util: 7.1.5 - minimist: 1.2.8 - proper-lockfile: 4.1.2 - solidity-ast: 0.4.55 - transitivePeerDependencies: - - supports-color - dev: false - /@rollup/plugin-babel@5.3.1(@babel/core@7.24.0)(rollup@1.32.1): resolution: {integrity: sha512-WFfdLWU/xVWKeRQnKmIAQULUI7Il0gZnBIH/ZFO069wYIfPu+8zrfp/KMW0atmELoRDq8FbiP3VCss9MhCut7Q==} engines: {node: '>= 10.0.0'} @@ -3068,6 +2775,7 @@ packages: /@scure/base@1.1.5: resolution: {integrity: sha512-Brj9FiG2W1MRQSTB212YVPRrcbjkv48FoZi/u4l/zds/ieRrqsh7aUf6CLwkAq61oKXr/ZlTzlY66gLIj3TFTQ==} + dev: false /@scure/bip32@1.1.5: resolution: {integrity: sha512-XyNh1rB0SkEqd3tXcXMi+Xe1fvg+kUIcoRIEujP1Jgv7DqW2r9lg3Ah0NkFaCs9sTkQAQA8kw7xiRXzENi9Rtw==} @@ -3075,6 +2783,7 @@ packages: '@noble/hashes': 1.2.0 '@noble/secp256k1': 1.7.1 '@scure/base': 1.1.5 + dev: false /@scure/bip32@1.3.3: resolution: {integrity: sha512-LJaN3HwRbfQK0X1xFSi0Q9amqOgzQnnDngIt+ZlsBC3Bm7/nE7K0kwshZHyaru79yIVRv/e1mQAjZyuZG6jOFQ==} @@ -3082,18 +2791,21 @@ packages: '@noble/curves': 1.3.0 '@noble/hashes': 1.3.3 '@scure/base': 1.1.5 + dev: false /@scure/bip39@1.1.1: resolution: {integrity: sha512-t+wDck2rVkh65Hmv280fYdVdY25J9YeEUIgn2LG1WM6gxFkGzcksoDiUkWVpVp3Oex9xGC68JU2dSbUfwZ2jPg==} dependencies: '@noble/hashes': 1.2.0 '@scure/base': 1.1.5 + dev: false /@scure/bip39@1.2.2: resolution: {integrity: sha512-HYf9TUXG80beW+hGAt3TRM8wU6pQoYur9iNypTROm42dorCGmLnFe3eWjz3gOq6G62H2WRh0FCzAR1PI+29zIA==} dependencies: '@noble/hashes': 1.3.3 '@scure/base': 1.1.5 + dev: false /@sentry/core@5.30.0: resolution: {integrity: sha512-TmfrII8w1PQZSZgPpUESqjB+jC6MvZJZdLtE/0hZ+SrnKhW3x5WlYLvTXZpcWePYBku7rl2wn1RZu6uT0qCTeg==} @@ -3104,6 +2816,7 @@ packages: '@sentry/types': 5.30.0 '@sentry/utils': 5.30.0 tslib: 1.14.1 + dev: false /@sentry/hub@5.30.0: resolution: {integrity: sha512-2tYrGnzb1gKz2EkMDQcfLrDTvmGcQPuWxLnJKXJvYTQDGLlEvi2tWz1VIHjunmOvJrB5aIQLhm+dcMRwFZDCqQ==} @@ -3112,6 +2825,7 @@ packages: '@sentry/types': 5.30.0 '@sentry/utils': 5.30.0 tslib: 1.14.1 + dev: false /@sentry/minimal@5.30.0: resolution: {integrity: sha512-BwWb/owZKtkDX+Sc4zCSTNcvZUq7YcH3uAVlmh/gtR9rmUvbzAA3ewLuB3myi4wWRAMEtny6+J/FN/x+2wn9Xw==} @@ -3120,6 +2834,7 @@ packages: '@sentry/hub': 5.30.0 '@sentry/types': 5.30.0 tslib: 1.14.1 + dev: false /@sentry/node@5.30.0: resolution: {integrity: sha512-Br5oyVBF0fZo6ZS9bxbJZG4ApAjRqAnqFFurMVJJdunNb80brh7a5Qva2kjhm+U6r9NJAB5OmDyPkA1Qnt+QVg==} @@ -3136,6 +2851,7 @@ packages: tslib: 1.14.1 transitivePeerDependencies: - supports-color + dev: false /@sentry/tracing@5.30.0: resolution: {integrity: sha512-dUFowCr0AIMwiLD7Fs314Mdzcug+gBVo/+NCMyDw8tFxJkwWAKl7Qa2OZxLQ0ZHjakcj1hNKfCQJ9rhyfOl4Aw==} @@ -3146,10 +2862,12 @@ packages: '@sentry/types': 5.30.0 '@sentry/utils': 5.30.0 tslib: 1.14.1 + dev: false /@sentry/types@5.30.0: resolution: {integrity: sha512-R8xOqlSTZ+htqrfteCWU5Nk0CDN5ApUTvrlvBuiH1DyP6czDZ4ktbZB0hAgBlVcK0U+qpD3ag3Tqqpa5Q67rPw==} engines: {node: '>=6'} + dev: false /@sentry/utils@5.30.0: resolution: {integrity: sha512-zaYmoH0NWWtvnJjC9/CBseXMtKHm/tm40sz3YfJRxeQjyzRqNQPgivpd9R/oDJCYj999mzdW382p/qi2ypjLww==} @@ -3157,6 +2875,7 @@ packages: dependencies: '@sentry/types': 5.30.0 tslib: 1.14.1 + dev: false /@sinonjs/commons@1.8.6: resolution: {integrity: sha512-Ky+XkAkqPZSm3NLBeUng77EBQl3cmeJhITaGHdYH8kjVB+aun3S4XBRti2zt17mtt0mIUDiNxYeoJm6drVvBJQ==} @@ -3194,60 +2913,31 @@ packages: size-limit: 7.0.8 dev: true - /@smithy/types@2.11.0: - resolution: {integrity: sha512-AR0SXO7FuAskfNhyGfSTThpLRntDI5bOrU0xrpVYU0rZyjl3LBXInZFMTP/NNSd7IS6Ksdtar0QvnrPRIhVrLQ==} - engines: {node: '>=14.0.0'} - dependencies: - tslib: 2.6.2 - dev: false - /@solidity-parser/parser@0.14.5: resolution: {integrity: sha512-6dKnHZn7fg/iQATVEzqyUOyEidbn05q7YA2mQ9hC0MMXhhV3/JrsxmFSYZAcr7j1yUP700LLhTruvJ3MiQmjJg==} dependencies: antlr4ts: 0.5.0-alpha.4 - - /@solidity-parser/parser@0.16.2: - resolution: {integrity: sha512-PI9NfoA3P8XK2VBkK5oIfRgKDsicwDZfkVq9ZTBCQYGOP1N2owgY2dyLGyU5/J/hQs8KRk55kdmvTLjy3Mu3vg==} - dependencies: - antlr4ts: 0.5.0-alpha.4 - dev: true - - /@solidity-parser/parser@0.17.0: - resolution: {integrity: sha512-Nko8R0/kUo391jsEHHxrGM07QFdnPGvlmox4rmH0kNiNAashItAilhy4Mv4pK5gQmW5f4sXAF58fwJbmlkGcVw==} - dev: true + dev: false /@solidity-parser/parser@0.18.0: resolution: {integrity: sha512-yfORGUIPgLck41qyN7nbwJRAx17/jAIXCTanHOJZhB6PJ1iAk/84b/xlsVKFSyNyLXIj0dhppoE0+CRws7wlzA==} + dev: false /@tsconfig/node10@1.0.9: resolution: {integrity: sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==} + dev: false /@tsconfig/node12@1.0.11: resolution: {integrity: sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==} + dev: false /@tsconfig/node14@1.0.3: resolution: {integrity: sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==} + dev: false /@tsconfig/node16@1.0.4: resolution: {integrity: sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==} - - /@typechain/ethers-v5@10.2.1(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2)(ethers@5.7.2)(typechain@8.3.2)(typescript@5.4.2): - resolution: {integrity: sha512-n3tQmCZjRE6IU4h6lqUGiQ1j866n5MTCBJreNEHHVWXa2u9GJTaeYyU1/k+1qLutkyw+sS6VAN+AbeiTqsxd/A==} - peerDependencies: - '@ethersproject/abi': ^5.0.0 - '@ethersproject/providers': ^5.0.0 - ethers: ^5.1.3 - typechain: ^8.1.1 - typescript: '>=4.3.0' - dependencies: - '@ethersproject/abi': 5.7.0 - '@ethersproject/providers': 5.7.2 - ethers: 5.7.2 - lodash: 4.17.21 - ts-essentials: 7.0.3(typescript@5.4.2) - typechain: 8.3.2(typescript@5.4.2) - typescript: 5.4.2 - dev: true + dev: false /@typechain/ethers-v6@0.4.3(ethers@6.11.1)(typechain@8.3.2)(typescript@5.4.2): resolution: {integrity: sha512-TrxBsyb4ryhaY9keP6RzhFCviWYApcLCIRMPyWaKp2cZZrfaM3QBoxXTnw/eO4+DAY3l+8O0brNW0WgeQeOiDA==} @@ -3277,25 +2967,6 @@ packages: typescript: 5.4.3 dev: false - /@typechain/hardhat@6.1.6(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2)(@typechain/ethers-v5@10.2.1)(ethers@5.7.2)(hardhat@2.21.0)(typechain@8.3.2): - resolution: {integrity: sha512-BiVnegSs+ZHVymyidtK472syodx1sXYlYJJixZfRstHVGYTi8V1O7QG4nsjyb0PC/LORcq7sfBUcHto1y6UgJA==} - peerDependencies: - '@ethersproject/abi': ^5.4.7 - '@ethersproject/providers': ^5.4.7 - '@typechain/ethers-v5': ^10.2.1 - ethers: ^5.4.7 - hardhat: ^2.9.9 - typechain: ^8.1.1 - dependencies: - '@ethersproject/abi': 5.7.0 - '@ethersproject/providers': 5.7.2 - '@typechain/ethers-v5': 10.2.1(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2)(ethers@5.7.2)(typechain@8.3.2)(typescript@5.4.2) - ethers: 5.7.2 - fs-extra: 9.1.0 - hardhat: 2.21.0(ts-node@10.9.2)(typescript@5.4.2) - typechain: 8.3.2(typescript@5.4.2) - dev: true - /@typechain/hardhat@8.0.3(@typechain/ethers-v6@0.4.3)(ethers@6.11.1)(hardhat@2.21.0)(typechain@8.3.2): resolution: {integrity: sha512-MytSmJJn+gs7Mqrpt/gWkTCOpOQ6ZDfRrRT2gtZL0rfGe4QrU4x9ZdW15fFbVM/XTa+5EsKiOMYXhRABibNeng==} peerDependencies: @@ -3355,11 +3026,13 @@ packages: resolution: {integrity: sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==} dependencies: '@types/node': 18.19.22 + dev: false /@types/bn.js@5.1.5: resolution: {integrity: sha512-V46N0zwKRF5Q00AZ6hWtN0T8gGmDUaUzLWQvHFo5yThtVwK/VCenFY3wXVbOvNfajEpsTfQM4IN9k/d6gUVX3A==} dependencies: '@types/node': 18.19.22 + dev: false /@types/body-parser@1.19.5: resolution: {integrity: sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==} @@ -3372,6 +3045,7 @@ packages: resolution: {integrity: sha512-ThlRVIJhr69FLlh6IctTXFkmhtP3NpMZ2QGq69StYLyKZFp/HOp1VdKZj7RvfNWYYcJ1xlbLGLLWj1UvP5u/Gw==} dependencies: '@types/chai': 4.3.12 + dev: false /@types/chai@4.3.12: resolution: {integrity: sha512-zNKDHG/1yxm8Il6uCCVsm+dRdEsJlFoDu73X17y09bId6UwoYww+vFBsAcRzl8knM1sab3Dp1VRikFQwDOtDDw==} @@ -3380,6 +3054,7 @@ packages: resolution: {integrity: sha512-eHE4cQPoj6ngxBZMvVf6Hw7Mh4jMW4U9lpGmS5GBPB9RYxlFg+CHaVN7ErNY4W9XfLIEn20b4VDYaIrbq0q4uA==} dependencies: '@types/node': 20.11.25 + dev: false /@types/connect@3.4.38: resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==} @@ -3422,12 +3097,14 @@ packages: resolution: {integrity: sha512-8BSvG1kGm83cyJITQMZSulnl6QV8jqAGreJsc5tPu1Jq0vTSOiY/k24Wx82JRpWwZSqrala6sd5rWi6aNXvqcw==} dependencies: '@types/node': 20.11.25 + dev: false /@types/glob@7.2.0: resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==} dependencies: '@types/minimatch': 5.1.2 '@types/node': 20.11.25 + dev: false /@types/graceful-fs@4.1.9: resolution: {integrity: sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==} @@ -3466,6 +3143,7 @@ packages: /@types/lru-cache@5.1.1: resolution: {integrity: sha512-ssE3Vlrys7sdIzs5LOxCzTVMsU7i9oa/IaW92wF32JFb3CVczqOkru2xspuKczHEbG3nvmPY7IFqVmGGHdNbYw==} + dev: false /@types/methods@1.1.4: resolution: {integrity: sha512-ymXWVrDiCxTBE3+RIrrP533E70eA+9qu7zdWoHuOmGujkYtzf4HQF96b8nwHLqhuf4ykX61IGRIB38CC6/sImQ==} @@ -3481,12 +3159,14 @@ packages: /@types/minimatch@5.1.2: resolution: {integrity: sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==} + dev: false /@types/mocha@10.0.6: resolution: {integrity: sha512-dJvrYWxP/UcXm36Qn36fxhUKu8A/xMRXVT2cliFF1Z7UA9liG5Psj3ezNSZw+5puH2czDXRLcXQxf8JbJt0ejg==} /@types/node@10.17.60: resolution: {integrity: sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==} + dev: false /@types/node@12.0.0: resolution: {integrity: sha512-Jrb/x3HT4PTJp6a4avhmJCDEVrPdqLfl3e8GGMbpkGGdwAV5UGlIs4vVEfsHHfylZVOKZWpOqmqFH8CbfOZ6kg==} @@ -3504,9 +3184,11 @@ packages: resolution: {integrity: sha512-TBHyJxk2b7HceLVGFcpAUjsa5zIdsPWlR6XHfyGzd0SFu+/NFgQgMAl96MSDZgQDvJAvV6BKsFOrt6zIL09JDw==} dependencies: undici-types: 5.26.5 + dev: false /@types/node@8.10.66: resolution: {integrity: sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw==} + dev: false /@types/normalize-package-data@2.4.4: resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} @@ -3518,12 +3200,14 @@ packages: resolution: {integrity: sha512-uRwJqmiXmh9++aSu1VNEn3iIxWOhd8AHXNSdlaLfdAAdSTY9jYVeGWnzejM3dvrkbqE3/hyQkQQ29IFATEGlew==} dependencies: '@types/node': 18.19.22 + dev: false /@types/prettier@1.19.1: resolution: {integrity: sha512-5qOlnZscTn4xxM5MeGXAMOsIOIKIbh9e85zJWfBRVPlRMEVawzoPhINYbRGkBZCI8LxvBe7tJCdWiarA99OZfQ==} /@types/prettier@2.7.3: resolution: {integrity: sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==} + dev: false /@types/qs@6.9.12: resolution: {integrity: sha512-bZcOkJ6uWrL0Qb2NAWKa7TBU+mJHPzhx9jjLL1KHF+XpzEcR7EXHvjbHlGtR/IsP1vyPrehuS6XqkmaePy//mg==} @@ -3541,9 +3225,11 @@ packages: resolution: {integrity: sha512-hHxJU6PAEUn0TP4S/ZOzuTUvJWuZ6eIKeNKb5RBpODvSl6hp1Wrw4s7ATY50rklRCScUDpHzVA/DQdSjJ3UoYQ==} dependencies: '@types/node': 18.19.22 + dev: false /@types/semver@7.5.8: resolution: {integrity: sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==} + dev: false /@types/send@0.17.4: resolution: {integrity: sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==} @@ -3632,34 +3318,6 @@ packages: transitivePeerDependencies: - supports-color - /@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0)(eslint@8.57.0)(typescript@5.4.2): - resolution: {integrity: sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - '@typescript-eslint/parser': ^5.0.0 - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@eslint-community/regexpp': 4.10.0 - '@typescript-eslint/parser': 5.62.0(eslint@8.57.0)(typescript@5.4.2) - '@typescript-eslint/scope-manager': 5.62.0 - '@typescript-eslint/type-utils': 5.62.0(eslint@8.57.0)(typescript@5.4.2) - '@typescript-eslint/utils': 5.62.0(eslint@8.57.0)(typescript@5.4.2) - debug: 4.3.4(supports-color@8.1.1) - eslint: 8.57.0 - graphemer: 1.4.0 - ignore: 5.3.1 - natural-compare-lite: 1.4.0 - semver: 7.6.0 - tsutils: 3.21.0(typescript@5.4.2) - typescript: 5.4.2 - transitivePeerDependencies: - - supports-color - dev: true - /@typescript-eslint/eslint-plugin@7.1.1(@typescript-eslint/parser@7.1.1)(eslint@8.57.0)(typescript@5.4.2): resolution: {integrity: sha512-zioDz623d0RHNhvx0eesUmGfIjzrk18nSBC8xewepKXbBvN/7c1qImV7Hg8TI1URTxKax7/zxfxj3Uph8Chcuw==} engines: {node: ^16.0.0 || >=18.0.0} @@ -3743,26 +3401,6 @@ packages: transitivePeerDependencies: - supports-color - /@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.4.2): - resolution: {integrity: sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@typescript-eslint/scope-manager': 5.62.0 - '@typescript-eslint/types': 5.62.0 - '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.4.2) - debug: 4.3.4(supports-color@8.1.1) - eslint: 8.57.0 - typescript: 5.4.2 - transitivePeerDependencies: - - supports-color - dev: true - /@typescript-eslint/parser@7.1.1(eslint@8.57.0)(typescript@5.4.2): resolution: {integrity: sha512-ZWUFyL0z04R1nAEgr9e79YtV5LbafdOtN7yapNbn1ansMyaegl2D4bL7vHoJ4HPSc4CaLwuCVas8CVuneKzplQ==} engines: {node: ^16.0.0 || >=18.0.0} @@ -3784,14 +3422,6 @@ packages: - supports-color dev: false - /@typescript-eslint/scope-manager@5.62.0: - resolution: {integrity: sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dependencies: - '@typescript-eslint/types': 5.62.0 - '@typescript-eslint/visitor-keys': 5.62.0 - dev: true - /@typescript-eslint/scope-manager@7.1.1: resolution: {integrity: sha512-cirZpA8bJMRb4WZ+rO6+mnOJrGFDd38WoXCEI57+CYBqta8Yc8aJym2i7vyqLL1vVYljgw0X27axkUXz32T8TA==} engines: {node: ^16.0.0 || >=18.0.0} @@ -3800,26 +3430,6 @@ packages: '@typescript-eslint/visitor-keys': 7.1.1 dev: false - /@typescript-eslint/type-utils@5.62.0(eslint@8.57.0)(typescript@5.4.2): - resolution: {integrity: sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: '*' - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.4.2) - '@typescript-eslint/utils': 5.62.0(eslint@8.57.0)(typescript@5.4.2) - debug: 4.3.4(supports-color@8.1.1) - eslint: 8.57.0 - tsutils: 3.21.0(typescript@5.4.2) - typescript: 5.4.2 - transitivePeerDependencies: - - supports-color - dev: true - /@typescript-eslint/type-utils@7.1.1(eslint@8.57.0)(typescript@5.4.2): resolution: {integrity: sha512-5r4RKze6XHEEhlZnJtR3GYeCh1IueUHdbrukV2KSlLXaTjuSfeVF8mZUVPLovidCuZfbVjfhi4c0DNSa/Rdg5g==} engines: {node: ^16.0.0 || >=18.0.0} @@ -3840,11 +3450,6 @@ packages: - supports-color dev: false - /@typescript-eslint/types@5.62.0: - resolution: {integrity: sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dev: true - /@typescript-eslint/types@7.1.1: resolution: {integrity: sha512-KhewzrlRMrgeKm1U9bh2z5aoL4s7K3tK5DwHDn8MHv0yQfWFz/0ZR6trrIHHa5CsF83j/GgHqzdbzCXJ3crx0Q==} engines: {node: ^16.0.0 || >=18.0.0} @@ -3860,36 +3465,15 @@ packages: optional: true dependencies: debug: 4.3.4(supports-color@8.1.1) - eslint-visitor-keys: 1.3.0 - glob: 7.2.3 - is-glob: 4.0.3 - lodash: 4.17.21 - semver: 7.6.0 - tsutils: 3.21.0(typescript@4.9.5) - typescript: 4.9.5 - transitivePeerDependencies: - - supports-color - - /@typescript-eslint/typescript-estree@5.62.0(typescript@5.4.2): - resolution: {integrity: sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@typescript-eslint/types': 5.62.0 - '@typescript-eslint/visitor-keys': 5.62.0 - debug: 4.3.4(supports-color@8.1.1) - globby: 11.1.0 + eslint-visitor-keys: 1.3.0 + glob: 7.2.3 is-glob: 4.0.3 + lodash: 4.17.21 semver: 7.6.0 - tsutils: 3.21.0(typescript@5.4.2) - typescript: 5.4.2 + tsutils: 3.21.0(typescript@4.9.5) + typescript: 4.9.5 transitivePeerDependencies: - supports-color - dev: true /@typescript-eslint/typescript-estree@7.1.1(typescript@5.4.2): resolution: {integrity: sha512-9ZOncVSfr+sMXVxxca2OJOPagRwT0u/UHikM2Rd6L/aB+kL/QAuTnsv6MeXtjzCJYb8PzrXarypSGIPx3Jemxw==} @@ -3913,26 +3497,6 @@ packages: - supports-color dev: false - /@typescript-eslint/utils@5.62.0(eslint@8.57.0)(typescript@5.4.2): - resolution: {integrity: sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) - '@types/json-schema': 7.0.15 - '@types/semver': 7.5.8 - '@typescript-eslint/scope-manager': 5.62.0 - '@typescript-eslint/types': 5.62.0 - '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.4.2) - eslint: 8.57.0 - eslint-scope: 5.1.1 - semver: 7.6.0 - transitivePeerDependencies: - - supports-color - - typescript - dev: true - /@typescript-eslint/utils@7.1.1(eslint@8.57.0)(typescript@5.4.2): resolution: {integrity: sha512-thOXM89xA03xAE0lW7alstvnyoBUbBX38YtY+zAUcpRPcq9EIhXPuJ0YTv948MbzmKh6e1AUszn5cBFK49Umqg==} engines: {node: ^16.0.0 || >=18.0.0} @@ -3952,14 +3516,6 @@ packages: - typescript dev: false - /@typescript-eslint/visitor-keys@5.62.0: - resolution: {integrity: sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dependencies: - '@typescript-eslint/types': 5.62.0 - eslint-visitor-keys: 3.4.3 - dev: true - /@typescript-eslint/visitor-keys@7.1.1: resolution: {integrity: sha512-yTdHDQxY7cSoCcAtiBzVzxleJhkGB9NncSIyMYe2+OGON1ZsP9zOPws/Pqgopa65jvknOjlk/w7ulPlZ78PiLQ==} engines: {node: ^16.0.0 || >=18.0.0} @@ -3970,6 +3526,7 @@ packages: /@ungap/structured-clone@1.2.0: resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} + dev: false /abab@2.0.6: resolution: {integrity: sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==} @@ -3977,6 +3534,7 @@ packages: /abbrev@1.0.9: resolution: {integrity: sha512-LEyx4aLEC3x6T0UguF6YILf+ntvmOaWsVfENmIW0E9H09vKlLDGelMjjSm0jkDHALj8A8quZ/HapKNigzwge+Q==} + dev: false /accepts@1.3.8: resolution: {integrity: sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==} @@ -4005,6 +3563,7 @@ packages: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: acorn: 8.11.3 + dev: false /acorn-walk@6.2.0: resolution: {integrity: sha512-7evsyfH1cLOCdAzZAd43Cic04yKydNx0cF+7tiA19p1XnLLPU4dpCQOqpjqwokFe//vS0QqfqqjCS2JkiIs0cA==} @@ -4013,6 +3572,7 @@ packages: /acorn-walk@8.3.2: resolution: {integrity: sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==} engines: {node: '>=0.4.0'} + dev: false /acorn@6.4.2: resolution: {integrity: sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==} @@ -4032,9 +3592,11 @@ packages: /adm-zip@0.4.16: resolution: {integrity: sha512-TFi4HBKSGfIKsK5YCkKaaFG2m4PEDyViZmEwof3MTIgzimHLto6muaHVpbrljdIvIrFZzEq/p4nafOeLcYegrg==} engines: {node: '>=0.3.0'} + dev: false /aes-js@3.0.0: resolution: {integrity: sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw==} + dev: false /aes-js@4.0.0-beta.5: resolution: {integrity: sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q==} @@ -4047,6 +3609,7 @@ packages: debug: 4.3.4(supports-color@8.1.1) transitivePeerDependencies: - supports-color + dev: false /aggregate-error@3.1.0: resolution: {integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==} @@ -4054,6 +3617,7 @@ packages: dependencies: clean-stack: 2.2.0 indent-string: 4.0.0 + dev: false /ajv@6.12.6: resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} @@ -4070,33 +3634,25 @@ packages: json-schema-traverse: 1.0.0 require-from-string: 2.0.2 uri-js: 4.4.1 - - /amazon-cognito-identity-js@6.3.12: - resolution: {integrity: sha512-s7NKDZgx336cp+oDeUtB2ZzT8jWJp/v2LWuYl+LQtMEODe22RF1IJ4nRiDATp+rp1pTffCZcm44Quw4jx2bqNg==} - dependencies: - '@aws-crypto/sha256-js': 1.2.2 - buffer: 4.9.2 - fast-base64-decode: 1.0.0 - isomorphic-unfetch: 3.1.0 - js-cookie: 2.2.1 - transitivePeerDependencies: - - encoding dev: false /amdefine@1.0.1: resolution: {integrity: sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg==} engines: {node: '>=0.4.2'} requiresBuild: true + dev: false optional: true /ansi-align@3.0.1: resolution: {integrity: sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==} dependencies: string-width: 4.2.3 + dev: false /ansi-colors@4.1.1: resolution: {integrity: sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==} engines: {node: '>=6'} + dev: false /ansi-colors@4.1.3: resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} @@ -4136,13 +3692,9 @@ packages: dependencies: color-convert: 2.0.1 - /antlr4@4.13.1: - resolution: {integrity: sha512-kiXTspaRYvnIArgE97z5YVVf/cDVQABr3abFRR6mE7yesLMkgu4ujuyV/sgxafQ8wgve0DJQUJ38Z8tkgA2izA==} - engines: {node: '>=16'} - dev: true - /antlr4ts@0.5.0-alpha.4: resolution: {integrity: sha512-WPQDt1B74OfPv/IMS2ekXAKkTZIHl88uMetg6q3OTqgFxZ/dxDXI0EWLyZid/1Pe6hTftyg5N7gel5wNAGxXyQ==} + dev: false /anymatch@2.0.0: resolution: {integrity: sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==} @@ -4161,6 +3713,7 @@ packages: /arg@4.1.3: resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} + dev: false /argparse@1.0.10: resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} @@ -4169,6 +3722,7 @@ packages: /argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + dev: false /aria-query@5.3.0: resolution: {integrity: sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==} @@ -4190,10 +3744,12 @@ packages: /array-back@3.1.0: resolution: {integrity: sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==} engines: {node: '>=6'} + dev: false /array-back@4.0.2: resolution: {integrity: sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg==} engines: {node: '>=8'} + dev: false /array-buffer-byte-length@1.0.1: resolution: {integrity: sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==} @@ -4226,6 +3782,7 @@ packages: /array-uniq@1.0.3: resolution: {integrity: sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q==} engines: {node: '>=0.10.0'} + dev: false /array-unique@0.3.2: resolution: {integrity: sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ==} @@ -4311,6 +3868,7 @@ packages: /asap@2.0.6: resolution: {integrity: sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==} + dev: false /asn1@0.2.6: resolution: {integrity: sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==} @@ -4323,15 +3881,12 @@ packages: /assertion-error@1.1.0: resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==} + dev: false /assign-symbols@1.0.0: resolution: {integrity: sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw==} engines: {node: '>=0.10.0'} - /ast-parents@0.0.1: - resolution: {integrity: sha512-XHusKxKz3zoYk1ic8Un640joHbFMhbqneyoZfoKnEGtf2ey9Uh/IdpcQplODdO/kENaMIWsD0nJm4+wX3UNLHA==} - dev: true - /ast-types-flow@0.0.8: resolution: {integrity: sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==} @@ -4342,15 +3897,11 @@ packages: /astral-regex@2.0.0: resolution: {integrity: sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==} engines: {node: '>=8'} - - /async-retry@1.3.3: - resolution: {integrity: sha512-wfr/jstw9xNi/0teMHrRW7dsz3Lt5ARhYNZ2ewpadnhaIp5mbALhOAP+EAdsC7t4Z6wqsDVv9+W6gm1Dk9mEyw==} - dependencies: - retry: 0.13.1 dev: false /async@1.5.2: resolution: {integrity: sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w==} + dev: false /async@3.2.5: resolution: {integrity: sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==} @@ -4392,15 +3943,7 @@ packages: resolution: {integrity: sha512-M0JtH+hlOL5pLQwHOLNYZaXuhqmvS8oExsqB1SBYgA4Dk7u/xx+YdGHXaK5pyUfed5mYXdlYiphWq3G8cRi5JQ==} engines: {node: '>=4'} - /axios@0.21.4(debug@4.3.4): - resolution: {integrity: sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==} - dependencies: - follow-redirects: 1.15.5(debug@4.3.4) - transitivePeerDependencies: - - debug - dev: false - - /axios@1.6.7(debug@4.3.4): + /axios@1.6.7: resolution: {integrity: sha512-/hDJGff6/c7u0hDkvkGxR/oy6CbCs8ziCsC7SqmhjfozqiJGc8Z11wrv9z9lYfY4K8l+H9TpjcMDX0xOZmx+RA==} dependencies: follow-redirects: 1.15.5(debug@4.3.4) @@ -4408,6 +3951,7 @@ packages: proxy-from-env: 1.1.0 transitivePeerDependencies: - debug + dev: false /axobject-query@3.2.1: resolution: {integrity: sha512-jsyHu61e6N4Vbz/v18DHwWYKK0bSWLqn47eeDSKPB7m8tqMHF9YJ+mhIk2lVteyZrY8tnSj/jHOv4YiTCuCJgg==} @@ -4589,9 +4133,6 @@ packages: resolution: {integrity: sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==} dependencies: safe-buffer: 5.2.1 - - /base64-js@1.5.1: - resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} dev: false /base@0.11.2: @@ -4613,20 +4154,7 @@ packages: /bech32@1.1.4: resolution: {integrity: sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==} - - /better-ajv-errors@1.2.0(ajv@8.12.0): - resolution: {integrity: sha512-UW+IsFycygIo7bclP9h5ugkNH8EjCSgqyFB/yQ4Hqqa1OEYDtb0uFIkYE0b6+CjkgJYVM5UKI/pJPxjYe9EZlA==} - engines: {node: '>= 12.13.0'} - peerDependencies: - ajv: 4.11.8 - 8 - dependencies: - '@babel/code-frame': 7.23.5 - '@humanwhocodes/momoa': 2.0.4 - ajv: 8.12.0 - chalk: 4.1.2 - jsonpointer: 5.0.1 - leven: 3.1.0 - dev: true + dev: false /binary-extensions@2.2.0: resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} @@ -4634,15 +4162,19 @@ packages: /blakejs@1.2.1: resolution: {integrity: sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ==} + dev: false /bn.js@4.11.6: resolution: {integrity: sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA==} + dev: false /bn.js@4.12.0: resolution: {integrity: sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==} + dev: false /bn.js@5.2.1: resolution: {integrity: sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==} + dev: false /body-parser@1.20.2: resolution: {integrity: sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==} @@ -4676,6 +4208,7 @@ packages: type-fest: 0.20.2 widest-line: 3.1.0 wrap-ansi: 7.0.0 + dev: false /brace-expansion@1.1.11: resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} @@ -4687,6 +4220,7 @@ packages: resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} dependencies: balanced-match: 1.0.2 + dev: false /braces@2.3.2: resolution: {integrity: sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==} @@ -4713,6 +4247,7 @@ packages: /brorand@1.1.0: resolution: {integrity: sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==} + dev: false /browser-process-hrtime@1.0.0: resolution: {integrity: sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==} @@ -4724,6 +4259,7 @@ packages: /browser-stdout@1.3.1: resolution: {integrity: sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==} + dev: false /browserify-aes@1.2.0: resolution: {integrity: sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==} @@ -4734,6 +4270,7 @@ packages: evp_bytestokey: 1.0.3 inherits: 2.0.4 safe-buffer: 5.2.1 + dev: false /browserslist@4.23.0: resolution: {integrity: sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==} @@ -4755,6 +4292,7 @@ packages: resolution: {integrity: sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==} dependencies: base-x: 3.0.9 + dev: false /bs58check@2.1.2: resolution: {integrity: sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==} @@ -4762,6 +4300,7 @@ packages: bs58: 4.0.1 create-hash: 1.2.0 safe-buffer: 5.2.1 + dev: false /bser@2.1.1: resolution: {integrity: sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==} @@ -4773,18 +4312,6 @@ packages: /buffer-xor@1.0.3: resolution: {integrity: sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==} - - /buffer@4.9.2: - resolution: {integrity: sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==} - dependencies: - base64-js: 1.5.1 - ieee754: 1.2.1 - isarray: 1.0.0 - dev: false - - /bufio@1.2.1: - resolution: {integrity: sha512-9oR3zNdupcg/Ge2sSHQF3GX+kmvL/fTPvD0nd5AGLq8SjUYnTz+SlFjK/GXidndbZtIj+pVKXiWeR9w6e9wKCA==} - engines: {node: '>=14.0.0'} dev: false /builtin-modules@3.3.0: @@ -4799,6 +4326,7 @@ packages: /bytes@3.1.2: resolution: {integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==} engines: {node: '>= 0.8'} + dev: false /cache-base@1.0.1: resolution: {integrity: sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==} @@ -4853,6 +4381,7 @@ packages: engines: {node: '>=12.19'} dependencies: nofilter: 3.1.0 + dev: false /cbor@9.0.2: resolution: {integrity: sha512-JPypkxsB10s9QOWwa6zwPzqE1Md3vqpPc+cai4sAecuCsRyAtAl/pMyhPlMbT/xtPnm2dznJZYRLui57qiRhaQ==} @@ -4868,6 +4397,7 @@ packages: dependencies: chai: 4.4.1 check-error: 1.0.3 + dev: false /chai@4.4.1: resolution: {integrity: sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==} @@ -4880,6 +4410,7 @@ packages: loupe: 2.3.7 pathval: 1.1.1 type-detect: 4.0.8 + dev: false /chalk@2.4.2: resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} @@ -4908,11 +4439,13 @@ packages: /charenc@0.0.2: resolution: {integrity: sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==} + dev: false /check-error@1.0.3: resolution: {integrity: sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==} dependencies: get-func-name: 2.0.2 + dev: false /chokidar@3.5.3: resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==} @@ -4927,6 +4460,7 @@ packages: readdirp: 3.6.0 optionalDependencies: fsevents: 2.3.3 + dev: false /chokidar@3.6.0: resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} @@ -4954,6 +4488,7 @@ packages: dependencies: inherits: 2.0.4 safe-buffer: 5.2.1 + dev: false /class-utils@0.3.6: resolution: {integrity: sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==} @@ -4967,10 +4502,12 @@ packages: /clean-stack@2.2.0: resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==} engines: {node: '>=6'} + dev: false /cli-boxes@2.2.1: resolution: {integrity: sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==} engines: {node: '>=6'} + dev: false /cli-cursor@2.1.0: resolution: {integrity: sha512-8lgKz8LmCRYZZQDpRyT2m5rKJ08TnU4tR9FFFW2rxpxR1FzWi4PQ/NfyODchAatHaUgnSPVcx/R5w6NuTBzFiw==} @@ -5000,6 +4537,7 @@ packages: string-width: 2.1.1 optionalDependencies: colors: 1.4.0 + dev: false /cli-width@3.0.0: resolution: {integrity: sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==} @@ -5018,6 +4556,7 @@ packages: string-width: 4.2.3 strip-ansi: 6.0.1 wrap-ansi: 7.0.0 + dev: false /clone@1.0.4: resolution: {integrity: sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==} @@ -5071,6 +4610,7 @@ packages: /colors@1.4.0: resolution: {integrity: sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==} engines: {node: '>=0.1.90'} + dev: false /colorspace@1.1.4: resolution: {integrity: sha512-BgvKJiuVu1igBUF2kEjRCZXol6wiiGbY5ipL/oVPwm0BL9sIpMIzM8IK7vwuxIIzOXMV3Ey5w+vxhm0rR/TN8w==} @@ -5087,6 +4627,7 @@ packages: /command-exists@1.2.9: resolution: {integrity: sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w==} + dev: false /command-line-args@5.2.1: resolution: {integrity: sha512-H4UfQhZyakIjC74I9d34fGYDwk3XpSr17QhEd0Q3I9Xq1CETHo4Hcuo87WyWHpAF1aSLjLRf5lD9ZGX2qStUvg==} @@ -5096,6 +4637,7 @@ packages: find-replace: 3.0.0 lodash.camelcase: 4.3.0 typical: 4.0.0 + dev: false /command-line-usage@6.1.3: resolution: {integrity: sha512-sH5ZSPr+7UStsloltmDh7Ce5fb8XPlHyoPzTpyyMuYCtervL65+ubVZ6Q61cFtFl62UyJlc8/JwERRbAFPUqgw==} @@ -5105,11 +4647,7 @@ packages: chalk: 2.4.2 table-layout: 1.0.2 typical: 5.2.0 - - /commander@10.0.1: - resolution: {integrity: sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==} - engines: {node: '>=14'} - dev: true + dev: false /commander@11.1.0: resolution: {integrity: sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==} @@ -5121,6 +4659,7 @@ packages: /commander@3.0.2: resolution: {integrity: sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow==} + dev: false /commander@9.5.0: resolution: {integrity: sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==} @@ -5130,10 +4669,6 @@ packages: /commondir@1.0.1: resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==} - /compare-versions@6.1.0: - resolution: {integrity: sha512-LNZQXhqUvqUTotpZ00qLSaify3b4VFD588aRr8MKFw4CMUr98ytzCW5wDH5qx/DEY5kCDXcbcRuCqL0szEf2tg==} - dev: false - /component-emitter@1.3.1: resolution: {integrity: sha512-T0+barUSQRTUQASh8bx02dl+DhF54GtIDY13Y3m9oWTklKbb3Wv974meRpeZ3lp1JpLVECWWNHC4vaG2XHXouQ==} @@ -5148,16 +4683,11 @@ packages: inherits: 2.0.4 readable-stream: 2.3.8 typedarray: 0.0.6 + dev: false /confusing-browser-globals@1.0.11: resolution: {integrity: sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA==} - /console-table-printer@2.12.0: - resolution: {integrity: sha512-Q/Ax+UOpZw0oPZGmv8bH8/W5NpC2rAYy6cX20BVLGQ45v944oL+srmLTZAse/5a3vWDl0MXR/0GTEdsz2dDTbg==} - dependencies: - simple-wcswidth: 1.0.1 - dev: false - /content-disposition@0.5.4: resolution: {integrity: sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==} engines: {node: '>= 0.6'} @@ -5183,6 +4713,7 @@ packages: /cookie@0.4.2: resolution: {integrity: sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==} engines: {node: '>= 0.6'} + dev: false /cookie@0.5.0: resolution: {integrity: sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==} @@ -5207,6 +4738,7 @@ packages: /core-util-is@1.0.3: resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} + dev: false /cors@2.8.5: resolution: {integrity: sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==} @@ -5226,22 +4758,6 @@ packages: path-type: 4.0.0 yaml: 1.10.2 - /cosmiconfig@8.3.6(typescript@5.4.2): - resolution: {integrity: sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==} - engines: {node: '>=14'} - peerDependencies: - typescript: '>=4.9.5' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - import-fresh: 3.3.0 - js-yaml: 4.1.0 - parse-json: 5.2.0 - path-type: 4.0.0 - typescript: 5.4.2 - dev: true - /create-hash@1.2.0: resolution: {integrity: sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==} dependencies: @@ -5250,6 +4766,7 @@ packages: md5.js: 1.3.5 ripemd160: 2.0.2 sha.js: 2.4.11 + dev: false /create-hmac@1.1.7: resolution: {integrity: sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==} @@ -5260,9 +4777,11 @@ packages: ripemd160: 2.0.2 safe-buffer: 5.2.1 sha.js: 2.4.11 + dev: false /create-require@1.1.1: resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} + dev: false /cross-spawn@6.0.5: resolution: {integrity: sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==} @@ -5284,6 +4803,7 @@ packages: /crypt@0.0.2: resolution: {integrity: sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==} + dev: false /cssom@0.3.8: resolution: {integrity: sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==} @@ -5315,6 +4835,7 @@ packages: /death@1.1.0: resolution: {integrity: sha512-vsV6S4KVHvTGxbEcij7hkWRv0It+sGGWVOM67dQde/o5Xjnr+KmLjxWJii2uEObIrt1CcM9w0Yaovx+iOlIL+w==} + dev: false /debug@2.6.9: resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} @@ -5355,6 +4876,7 @@ packages: /decamelize@4.0.0: resolution: {integrity: sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==} engines: {node: '>=10'} + dev: false /decode-uri-component@0.2.2: resolution: {integrity: sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==} @@ -5365,10 +4887,12 @@ packages: engines: {node: '>=6'} dependencies: type-detect: 4.0.8 + dev: false /deep-extend@0.6.0: resolution: {integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==} engines: {node: '>=4.0.0'} + dev: false /deep-is@0.1.4: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} @@ -5424,6 +4948,7 @@ packages: /depd@2.0.0: resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==} engines: {node: '>= 0.8'} + dev: false /dequal@2.0.3: resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} @@ -5434,11 +4959,6 @@ packages: engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} dev: false - /detect-indent@6.1.0: - resolution: {integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==} - engines: {node: '>=8'} - dev: true - /detect-newline@3.1.0: resolution: {integrity: sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==} engines: {node: '>=8'} @@ -5457,15 +4977,18 @@ packages: /diff@4.0.2: resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} engines: {node: '>=0.3.1'} + dev: false /diff@5.0.0: resolution: {integrity: sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==} engines: {node: '>=0.3.1'} + dev: false /difflib@0.2.4: resolution: {integrity: sha512-9YVwmMb0wQHQNr5J9m6BSj6fk4pfGITGQOOs+D9Fl+INODWFOfvhIU1hNv6GgR1RBoC/9NJcwu77zShxV0kT7w==} dependencies: heap: 0.2.7 + dev: false /dir-glob@3.0.1: resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} @@ -5526,6 +5049,7 @@ packages: inherits: 2.0.4 minimalistic-assert: 1.0.1 minimalistic-crypto-utils: 1.0.1 + dev: false /elliptic@6.5.5: resolution: {integrity: sha512-7EjbcmUm17NQFu4Pmgmq2olYMj8nwMnpcddByChSUjArp8F5DQWcIcpriwO4ZToLNAJig0yiyjswfyGNje/ixw==} @@ -5537,6 +5061,7 @@ packages: inherits: 2.0.4 minimalistic-assert: 1.0.1 minimalistic-crypto-utils: 1.0.1 + dev: false /emoji-regex@7.0.3: resolution: {integrity: sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==} @@ -5571,6 +5096,7 @@ packages: /env-paths@2.2.1: resolution: {integrity: sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==} engines: {node: '>=6'} + dev: false /error-ex@1.3.2: resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} @@ -5905,6 +5431,7 @@ packages: /escape-string-regexp@4.0.0: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} + dev: false /escodegen@1.14.3: resolution: {integrity: sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==} @@ -5929,6 +5456,7 @@ packages: optionator: 0.8.3 optionalDependencies: source-map: 0.2.0 + dev: false /eslint-config-prettier@6.15.0(eslint@6.8.0): resolution: {integrity: sha512-a1+kOYLR8wMGustcgAjdydMsQ2A/2ipRPwRKUmfYaSxc9ZPcrku080Ctl6zrZzZNs/U82MjSv+qKREkoq3bJaw==} @@ -5939,15 +5467,6 @@ packages: eslint: 6.8.0 get-stdin: 6.0.0 - /eslint-config-prettier@8.10.0(eslint@8.57.0): - resolution: {integrity: sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==} - hasBin: true - peerDependencies: - eslint: '>=7.0.0' - dependencies: - eslint: 8.57.0 - dev: true - /eslint-config-react-app@5.2.1(@typescript-eslint/eslint-plugin@2.34.0)(@typescript-eslint/parser@2.34.0)(babel-eslint@10.1.0)(eslint-plugin-flowtype@3.13.0)(eslint-plugin-import@2.29.1)(eslint-plugin-jsx-a11y@6.8.0)(eslint-plugin-react-hooks@2.5.1)(eslint-plugin-react@7.34.0)(eslint@6.8.0)(typescript@3.9.10): resolution: {integrity: sha512-pGIZ8t0mFLcV+6ZirRgYK6RVqUIKRIi9MmgzUEmrIknsn3AdO0I32asO86dJgloHq+9ZPl8UIg8mYrvgP5u2wQ==} peerDependencies: @@ -6131,20 +5650,6 @@ packages: - supports-color dev: false - /eslint-plugin-json-files@2.2.0(eslint@8.57.0): - resolution: {integrity: sha512-7ETNwGWMtlAqtAIfwrNSm/X8RsHrZcV78YFa/EyYjavFWaVFhi/fsZBjnj4yIf1G0Rbx5f2t+sd037hVPK20WQ==} - engines: {node: '>=14.15'} - peerDependencies: - eslint: '>=5' - dependencies: - ajv: 8.12.0 - better-ajv-errors: 1.2.0(ajv@8.12.0) - eslint: 8.57.0 - requireindex: 1.2.0 - semver: 7.6.0 - sort-package-json: 1.57.0 - dev: true - /eslint-plugin-jsx-a11y@6.8.0(eslint@6.8.0): resolution: {integrity: sha512-Hdh937BS3KdwwbBaKd5+PLCOmYY6U4f2h9Z2ktwtNKvIdIEu137rjYbcb9ApSbVJfWxANNuiKTD/9tOKjK9qOA==} engines: {node: '>=4.0'} @@ -6210,23 +5715,6 @@ packages: prettier: 1.19.1 prettier-linter-helpers: 1.0.0 - /eslint-plugin-prettier@4.2.1(eslint-config-prettier@8.10.0)(eslint@8.57.0)(prettier@2.8.8): - resolution: {integrity: sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==} - engines: {node: '>=12.0.0'} - peerDependencies: - eslint: '>=7.28.0' - eslint-config-prettier: '*' - prettier: '>=2.0.0' - peerDependenciesMeta: - eslint-config-prettier: - optional: true - dependencies: - eslint: 8.57.0 - eslint-config-prettier: 8.10.0(eslint@8.57.0) - prettier: 2.8.8 - prettier-linter-helpers: 1.0.0 - dev: true - /eslint-plugin-react-hooks@2.5.1(eslint@6.8.0): resolution: {integrity: sha512-Y2c4b55R+6ZzwtTppKwSmK/Kar8AdLiC2f9NADCuxbcTgPPg41Gyqa6b9GppgXSvCtkRw43ZE86CT5sejKC6/g==} engines: {node: '>=7'} @@ -6310,6 +5798,7 @@ packages: dependencies: esrecurse: 4.3.0 estraverse: 5.3.0 + dev: false /eslint-utils@1.4.3: resolution: {integrity: sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==} @@ -6330,6 +5819,7 @@ packages: /eslint-visitor-keys@3.4.3: resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dev: false /eslint@6.8.0: resolution: {integrity: sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==} @@ -6421,6 +5911,7 @@ packages: text-table: 0.2.0 transitivePeerDependencies: - supports-color + dev: false /espree@6.2.1: resolution: {integrity: sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==} @@ -6437,11 +5928,13 @@ packages: acorn: 8.11.3 acorn-jsx: 5.3.2(acorn@8.11.3) eslint-visitor-keys: 3.4.3 + dev: false /esprima@2.7.3: resolution: {integrity: sha512-OarPfz0lFCiW4/AV2Oy1Rp9qu0iusTKqykwTspGCZtPxmF81JR4MmIebvF1F9+UOKth2ZubLQ4XGGaU+hSn99A==} engines: {node: '>=0.10.0'} hasBin: true + dev: false /esprima@4.0.1: resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} @@ -6463,6 +5956,7 @@ packages: /estraverse@1.9.3: resolution: {integrity: sha512-25w1fMXQrGdoquWnScXZGckOv+Wes+JDnuN/+7ex3SauFRS72r2lFDec0EKPt2YD1wUJ/IrfEex+9yp4hfSOJA==} engines: {node: '>=0.10.0'} + dev: false /estraverse@4.3.0: resolution: {integrity: sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==} @@ -6496,7 +5990,7 @@ packages: optional: true dependencies: '@solidity-parser/parser': 0.14.5 - axios: 1.6.7(debug@4.3.4) + axios: 1.6.7 cli-table3: 0.5.1 colors: 1.4.0 ethereum-cryptography: 1.2.0 @@ -6512,11 +6006,13 @@ packages: - bufferutil - debug - utf-8-validate + dev: false /ethereum-bloom-filters@1.0.10: resolution: {integrity: sha512-rxJ5OFN3RwjQxDcFP2Z5+Q9ho4eIdEmSc2ht0fCu8Se9nbXjZ7/031uXoUYJ87KHCOdVeiUuwSnoS7hmYAGVHA==} dependencies: js-sha3: 0.8.0 + dev: false /ethereum-cryptography@0.1.3: resolution: {integrity: sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==} @@ -6536,6 +6032,7 @@ packages: scrypt-js: 3.0.1 secp256k1: 4.0.3 setimmediate: 1.0.5 + dev: false /ethereum-cryptography@1.2.0: resolution: {integrity: sha512-6yFQC9b5ug6/17CQpCyE3k9eKBMdhyVjzUy1WkiuY/E4vj/SXDBbCw8QEIaXqf0Mf2SnY6RmpDcwlUmBSS0EJw==} @@ -6544,6 +6041,7 @@ packages: '@noble/secp256k1': 1.7.1 '@scure/bip32': 1.1.5 '@scure/bip39': 1.1.1 + dev: false /ethereum-cryptography@2.1.3: resolution: {integrity: sha512-BlwbIL7/P45W8FGW2r7LGuvoEZ+7PWsniMvQ4p5s2xCyw9tmaDlpfsN9HjAucbF+t/qpVHwZUisgfK24TCW8aA==} @@ -6552,12 +6050,14 @@ packages: '@noble/hashes': 1.3.3 '@scure/bip32': 1.3.3 '@scure/bip39': 1.2.2 + dev: false /ethereumjs-abi@0.6.8: resolution: {integrity: sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA==} dependencies: bn.js: 4.12.0 ethereumjs-util: 6.2.1 + dev: false /ethereumjs-util@6.2.1: resolution: {integrity: sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==} @@ -6569,6 +6069,7 @@ packages: ethereum-cryptography: 0.1.3 ethjs-util: 0.1.6 rlp: 2.2.7 + dev: false /ethereumjs-util@7.1.5: resolution: {integrity: sha512-SDl5kKrQAudFBUe5OJM9Ac6WmMyYmXX/6sTmLZ3ffG2eY6ZIGBes3pEDxNN6V72WyOw4CPD5RomKdsa8DAAwLg==} @@ -6579,6 +6080,7 @@ packages: create-hash: 1.2.0 ethereum-cryptography: 0.1.3 rlp: 2.2.7 + dev: false /ethers@5.7.2: resolution: {integrity: sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==} @@ -6616,6 +6118,7 @@ packages: transitivePeerDependencies: - bufferutil - utf-8-validate + dev: false /ethers@6.11.1: resolution: {integrity: sha512-mxTAE6wqJQAbp5QAe/+o+rXOID7Nw91OZXvgpjDa1r4fAbq2Nu314oEZSbjoRLacuCzs7kUC3clEvkCQowffGg==} @@ -6639,6 +6142,7 @@ packages: dependencies: bn.js: 4.11.6 number-to-bn: 1.7.0 + dev: false /ethjs-util@0.1.6: resolution: {integrity: sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==} @@ -6646,12 +6150,14 @@ packages: dependencies: is-hex-prefixed: 1.0.0 strip-hex-prefix: 1.0.0 + dev: false /evp_bytestokey@1.0.3: resolution: {integrity: sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==} dependencies: md5.js: 1.3.5 safe-buffer: 5.2.1 + dev: false /exec-sh@0.3.6: resolution: {integrity: sha512-nQn+hI3yp+oD0huYhKwvYI32+JFeq+XkNcD1GAo3Y/MjxsfVGmrrzrnzjWiNY6f+pUCP440fThsFh5gZrRAU/w==} @@ -6808,10 +6314,6 @@ packages: resolution: {integrity: sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==} engines: {'0': node >=0.6.0} - /fast-base64-decode@1.0.0: - resolution: {integrity: sha512-qwaScUgUGBYeDNRnbc/KyllVU88Jk1pRHPStuF/lO7B0/RTRLj7U0lkdTAutlBblY08rwZDff6tNU9cjv6j//Q==} - dev: false - /fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} @@ -6869,6 +6371,7 @@ packages: engines: {node: ^10.12.0 || >=12.0.0} dependencies: flat-cache: 3.2.0 + dev: false /fill-range@4.0.0: resolution: {integrity: sha512-VcpLTWqWDiTerugjj8e3+esbg+skS3M9e54UuR3iCeIDMXCLTsAH8hTSzDQU/X6/6t3eYkOKoZSef2PlU6U1XQ==} @@ -6913,12 +6416,14 @@ packages: engines: {node: '>=4.0.0'} dependencies: array-back: 3.1.0 + dev: false /find-up@2.1.0: resolution: {integrity: sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ==} engines: {node: '>=4'} dependencies: locate-path: 2.0.0 + dev: false /find-up@4.1.0: resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} @@ -6933,6 +6438,7 @@ packages: dependencies: locate-path: 6.0.0 path-exists: 4.0.0 + dev: false /flat-cache@2.0.1: resolution: {integrity: sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==} @@ -6949,16 +6455,19 @@ packages: flatted: 3.3.1 keyv: 4.5.4 rimraf: 3.0.2 + dev: false /flat@5.0.2: resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} hasBin: true + dev: false /flatted@2.0.2: resolution: {integrity: sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==} /flatted@3.3.1: resolution: {integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==} + dev: false /fn.name@1.1.0: resolution: {integrity: sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==} @@ -6974,6 +6483,7 @@ packages: optional: true dependencies: debug: 4.3.4(supports-color@8.1.1) + dev: false /for-each@0.3.3: resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} @@ -7002,6 +6512,7 @@ packages: asynckit: 0.4.0 combined-stream: 1.0.8 mime-types: 2.1.35 + dev: false /form-data@4.0.0: resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} @@ -7010,6 +6521,7 @@ packages: asynckit: 0.4.0 combined-stream: 1.0.8 mime-types: 2.1.35 + dev: false /formidable@2.1.2: resolution: {integrity: sha512-CM3GuJ57US06mlpQ47YcunuUZ9jpm8Vx+P2CGt2j7HpgkKZO/DJYQ0Bobim8G6PFQmK5lOqOOdUXboU+h73A4g==} @@ -7027,6 +6539,7 @@ packages: /fp-ts@1.19.3: resolution: {integrity: sha512-H5KQDspykdHuztLTg+ajGN0Z2qUjcEf3Ybxc6hLt0k7/zPkn29XnKnxlBPyW2XIddWrGaJBzBl4VLYOtk39yZg==} + dev: false /fragment-cache@0.2.1: resolution: {integrity: sha512-GMBAbW9antB8iZRHLoGw0b3HANt57diZYFO/HL1JGIC1MjKrdmhxvrJbupnVvpys0zsz7yBApXdQyfepKly2kA==} @@ -7047,6 +6560,7 @@ packages: klaw: 1.3.1 path-is-absolute: 1.0.1 rimraf: 2.7.1 + dev: false /fs-extra@10.1.0: resolution: {integrity: sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==} @@ -7064,6 +6578,7 @@ packages: graceful-fs: 4.2.11 jsonfile: 4.0.0 universalify: 0.1.2 + dev: false /fs-extra@8.1.0: resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==} @@ -7084,6 +6599,7 @@ packages: /fs-readdir-recursive@1.1.0: resolution: {integrity: sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA==} + dev: false /fs.realpath@1.0.0: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} @@ -7123,6 +6639,7 @@ packages: /get-func-name@2.0.2: resolution: {integrity: sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==} + dev: false /get-intrinsic@1.2.4: resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==} @@ -7141,6 +6658,7 @@ packages: /get-port@3.2.0: resolution: {integrity: sha512-x5UJKlgeUiNT8nyo/AcnwLnZuZNcSjSw0kogRB+Whd1fjjFq4B1hySFxSFWWSn4mIBzg3sRNUDFYc4g5gjPoLg==} engines: {node: '>=4'} + dev: false /get-stdin@6.0.0: resolution: {integrity: sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==} @@ -7181,10 +6699,7 @@ packages: dependencies: chalk: 2.4.2 node-emoji: 1.11.0 - - /git-hooks-list@1.0.3: - resolution: {integrity: sha512-Y7wLWcrLUXwk2noSka166byGCvhMtDRpgHdzCno1UQv/n/Hegp++a2xBWJL1lJarnKD3SWaljD+0z1ztqxuKyQ==} - dev: true + dev: false /glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} @@ -7197,6 +6712,7 @@ packages: engines: {node: '>=10.13.0'} dependencies: is-glob: 4.0.3 + dev: false /glob@5.0.15: resolution: {integrity: sha512-c9IPMazfRITpmAAKi22dK1VKxGDX9ehhqfABDriL/lzO92xcUKEJPQHrVA/2YHSNFB4iFlykVmWvwo48nr3OxA==} @@ -7206,6 +6722,7 @@ packages: minimatch: 3.1.2 once: 1.4.0 path-is-absolute: 1.0.1 + dev: false /glob@7.1.7: resolution: {integrity: sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==} @@ -7216,6 +6733,7 @@ packages: minimatch: 3.1.2 once: 1.4.0 path-is-absolute: 1.0.1 + dev: false /glob@7.2.0: resolution: {integrity: sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==} @@ -7226,6 +6744,7 @@ packages: minimatch: 3.1.2 once: 1.4.0 path-is-absolute: 1.0.1 + dev: false /glob@7.2.3: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} @@ -7246,12 +6765,14 @@ packages: inherits: 2.0.4 minimatch: 5.1.6 once: 1.4.0 + dev: false /global-modules@2.0.0: resolution: {integrity: sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==} engines: {node: '>=6'} dependencies: global-prefix: 3.0.0 + dev: false /global-prefix@3.0.0: resolution: {integrity: sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==} @@ -7260,6 +6781,7 @@ packages: ini: 1.3.8 kind-of: 6.0.3 which: 1.3.1 + dev: false /globals@11.12.0: resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} @@ -7276,6 +6798,7 @@ packages: engines: {node: '>=8'} dependencies: type-fest: 0.20.2 + dev: false /globalthis@1.0.3: resolution: {integrity: sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==} @@ -7286,20 +6809,6 @@ packages: /globalyzer@0.1.0: resolution: {integrity: sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q==} - /globby@10.0.0: - resolution: {integrity: sha512-3LifW9M4joGZasyYPz2A1U74zbC/45fvpXUvO/9KbSa+VV0aGZarWkfdgKyR9sExNP0t0x0ss/UMJpNpcaTspw==} - engines: {node: '>=8'} - dependencies: - '@types/glob': 7.2.0 - array-union: 2.1.0 - dir-glob: 3.0.1 - fast-glob: 3.3.2 - glob: 7.2.3 - ignore: 5.3.1 - merge2: 1.4.1 - slash: 3.0.0 - dev: true - /globby@10.0.2: resolution: {integrity: sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg==} engines: {node: '>=8'} @@ -7312,6 +6821,7 @@ packages: ignore: 5.3.1 merge2: 1.4.1 slash: 3.0.0 + dev: false /globby@11.1.0: resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} @@ -7337,6 +6847,7 @@ packages: /graphemer@1.4.0: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} + dev: false /growly@1.3.0: resolution: {integrity: sha512-+xGQY0YyAWCnqy7Cd++hc2JqMYzlm0dG30Jd0beaA64sROr8C4nt8Yc9V5Ro3avlSUDTN0ulqP/VBKi1/lLygw==} @@ -7354,6 +6865,7 @@ packages: wordwrap: 1.0.0 optionalDependencies: uglify-js: 3.17.4 + dev: false /har-schema@2.0.0: resolution: {integrity: sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==} @@ -7381,6 +6893,7 @@ packages: - bufferutil - debug - utf-8-validate + dev: false /hardhat-gas-reporter@1.0.10(hardhat@2.22.1): resolution: {integrity: sha512-02N4+So/fZrzJ88ci54GqwVA3Zrf0C9duuTyGt0CFRIh/CdNwbnTgkXkRfojOMLBQ+6t+lBIkgbsOtqMvNwikA==} @@ -7398,15 +6911,6 @@ packages: - utf-8-validate dev: false - /hardhat-storage-layout@0.1.7(hardhat@2.21.0): - resolution: {integrity: sha512-q723g2iQnJpRdMC6Y8fbh/stG6MLHKNxa5jq/ohjtD5znOlOzQ6ojYuInY8V4o4WcPyG3ty4hzHYunLf66/1+A==} - peerDependencies: - hardhat: ^2.0.3 - dependencies: - console-table-printer: 2.12.0 - hardhat: 2.21.0(ts-node@10.9.2)(typescript@5.4.2) - dev: false - /hardhat@2.21.0(ts-node@10.9.2)(typescript@5.4.2): resolution: {integrity: sha512-8DlJAVJDEVHaV1sh9FLuKLLgCFv9EAJ+M+8IbjSIPgoeNo3ss5L1HgGBMfnI88c7OzMEZkdcuyGoobFeK3Orqw==} hasBin: true @@ -7458,7 +6962,7 @@ packages: solc: 0.7.3(debug@4.3.4) source-map-support: 0.5.21 stacktrace-parser: 0.1.10 - ts-node: 10.9.2(@types/node@20.11.25)(typescript@5.4.2) + ts-node: 10.9.2(@types/node@12.0.0)(typescript@5.4.2) tsort: 0.0.1 typescript: 5.4.2 undici: 5.28.3 @@ -7469,6 +6973,7 @@ packages: - c-kzg - supports-color - utf-8-validate + dev: false /hardhat@2.22.1(ts-node@10.9.2)(typescript@5.4.3): resolution: {integrity: sha512-cTWYIJc5jQ132XUI8oRI/TO9L6oavPoJRCTRU9sIjkVxvkxz0Axz0K83Z3BEdJTqBQ2W84ZRoTekti84kBwCjg==} @@ -7540,6 +7045,7 @@ packages: /has-flag@1.0.0: resolution: {integrity: sha512-DyYHfIYwAJmjAjSSPKANxI8bFY9YtFrgkAfinBojQ8YJTOuOuav64tMUJv584SES4xl74PmuaevIyaLESHdTAA==} engines: {node: '>=0.10.0'} + dev: false /has-flag@3.0.0: resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} @@ -7602,6 +7108,7 @@ packages: inherits: 2.0.4 readable-stream: 3.6.2 safe-buffer: 5.2.1 + dev: false /hash-test-vectors@1.3.2: resolution: {integrity: sha512-PKd/fitmsrlWGh3OpKbgNLE04ZQZsvs1ZkuLoQpeIKuwx+6CYVNdW6LaPIS1QAdZvV40+skk0w4YomKnViUnvQ==} @@ -7612,6 +7119,7 @@ packages: dependencies: inherits: 2.0.4 minimalistic-assert: 1.0.1 + dev: false /hasown@2.0.1: resolution: {integrity: sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA==} @@ -7622,9 +7130,11 @@ packages: /he@1.2.0: resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} hasBin: true + dev: false /heap@0.2.7: resolution: {integrity: sha512-2bsegYkkHO+h/9MGbn6KWcE45cHZgPANo5LXF7EvWdT0yT2EguSVO1nDgU5c8+ZOPwp2vMNa7YFsJhVcDR9Sdg==} + dev: false /hexoid@1.0.0: resolution: {integrity: sha512-QFLV0taWQOZtvIRIAdBChesmogZrtuXvVWsFHZTk2SU+anspqZ2vMnoLg7IE1+Uk16N19APic1BuF8bC8c2m5g==} @@ -7637,6 +7147,7 @@ packages: hash.js: 1.1.7 minimalistic-assert: 1.0.1 minimalistic-crypto-utils: 1.0.1 + dev: false /hosted-git-info@2.8.9: resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} @@ -7657,6 +7168,7 @@ packages: concat-stream: 1.6.2 http-response-object: 3.0.2 parse-cache-control: 1.0.1 + dev: false /http-errors@2.0.0: resolution: {integrity: sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==} @@ -7667,11 +7179,13 @@ packages: setprototypeof: 1.2.0 statuses: 2.0.1 toidentifier: 1.0.1 + dev: false /http-response-object@3.0.2: resolution: {integrity: sha512-bqX0XTF6fnXSQcEJ2Iuyr75yVakyjIDCqroJQ/aHfSdlM743Cwqoi2nDYMzLGWUcuTWGWy8AAvOKXTfiv6q9RA==} dependencies: '@types/node': 10.17.60 + dev: false /http-signature@1.2.0: resolution: {integrity: sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==} @@ -7689,6 +7203,7 @@ packages: debug: 4.3.4(supports-color@8.1.1) transitivePeerDependencies: - supports-color + dev: false /human-signals@1.1.1: resolution: {integrity: sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==} @@ -7709,10 +7224,6 @@ packages: dependencies: safer-buffer: 2.1.2 - /ieee754@1.2.1: - resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} - dev: false - /ignore@4.0.6: resolution: {integrity: sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==} engines: {node: '>= 4'} @@ -7727,6 +7238,7 @@ packages: /immutable@4.3.5: resolution: {integrity: sha512-8eabxkth9gZatlwl5TBuJnCsoTADlL6ftEr7A4qgdaTsPyreilDSnUk57SO+jfKcNtxPa22U5KK6DSeAYhpBJw==} + dev: false /import-fresh@3.3.0: resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} @@ -7750,6 +7262,7 @@ packages: /indent-string@4.0.0: resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==} engines: {node: '>=8'} + dev: false /inflight@1.0.6: resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} @@ -7762,6 +7275,7 @@ packages: /ini@1.3.8: resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==} + dev: false /inquirer@7.3.3: resolution: {integrity: sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA==} @@ -7797,6 +7311,7 @@ packages: resolution: {integrity: sha512-b23PteSnYXSONJ6JQXRAlvJhuw8KOtkqa87W4wDtvMrud/DTJd5X+NpOOI+O/zZwVq6v0VLAaJ+1EDViKEuN9g==} dependencies: fp-ts: 1.19.3 + dev: false /ip-regex@2.1.0: resolution: {integrity: sha512-58yWmlHpp7VYfcdTwMTvwMmqx/Elfxjd9RXTDyMsbL7lLWmhMylLEqiYVLKuLzOZqVgiWXD9MfR62Vv89VRxkw==} @@ -7948,6 +7463,7 @@ packages: /is-hex-prefixed@1.0.0: resolution: {integrity: sha512-WvtOiug1VFrE9v1Cydwm+FnXd3+w9GaeVUss5W4v/SLy3UW00vP+6iNF2SdnfiBoLy4bTqVdkftNGTUeOFVsbA==} engines: {node: '>=6.5.0', npm: '>=3'} + dev: false /is-interactive@1.0.0: resolution: {integrity: sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==} @@ -7983,10 +7499,12 @@ packages: /is-path-inside@3.0.3: resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} engines: {node: '>=8'} + dev: false /is-plain-obj@2.1.0: resolution: {integrity: sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==} engines: {node: '>=8'} + dev: false /is-plain-object@2.0.4: resolution: {integrity: sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==} @@ -8048,6 +7566,7 @@ packages: /is-unicode-supported@0.1.0: resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} engines: {node: '>=10'} + dev: false /is-weakmap@2.0.2: resolution: {integrity: sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==} @@ -8096,15 +7615,6 @@ packages: resolution: {integrity: sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==} engines: {node: '>=0.10.0'} - /isomorphic-unfetch@3.1.0: - resolution: {integrity: sha512-geDJjpoZ8N0kWexiwkX8F9NkTsXhetLPVbZFQ+JTW239QNOwvB0gniuR1Wc6f0AMTn7/mFGyXvHTifrCp/GH8Q==} - dependencies: - node-fetch: 2.7.0 - unfetch: 4.2.0 - transitivePeerDependencies: - - encoding - dev: false - /isstream@0.1.2: resolution: {integrity: sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==} @@ -8572,12 +8082,9 @@ packages: /jpjs@1.2.1: resolution: {integrity: sha512-GxJWybWU4NV0RNKi6EIqk6IRPOTqd/h+U7sbtyuD7yUISUzV78LdHnq2xkevJsTlz/EImux4sWj+wfMiwKLkiw==} - /js-cookie@2.2.1: - resolution: {integrity: sha512-HvdH2LzI/EAZcUwA8+0nKNtWHqS+ZmijLA30RwZA0bo7ToCckjK5MkGhjED9KoRcXO6BaGI3I9UIzSA1FKFPOQ==} - dev: false - /js-sha3@0.8.0: resolution: {integrity: sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==} + dev: false /js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} @@ -8594,6 +8101,7 @@ packages: hasBin: true dependencies: argparse: 2.0.1 + dev: false /jsbn@0.1.1: resolution: {integrity: sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==} @@ -8648,6 +8156,7 @@ packages: /json-buffer@3.0.1: resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} + dev: false /json-parse-even-better-errors@2.3.1: resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} @@ -8657,6 +8166,7 @@ packages: /json-schema-traverse@1.0.0: resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} + dev: false /json-schema@0.4.0: resolution: {integrity: sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==} @@ -8682,6 +8192,7 @@ packages: resolution: {integrity: sha512-PKllAqbgLgxHaj8TElYymKCAgrASebJrWpTnEkOaTowt23VKXXN0sUeriJ+eh7y6ufb/CC5ap11pz71/cM0hUw==} optionalDependencies: graceful-fs: 4.2.11 + dev: false /jsonfile@4.0.0: resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} @@ -8695,13 +8206,9 @@ packages: optionalDependencies: graceful-fs: 4.2.11 - /jsonpointer@5.0.1: - resolution: {integrity: sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ==} - engines: {node: '>=0.10.0'} - dev: true - /jsonschema@1.4.1: resolution: {integrity: sha512-S6cATIPVv1z0IlxdN+zUk5EPjkGCdnhN4wVSBlvoUO1tOLJootbo9CquNJmbIh4yikWHiUedhRYrNPn1arpEmQ==} + dev: false /jsprim@1.4.2: resolution: {integrity: sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==} @@ -8729,11 +8236,13 @@ packages: node-addon-api: 2.0.2 node-gyp-build: 4.8.0 readable-stream: 3.6.2 + dev: false /keyv@4.5.4: resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} dependencies: json-buffer: 3.0.1 + dev: false /kind-of@3.2.2: resolution: {integrity: sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==} @@ -8755,6 +8264,7 @@ packages: resolution: {integrity: sha512-TED5xi9gGQjGpNnvRWknrwAB1eL5GciPfVFOt3Vk1OJCVDQbzuSfrF3hkUQKlsgKrG1F+0t5W0m+Fje1jIt8rw==} optionalDependencies: graceful-fs: 4.2.11 + dev: false /kleur@3.0.3: resolution: {integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==} @@ -8790,6 +8300,7 @@ packages: dependencies: prelude-ls: 1.2.1 type-check: 0.4.0 + dev: false /lilconfig@2.1.0: resolution: {integrity: sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==} @@ -8805,6 +8316,7 @@ packages: dependencies: p-locate: 2.0.0 path-exists: 3.0.0 + dev: false /locate-path@5.0.0: resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} @@ -8817,9 +8329,11 @@ packages: engines: {node: '>=10'} dependencies: p-locate: 5.0.0 + dev: false /lodash.camelcase@4.3.0: resolution: {integrity: sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==} + dev: false /lodash.clonedeep@4.5.0: resolution: {integrity: sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==} @@ -8843,6 +8357,7 @@ packages: /lodash.truncate@4.4.2: resolution: {integrity: sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==} + dev: false /lodash@4.17.21: resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} @@ -8859,6 +8374,7 @@ packages: dependencies: chalk: 4.1.2 is-unicode-supported: 0.1.0 + dev: false /log-update@2.3.0: resolution: {integrity: sha512-vlP11XfFGyeNQlmEn9tJ66rEW1coA/79m5z6BCkudjbAGE83uhAcGYrBFwfs3AdLiLzGRusRPAbSPK9xZteCmg==} @@ -8895,6 +8411,7 @@ packages: resolution: {integrity: sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==} dependencies: get-func-name: 2.0.2 + dev: false /lower-case@2.0.2: resolution: {integrity: sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==} @@ -8914,6 +8431,7 @@ packages: /lru_map@0.3.3: resolution: {integrity: sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ==} + dev: false /magic-string@0.25.9: resolution: {integrity: sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==} @@ -8952,6 +8470,7 @@ packages: /markdown-table@1.1.3: resolution: {integrity: sha512-1RUZVgQlpJSPWYbFSpmudq5nHY1doEIv89gBtF0s4gW1GF2XorxcA/70M5vq7rLv0a6mhOUccRsqkwhwLCIQ2Q==} + dev: false /md5.js@1.3.5: resolution: {integrity: sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==} @@ -8959,6 +8478,7 @@ packages: hash-base: 3.1.0 inherits: 2.0.4 safe-buffer: 5.2.1 + dev: false /media-typer@0.3.0: resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==} @@ -8968,6 +8488,7 @@ packages: /memorystream@0.3.1: resolution: {integrity: sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==} engines: {node: '>= 0.10.0'} + dev: false /merge-descriptors@1.0.1: resolution: {integrity: sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==} @@ -8987,6 +8508,7 @@ packages: /micro-ftch@0.3.1: resolution: {integrity: sha512-/0LLxhzP0tfiR5hcQebtudP56gUurs2CLkGarnCiB/OqEyUFQ6U3paQi/tgLv0hBJYt2rnr9MNpxz4fiiugstg==} + dev: false /micromatch@3.1.10: resolution: {integrity: sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==} @@ -9047,9 +8569,11 @@ packages: /minimalistic-assert@1.0.1: resolution: {integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==} + dev: false /minimalistic-crypto-utils@1.0.1: resolution: {integrity: sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==} + dev: false /minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} @@ -9061,12 +8585,14 @@ packages: engines: {node: '>=10'} dependencies: brace-expansion: 2.0.1 + dev: false /minimatch@5.1.6: resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==} engines: {node: '>=10'} dependencies: brace-expansion: 2.0.1 + dev: false /minimatch@9.0.3: resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==} @@ -9100,6 +8626,7 @@ packages: resolution: {integrity: sha512-bZTFT5rrPKtPJxj8KSV0WkPyNxl72vQepqqVUAW2ARUpUSF2qXMB6jZj7hW5/k7C1rtpzqbD/IIbJwLXUjCHeg==} dependencies: obliterator: 2.0.4 + dev: false /mocha@10.3.0: resolution: {integrity: sha512-uF2XJs+7xSLsrmIvn37i/wnc91nw7XjOQB8ccyx5aEgdnohr7n+rEiZP23WkCYHjilR6+EboEnbq/ZQDz4LSbg==} @@ -9126,6 +8653,7 @@ packages: yargs: 16.2.0 yargs-parser: 20.2.4 yargs-unparser: 2.0.0 + dev: false /mri@1.2.0: resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} @@ -9173,10 +8701,6 @@ packages: picocolors: 1.0.0 dev: true - /natural-compare-lite@1.4.0: - resolution: {integrity: sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==} - dev: true - /natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} @@ -9199,6 +8723,7 @@ packages: /neo-async@2.6.2: resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} + dev: false /nice-try@1.0.5: resolution: {integrity: sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==} @@ -9211,27 +8736,18 @@ packages: /node-addon-api@2.0.2: resolution: {integrity: sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==} + dev: false /node-emoji@1.11.0: resolution: {integrity: sha512-wo2DpQkQp7Sjm2A0cq+sN7EHKO6Sl0ctXeBdFZrL9T9+UywORbufTcTZxom8YqpLQt/FqNMUkOpkZrJVYSKD3A==} dependencies: lodash: 4.17.21 - - /node-fetch@2.7.0: - resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} - engines: {node: 4.x || >=6.0.0} - peerDependencies: - encoding: ^0.1.0 - peerDependenciesMeta: - encoding: - optional: true - dependencies: - whatwg-url: 5.0.0 dev: false /node-gyp-build@4.8.0: resolution: {integrity: sha512-u6fs2AEUljNho3EYTJNBfImO5QTo/J/1Etd+NVdCj7qWKUSN/bSLkZwhDv7I+w/MSC6qJ4cknepkAYykDdK8og==} hasBin: true + dev: false /node-int64@0.4.0: resolution: {integrity: sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==} @@ -9253,12 +8769,14 @@ packages: /nofilter@3.1.0: resolution: {integrity: sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g==} engines: {node: '>=12.19'} + dev: false /nopt@3.0.6: resolution: {integrity: sha512-4GUt3kSEYmk4ITxzB/b9vaIDfUVWN/Ml1Fwl11IlnIG2iaJ9O6WXZ9SrYM9NLI8OCBieN2Y8SWC2oJV0RQ7qYg==} hasBin: true dependencies: abbrev: 1.0.9 + dev: false /normalize-package-data@2.5.0: resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} @@ -9296,6 +8814,7 @@ packages: dependencies: bn.js: 4.11.6 strip-hex-prefix: 1.0.0 + dev: false /nwsapi@2.2.7: resolution: {integrity: sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ==} @@ -9384,6 +8903,7 @@ packages: /obliterator@2.0.4: resolution: {integrity: sha512-lgHwxlxV1qIg1Eap7LgIeoBWIMFibOjbrYPIPJZcI1mmGAI2m3lNYpK12Y+GBdPQ0U1hRwSord7GIaawz962qQ==} + dev: false /on-finished@2.4.1: resolution: {integrity: sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==} @@ -9436,6 +8956,7 @@ packages: levn: 0.4.1 prelude-ls: 1.2.1 type-check: 0.4.0 + dev: false /ora@4.1.1: resolution: {integrity: sha512-sjYP8QyVWBpBZWD6Vr1M/KwknSw6kJOz41tvGMlwWeClHBtYKTbHMki1PsLZnxKpXMPbTKv9b3pjQu3REib96A==} @@ -9452,6 +8973,7 @@ packages: /ordinal@1.0.3: resolution: {integrity: sha512-cMddMgb2QElm8G7vdaa02jhUNbTSrhsgAGUz1OokD83uJTwSUn+nKoNoKVVaRa08yF6sgfO7Maou1+bgLd9rdQ==} + dev: false /os-tmpdir@1.0.2: resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==} @@ -9474,6 +8996,7 @@ packages: engines: {node: '>=4'} dependencies: p-try: 1.0.0 + dev: false /p-limit@2.3.0: resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} @@ -9486,12 +9009,14 @@ packages: engines: {node: '>=10'} dependencies: yocto-queue: 0.1.0 + dev: false /p-locate@2.0.0: resolution: {integrity: sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==} engines: {node: '>=4'} dependencies: p-limit: 1.3.0 + dev: false /p-locate@4.1.0: resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} @@ -9504,16 +9029,19 @@ packages: engines: {node: '>=10'} dependencies: p-limit: 3.1.0 + dev: false /p-map@4.0.0: resolution: {integrity: sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==} engines: {node: '>=10'} dependencies: aggregate-error: 3.1.0 + dev: false /p-try@1.0.0: resolution: {integrity: sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==} engines: {node: '>=4'} + dev: false /p-try@2.2.0: resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} @@ -9527,6 +9055,7 @@ packages: /parse-cache-control@1.0.1: resolution: {integrity: sha512-60zvsJReQPX5/QP0Kzfd/VrpjScIQ7SHBW6bFCYfEP+fp0Eppr1SHhIO5nd1PjZtvclzSzES9D/p5nFJurwfWg==} + dev: false /parse-json@5.2.0: resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} @@ -9558,6 +9087,7 @@ packages: /path-exists@3.0.0: resolution: {integrity: sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==} engines: {node: '>=4'} + dev: false /path-exists@4.0.0: resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} @@ -9588,6 +9118,7 @@ packages: /pathval@1.1.1: resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==} + dev: false /pbkdf2@3.1.2: resolution: {integrity: sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==} @@ -9598,6 +9129,7 @@ packages: ripemd160: 2.0.2 safe-buffer: 5.2.1 sha.js: 2.4.11 + dev: false /performance-now@2.1.0: resolution: {integrity: sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==} @@ -9612,6 +9144,7 @@ packages: /pify@4.0.1: resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==} engines: {node: '>=6'} + dev: false /pirates@4.0.6: resolution: {integrity: sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==} @@ -9623,11 +9156,6 @@ packages: dependencies: find-up: 4.1.0 - /pluralize@8.0.0: - resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==} - engines: {node: '>=4'} - dev: true - /pn@1.1.0: resolution: {integrity: sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA==} @@ -9646,6 +9174,7 @@ packages: /prelude-ls@1.2.1: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} + dev: false /prettier-linter-helpers@1.0.0: resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==} @@ -9653,18 +9182,6 @@ packages: dependencies: fast-diff: 1.3.0 - /prettier-plugin-solidity@1.3.1(prettier@2.8.8): - resolution: {integrity: sha512-MN4OP5I2gHAzHZG1wcuJl0FsLS3c4Cc5494bbg+6oQWBPuEamjwDvmGfFMZ6NFzsh3Efd9UUxeT7ImgjNH4ozA==} - engines: {node: '>=16'} - peerDependencies: - prettier: '>=2.3.0' - dependencies: - '@solidity-parser/parser': 0.17.0 - prettier: 2.8.8 - semver: 7.6.0 - solidity-comments-extractor: 0.0.8 - dev: true - /prettier@1.19.1: resolution: {integrity: sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==} engines: {node: '>=4'} @@ -9674,6 +9191,7 @@ packages: resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} engines: {node: '>=10.13.0'} hasBin: true + dev: false /pretty-format@25.5.0: resolution: {integrity: sha512-kbo/kq2LQ/A/is0PQwsEHM7Ca6//bGPPvU6UnsdDRSKTWxT/ru/xb88v4BJf6a69H+uTytOEsTusT9ksd/1iWQ==} @@ -9686,6 +9204,7 @@ packages: /process-nextick-args@2.0.1: resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} + dev: false /progress-estimator@0.2.2: resolution: {integrity: sha512-GF76Ac02MTJD6o2nMNtmtOFjwWCnHcvXyn5HOWPQnEMO8OTLw7LAvNmrwe8LmdsB+eZhwUu9fX/c9iQnBxWaFA==} @@ -9703,6 +9222,7 @@ packages: resolution: {integrity: sha512-rZPNPKTOYVNEEKFaq1HqTgOwZD+4/YHS5ukLzQCypkj+OkYx7iv0mA91lJlpPPZ8vMau3IIGj5Qlwrx+8iiSmg==} dependencies: asap: 2.0.6 + dev: false /prompts@2.4.2: resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==} @@ -9718,14 +9238,6 @@ packages: object-assign: 4.1.1 react-is: 16.13.1 - /proper-lockfile@4.1.2: - resolution: {integrity: sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA==} - dependencies: - graceful-fs: 4.2.11 - retry: 0.12.0 - signal-exit: 3.0.7 - dev: false - /proxy-addr@2.0.7: resolution: {integrity: sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==} engines: {node: '>= 0.10'} @@ -9736,6 +9248,7 @@ packages: /proxy-from-env@1.1.0: resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} + dev: false /psl@1.9.0: resolution: {integrity: sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==} @@ -9762,6 +9275,7 @@ packages: engines: {node: '>=0.6'} dependencies: side-channel: 1.0.6 + dev: false /qs@6.5.3: resolution: {integrity: sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==} @@ -9788,6 +9302,7 @@ packages: http-errors: 2.0.0 iconv-lite: 0.4.24 unpipe: 1.0.0 + dev: false /react-is@16.13.1: resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} @@ -9819,6 +9334,7 @@ packages: safe-buffer: 5.1.2 string_decoder: 1.1.1 util-deprecate: 1.0.2 + dev: false /readable-stream@3.6.2: resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} @@ -9827,6 +9343,7 @@ packages: inherits: 2.0.4 string_decoder: 1.3.0 util-deprecate: 1.0.2 + dev: false /readdirp@3.6.0: resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} @@ -9849,10 +9366,12 @@ packages: engines: {node: '>=6.0.0'} dependencies: minimatch: 3.1.2 + dev: false /reduce-flatten@2.0.0: resolution: {integrity: sha512-EJ4UNY/U1t2P/2k6oqotuX2Cc3T6nxJwsM0N0asT7dhrtH1ltUxDn4NalSYmPE2rCkVpcf/X6R0wDwcFpzhd4w==} engines: {node: '>=6'} + dev: false /reflect.getprototypeof@1.0.5: resolution: {integrity: sha512-62wgfC8dJWrmxv44CA36pLDnP6KKl3Vhxb7PL+8+qrrFMMoJij4vgiMP8zV4O8+CBMXY1mHxI5fITGHXFHVmQQ==} @@ -9943,12 +9462,14 @@ packages: engines: {node: '>=4'} dependencies: req-from: 2.0.0 + dev: false /req-from@2.0.0: resolution: {integrity: sha512-LzTfEVDVQHBRfjOUMgNBA+V6DWsSnoeKzf42J7l0xa/B4jyPOuuF5MlNSmomLNGemWTnV2TIdjSSLnEn95fOQA==} engines: {node: '>=4'} dependencies: resolve-from: 3.0.0 + dev: false /request-promise-core@1.1.4(request@2.88.2): resolution: {integrity: sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw==} @@ -10004,15 +9525,11 @@ packages: /require-from-string@2.0.2: resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} engines: {node: '>=0.10.0'} + dev: false /require-main-filename@2.0.0: resolution: {integrity: sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==} - /requireindex@1.2.0: - resolution: {integrity: sha512-L9jEkOi3ASd9PYit2cwRfyppc9NoABujTP8/5gFcbERmo5jUoAKovIC3fsF17pkTnGsrByysqX+Kxd2OTNI1ww==} - engines: {node: '>=0.10.5'} - dev: true - /resolve-cwd@3.0.0: resolution: {integrity: sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==} engines: {node: '>=8'} @@ -10022,6 +9539,7 @@ packages: /resolve-from@3.0.0: resolution: {integrity: sha512-GnlH6vxLymXJNMBo7XP1fJIzBFbdYt49CuTwmB/6N53t+kMPRMFKz783LlQ4tv28XoQfMWinAJX6WCGf2IlaIw==} engines: {node: '>=4'} + dev: false /resolve-from@4.0.0: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} @@ -10077,16 +9595,6 @@ packages: resolution: {integrity: sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==} engines: {node: '>=0.12'} - /retry@0.12.0: - resolution: {integrity: sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==} - engines: {node: '>= 4'} - dev: false - - /retry@0.13.1: - resolution: {integrity: sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==} - engines: {node: '>= 4'} - dev: false - /reusify@1.0.4: resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} @@ -10102,6 +9610,7 @@ packages: hasBin: true dependencies: glob: 7.2.3 + dev: false /rimraf@3.0.2: resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} @@ -10114,12 +9623,14 @@ packages: dependencies: hash-base: 3.1.0 inherits: 2.0.4 + dev: false /rlp@2.2.7: resolution: {integrity: sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ==} hasBin: true dependencies: bn.js: 5.2.1 + dev: false /rollup-plugin-sourcemaps@0.6.3(@types/node@12.0.0)(rollup@1.32.1): resolution: {integrity: sha512-paFu+nT1xvuO1tPFYXGe+XnQvg4Hjqv/eIhG8i5EspfYYPBKL57X7iVbfv55aNVASg3dzWvES9dmWsL2KhfByw==} @@ -10229,6 +9740,7 @@ packages: /safe-buffer@5.1.2: resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==} + dev: false /safe-buffer@5.2.1: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} @@ -10296,9 +9808,11 @@ packages: supports-color: 3.2.3 which: 1.3.1 wordwrap: 1.0.0 + dev: false /scrypt-js@3.0.1: resolution: {integrity: sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==} + dev: false /secp256k1@4.0.3: resolution: {integrity: sha512-NLZVf+ROMxwtEj3Xa562qgv2BK5e2WNmXPiOdVIPLgs6lyTzMvBq0aWTYMI5XCP9jZMVKOcqZLw/Wc4vDkuxhA==} @@ -10308,6 +9822,7 @@ packages: elliptic: 6.5.5 node-addon-api: 2.0.2 node-gyp-build: 4.8.0 + dev: false /semver@5.7.2: resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==} @@ -10362,6 +9877,7 @@ packages: resolution: {integrity: sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==} dependencies: randombytes: 2.1.0 + dev: false /serve-static@1.15.0: resolution: {integrity: sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==} @@ -10409,9 +9925,11 @@ packages: /setimmediate@1.0.5: resolution: {integrity: sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==} + dev: false /setprototypeof@1.2.0: resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==} + dev: false /sha.js@2.4.11: resolution: {integrity: sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==} @@ -10419,12 +9937,14 @@ packages: dependencies: inherits: 2.0.4 safe-buffer: 5.2.1 + dev: false /sha1@1.1.1: resolution: {integrity: sha512-dZBS6OrMjtgVkopB1Gmo4RQCDKiZsqcpAQpkV/aaj+FCrCg8r4I4qMkDPQjBgLIxlmu9k4nUbWq6ohXahOneYA==} dependencies: charenc: 0.0.2 crypt: 0.0.2 + dev: false /shebang-command@1.2.0: resolution: {integrity: sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==} @@ -10478,10 +9998,6 @@ packages: is-arrayish: 0.3.2 dev: false - /simple-wcswidth@1.0.1: - resolution: {integrity: sha512-xMO/8eNREtaROt7tJvWJqHBDTMFN4eiQ5I4JRMuilwfnFcV5W9u7RUkueNkdw0jPqGMX36iCywelS5yilTuOxg==} - dev: false - /sisteransi@1.0.5: resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} @@ -10519,6 +10035,7 @@ packages: ansi-styles: 4.3.0 astral-regex: 2.0.0 is-fullwidth-code-point: 3.0.0 + dev: false /snapdragon-node@2.1.1: resolution: {integrity: sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==} @@ -10565,55 +10082,8 @@ packages: tmp: 0.0.33 transitivePeerDependencies: - debug - - /solhint-plugin-prettier@0.0.5(prettier-plugin-solidity@1.3.1)(prettier@2.8.8): - resolution: {integrity: sha512-7jmWcnVshIrO2FFinIvDQmhQpfpS2rRRn3RejiYgnjIE68xO2bvrYvjqVNfrio4xH9ghOqn83tKuTzLjEbmGIA==} - peerDependencies: - prettier: ^1.15.0 || ^2.0.0 - prettier-plugin-solidity: ^1.0.0-alpha.14 - dependencies: - prettier: 2.8.8 - prettier-linter-helpers: 1.0.0 - prettier-plugin-solidity: 1.3.1(prettier@2.8.8) - dev: true - - /solhint@3.6.2(typescript@5.4.2): - resolution: {integrity: sha512-85EeLbmkcPwD+3JR7aEMKsVC9YrRSxd4qkXuMzrlf7+z2Eqdfm1wHWq1ffTuo5aDhoZxp2I9yF3QkxZOxOL7aQ==} - hasBin: true - dependencies: - '@solidity-parser/parser': 0.16.2 - ajv: 6.12.6 - antlr4: 4.13.1 - ast-parents: 0.0.1 - chalk: 4.1.2 - commander: 10.0.1 - cosmiconfig: 8.3.6(typescript@5.4.2) - fast-diff: 1.3.0 - glob: 8.1.0 - ignore: 5.3.1 - js-yaml: 4.1.0 - lodash: 4.17.21 - pluralize: 8.0.0 - semver: 7.6.0 - strip-ansi: 6.0.1 - table: 6.8.1 - text-table: 0.2.0 - optionalDependencies: - prettier: 2.8.8 - transitivePeerDependencies: - - typescript - dev: true - - /solidity-ast@0.4.55: - resolution: {integrity: sha512-qeEU/r/K+V5lrAw8iswf2/yfWAnSGs3WKPHI+zAFKFjX0dIBVXEU/swQ8eJQYHf6PJWUZFO2uWV4V1wEOkeQbA==} - dependencies: - array.prototype.findlast: 1.2.4 dev: false - /solidity-comments-extractor@0.0.8: - resolution: {integrity: sha512-htM7Vn6LhHreR+EglVMd2s+sZhcXAirB1Zlyrv5zBuTxieCvjfnRpd7iZk75m/u6NOlEyQ94C6TWbBn2cY7w8g==} - dev: true - /solidity-coverage@0.8.11(hardhat@2.21.0): resolution: {integrity: sha512-yy0Yk+olovBbXn0Me8BWULmmv7A69ZKkP5aTOJGOO8u61Tu2zS989erfjtFlUjDnfWtxRAVkd8BsQD704yLWHw==} hasBin: true @@ -10640,6 +10110,7 @@ packages: semver: 7.6.0 shelljs: 0.8.5 web3-utils: 1.10.4 + dev: false /solidity-coverage@0.8.11(hardhat@2.22.1): resolution: {integrity: sha512-yy0Yk+olovBbXn0Me8BWULmmv7A69ZKkP5aTOJGOO8u61Tu2zS989erfjtFlUjDnfWtxRAVkd8BsQD704yLWHw==} @@ -10669,22 +10140,6 @@ packages: web3-utils: 1.10.4 dev: false - /sort-object-keys@1.1.3: - resolution: {integrity: sha512-855pvK+VkU7PaKYPc+Jjnmt4EzejQHyhhF33q31qG8x7maDzkeFhAAThdCYay11CISO+qAMwjOBP+fPZe0IPyg==} - dev: true - - /sort-package-json@1.57.0: - resolution: {integrity: sha512-FYsjYn2dHTRb41wqnv+uEqCUvBpK3jZcTp9rbz2qDTmel7Pmdtf+i2rLaaPMRZeSVM60V3Se31GyWFpmKs4Q5Q==} - hasBin: true - dependencies: - detect-indent: 6.1.0 - detect-newline: 3.1.0 - git-hooks-list: 1.0.3 - globby: 10.0.0 - is-plain-obj: 2.1.0 - sort-object-keys: 1.1.3 - dev: true - /source-map-resolve@0.5.3: resolution: {integrity: sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==} deprecated: See https://github.com/lydell/source-map-resolve#deprecated @@ -10718,6 +10173,7 @@ packages: requiresBuild: true dependencies: amdefine: 1.0.1 + dev: false optional: true /source-map@0.5.7: @@ -10799,6 +10255,7 @@ packages: engines: {node: '>=6'} dependencies: type-fest: 0.7.1 + dev: false /static-extend@0.1.2: resolution: {integrity: sha512-72E9+uLc27Mt718pMHt9VMNiAL4LMsmDbBva8mxWUCkT07fSzEGMYUCk0XWY6lp0j6RBAG4cJ3mWuZv2OE3s0g==} @@ -10810,6 +10267,7 @@ packages: /statuses@2.0.1: resolution: {integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==} engines: {node: '>= 0.8'} + dev: false /stealthy-require@1.1.1: resolution: {integrity: sha512-ZnWpYnYugiOVEY5GkcuJK1io5V8QmNYChG62gSit9pQVGErXtrKuPC55ITaVSukmMta5qpMU7vqLt2Lnni4f/g==} @@ -10817,6 +10275,7 @@ packages: /string-format@2.0.0: resolution: {integrity: sha512-bbEs3scLeYNXLecRRuk6uJxdXUSj6le/8rNPHChIJTn2V79aXVTR1EH2OH5zLKKoz0V02fOUKZZcw01pLUShZA==} + dev: false /string-length@3.1.0: resolution: {integrity: sha512-Ttp5YvkGm5v9Ijagtaz1BnN+k9ObpvS0eIBblPMp2YWL8FBmi9qblQ9fexc2k/CXFgrTIteU3jAw3payCnwSTA==} @@ -10887,11 +10346,13 @@ packages: resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==} dependencies: safe-buffer: 5.1.2 + dev: false /string_decoder@1.3.0: resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} dependencies: safe-buffer: 5.2.1 + dev: false /strip-ansi@4.0.0: resolution: {integrity: sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==} @@ -10932,6 +10393,7 @@ packages: engines: {node: '>=6.5.0', npm: '>=3'} dependencies: is-hex-prefixed: 1.0.0 + dev: false /strip-json-comments@3.1.1: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} @@ -10970,6 +10432,7 @@ packages: engines: {node: '>=0.8.0'} dependencies: has-flag: 1.0.0 + dev: false /supports-color@5.5.0: resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} @@ -11016,11 +10479,13 @@ packages: http-response-object: 3.0.2 sync-rpc: 1.3.6 then-request: 6.0.2 + dev: false /sync-rpc@1.3.6: resolution: {integrity: sha512-J8jTXuZzRlvU7HemDgHi3pGnh/rkoqR/OZSjhTyyZrEkkYQbk7Z33AXp37mkPfPpfdOuj7Ex3H/TJM1z48uPQw==} dependencies: get-port: 3.2.0 + dev: false /table-layout@1.0.2: resolution: {integrity: sha512-qd/R7n5rQTRFi+Zf2sk5XVVd9UQl6ZkduPFC3S7WEGJAmetDTjY3qPN50eSKzwuzEyQKy5TN2TiZdkIjos2L6A==} @@ -11030,6 +10495,7 @@ packages: deep-extend: 0.6.0 typical: 5.2.0 wordwrapjs: 4.0.1 + dev: false /table@5.4.6: resolution: {integrity: sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==} @@ -11049,6 +10515,7 @@ packages: slice-ansi: 4.0.0 string-width: 4.2.3 strip-ansi: 6.0.1 + dev: false /terminal-link@2.1.1: resolution: {integrity: sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==} @@ -11097,6 +10564,7 @@ packages: http-response-object: 3.0.2 promise: 8.3.0 qs: 6.12.0 + dev: false /throat@5.0.0: resolution: {integrity: sha512-fcwX4mndzpLQKBS1DVYhGAcYaYt7vsHNIvQV+WXMvnow5cgjPphq5CaayLaGsjRdSCKZFNGt7/GYAuXaNOiYCA==} @@ -11160,6 +10628,7 @@ packages: /toidentifier@1.0.1: resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==} engines: {node: '>=0.6'} + dev: false /tough-cookie@2.5.0: resolution: {integrity: sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==} @@ -11176,10 +10645,6 @@ packages: psl: 1.9.0 punycode: 2.3.1 - /tr46@0.0.3: - resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} - dev: false - /tr46@1.0.1: resolution: {integrity: sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA==} dependencies: @@ -11207,6 +10672,7 @@ packages: command-line-args: 5.2.1 command-line-usage: 6.1.3 string-format: 2.0.0 + dev: false /ts-essentials@7.0.3(typescript@5.4.2): resolution: {integrity: sha512-8+gr5+lqO3G84KdiTSMRLtuyJ+nTBVRKuCrK4lidMPdVeEp0uqC875uE5NMcaA7YYMN7XsNiFQuMvasF8HT/xQ==} @@ -11214,6 +10680,7 @@ packages: typescript: '>=3.7.0' dependencies: typescript: 5.4.2 + dev: false /ts-essentials@7.0.3(typescript@5.4.3): resolution: {integrity: sha512-8+gr5+lqO3G84KdiTSMRLtuyJ+nTBVRKuCrK4lidMPdVeEp0uqC875uE5NMcaA7YYMN7XsNiFQuMvasF8HT/xQ==} @@ -11337,36 +10804,6 @@ packages: yn: 3.1.1 dev: false - /ts-node@10.9.2(@types/node@20.11.25)(typescript@5.4.2): - resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} - hasBin: true - peerDependencies: - '@swc/core': '>=1.2.50' - '@swc/wasm': '>=1.2.50' - '@types/node': '*' - typescript: '>=2.7' - peerDependenciesMeta: - '@swc/core': - optional: true - '@swc/wasm': - optional: true - dependencies: - '@cspotcode/source-map-support': 0.8.1 - '@tsconfig/node10': 1.0.9 - '@tsconfig/node12': 1.0.11 - '@tsconfig/node14': 1.0.3 - '@tsconfig/node16': 1.0.4 - '@types/node': 20.11.25 - acorn: 8.11.3 - acorn-walk: 8.3.2 - arg: 4.1.3 - create-require: 1.1.1 - diff: 4.0.2 - make-error: 1.3.6 - typescript: 5.4.2 - v8-compile-cache-lib: 3.0.1 - yn: 3.1.1 - /tsconfig-paths@3.15.0: resolution: {integrity: sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==} dependencies: @@ -11534,6 +10971,7 @@ packages: /tsort@0.0.1: resolution: {integrity: sha512-Tyrf5mxF8Ofs1tNoxA13lFeZ2Zrbd6cKbuH3V+MQ5sb6DtBj5FjrXVsRWT8YvNAQTqNoz66dz1WsbigI22aEnw==} + dev: false /tsutils@3.21.0(typescript@4.9.5): resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} @@ -11544,16 +10982,6 @@ packages: tslib: 1.14.1 typescript: 4.9.5 - /tsutils@3.21.0(typescript@5.4.2): - resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} - engines: {node: '>= 6'} - peerDependencies: - typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' - dependencies: - tslib: 1.14.1 - typescript: 5.4.2 - dev: true - /tunnel-agent@0.6.0: resolution: {integrity: sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==} dependencies: @@ -11561,12 +10989,14 @@ packages: /tweetnacl-util@0.15.1: resolution: {integrity: sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw==} + dev: false /tweetnacl@0.14.5: resolution: {integrity: sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==} /tweetnacl@1.0.3: resolution: {integrity: sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==} + dev: false /type-check@0.3.2: resolution: {integrity: sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==} @@ -11579,6 +11009,7 @@ packages: engines: {node: '>= 0.8.0'} dependencies: prelude-ls: 1.2.1 + dev: false /type-detect@4.0.8: resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} @@ -11587,6 +11018,7 @@ packages: /type-fest@0.20.2: resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} engines: {node: '>=10'} + dev: false /type-fest@0.21.3: resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} @@ -11599,6 +11031,7 @@ packages: /type-fest@0.7.1: resolution: {integrity: sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg==} engines: {node: '>=8'} + dev: false /type-fest@0.8.1: resolution: {integrity: sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==} @@ -11631,6 +11064,7 @@ packages: typescript: 5.4.2 transitivePeerDependencies: - supports-color + dev: false /typechain@8.3.2(typescript@5.4.3): resolution: {integrity: sha512-x/sQYr5w9K7yv3es7jo4KTX05CLxOf7TRWwoHlrjRh8H82G64g+k7VuWPJlgMo6qrjfCulOdfBjiaDtmhFYD/Q==} @@ -11700,6 +11134,7 @@ packages: /typedarray@0.0.6: resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==} + dev: false /typescript@3.9.10: resolution: {integrity: sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==} @@ -11715,6 +11150,7 @@ packages: resolution: {integrity: sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==} engines: {node: '>=14.17'} hasBin: true + dev: false /typescript@5.4.3: resolution: {integrity: sha512-KrPd3PKaCLr78MalgiwJnA25Nm8HAmdwN3mYUYZgG/wizIo9EainNVQI9/yDavtVFRN2h3k8uf3GLHuhDMgEHg==} @@ -11725,16 +11161,19 @@ packages: /typical@4.0.0: resolution: {integrity: sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==} engines: {node: '>=8'} + dev: false /typical@5.2.0: resolution: {integrity: sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==} engines: {node: '>=8'} + dev: false /uglify-js@3.17.4: resolution: {integrity: sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==} engines: {node: '>=0.8.0'} hasBin: true requiresBuild: true + dev: false optional: true /unbox-primitive@1.0.2: @@ -11753,9 +11192,6 @@ packages: engines: {node: '>=14.0'} dependencies: '@fastify/busboy': 2.1.1 - - /unfetch@4.2.0: - resolution: {integrity: sha512-F9p7yYCn6cIW9El1zi0HI6vqpeIvBsr3dSuRO6Xuppb1u5rXpCPmMvLSyECLhybr9isec8Ohl0hPekMVrEinDA==} dev: false /unicode-canonical-property-names-ecmascript@2.0.0: @@ -11797,6 +11233,7 @@ packages: /unpipe@1.0.0: resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==} engines: {node: '>= 0.8'} + dev: false /unset-value@1.0.0: resolution: {integrity: sha512-PcA2tsuGSF9cnySLHTLSh2qrQiJ70mn+r+Glzxv2TWZblxsxCC52BDlZoPCsz7STd9pN7EZetkWZBAvk4cgZdQ==} @@ -11830,9 +11267,11 @@ packages: /utf8@3.0.0: resolution: {integrity: sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ==} + dev: false /util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + dev: false /utils-merge@1.0.1: resolution: {integrity: sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==} @@ -11847,9 +11286,11 @@ packages: /uuid@8.3.2: resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==} hasBin: true + dev: false /v8-compile-cache-lib@3.0.1: resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} + dev: false /v8-compile-cache@2.4.0: resolution: {integrity: sha512-ocyWc3bAHBB/guyqJQVI5o4BZkPhznPYUG2ea80Gond/BgNWpap8TOmLSeeQG7bnh2KMISxskdADG59j7zruhw==} @@ -11916,9 +11357,6 @@ packages: number-to-bn: 1.7.0 randombytes: 2.1.0 utf8: 3.0.0 - - /webidl-conversions@3.0.1: - resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} dev: false /webidl-conversions@4.0.2: @@ -11932,13 +11370,6 @@ packages: /whatwg-mimetype@2.3.0: resolution: {integrity: sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==} - /whatwg-url@5.0.0: - resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} - dependencies: - tr46: 0.0.3 - webidl-conversions: 3.0.1 - dev: false - /whatwg-url@7.1.0: resolution: {integrity: sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==} dependencies: @@ -12011,6 +11442,7 @@ packages: engines: {node: '>=8'} dependencies: string-width: 4.2.3 + dev: false /winston-transport@4.7.0: resolution: {integrity: sha512-ajBj65K5I7denzer2IYW6+2bNIVqLGDHqDw3Ow8Ohh+vdW+rv4MZ6eiDvHoKhfJFZ2auyN8byXieDDJ96ViONg==} @@ -12044,6 +11476,7 @@ packages: /wordwrap@1.0.0: resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==} + dev: false /wordwrapjs@4.0.1: resolution: {integrity: sha512-kKlNACbvHrkpIw6oPeYDSmdCTu2hdMHoyXLTcUKala++lx5Y+wjJ/e474Jqv5abnVmwxw08DiTuHmw69lJGksA==} @@ -12051,9 +11484,11 @@ packages: dependencies: reduce-flatten: 2.0.0 typical: 5.2.0 + dev: false /workerpool@6.2.1: resolution: {integrity: sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==} + dev: false /wrap-ansi@3.0.1: resolution: {integrity: sha512-iXR3tDXpbnTpzjKSylUJRkLuOrEC7hwEB221cgn6wtF8wpmz28puFXAEfPT5zrjM3wahygB//VuWEr1vTkDcNQ==} @@ -12077,6 +11512,7 @@ packages: ansi-styles: 4.3.0 string-width: 4.2.3 strip-ansi: 6.0.1 + dev: false /wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} @@ -12106,6 +11542,7 @@ packages: optional: true utf-8-validate: optional: true + dev: false /ws@7.5.9: resolution: {integrity: sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==} @@ -12144,6 +11581,7 @@ packages: /y18n@5.0.8: resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} engines: {node: '>=10'} + dev: false /yallist@3.1.1: resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} @@ -12165,6 +11603,7 @@ packages: /yargs-parser@20.2.4: resolution: {integrity: sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==} engines: {node: '>=10'} + dev: false /yargs-unparser@2.0.0: resolution: {integrity: sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==} @@ -12174,6 +11613,7 @@ packages: decamelize: 4.0.0 flat: 5.0.2 is-plain-obj: 2.1.0 + dev: false /yargs@15.4.1: resolution: {integrity: sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==} @@ -12202,14 +11642,17 @@ packages: string-width: 4.2.3 y18n: 5.0.8 yargs-parser: 20.2.4 + dev: false /yn@3.1.1: resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} engines: {node: '>=6'} + dev: false /yocto-queue@0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} + dev: false github.com/Arachnid/clones-with-immutable-args/23768824cdc037f361f7065538b8f949cae9d3d1: resolution: {tarball: https://codeload.github.com/Arachnid/clones-with-immutable-args/tar.gz/23768824cdc037f361f7065538b8f949cae9d3d1} From 2b41a0b91c0e84faf656bbc99fa437792a0003ad Mon Sep 17 00:00:00 2001 From: Julink Date: Tue, 26 Mar 2024 22:37:15 +0100 Subject: [PATCH 4/4] chore: update block in mocked rollup and delete unused contracts --- .../l1-contracts/contracts/RollupMock.sol | 4 +- .../delegatableResolvers/BytesUtils.sol | 400 ---------------- .../DelegatableResolver.sol | 134 ------ .../DelegatableResolverFactory.sol | 33 -- .../IDelegatableResolver.sol | 18 - .../delegatableResolvers/IMulticallable.sol | 13 - .../delegatableResolvers/Multicallable.sol | 53 --- .../delegatableResolvers/RRUtils.sol | 433 ------------------ .../delegatableResolvers/ResolverBase.sol | 34 -- .../profiles/ABIResolver.sol | 69 --- .../profiles/AddrResolver.sol | 88 ---- .../profiles/ContentHashResolver.sol | 42 -- .../profiles/DNSResolver.sol | 208 --------- .../profiles/ExtendedResolver.sol | 19 - .../profiles/IABIResolver.sol | 19 - .../profiles/IAddrResolver.sol | 16 - .../profiles/IAddressResolver.sol | 18 - .../profiles/IContentHashResolver.sol | 13 - .../profiles/IDNSRecordResolver.sol | 27 -- .../profiles/IDNSZoneResolver.sol | 18 - .../profiles/IExtendedDNSResolver.sol | 10 - .../profiles/IExtendedResolver.sol | 9 - .../profiles/IInterfaceResolver.sol | 25 - .../profiles/INameResolver.sol | 14 - .../profiles/IPubkeyResolver.sol | 15 - .../profiles/ITextResolver.sol | 22 - .../profiles/IVersionableResolver.sol | 8 - .../profiles/InterfaceResolver.sol | 85 ---- .../profiles/NameResolver.sol | 42 -- .../profiles/PubkeyResolver.sol | 54 --- .../profiles/TextResolver.sol | 46 -- 31 files changed, 2 insertions(+), 1987 deletions(-) delete mode 100644 packages/l1-contracts/contracts/delegatableResolvers/BytesUtils.sol delete mode 100644 packages/l1-contracts/contracts/delegatableResolvers/DelegatableResolver.sol delete mode 100644 packages/l1-contracts/contracts/delegatableResolvers/DelegatableResolverFactory.sol delete mode 100644 packages/l1-contracts/contracts/delegatableResolvers/IDelegatableResolver.sol delete mode 100644 packages/l1-contracts/contracts/delegatableResolvers/IMulticallable.sol delete mode 100644 packages/l1-contracts/contracts/delegatableResolvers/Multicallable.sol delete mode 100644 packages/l1-contracts/contracts/delegatableResolvers/RRUtils.sol delete mode 100644 packages/l1-contracts/contracts/delegatableResolvers/ResolverBase.sol delete mode 100644 packages/l1-contracts/contracts/delegatableResolvers/profiles/ABIResolver.sol delete mode 100644 packages/l1-contracts/contracts/delegatableResolvers/profiles/AddrResolver.sol delete mode 100644 packages/l1-contracts/contracts/delegatableResolvers/profiles/ContentHashResolver.sol delete mode 100644 packages/l1-contracts/contracts/delegatableResolvers/profiles/DNSResolver.sol delete mode 100644 packages/l1-contracts/contracts/delegatableResolvers/profiles/ExtendedResolver.sol delete mode 100644 packages/l1-contracts/contracts/delegatableResolvers/profiles/IABIResolver.sol delete mode 100644 packages/l1-contracts/contracts/delegatableResolvers/profiles/IAddrResolver.sol delete mode 100644 packages/l1-contracts/contracts/delegatableResolvers/profiles/IAddressResolver.sol delete mode 100644 packages/l1-contracts/contracts/delegatableResolvers/profiles/IContentHashResolver.sol delete mode 100644 packages/l1-contracts/contracts/delegatableResolvers/profiles/IDNSRecordResolver.sol delete mode 100644 packages/l1-contracts/contracts/delegatableResolvers/profiles/IDNSZoneResolver.sol delete mode 100644 packages/l1-contracts/contracts/delegatableResolvers/profiles/IExtendedDNSResolver.sol delete mode 100644 packages/l1-contracts/contracts/delegatableResolvers/profiles/IExtendedResolver.sol delete mode 100644 packages/l1-contracts/contracts/delegatableResolvers/profiles/IInterfaceResolver.sol delete mode 100644 packages/l1-contracts/contracts/delegatableResolvers/profiles/INameResolver.sol delete mode 100644 packages/l1-contracts/contracts/delegatableResolvers/profiles/IPubkeyResolver.sol delete mode 100644 packages/l1-contracts/contracts/delegatableResolvers/profiles/ITextResolver.sol delete mode 100644 packages/l1-contracts/contracts/delegatableResolvers/profiles/IVersionableResolver.sol delete mode 100644 packages/l1-contracts/contracts/delegatableResolvers/profiles/InterfaceResolver.sol delete mode 100644 packages/l1-contracts/contracts/delegatableResolvers/profiles/NameResolver.sol delete mode 100644 packages/l1-contracts/contracts/delegatableResolvers/profiles/PubkeyResolver.sol delete mode 100644 packages/l1-contracts/contracts/delegatableResolvers/profiles/TextResolver.sol diff --git a/packages/l1-contracts/contracts/RollupMock.sol b/packages/l1-contracts/contracts/RollupMock.sol index 79e49f239..7499efb54 100644 --- a/packages/l1-contracts/contracts/RollupMock.sol +++ b/packages/l1-contracts/contracts/RollupMock.sol @@ -3,13 +3,13 @@ pragma solidity ^0.8.25; contract RollupMock { function currentL2BlockNumber() public pure returns (uint256) { - return 20720; + return 96857; } function stateRootHashes( uint256 blockNumber ) public pure returns (bytes32) { return - 0x03d0b763f587ee91006fda775636a2d190d9e3037807a39aa566c5f13ba73965; + 0x0bfb083c42510e3258119e3b27a7e84730b80f6c9009416dd6e532843af93a7e; } } diff --git a/packages/l1-contracts/contracts/delegatableResolvers/BytesUtils.sol b/packages/l1-contracts/contracts/delegatableResolvers/BytesUtils.sol deleted file mode 100644 index 96344ce57..000000000 --- a/packages/l1-contracts/contracts/delegatableResolvers/BytesUtils.sol +++ /dev/null @@ -1,400 +0,0 @@ -pragma solidity ^0.8.4; - -library BytesUtils { - error OffsetOutOfBoundsError(uint256 offset, uint256 length); - - /* - * @dev Returns the keccak-256 hash of a byte range. - * @param self The byte string to hash. - * @param offset The position to start hashing at. - * @param len The number of bytes to hash. - * @return The hash of the byte range. - */ - function keccak( - bytes memory self, - uint256 offset, - uint256 len - ) internal pure returns (bytes32 ret) { - require(offset + len <= self.length); - assembly { - ret := keccak256(add(add(self, 32), offset), len) - } - } - - /* - * @dev Returns a positive number if `other` comes lexicographically after - * `self`, a negative number if it comes before, or zero if the - * contents of the two bytes are equal. - * @param self The first bytes to compare. - * @param other The second bytes to compare. - * @return The result of the comparison. - */ - function compare( - bytes memory self, - bytes memory other - ) internal pure returns (int256) { - return compare(self, 0, self.length, other, 0, other.length); - } - - /* - * @dev Returns a positive number if `other` comes lexicographically after - * `self`, a negative number if it comes before, or zero if the - * contents of the two bytes are equal. Comparison is done per-rune, - * on unicode codepoints. - * @param self The first bytes to compare. - * @param offset The offset of self. - * @param len The length of self. - * @param other The second bytes to compare. - * @param otheroffset The offset of the other string. - * @param otherlen The length of the other string. - * @return The result of the comparison. - */ - function compare( - bytes memory self, - uint256 offset, - uint256 len, - bytes memory other, - uint256 otheroffset, - uint256 otherlen - ) internal pure returns (int256) { - if (offset + len > self.length) { - revert OffsetOutOfBoundsError(offset + len, self.length); - } - if (otheroffset + otherlen > other.length) { - revert OffsetOutOfBoundsError(otheroffset + otherlen, other.length); - } - - uint256 shortest = len; - if (otherlen < len) shortest = otherlen; - - uint256 selfptr; - uint256 otherptr; - - assembly { - selfptr := add(self, add(offset, 32)) - otherptr := add(other, add(otheroffset, 32)) - } - for (uint256 idx = 0; idx < shortest; idx += 32) { - uint256 a; - uint256 b; - assembly { - a := mload(selfptr) - b := mload(otherptr) - } - if (a != b) { - // Mask out irrelevant bytes and check again - uint256 mask; - if (shortest - idx >= 32) { - mask = type(uint256).max; - } else { - mask = ~(2 ** (8 * (idx + 32 - shortest)) - 1); - } - int256 diff = int256(a & mask) - int256(b & mask); - if (diff != 0) return diff; - } - selfptr += 32; - otherptr += 32; - } - - return int256(len) - int256(otherlen); - } - - /* - * @dev Returns true if the two byte ranges are equal. - * @param self The first byte range to compare. - * @param offset The offset into the first byte range. - * @param other The second byte range to compare. - * @param otherOffset The offset into the second byte range. - * @param len The number of bytes to compare - * @return True if the byte ranges are equal, false otherwise. - */ - function equals( - bytes memory self, - uint256 offset, - bytes memory other, - uint256 otherOffset, - uint256 len - ) internal pure returns (bool) { - return keccak(self, offset, len) == keccak(other, otherOffset, len); - } - - /* - * @dev Returns true if the two byte ranges are equal with offsets. - * @param self The first byte range to compare. - * @param offset The offset into the first byte range. - * @param other The second byte range to compare. - * @param otherOffset The offset into the second byte range. - * @return True if the byte ranges are equal, false otherwise. - */ - function equals( - bytes memory self, - uint256 offset, - bytes memory other, - uint256 otherOffset - ) internal pure returns (bool) { - return - keccak(self, offset, self.length - offset) == - keccak(other, otherOffset, other.length - otherOffset); - } - - /* - * @dev Compares a range of 'self' to all of 'other' and returns True iff - * they are equal. - * @param self The first byte range to compare. - * @param offset The offset into the first byte range. - * @param other The second byte range to compare. - * @return True if the byte ranges are equal, false otherwise. - */ - function equals( - bytes memory self, - uint256 offset, - bytes memory other - ) internal pure returns (bool) { - return - self.length == offset + other.length && - equals(self, offset, other, 0, other.length); - } - - /* - * @dev Returns true if the two byte ranges are equal. - * @param self The first byte range to compare. - * @param other The second byte range to compare. - * @return True if the byte ranges are equal, false otherwise. - */ - function equals( - bytes memory self, - bytes memory other - ) internal pure returns (bool) { - return - self.length == other.length && - equals(self, 0, other, 0, self.length); - } - - /* - * @dev Returns the 8-bit number at the specified index of self. - * @param self The byte string. - * @param idx The index into the bytes - * @return The specified 8 bits of the string, interpreted as an integer. - */ - function readUint8( - bytes memory self, - uint256 idx - ) internal pure returns (uint8 ret) { - return uint8(self[idx]); - } - - /* - * @dev Returns the 16-bit number at the specified index of self. - * @param self The byte string. - * @param idx The index into the bytes - * @return The specified 16 bits of the string, interpreted as an integer. - */ - function readUint16( - bytes memory self, - uint256 idx - ) internal pure returns (uint16 ret) { - require(idx + 2 <= self.length); - assembly { - ret := and(mload(add(add(self, 2), idx)), 0xFFFF) - } - } - - /* - * @dev Returns the 32-bit number at the specified index of self. - * @param self The byte string. - * @param idx The index into the bytes - * @return The specified 32 bits of the string, interpreted as an integer. - */ - function readUint32( - bytes memory self, - uint256 idx - ) internal pure returns (uint32 ret) { - require(idx + 4 <= self.length); - assembly { - ret := and(mload(add(add(self, 4), idx)), 0xFFFFFFFF) - } - } - - /* - * @dev Returns the 32 byte value at the specified index of self. - * @param self The byte string. - * @param idx The index into the bytes - * @return The specified 32 bytes of the string. - */ - function readBytes32( - bytes memory self, - uint256 idx - ) internal pure returns (bytes32 ret) { - require(idx + 32 <= self.length); - assembly { - ret := mload(add(add(self, 32), idx)) - } - } - - /* - * @dev Returns the 32 byte value at the specified index of self. - * @param self The byte string. - * @param idx The index into the bytes - * @return The specified 32 bytes of the string. - */ - function readBytes20( - bytes memory self, - uint256 idx - ) internal pure returns (bytes20 ret) { - require(idx + 20 <= self.length); - assembly { - ret := and( - mload(add(add(self, 32), idx)), - 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000 - ) - } - } - - /* - * @dev Returns the n byte value at the specified index of self. - * @param self The byte string. - * @param idx The index into the bytes. - * @param len The number of bytes. - * @return The specified 32 bytes of the string. - */ - function readBytesN( - bytes memory self, - uint256 idx, - uint256 len - ) internal pure returns (bytes32 ret) { - require(len <= 32); - require(idx + len <= self.length); - assembly { - let mask := not(sub(exp(256, sub(32, len)), 1)) - ret := and(mload(add(add(self, 32), idx)), mask) - } - } - - function memcpy(uint256 dest, uint256 src, uint256 len) private pure { - // Copy word-length chunks while possible - for (; len >= 32; len -= 32) { - assembly { - mstore(dest, mload(src)) - } - dest += 32; - src += 32; - } - - // Copy remaining bytes - unchecked { - uint256 mask = (256 ** (32 - len)) - 1; - assembly { - let srcpart := and(mload(src), not(mask)) - let destpart := and(mload(dest), mask) - mstore(dest, or(destpart, srcpart)) - } - } - } - - /* - * @dev Copies a substring into a new byte string. - * @param self The byte string to copy from. - * @param offset The offset to start copying at. - * @param len The number of bytes to copy. - */ - function substring( - bytes memory self, - uint256 offset, - uint256 len - ) internal pure returns (bytes memory) { - require(offset + len <= self.length); - - bytes memory ret = new bytes(len); - uint256 dest; - uint256 src; - - assembly { - dest := add(ret, 32) - src := add(add(self, 32), offset) - } - memcpy(dest, src, len); - - return ret; - } - - // Maps characters from 0x30 to 0x7A to their base32 values. - // 0xFF represents invalid characters in that range. - bytes constant base32HexTable = - hex"00010203040506070809FFFFFFFFFFFFFF0A0B0C0D0E0F101112131415161718191A1B1C1D1E1FFFFFFFFFFFFFFFFFFFFF0A0B0C0D0E0F101112131415161718191A1B1C1D1E1F"; - - /** - * @dev Decodes unpadded base32 data of up to one word in length. - * @param self The data to decode. - * @param off Offset into the string to start at. - * @param len Number of characters to decode. - * @return The decoded data, left aligned. - */ - function base32HexDecodeWord( - bytes memory self, - uint256 off, - uint256 len - ) internal pure returns (bytes32) { - require(len <= 52); - - uint256 ret = 0; - uint8 decoded; - for (uint256 i = 0; i < len; i++) { - bytes1 char = self[off + i]; - require(char >= 0x30 && char <= 0x7A); - decoded = uint8(base32HexTable[uint256(uint8(char)) - 0x30]); - require(decoded <= 0x20); - if (i == len - 1) { - break; - } - ret = (ret << 5) | decoded; - } - - uint256 bitlen = len * 5; - if (len % 8 == 0) { - // Multiple of 8 characters, no padding - ret = (ret << 5) | decoded; - } else if (len % 8 == 2) { - // Two extra characters - 1 byte - ret = (ret << 3) | (decoded >> 2); - bitlen -= 2; - } else if (len % 8 == 4) { - // Four extra characters - 2 bytes - ret = (ret << 1) | (decoded >> 4); - bitlen -= 4; - } else if (len % 8 == 5) { - // Five extra characters - 3 bytes - ret = (ret << 4) | (decoded >> 1); - bitlen -= 1; - } else if (len % 8 == 7) { - // Seven extra characters - 4 bytes - ret = (ret << 2) | (decoded >> 3); - bitlen -= 3; - } else { - revert(); - } - - return bytes32(ret << (256 - bitlen)); - } - - /** - * @dev Finds the first occurrence of the byte `needle` in `self`. - * @param self The string to search - * @param off The offset to start searching at - * @param len The number of bytes to search - * @param needle The byte to search for - * @return The offset of `needle` in `self`, or 2**256-1 if it was not found. - */ - function find( - bytes memory self, - uint256 off, - uint256 len, - bytes1 needle - ) internal pure returns (uint256) { - for (uint256 idx = off; idx < off + len; idx++) { - if (self[idx] == needle) { - return idx; - } - } - return type(uint256).max; - } -} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/DelegatableResolver.sol b/packages/l1-contracts/contracts/delegatableResolvers/DelegatableResolver.sol deleted file mode 100644 index 92b0f3a7c..000000000 --- a/packages/l1-contracts/contracts/delegatableResolvers/DelegatableResolver.sol +++ /dev/null @@ -1,134 +0,0 @@ -pragma solidity >=0.8.4; -import "./profiles/ABIResolver.sol"; -import "./profiles/AddrResolver.sol"; -import "./profiles/ContentHashResolver.sol"; -import "./profiles/DNSResolver.sol"; -import "./profiles/InterfaceResolver.sol"; -import "./profiles/NameResolver.sol"; -import "./profiles/PubkeyResolver.sol"; -import "./profiles/TextResolver.sol"; -import "./profiles/ExtendedResolver.sol"; -import "./Multicallable.sol"; -import "./IDelegatableResolver.sol"; -import {Clone} from "clones-with-immutable-args/src/Clone.sol"; - -/** - * A delegated resolver that allows the resolver owner to add an operator to update records of a node on behalf of the owner. - * address. - */ -contract DelegatableResolver is - Clone, - Multicallable, - ABIResolver, - AddrResolver, - ContentHashResolver, - DNSResolver, - InterfaceResolver, - NameResolver, - PubkeyResolver, - TextResolver, - ExtendedResolver -{ - using BytesUtils for bytes; - - // Logged when an operator is added or removed. - event Approval( - bytes32 indexed node, - address indexed operator, - bytes name, - bool approved - ); - - error NotAuthorized(bytes32 node); - - //node => (delegate => isAuthorised) - mapping(bytes32 => mapping(address => bool)) operators; - - /* - * Check to see if the operator has been approved by the owner for the node. - * @param name The ENS node to query - * @param offset The offset of the label to query recursively. Start from the 0 position and kepp adding the length of each label as it traverse. The function exits when len is 0. - * @param operator The address of the operator to query - * @return node The node of the name passed as an argument - * @return authorized The boolean state of whether the operator is approved to update record of the name - */ - function getAuthorisedNode( - bytes memory name, - uint256 offset, - address operator - ) public view returns (bytes32 node, bool authorized) { - uint256 len = name.readUint8(offset); - node = bytes32(0); - if (len > 0) { - bytes32 label = name.keccak(offset + 1, len); - (node, authorized) = getAuthorisedNode( - name, - offset + len + 1, - operator - ); - node = keccak256(abi.encodePacked(node, label)); - } else { - return ( - node, - authorized || operators[node][operator] || owner() == operator - ); - } - return (node, authorized || operators[node][operator]); - } - - /** - * @dev Approve an operator to be able to updated records on a node. - */ - function approve( - bytes memory name, - address operator, - bool approved - ) external { - (bytes32 node, bool authorized) = getAuthorisedNode( - name, - 0, - msg.sender - ); - if (!authorized) { - revert NotAuthorized(node); - } - operators[node][operator] = approved; - emit Approval(node, operator, name, approved); - } - - /* - * Returns the owner address passed set by the Factory - * @return address The owner address - */ - function owner() public view returns (address) { - return _getArgAddress(0); - } - - function isAuthorised(bytes32 node) internal view override returns (bool) { - return msg.sender == owner() || operators[node][msg.sender]; - } - - function supportsInterface( - bytes4 interfaceID - ) - public - view - virtual - override( - Multicallable, - ABIResolver, - AddrResolver, - ContentHashResolver, - DNSResolver, - InterfaceResolver, - NameResolver, - PubkeyResolver, - TextResolver - ) - returns (bool) - { - return - interfaceID == type(IDelegatableResolver).interfaceId || - super.supportsInterface(interfaceID); - } -} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/DelegatableResolverFactory.sol b/packages/l1-contracts/contracts/delegatableResolvers/DelegatableResolverFactory.sol deleted file mode 100644 index 1d4dbbea2..000000000 --- a/packages/l1-contracts/contracts/delegatableResolvers/DelegatableResolverFactory.sol +++ /dev/null @@ -1,33 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; - -import "./DelegatableResolver.sol"; -import {ClonesWithImmutableArgs} from "clones-with-immutable-args/src/ClonesWithImmutableArgs.sol"; - -/** - * A resolver factory that creates a dedicated resolver for each user - */ - -contract DelegatableResolverFactory { - using ClonesWithImmutableArgs for address; - - DelegatableResolver public implementation; - event NewDelegatableResolver(address resolver, address owner); - - constructor(DelegatableResolver _implementation) { - implementation = _implementation; - } - - /* - * Create the unique address unique to the owner - * @param address The address of the resolver owner - * @return address The address of the newly created Resolver - */ - function create( - address owner - ) external returns (DelegatableResolver clone) { - bytes memory data = abi.encodePacked(owner); - clone = DelegatableResolver(address(implementation).clone2(data)); - emit NewDelegatableResolver(address(clone), owner); - } -} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/IDelegatableResolver.sol b/packages/l1-contracts/contracts/delegatableResolvers/IDelegatableResolver.sol deleted file mode 100644 index f01b0c35b..000000000 --- a/packages/l1-contracts/contracts/delegatableResolvers/IDelegatableResolver.sol +++ /dev/null @@ -1,18 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.8.4; - -interface IDelegatableResolver { - function approve( - bytes memory name, - address operator, - bool approved - ) external; - - function getAuthorisedNode( - bytes memory name, - uint256 offset, - address operator - ) external returns (bytes32 node, bool authorized); - - function owner() external view returns (address); -} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/IMulticallable.sol b/packages/l1-contracts/contracts/delegatableResolvers/IMulticallable.sol deleted file mode 100644 index 9f51fb4c6..000000000 --- a/packages/l1-contracts/contracts/delegatableResolvers/IMulticallable.sol +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.4; - -interface IMulticallable { - function multicall( - bytes[] calldata data - ) external returns (bytes[] memory results); - - function multicallWithNodeCheck( - bytes32, - bytes[] calldata data - ) external returns (bytes[] memory results); -} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/Multicallable.sol b/packages/l1-contracts/contracts/delegatableResolvers/Multicallable.sol deleted file mode 100644 index 6200430ea..000000000 --- a/packages/l1-contracts/contracts/delegatableResolvers/Multicallable.sol +++ /dev/null @@ -1,53 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.4; - -import "./IMulticallable.sol"; -import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; - -abstract contract Multicallable is IMulticallable, ERC165 { - function _multicall( - bytes32 nodehash, - bytes[] calldata data - ) internal returns (bytes[] memory results) { - results = new bytes[](data.length); - for (uint256 i = 0; i < data.length; i++) { - if (nodehash != bytes32(0)) { - bytes32 txNamehash = bytes32(data[i][4:36]); - require( - txNamehash == nodehash, - "multicall: All records must have a matching namehash" - ); - } - (bool success, bytes memory result) = address(this).delegatecall( - data[i] - ); - require(success); - results[i] = result; - } - return results; - } - - // This function provides an extra security check when called - // from priviledged contracts (such as EthRegistrarController) - // that can set records on behalf of the node owners - function multicallWithNodeCheck( - bytes32 nodehash, - bytes[] calldata data - ) external returns (bytes[] memory results) { - return _multicall(nodehash, data); - } - - function multicall( - bytes[] calldata data - ) public override returns (bytes[] memory results) { - return _multicall(bytes32(0), data); - } - - function supportsInterface( - bytes4 interfaceID - ) public view virtual override returns (bool) { - return - interfaceID == type(IMulticallable).interfaceId || - super.supportsInterface(interfaceID); - } -} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/RRUtils.sol b/packages/l1-contracts/contracts/delegatableResolvers/RRUtils.sol deleted file mode 100644 index 20fbf15f0..000000000 --- a/packages/l1-contracts/contracts/delegatableResolvers/RRUtils.sol +++ /dev/null @@ -1,433 +0,0 @@ -pragma solidity ^0.8.4; - -import "./BytesUtils.sol"; -import "@ensdomains/buffer/contracts/Buffer.sol"; - -/** - * @dev RRUtils is a library that provides utilities for parsing DNS resource records. - */ -library RRUtils { - using BytesUtils for *; - using Buffer for *; - - /** - * @dev Returns the number of bytes in the DNS name at 'offset' in 'self'. - * @param self The byte array to read a name from. - * @param offset The offset to start reading at. - * @return The length of the DNS name at 'offset', in bytes. - */ - function nameLength( - bytes memory self, - uint256 offset - ) internal pure returns (uint256) { - uint256 idx = offset; - while (true) { - assert(idx < self.length); - uint256 labelLen = self.readUint8(idx); - idx += labelLen + 1; - if (labelLen == 0) { - break; - } - } - return idx - offset; - } - - /** - * @dev Returns a DNS format name at the specified offset of self. - * @param self The byte array to read a name from. - * @param offset The offset to start reading at. - * @return ret The name. - */ - function readName( - bytes memory self, - uint256 offset - ) internal pure returns (bytes memory ret) { - uint256 len = nameLength(self, offset); - return self.substring(offset, len); - } - - /** - * @dev Returns the number of labels in the DNS name at 'offset' in 'self'. - * @param self The byte array to read a name from. - * @param offset The offset to start reading at. - * @return The number of labels in the DNS name at 'offset', in bytes. - */ - function labelCount( - bytes memory self, - uint256 offset - ) internal pure returns (uint256) { - uint256 count = 0; - while (true) { - assert(offset < self.length); - uint256 labelLen = self.readUint8(offset); - offset += labelLen + 1; - if (labelLen == 0) { - break; - } - count += 1; - } - return count; - } - - uint256 constant RRSIG_TYPE = 0; - uint256 constant RRSIG_ALGORITHM = 2; - uint256 constant RRSIG_LABELS = 3; - uint256 constant RRSIG_TTL = 4; - uint256 constant RRSIG_EXPIRATION = 8; - uint256 constant RRSIG_INCEPTION = 12; - uint256 constant RRSIG_KEY_TAG = 16; - uint256 constant RRSIG_SIGNER_NAME = 18; - - struct SignedSet { - uint16 typeCovered; - uint8 algorithm; - uint8 labels; - uint32 ttl; - uint32 expiration; - uint32 inception; - uint16 keytag; - bytes signerName; - bytes data; - bytes name; - } - - function readSignedSet( - bytes memory data - ) internal pure returns (SignedSet memory self) { - self.typeCovered = data.readUint16(RRSIG_TYPE); - self.algorithm = data.readUint8(RRSIG_ALGORITHM); - self.labels = data.readUint8(RRSIG_LABELS); - self.ttl = data.readUint32(RRSIG_TTL); - self.expiration = data.readUint32(RRSIG_EXPIRATION); - self.inception = data.readUint32(RRSIG_INCEPTION); - self.keytag = data.readUint16(RRSIG_KEY_TAG); - self.signerName = readName(data, RRSIG_SIGNER_NAME); - self.data = data.substring( - RRSIG_SIGNER_NAME + self.signerName.length, - data.length - RRSIG_SIGNER_NAME - self.signerName.length - ); - } - - function rrs( - SignedSet memory rrset - ) internal pure returns (RRIterator memory) { - return iterateRRs(rrset.data, 0); - } - - /** - * @dev An iterator over resource records. - */ - struct RRIterator { - bytes data; - uint256 offset; - uint16 dnstype; - uint16 class; - uint32 ttl; - uint256 rdataOffset; - uint256 nextOffset; - } - - /** - * @dev Begins iterating over resource records. - * @param self The byte string to read from. - * @param offset The offset to start reading at. - * @return ret An iterator object. - */ - function iterateRRs( - bytes memory self, - uint256 offset - ) internal pure returns (RRIterator memory ret) { - ret.data = self; - ret.nextOffset = offset; - next(ret); - } - - /** - * @dev Returns true iff there are more RRs to iterate. - * @param iter The iterator to check. - * @return True iff the iterator has finished. - */ - function done(RRIterator memory iter) internal pure returns (bool) { - return iter.offset >= iter.data.length; - } - - /** - * @dev Moves the iterator to the next resource record. - * @param iter The iterator to advance. - */ - function next(RRIterator memory iter) internal pure { - iter.offset = iter.nextOffset; - if (iter.offset >= iter.data.length) { - return; - } - - // Skip the name - uint256 off = iter.offset + nameLength(iter.data, iter.offset); - - // Read type, class, and ttl - iter.dnstype = iter.data.readUint16(off); - off += 2; - iter.class = iter.data.readUint16(off); - off += 2; - iter.ttl = iter.data.readUint32(off); - off += 4; - - // Read the rdata - uint256 rdataLength = iter.data.readUint16(off); - off += 2; - iter.rdataOffset = off; - iter.nextOffset = off + rdataLength; - } - - /** - * @dev Returns the name of the current record. - * @param iter The iterator. - * @return A new bytes object containing the owner name from the RR. - */ - function name(RRIterator memory iter) internal pure returns (bytes memory) { - return - iter.data.substring( - iter.offset, - nameLength(iter.data, iter.offset) - ); - } - - /** - * @dev Returns the rdata portion of the current record. - * @param iter The iterator. - * @return A new bytes object containing the RR's RDATA. - */ - function rdata( - RRIterator memory iter - ) internal pure returns (bytes memory) { - return - iter.data.substring( - iter.rdataOffset, - iter.nextOffset - iter.rdataOffset - ); - } - - uint256 constant DNSKEY_FLAGS = 0; - uint256 constant DNSKEY_PROTOCOL = 2; - uint256 constant DNSKEY_ALGORITHM = 3; - uint256 constant DNSKEY_PUBKEY = 4; - - struct DNSKEY { - uint16 flags; - uint8 protocol; - uint8 algorithm; - bytes publicKey; - } - - function readDNSKEY( - bytes memory data, - uint256 offset, - uint256 length - ) internal pure returns (DNSKEY memory self) { - self.flags = data.readUint16(offset + DNSKEY_FLAGS); - self.protocol = data.readUint8(offset + DNSKEY_PROTOCOL); - self.algorithm = data.readUint8(offset + DNSKEY_ALGORITHM); - self.publicKey = data.substring( - offset + DNSKEY_PUBKEY, - length - DNSKEY_PUBKEY - ); - } - - uint256 constant DS_KEY_TAG = 0; - uint256 constant DS_ALGORITHM = 2; - uint256 constant DS_DIGEST_TYPE = 3; - uint256 constant DS_DIGEST = 4; - - struct DS { - uint16 keytag; - uint8 algorithm; - uint8 digestType; - bytes digest; - } - - function readDS( - bytes memory data, - uint256 offset, - uint256 length - ) internal pure returns (DS memory self) { - self.keytag = data.readUint16(offset + DS_KEY_TAG); - self.algorithm = data.readUint8(offset + DS_ALGORITHM); - self.digestType = data.readUint8(offset + DS_DIGEST_TYPE); - self.digest = data.substring(offset + DS_DIGEST, length - DS_DIGEST); - } - - function isSubdomainOf( - bytes memory self, - bytes memory other - ) internal pure returns (bool) { - uint256 off = 0; - uint256 counts = labelCount(self, 0); - uint256 othercounts = labelCount(other, 0); - - while (counts > othercounts) { - off = progress(self, off); - counts--; - } - - return self.equals(off, other, 0); - } - - function compareNames( - bytes memory self, - bytes memory other - ) internal pure returns (int256) { - if (self.equals(other)) { - return 0; - } - - uint256 off; - uint256 otheroff; - uint256 prevoff; - uint256 otherprevoff; - uint256 counts = labelCount(self, 0); - uint256 othercounts = labelCount(other, 0); - - // Keep removing labels from the front of the name until both names are equal length - while (counts > othercounts) { - prevoff = off; - off = progress(self, off); - counts--; - } - - while (othercounts > counts) { - otherprevoff = otheroff; - otheroff = progress(other, otheroff); - othercounts--; - } - - // Compare the last nonequal labels to each other - while (counts > 0 && !self.equals(off, other, otheroff)) { - prevoff = off; - off = progress(self, off); - otherprevoff = otheroff; - otheroff = progress(other, otheroff); - counts -= 1; - } - - if (off == 0) { - return -1; - } - if (otheroff == 0) { - return 1; - } - - return - self.compare( - prevoff + 1, - self.readUint8(prevoff), - other, - otherprevoff + 1, - other.readUint8(otherprevoff) - ); - } - - /** - * @dev Compares two serial numbers using RFC1982 serial number math. - */ - function serialNumberGte( - uint32 i1, - uint32 i2 - ) internal pure returns (bool) { - unchecked { - return int32(i1) - int32(i2) >= 0; - } - } - - function progress( - bytes memory body, - uint256 off - ) internal pure returns (uint256) { - return off + 1 + body.readUint8(off); - } - - /** - * @dev Computes the keytag for a chunk of data. - * @param data The data to compute a keytag for. - * @return The computed key tag. - */ - function computeKeytag(bytes memory data) internal pure returns (uint16) { - /* This function probably deserves some explanation. - * The DNSSEC keytag function is a checksum that relies on summing up individual bytes - * from the input string, with some mild bitshifting. Here's a Naive solidity implementation: - * - * function computeKeytag(bytes memory data) internal pure returns (uint16) { - * uint ac; - * for (uint i = 0; i < data.length; i++) { - * ac += i & 1 == 0 ? uint16(data.readUint8(i)) << 8 : data.readUint8(i); - * } - * return uint16(ac + (ac >> 16)); - * } - * - * The EVM, with its 256 bit words, is exceedingly inefficient at doing byte-by-byte operations; - * the code above, on reasonable length inputs, consumes over 100k gas. But we can make the EVM's - * large words work in our favour. - * - * The code below works by treating the input as a series of 256 bit words. It first masks out - * even and odd bytes from each input word, adding them to two separate accumulators `ac1` and `ac2`. - * The bytes are separated by empty bytes, so as long as no individual sum exceeds 2^16-1, we're - * effectively summing 16 different numbers with each EVM ADD opcode. - * - * Once it's added up all the inputs, it has to add all the 16 bit values in `ac1` and `ac2` together. - * It does this using the same trick - mask out every other value, shift to align them, add them together. - * After the first addition on both accumulators, there's enough room to add the two accumulators together, - * and the remaining sums can be done just on ac1. - */ - unchecked { - require(data.length <= 8192, "Long keys not permitted"); - uint256 ac1; - uint256 ac2; - for (uint256 i = 0; i < data.length + 31; i += 32) { - uint256 word; - assembly { - word := mload(add(add(data, 32), i)) - } - if (i + 32 > data.length) { - uint256 unused = 256 - (data.length - i) * 8; - word = (word >> unused) << unused; - } - ac1 += - (word & - 0xFF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00) >> - 8; - ac2 += (word & - 0x00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF); - } - ac1 = - (ac1 & - 0x0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF) + - ((ac1 & - 0xFFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000) >> - 16); - ac2 = - (ac2 & - 0x0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF) + - ((ac2 & - 0xFFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000) >> - 16); - ac1 = (ac1 << 8) + ac2; - ac1 = - (ac1 & - 0x00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF) + - ((ac1 & - 0xFFFFFFFF00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF00000000) >> - 32); - ac1 = - (ac1 & - 0x0000000000000000FFFFFFFFFFFFFFFF0000000000000000FFFFFFFFFFFFFFFF) + - ((ac1 & - 0xFFFFFFFFFFFFFFFF0000000000000000FFFFFFFFFFFFFFFF0000000000000000) >> - 64); - ac1 = - (ac1 & - 0x00000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) + - (ac1 >> 128); - ac1 += (ac1 >> 16) & 0xFFFF; - return uint16(ac1); - } - } -} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/ResolverBase.sol b/packages/l1-contracts/contracts/delegatableResolvers/ResolverBase.sol deleted file mode 100644 index 3eb8ba73f..000000000 --- a/packages/l1-contracts/contracts/delegatableResolvers/ResolverBase.sol +++ /dev/null @@ -1,34 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.8.4; - -import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; -import "./profiles/IVersionableResolver.sol"; - -abstract contract ResolverBase is ERC165, IVersionableResolver { - mapping(bytes32 => uint64) public recordVersions; - - function isAuthorised(bytes32 node) internal view virtual returns (bool); - - modifier authorised(bytes32 node) { - require(isAuthorised(node)); - _; - } - - /** - * Increments the record version associated with an ENS node. - * May only be called by the owner of that node in the ENS registry. - * @param node The node to update. - */ - function clearRecords(bytes32 node) public virtual authorised(node) { - recordVersions[node]++; - emit VersionChanged(node, recordVersions[node]); - } - - function supportsInterface( - bytes4 interfaceID - ) public view virtual override returns (bool) { - return - interfaceID == type(IVersionableResolver).interfaceId || - super.supportsInterface(interfaceID); - } -} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/profiles/ABIResolver.sol b/packages/l1-contracts/contracts/delegatableResolvers/profiles/ABIResolver.sol deleted file mode 100644 index 8af733276..000000000 --- a/packages/l1-contracts/contracts/delegatableResolvers/profiles/ABIResolver.sol +++ /dev/null @@ -1,69 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.8.4; - -import "./IABIResolver.sol"; -import "../ResolverBase.sol"; - -abstract contract ABIResolver is IABIResolver, ResolverBase { - mapping(uint64 => mapping(bytes32 => mapping(uint256 => bytes))) versionable_abis; - - /** - * Sets the ABI associated with an ENS node. - * Nodes may have one ABI of each content type. To remove an ABI, set it to - * the empty string. - * @param node The node to update. - * @param contentType The content type of the ABI - * @param data The ABI data. - */ - function setABI( - bytes32 node, - uint256 contentType, - bytes calldata data - ) external virtual authorised(node) { - // Content types must be powers of 2 - require(((contentType - 1) & contentType) == 0); - - versionable_abis[recordVersions[node]][node][contentType] = data; - emit ABIChanged(node, contentType); - } - - /** - * Returns the ABI associated with an ENS node. - * Defined in EIP205. - * @param node The ENS node to query - * @param contentTypes A bitwise OR of the ABI formats accepted by the caller. - * @return contentType The content type of the return value - * @return data The ABI data - */ - function ABI( - bytes32 node, - uint256 contentTypes - ) external view virtual override returns (uint256, bytes memory) { - mapping(uint256 => bytes) storage abiset = versionable_abis[ - recordVersions[node] - ][node]; - - for ( - uint256 contentType = 1; - contentType <= contentTypes; - contentType <<= 1 - ) { - if ( - (contentType & contentTypes) != 0 && - abiset[contentType].length > 0 - ) { - return (contentType, abiset[contentType]); - } - } - - return (0, bytes("")); - } - - function supportsInterface( - bytes4 interfaceID - ) public view virtual override returns (bool) { - return - interfaceID == type(IABIResolver).interfaceId || - super.supportsInterface(interfaceID); - } -} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/profiles/AddrResolver.sol b/packages/l1-contracts/contracts/delegatableResolvers/profiles/AddrResolver.sol deleted file mode 100644 index 92a6efec2..000000000 --- a/packages/l1-contracts/contracts/delegatableResolvers/profiles/AddrResolver.sol +++ /dev/null @@ -1,88 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.8.4; - -import "../ResolverBase.sol"; -import "./IAddrResolver.sol"; -import "./IAddressResolver.sol"; - -abstract contract AddrResolver is - IAddrResolver, - IAddressResolver, - ResolverBase -{ - uint256 private constant COIN_TYPE_ETH = 60; - - mapping(uint64 => mapping(bytes32 => mapping(uint256 => bytes))) versionable_addresses; - - /** - * Sets the address associated with an ENS node. - * May only be called by the owner of that node in the ENS registry. - * @param node The node to update. - * @param a The address to set. - */ - function setAddr( - bytes32 node, - address a - ) external virtual authorised(node) { - setAddr(node, COIN_TYPE_ETH, addressToBytes(a)); - } - - /** - * Returns the address associated with an ENS node. - * @param node The ENS node to query. - * @return The associated address. - */ - function addr( - bytes32 node - ) public view virtual override returns (address payable) { - bytes memory a = addr(node, COIN_TYPE_ETH); - if (a.length == 0) { - return payable(0); - } - return bytesToAddress(a); - } - - function setAddr( - bytes32 node, - uint256 coinType, - bytes memory a - ) public virtual authorised(node) { - emit AddressChanged(node, coinType, a); - if (coinType == COIN_TYPE_ETH) { - emit AddrChanged(node, bytesToAddress(a)); - } - versionable_addresses[recordVersions[node]][node][coinType] = a; - } - - function addr( - bytes32 node, - uint256 coinType - ) public view virtual override returns (bytes memory) { - return versionable_addresses[recordVersions[node]][node][coinType]; - } - - function supportsInterface( - bytes4 interfaceID - ) public view virtual override returns (bool) { - return - interfaceID == type(IAddrResolver).interfaceId || - interfaceID == type(IAddressResolver).interfaceId || - super.supportsInterface(interfaceID); - } - - function bytesToAddress( - bytes memory b - ) internal pure returns (address payable a) { - require(b.length == 20); - assembly { - a := div(mload(add(b, 32)), exp(256, 12)) - } - } - - function addressToBytes(address a) internal pure returns (bytes memory b) { - b = new bytes(20); - assembly { - mstore(add(b, 32), mul(a, exp(256, 12))) - } - } -} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/profiles/ContentHashResolver.sol b/packages/l1-contracts/contracts/delegatableResolvers/profiles/ContentHashResolver.sol deleted file mode 100644 index 57ade4bc8..000000000 --- a/packages/l1-contracts/contracts/delegatableResolvers/profiles/ContentHashResolver.sol +++ /dev/null @@ -1,42 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.8.4; - -import "../ResolverBase.sol"; -import "./IContentHashResolver.sol"; - -abstract contract ContentHashResolver is IContentHashResolver, ResolverBase { - mapping(uint64 => mapping(bytes32 => bytes)) versionable_hashes; - - /** - * Sets the contenthash associated with an ENS node. - * May only be called by the owner of that node in the ENS registry. - * @param node The node to update. - * @param hash The contenthash to set - */ - function setContenthash( - bytes32 node, - bytes calldata hash - ) external virtual authorised(node) { - versionable_hashes[recordVersions[node]][node] = hash; - emit ContenthashChanged(node, hash); - } - - /** - * Returns the contenthash associated with an ENS node. - * @param node The ENS node to query. - * @return The associated contenthash. - */ - function contenthash( - bytes32 node - ) external view virtual override returns (bytes memory) { - return versionable_hashes[recordVersions[node]][node]; - } - - function supportsInterface( - bytes4 interfaceID - ) public view virtual override returns (bool) { - return - interfaceID == type(IContentHashResolver).interfaceId || - super.supportsInterface(interfaceID); - } -} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/profiles/DNSResolver.sol b/packages/l1-contracts/contracts/delegatableResolvers/profiles/DNSResolver.sol deleted file mode 100644 index f679e971b..000000000 --- a/packages/l1-contracts/contracts/delegatableResolvers/profiles/DNSResolver.sol +++ /dev/null @@ -1,208 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.8.4; - -import "../ResolverBase.sol"; -import "../RRUtils.sol"; -import "./IDNSRecordResolver.sol"; -import "./IDNSZoneResolver.sol"; - -abstract contract DNSResolver is - IDNSRecordResolver, - IDNSZoneResolver, - ResolverBase -{ - using RRUtils for *; - using BytesUtils for bytes; - - // Zone hashes for the domains. - // A zone hash is an EIP-1577 content hash in binary format that should point to a - // resource containing a single zonefile. - // node => contenthash - mapping(uint64 => mapping(bytes32 => bytes)) private versionable_zonehashes; - - // The records themselves. Stored as binary RRSETs - // node => version => name => resource => data - mapping(uint64 => mapping(bytes32 => mapping(bytes32 => mapping(uint16 => bytes)))) - private versionable_records; - - // Count of number of entries for a given name. Required for DNS resolvers - // when resolving wildcards. - // node => version => name => number of records - mapping(uint64 => mapping(bytes32 => mapping(bytes32 => uint16))) - private versionable_nameEntriesCount; - - /** - * Set one or more DNS records. Records are supplied in wire-format. - * Records with the same node/name/resource must be supplied one after the - * other to ensure the data is updated correctly. For example, if the data - * was supplied: - * a.example.com IN A 1.2.3.4 - * a.example.com IN A 5.6.7.8 - * www.example.com IN CNAME a.example.com. - * then this would store the two A records for a.example.com correctly as a - * single RRSET, however if the data was supplied: - * a.example.com IN A 1.2.3.4 - * www.example.com IN CNAME a.example.com. - * a.example.com IN A 5.6.7.8 - * then this would store the first A record, the CNAME, then the second A - * record which would overwrite the first. - * - * @param node the namehash of the node for which to set the records - * @param data the DNS wire format records to set - */ - function setDNSRecords( - bytes32 node, - bytes calldata data - ) external virtual authorised(node) { - uint16 resource = 0; - uint256 offset = 0; - bytes memory name; - bytes memory value; - bytes32 nameHash; - uint64 version = recordVersions[node]; - // Iterate over the data to add the resource records - for ( - RRUtils.RRIterator memory iter = data.iterateRRs(0); - !iter.done(); - iter.next() - ) { - if (resource == 0) { - resource = iter.dnstype; - name = iter.name(); - nameHash = keccak256(abi.encodePacked(name)); - value = bytes(iter.rdata()); - } else { - bytes memory newName = iter.name(); - if (resource != iter.dnstype || !name.equals(newName)) { - setDNSRRSet( - node, - name, - resource, - data, - offset, - iter.offset - offset, - value.length == 0, - version - ); - resource = iter.dnstype; - offset = iter.offset; - name = newName; - nameHash = keccak256(name); - value = bytes(iter.rdata()); - } - } - } - if (name.length > 0) { - setDNSRRSet( - node, - name, - resource, - data, - offset, - data.length - offset, - value.length == 0, - version - ); - } - } - - /** - * Obtain a DNS record. - * @param node the namehash of the node for which to fetch the record - * @param name the keccak-256 hash of the fully-qualified name for which to fetch the record - * @param resource the ID of the resource as per https://en.wikipedia.org/wiki/List_of_DNS_record_types - * @return the DNS record in wire format if present, otherwise empty - */ - function dnsRecord( - bytes32 node, - bytes32 name, - uint16 resource - ) public view virtual override returns (bytes memory) { - return versionable_records[recordVersions[node]][node][name][resource]; - } - - /** - * Check if a given node has records. - * @param node the namehash of the node for which to check the records - * @param name the namehash of the node for which to check the records - */ - function hasDNSRecords( - bytes32 node, - bytes32 name - ) public view virtual returns (bool) { - return (versionable_nameEntriesCount[recordVersions[node]][node][ - name - ] != 0); - } - - /** - * setZonehash sets the hash for the zone. - * May only be called by the owner of that node in the ENS registry. - * @param node The node to update. - * @param hash The zonehash to set - */ - function setZonehash( - bytes32 node, - bytes calldata hash - ) external virtual authorised(node) { - uint64 currentRecordVersion = recordVersions[node]; - bytes memory oldhash = versionable_zonehashes[currentRecordVersion][ - node - ]; - versionable_zonehashes[currentRecordVersion][node] = hash; - emit DNSZonehashChanged(node, oldhash, hash); - } - - /** - * zonehash obtains the hash for the zone. - * @param node The ENS node to query. - * @return The associated contenthash. - */ - function zonehash( - bytes32 node - ) external view virtual override returns (bytes memory) { - return versionable_zonehashes[recordVersions[node]][node]; - } - - function supportsInterface( - bytes4 interfaceID - ) public view virtual override returns (bool) { - return - interfaceID == type(IDNSRecordResolver).interfaceId || - interfaceID == type(IDNSZoneResolver).interfaceId || - super.supportsInterface(interfaceID); - } - - function setDNSRRSet( - bytes32 node, - bytes memory name, - uint16 resource, - bytes memory data, - uint256 offset, - uint256 size, - bool deleteRecord, - uint64 version - ) private { - bytes32 nameHash = keccak256(name); - bytes memory rrData = data.substring(offset, size); - if (deleteRecord) { - if ( - versionable_records[version][node][nameHash][resource].length != - 0 - ) { - versionable_nameEntriesCount[version][node][nameHash]--; - } - delete (versionable_records[version][node][nameHash][resource]); - emit DNSRecordDeleted(node, name, resource); - } else { - if ( - versionable_records[version][node][nameHash][resource].length == - 0 - ) { - versionable_nameEntriesCount[version][node][nameHash]++; - } - versionable_records[version][node][nameHash][resource] = rrData; - emit DNSRecordChanged(node, name, resource, rrData); - } - } -} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/profiles/ExtendedResolver.sol b/packages/l1-contracts/contracts/delegatableResolvers/profiles/ExtendedResolver.sol deleted file mode 100644 index e3159c343..000000000 --- a/packages/l1-contracts/contracts/delegatableResolvers/profiles/ExtendedResolver.sol +++ /dev/null @@ -1,19 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.4; - -contract ExtendedResolver { - function resolve( - bytes memory /* name */, - bytes memory data - ) external view returns (bytes memory) { - (bool success, bytes memory result) = address(this).staticcall(data); - if (success) { - return result; - } else { - // Revert with the reason provided by the call - assembly { - revert(add(result, 0x20), mload(result)) - } - } - } -} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/profiles/IABIResolver.sol b/packages/l1-contracts/contracts/delegatableResolvers/profiles/IABIResolver.sol deleted file mode 100644 index c8b4b2660..000000000 --- a/packages/l1-contracts/contracts/delegatableResolvers/profiles/IABIResolver.sol +++ /dev/null @@ -1,19 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.8.4; - -interface IABIResolver { - event ABIChanged(bytes32 indexed node, uint256 indexed contentType); - - /** - * Returns the ABI associated with an ENS node. - * Defined in EIP205. - * @param node The ENS node to query - * @param contentTypes A bitwise OR of the ABI formats accepted by the caller. - * @return contentType The content type of the return value - * @return data The ABI data - */ - function ABI( - bytes32 node, - uint256 contentTypes - ) external view returns (uint256, bytes memory); -} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/profiles/IAddrResolver.sol b/packages/l1-contracts/contracts/delegatableResolvers/profiles/IAddrResolver.sol deleted file mode 100644 index 6ae6628d1..000000000 --- a/packages/l1-contracts/contracts/delegatableResolvers/profiles/IAddrResolver.sol +++ /dev/null @@ -1,16 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.8.4; - -/** - * Interface for the legacy (ETH-only) addr function. - */ -interface IAddrResolver { - event AddrChanged(bytes32 indexed node, address a); - - /** - * Returns the address associated with an ENS node. - * @param node The ENS node to query. - * @return The associated address. - */ - function addr(bytes32 node) external view returns (address payable); -} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/profiles/IAddressResolver.sol b/packages/l1-contracts/contracts/delegatableResolvers/profiles/IAddressResolver.sol deleted file mode 100644 index 28e838648..000000000 --- a/packages/l1-contracts/contracts/delegatableResolvers/profiles/IAddressResolver.sol +++ /dev/null @@ -1,18 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.8.4; - -/** - * Interface for the new (multicoin) addr function. - */ -interface IAddressResolver { - event AddressChanged( - bytes32 indexed node, - uint256 coinType, - bytes newAddress - ); - - function addr( - bytes32 node, - uint256 coinType - ) external view returns (bytes memory); -} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/profiles/IContentHashResolver.sol b/packages/l1-contracts/contracts/delegatableResolvers/profiles/IContentHashResolver.sol deleted file mode 100644 index 64b50ddf0..000000000 --- a/packages/l1-contracts/contracts/delegatableResolvers/profiles/IContentHashResolver.sol +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.8.4; - -interface IContentHashResolver { - event ContenthashChanged(bytes32 indexed node, bytes hash); - - /** - * Returns the contenthash associated with an ENS node. - * @param node The ENS node to query. - * @return The associated contenthash. - */ - function contenthash(bytes32 node) external view returns (bytes memory); -} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/profiles/IDNSRecordResolver.sol b/packages/l1-contracts/contracts/delegatableResolvers/profiles/IDNSRecordResolver.sol deleted file mode 100644 index ac849dcaa..000000000 --- a/packages/l1-contracts/contracts/delegatableResolvers/profiles/IDNSRecordResolver.sol +++ /dev/null @@ -1,27 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.8.4; - -interface IDNSRecordResolver { - // DNSRecordChanged is emitted whenever a given node/name/resource's RRSET is updated. - event DNSRecordChanged( - bytes32 indexed node, - bytes name, - uint16 resource, - bytes record - ); - // DNSRecordDeleted is emitted whenever a given node/name/resource's RRSET is deleted. - event DNSRecordDeleted(bytes32 indexed node, bytes name, uint16 resource); - - /** - * Obtain a DNS record. - * @param node the namehash of the node for which to fetch the record - * @param name the keccak-256 hash of the fully-qualified name for which to fetch the record - * @param resource the ID of the resource as per https://en.wikipedia.org/wiki/List_of_DNS_record_types - * @return the DNS record in wire format if present, otherwise empty - */ - function dnsRecord( - bytes32 node, - bytes32 name, - uint16 resource - ) external view returns (bytes memory); -} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/profiles/IDNSZoneResolver.sol b/packages/l1-contracts/contracts/delegatableResolvers/profiles/IDNSZoneResolver.sol deleted file mode 100644 index b4caad566..000000000 --- a/packages/l1-contracts/contracts/delegatableResolvers/profiles/IDNSZoneResolver.sol +++ /dev/null @@ -1,18 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.8.4; - -interface IDNSZoneResolver { - // DNSZonehashChanged is emitted whenever a given node's zone hash is updated. - event DNSZonehashChanged( - bytes32 indexed node, - bytes lastzonehash, - bytes zonehash - ); - - /** - * zonehash obtains the hash for the zone. - * @param node The ENS node to query. - * @return The associated contenthash. - */ - function zonehash(bytes32 node) external view returns (bytes memory); -} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/profiles/IExtendedDNSResolver.sol b/packages/l1-contracts/contracts/delegatableResolvers/profiles/IExtendedDNSResolver.sol deleted file mode 100644 index f59a07ebc..000000000 --- a/packages/l1-contracts/contracts/delegatableResolvers/profiles/IExtendedDNSResolver.sol +++ /dev/null @@ -1,10 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.4; - -interface IExtendedDNSResolver { - function resolve( - bytes memory name, - bytes memory data, - bytes memory context - ) external view returns (bytes memory); -} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/profiles/IExtendedResolver.sol b/packages/l1-contracts/contracts/delegatableResolvers/profiles/IExtendedResolver.sol deleted file mode 100644 index c5fbb217d..000000000 --- a/packages/l1-contracts/contracts/delegatableResolvers/profiles/IExtendedResolver.sol +++ /dev/null @@ -1,9 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.4; - -interface IExtendedResolver { - function resolve( - bytes memory name, - bytes memory data - ) external view returns (bytes memory); -} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/profiles/IInterfaceResolver.sol b/packages/l1-contracts/contracts/delegatableResolvers/profiles/IInterfaceResolver.sol deleted file mode 100644 index 3e7fd9505..000000000 --- a/packages/l1-contracts/contracts/delegatableResolvers/profiles/IInterfaceResolver.sol +++ /dev/null @@ -1,25 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.8.4; - -interface IInterfaceResolver { - event InterfaceChanged( - bytes32 indexed node, - bytes4 indexed interfaceID, - address implementer - ); - - /** - * Returns the address of a contract that implements the specified interface for this name. - * If an implementer has not been set for this interfaceID and name, the resolver will query - * the contract at `addr()`. If `addr()` is set, a contract exists at that address, and that - * contract implements EIP165 and returns `true` for the specified interfaceID, its address - * will be returned. - * @param node The ENS node to query. - * @param interfaceID The EIP 165 interface ID to check for. - * @return The address that implements this interface, or 0 if the interface is unsupported. - */ - function interfaceImplementer( - bytes32 node, - bytes4 interfaceID - ) external view returns (address); -} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/profiles/INameResolver.sol b/packages/l1-contracts/contracts/delegatableResolvers/profiles/INameResolver.sol deleted file mode 100644 index 639d3284b..000000000 --- a/packages/l1-contracts/contracts/delegatableResolvers/profiles/INameResolver.sol +++ /dev/null @@ -1,14 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.8.4; - -interface INameResolver { - event NameChanged(bytes32 indexed node, string name); - - /** - * Returns the name associated with an ENS node, for reverse records. - * Defined in EIP181. - * @param node The ENS node to query. - * @return The associated name. - */ - function name(bytes32 node) external view returns (string memory); -} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/profiles/IPubkeyResolver.sol b/packages/l1-contracts/contracts/delegatableResolvers/profiles/IPubkeyResolver.sol deleted file mode 100644 index db8cd53f5..000000000 --- a/packages/l1-contracts/contracts/delegatableResolvers/profiles/IPubkeyResolver.sol +++ /dev/null @@ -1,15 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.8.4; - -interface IPubkeyResolver { - event PubkeyChanged(bytes32 indexed node, bytes32 x, bytes32 y); - - /** - * Returns the SECP256k1 public key associated with an ENS node. - * Defined in EIP 619. - * @param node The ENS node to query - * @return x The X coordinate of the curve point for the public key. - * @return y The Y coordinate of the curve point for the public key. - */ - function pubkey(bytes32 node) external view returns (bytes32 x, bytes32 y); -} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/profiles/ITextResolver.sol b/packages/l1-contracts/contracts/delegatableResolvers/profiles/ITextResolver.sol deleted file mode 100644 index 85a809712..000000000 --- a/packages/l1-contracts/contracts/delegatableResolvers/profiles/ITextResolver.sol +++ /dev/null @@ -1,22 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.8.4; - -interface ITextResolver { - event TextChanged( - bytes32 indexed node, - string indexed indexedKey, - string key, - string value - ); - - /** - * Returns the text data associated with an ENS node and key. - * @param node The ENS node to query. - * @param key The text data key to query. - * @return The associated text data. - */ - function text( - bytes32 node, - string calldata key - ) external view returns (string memory); -} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/profiles/IVersionableResolver.sol b/packages/l1-contracts/contracts/delegatableResolvers/profiles/IVersionableResolver.sol deleted file mode 100644 index 01c074aec..000000000 --- a/packages/l1-contracts/contracts/delegatableResolvers/profiles/IVersionableResolver.sol +++ /dev/null @@ -1,8 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.8.4; - -interface IVersionableResolver { - event VersionChanged(bytes32 indexed node, uint64 newVersion); - - function recordVersions(bytes32 node) external view returns (uint64); -} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/profiles/InterfaceResolver.sol b/packages/l1-contracts/contracts/delegatableResolvers/profiles/InterfaceResolver.sol deleted file mode 100644 index da0aeac39..000000000 --- a/packages/l1-contracts/contracts/delegatableResolvers/profiles/InterfaceResolver.sol +++ /dev/null @@ -1,85 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.8.4; - -import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; -import "../ResolverBase.sol"; -import "./AddrResolver.sol"; -import "./IInterfaceResolver.sol"; - -abstract contract InterfaceResolver is IInterfaceResolver, AddrResolver { - mapping(uint64 => mapping(bytes32 => mapping(bytes4 => address))) versionable_interfaces; - - /** - * Sets an interface associated with a name. - * Setting the address to 0 restores the default behaviour of querying the contract at `addr()` for interface support. - * @param node The node to update. - * @param interfaceID The EIP 165 interface ID. - * @param implementer The address of a contract that implements this interface for this node. - */ - function setInterface( - bytes32 node, - bytes4 interfaceID, - address implementer - ) external virtual authorised(node) { - versionable_interfaces[recordVersions[node]][node][ - interfaceID - ] = implementer; - emit InterfaceChanged(node, interfaceID, implementer); - } - - /** - * Returns the address of a contract that implements the specified interface for this name. - * If an implementer has not been set for this interfaceID and name, the resolver will query - * the contract at `addr()`. If `addr()` is set, a contract exists at that address, and that - * contract implements EIP165 and returns `true` for the specified interfaceID, its address - * will be returned. - * @param node The ENS node to query. - * @param interfaceID The EIP 165 interface ID to check for. - * @return The address that implements this interface, or 0 if the interface is unsupported. - */ - function interfaceImplementer( - bytes32 node, - bytes4 interfaceID - ) external view virtual override returns (address) { - address implementer = versionable_interfaces[recordVersions[node]][ - node - ][interfaceID]; - if (implementer != address(0)) { - return implementer; - } - - address a = addr(node); - if (a == address(0)) { - return address(0); - } - - (bool success, bytes memory returnData) = a.staticcall( - abi.encodeWithSignature( - "supportsInterface(bytes4)", - type(IERC165).interfaceId - ) - ); - if (!success || returnData.length < 32 || returnData[31] == 0) { - // EIP 165 not supported by target - return address(0); - } - - (success, returnData) = a.staticcall( - abi.encodeWithSignature("supportsInterface(bytes4)", interfaceID) - ); - if (!success || returnData.length < 32 || returnData[31] == 0) { - // Specified interface not supported by target - return address(0); - } - - return a; - } - - function supportsInterface( - bytes4 interfaceID - ) public view virtual override returns (bool) { - return - interfaceID == type(IInterfaceResolver).interfaceId || - super.supportsInterface(interfaceID); - } -} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/profiles/NameResolver.sol b/packages/l1-contracts/contracts/delegatableResolvers/profiles/NameResolver.sol deleted file mode 100644 index a2452ea7f..000000000 --- a/packages/l1-contracts/contracts/delegatableResolvers/profiles/NameResolver.sol +++ /dev/null @@ -1,42 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.8.4; - -import "../ResolverBase.sol"; -import "./INameResolver.sol"; - -abstract contract NameResolver is INameResolver, ResolverBase { - mapping(uint64 => mapping(bytes32 => string)) versionable_names; - - /** - * Sets the name associated with an ENS node, for reverse records. - * May only be called by the owner of that node in the ENS registry. - * @param node The node to update. - */ - function setName( - bytes32 node, - string calldata newName - ) external virtual authorised(node) { - versionable_names[recordVersions[node]][node] = newName; - emit NameChanged(node, newName); - } - - /** - * Returns the name associated with an ENS node, for reverse records. - * Defined in EIP181. - * @param node The ENS node to query. - * @return The associated name. - */ - function name( - bytes32 node - ) external view virtual override returns (string memory) { - return versionable_names[recordVersions[node]][node]; - } - - function supportsInterface( - bytes4 interfaceID - ) public view virtual override returns (bool) { - return - interfaceID == type(INameResolver).interfaceId || - super.supportsInterface(interfaceID); - } -} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/profiles/PubkeyResolver.sol b/packages/l1-contracts/contracts/delegatableResolvers/profiles/PubkeyResolver.sol deleted file mode 100644 index 7d22d546a..000000000 --- a/packages/l1-contracts/contracts/delegatableResolvers/profiles/PubkeyResolver.sol +++ /dev/null @@ -1,54 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.8.4; - -import "../ResolverBase.sol"; -import "./IPubkeyResolver.sol"; - -abstract contract PubkeyResolver is IPubkeyResolver, ResolverBase { - struct PublicKey { - bytes32 x; - bytes32 y; - } - - mapping(uint64 => mapping(bytes32 => PublicKey)) versionable_pubkeys; - - /** - * Sets the SECP256k1 public key associated with an ENS node. - * @param node The ENS node to query - * @param x the X coordinate of the curve point for the public key. - * @param y the Y coordinate of the curve point for the public key. - */ - function setPubkey( - bytes32 node, - bytes32 x, - bytes32 y - ) external virtual authorised(node) { - versionable_pubkeys[recordVersions[node]][node] = PublicKey(x, y); - emit PubkeyChanged(node, x, y); - } - - /** - * Returns the SECP256k1 public key associated with an ENS node. - * Defined in EIP 619. - * @param node The ENS node to query - * @return x The X coordinate of the curve point for the public key. - * @return y The Y coordinate of the curve point for the public key. - */ - function pubkey( - bytes32 node - ) external view virtual override returns (bytes32 x, bytes32 y) { - uint64 currentRecordVersion = recordVersions[node]; - return ( - versionable_pubkeys[currentRecordVersion][node].x, - versionable_pubkeys[currentRecordVersion][node].y - ); - } - - function supportsInterface( - bytes4 interfaceID - ) public view virtual override returns (bool) { - return - interfaceID == type(IPubkeyResolver).interfaceId || - super.supportsInterface(interfaceID); - } -} diff --git a/packages/l1-contracts/contracts/delegatableResolvers/profiles/TextResolver.sol b/packages/l1-contracts/contracts/delegatableResolvers/profiles/TextResolver.sol deleted file mode 100644 index 7f4d90618..000000000 --- a/packages/l1-contracts/contracts/delegatableResolvers/profiles/TextResolver.sol +++ /dev/null @@ -1,46 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.8.4; - -import "../ResolverBase.sol"; -import "./ITextResolver.sol"; - -abstract contract TextResolver is ITextResolver, ResolverBase { - mapping(uint64 => mapping(bytes32 => mapping(string => string))) versionable_texts; - - /** - * Sets the text data associated with an ENS node and key. - * May only be called by the owner of that node in the ENS registry. - * @param node The node to update. - * @param key The key to set. - * @param value The text data value to set. - */ - function setText( - bytes32 node, - string calldata key, - string calldata value - ) external virtual authorised(node) { - versionable_texts[recordVersions[node]][node][key] = value; - emit TextChanged(node, key, key, value); - } - - /** - * Returns the text data associated with an ENS node and key. - * @param node The ENS node to query. - * @param key The text data key to query. - * @return The associated text data. - */ - function text( - bytes32 node, - string calldata key - ) external view virtual override returns (string memory) { - return versionable_texts[recordVersions[node]][node][key]; - } - - function supportsInterface( - bytes4 interfaceID - ) public view virtual override returns (bool) { - return - interfaceID == type(ITextResolver).interfaceId || - super.supportsInterface(interfaceID); - } -}