diff --git a/.github/workflows/l1-contracts-ci.yaml b/.github/workflows/l1-contracts-ci.yaml index 1614e6120c..edf868639b 100644 --- a/.github/workflows/l1-contracts-ci.yaml +++ b/.github/workflows/l1-contracts-ci.yaml @@ -246,43 +246,25 @@ jobs: working-directory: tools run: rustup toolchain install - - name: Generate verifiers + - name: Generate Era verifiers working-directory: tools - run: cargo run + run: cargo run --bin zksync_verifier_contract_generator --release -- --variant era - - name: Compare L1VerifierPlonk.sol - run: diff tools/data/VerifierPlonk.sol l1-contracts/contracts/state-transition/verifiers/L1VerifierPlonk.sol + - name: Compare EraVerifierPlonk.sol + run: diff tools/data/EraVerifierPlonk.sol l1-contracts/contracts/state-transition/verifiers/EraVerifierPlonk.sol - - name: Compare VerifierFflonk.sol - run: diff tools/data/VerifierFflonk.sol l1-contracts/contracts/state-transition/verifiers/L1VerifierFflonk.sol + - name: Compare EraVerifierFflonk.sol + run: diff tools/data/EraVerifierFflonk.sol l1-contracts/contracts/state-transition/verifiers/EraVerifierFflonk.sol - check-verifier-generator-l2: - runs-on: ubuntu-latest - - steps: - - name: Checkout the repository - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Install rust - uses: actions-rs/toolchain@v1 - with: - toolchain: 1.72.0 - - - name: Install Rust toolchain - working-directory: tools - run: rustup toolchain install - - - name: Generate verifiers + - name: Generate ZKsyncOS verifiers working-directory: tools - run: cargo run -- --l2_mode + run: cargo run --bin zksync_verifier_contract_generator --release -- --variant zksync-os - - name: Compare L2VerifierPlonk.sol - run: diff tools/data/VerifierPlonk.sol l1-contracts/contracts/state-transition/verifiers/L2VerifierPlonk.sol + - name: Compare ZKsyncOSVerifierPlonk.sol + run: diff tools/data/ZKsyncOSVerifierPlonk.sol l1-contracts/contracts/state-transition/verifiers/ZKsyncOSVerifierPlonk.sol - - name: Compare L2VerifierFflonk.sol - run: diff tools/data/VerifierFflonk.sol l1-contracts/contracts/state-transition/verifiers/L2VerifierFflonk.sol + - name: Compare ZKsyncOSVerifierFflonk.sol + run: diff tools/data/ZKsyncOSVerifierFflonk.sol l1-contracts/contracts/state-transition/verifiers/ZKsyncOSVerifierFflonk.sol coverage: defaults: diff --git a/.github/workflows/l2-contracts-ci.yaml b/.github/workflows/l2-contracts-ci.yaml index 2bb8a148ee..1e296de7d7 100644 --- a/.github/workflows/l2-contracts-ci.yaml +++ b/.github/workflows/l2-contracts-ci.yaml @@ -73,46 +73,3 @@ jobs: - name: Lint run: yarn lint:check - - test: - needs: [build, lint] - runs-on: ubuntu-latest - - steps: - - name: Checkout the repository - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Use Node.js - uses: actions/setup-node@v3 - with: - node-version: 18.18.0 - cache: yarn - - - name: Install dependencies - run: yarn - - - name: Restore artifacts cache - uses: actions/cache/restore@v3 - with: - fail-on-cache-miss: true - key: artifacts-l2-${{ github.sha }} - path: | - da-contracts/out - l1-contracts/cache-forge - l1-contracts/out - l1-contracts/zkout - l2-contracts/cache-forge - l2-contracts/zkout - - - name: Install foundry-zksync - run: | - mkdir ./foundry-zksync - curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/nightly-ae913af65381734ad46c044a9495b67310bc77c4/foundry_nightly_linux_amd64.tar.gz - tar zxf foundry_nightly_linux_amd64.tar.gz -C ./foundry-zksync - chmod +x ./foundry-zksync/forge ./foundry-zksync/cast - echo "$PWD/foundry-zksync" >> $GITHUB_PATH - - - name: Run tests - run: yarn l2 test:foundry diff --git a/.github/workflows/slither.yaml b/.github/workflows/slither.yaml index e3532e59ea..7a1356739f 100644 --- a/.github/workflows/slither.yaml +++ b/.github/workflows/slither.yaml @@ -43,27 +43,21 @@ jobs: run: | rm -rf ./l1-contracts/contracts/state-transition/utils/ rm -rf ./l1-contracts/contracts/state-transition/verifiers/DualVerifier.sol - rm -rf ./l1-contracts/contracts/state-transition/verifiers/L1VerifierPlonk.sol - rm -rf ./l1-contracts/contracts/state-transition/verifiers/L1VerifierFflonk.sol - rm -rf ./l1-contracts/contracts/state-transition/verifiers/L2VerifierPlonk.sol - rm -rf ./l1-contracts/contracts/state-transition/verifiers/L2VerifierFflonk.sol + rm -rf ./l1-contracts/contracts/state-transition/verifiers/VerifierPlonk.sol + rm -rf ./l1-contracts/contracts/state-transition/verifiers/VerifierFflonk.sol rm -rf ./l1-contracts/contracts/state-transition/verifiers/TestnetVerifier.sol - rm -rf ./l1-contracts/contracts/state-transition/verifiers/L2TestnetVerifier.sol rm -rf ./l1-contracts/contracts/dev-contracts/test/PlonkVerifierTest.sol rm -rf ./l1-contracts/contracts/dev-contracts/test/PlonkVerifierRecursiveTest.sol - rm -rf ./l1-contracts/contracts/dev-contracts/test/L2PlonkVerifierTest.sol - rm -rf ./l1-contracts/contracts/dev-contracts/test/L2PlonkVerifierRecursiveTest.sol rm -rf ./l1-contracts/contracts/dev-contracts/test/VerifierTest.sol rm -rf ./l1-contracts/contracts/dev-contracts/test/VerifierRecursiveTest.sol rm -rf ./l1-contracts/contracts/dev-contracts/test/DummyPlonkVerifier.sol - rm -rf ./l1-contracts/contracts/dev-contracts/test/L2VerifierTest.sol - rm -rf ./l1-contracts/contracts/dev-contracts/test/L2VerifierRecursiveTest.sol rm -rf ./l1-contracts/contracts/state-transition/chain-deps/GatewayCTMDeployer.sol - name: Run Slither for L1 contracts working-directory: ./l1-contracts + # FIXME? --skip assembly because otherwise IR for DummyVerifierPlonk can't be generated (Slither issue). run: | - slither --config ./slither.config.json . + slither --config ./slither.config.json --skip-assembly . - name: Run Slither for L2 contracts working-directory: ./l2-contracts diff --git a/.github/workflows/system-contracts-ci.yaml b/.github/workflows/system-contracts-ci.yaml index cec5f90e87..16f59067f7 100644 --- a/.github/workflows/system-contracts-ci.yaml +++ b/.github/workflows/system-contracts-ci.yaml @@ -154,3 +154,33 @@ jobs: - name: Print output logs of anvil-zksync if: always() run: cat anvil_zksync.log + + test-contracts-foundry: + needs: [lint] + runs-on: ubuntu-latest + + steps: + - name: Checkout the repository + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Use Node.js + uses: actions/setup-node@v3 + with: + node-version: 18.18.0 + cache: yarn + + - name: Install dependencies + run: yarn + + - name: Install foundry-zksync + run: | + mkdir ./foundry-zksync + curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/nightly-5353a10345187933527fbad213d8c4f6500a775c/foundry_nightly_linux_amd64.tar.gz + tar zxf foundry_nightly_linux_amd64.tar.gz -C ./foundry-zksync + chmod +x ./foundry-zksync/forge ./foundry-zksync/cast + echo "$PWD/foundry-zksync" >> $GITHUB_PATH + + - name: Run tests using foundry + run: yarn sc test:foundry diff --git a/.gitmodules b/.gitmodules index f94071e535..7de12ef757 100644 --- a/.gitmodules +++ b/.gitmodules @@ -14,4 +14,4 @@ url = https://github.com/foundry-rs/forge-std [submodule "lib/@matterlabs/zksync-contracts"] path = lib/@matterlabs/zksync-contracts - url = https://github.com/matter-labs/v2-testnet-contracts + url = https://github.com/matter-labs/zksync-contracts diff --git a/AllContractsHashes.json b/AllContractsHashes.json index b2c190414a..1b109c6b8d 100644 --- a/AllContractsHashes.json +++ b/AllContractsHashes.json @@ -385,7 +385,7 @@ }, { "contractName": "l2-contracts/Address", - "zkBytecodeHash": "0x01000007a92dd917eafa3b4c77079cb67fa4aa1973e553e84faad5dbee52c06a", + "zkBytecodeHash": "0x01000007845a0dbe6db82eba20ff351078340155c267646f714a4c19340221f0", "zkBytecodePath": "/l2-contracts/zkout/Address.sol/Address.json", "evmBytecodeHash": null, "evmBytecodePath": null, @@ -393,7 +393,7 @@ }, { "contractName": "l2-contracts/AddressAliasHelper", - "zkBytecodeHash": "0x01000007e4f8bfa9534a3d2dc7fe091991eada37aebefa0cd517d0dbedc822ca", + "zkBytecodeHash": "0x010000076125b83f5d226667555642e6caaca1b08139fe16b5f4774972c94116", "zkBytecodePath": "/l2-contracts/zkout/AddressAliasHelper.sol/AddressAliasHelper.json", "evmBytecodeHash": null, "evmBytecodePath": null, @@ -401,7 +401,7 @@ }, { "contractName": "l2-contracts/AddressUpgradeable", - "zkBytecodeHash": "0x01000007416789c97109f2782faf830f95b2d6715d3a1b1fd80e68d1a82f6612", + "zkBytecodeHash": "0x010000074c76d0f9900737899c3cee58cdbe692764af066c6ffcdc541a9d5b96", "zkBytecodePath": "/l2-contracts/zkout/AddressUpgradeable.sol/AddressUpgradeable.json", "evmBytecodeHash": null, "evmBytecodePath": null, @@ -409,7 +409,7 @@ }, { "contractName": "l2-contracts/AvailL2DAValidator", - "zkBytecodeHash": "0x01000105f38d9b05c85ff1e3a9cc9c722c8aa0d8b5cd0951af93f58d0a7334d9", + "zkBytecodeHash": "0x01000105ab2d7d56d31cc2660436e81c7677ea0aaf49a29d16da5d5cd6edbaa5", "zkBytecodePath": "/l2-contracts/zkout/AvailL2DAValidator.sol/AvailL2DAValidator.json", "evmBytecodeHash": null, "evmBytecodePath": null, @@ -417,7 +417,7 @@ }, { "contractName": "l2-contracts/BootloaderUtilities", - "zkBytecodeHash": "0x010006f15729010e25b8ef74cc6b3e90637e50c407e701be45adddce4dcdcc6a", + "zkBytecodeHash": "0x010006f15988062517a16eb7e85b9fbba491223730a3671f787a40cad4f6b2df", "zkBytecodePath": "/l2-contracts/zkout/BootloaderUtilities.sol/BootloaderUtilities.json", "evmBytecodeHash": null, "evmBytecodePath": null, @@ -425,7 +425,7 @@ }, { "contractName": "l2-contracts/ConsensusRegistry", - "zkBytecodeHash": "0x0100046f04cc82e8938a5358c38e46dd6c4fad8d6771ba99ac1e19cceb370f86", + "zkBytecodeHash": "0x0100046fde0dc2d218ac77b8e85f4f9b25f230966be5d3c999f8b0fc6878ab61", "zkBytecodePath": "/l2-contracts/zkout/ConsensusRegistry.sol/ConsensusRegistry.json", "evmBytecodeHash": null, "evmBytecodePath": null, @@ -433,7 +433,7 @@ }, { "contractName": "l2-contracts/CountersUpgradeable", - "zkBytecodeHash": "0x01000007cf6313f5cd9e1c4743ea673fb26281eac0e0a5fbe88c45e4d7490822", + "zkBytecodeHash": "0x01000007acba5df5eba634aec44d34e14d5639887348d9a0298ca719c84ee74b", "zkBytecodePath": "/l2-contracts/zkout/CountersUpgradeable.sol/CountersUpgradeable.json", "evmBytecodeHash": null, "evmBytecodePath": null, @@ -441,7 +441,7 @@ }, { "contractName": "l2-contracts/ECDSAUpgradeable", - "zkBytecodeHash": "0x0100000766e73a134cc170c5ea9d645dfac2789365f7fa9dff3b4f4a7ee85cec", + "zkBytecodeHash": "0x0100000774b7e383ed0d349bae3c24cf2e97ae88bce50ebc55881f8578077183", "zkBytecodePath": "/l2-contracts/zkout/ECDSAUpgradeable.sol/ECDSAUpgradeable.json", "evmBytecodeHash": null, "evmBytecodePath": null, @@ -449,7 +449,7 @@ }, { "contractName": "l2-contracts/ERC1967Proxy", - "zkBytecodeHash": "0x0100008bb97236734cb0cf0406019727bc7ed169025dd513497107e7ae624c1a", + "zkBytecodeHash": "0x0100008b7507e79e50c4834a6a411ec998e11919d3b86a5075269a146e3c6742", "zkBytecodePath": "/l2-contracts/zkout/ERC1967Proxy.sol/ERC1967Proxy.json", "evmBytecodeHash": null, "evmBytecodePath": null, @@ -457,7 +457,7 @@ }, { "contractName": "l2-contracts/ERC20Upgradeable", - "zkBytecodeHash": "0x010000dd38f19bd04c9775dd8528c1b6a5a7353de8c336f10464494ad5891af4", + "zkBytecodeHash": "0x010000dd4545b842aceafc77b396f1f4df23ef02a3526db02f915b50ec1b46d6", "zkBytecodePath": "/l2-contracts/zkout/ERC20Upgradeable.sol/ERC20Upgradeable.json", "evmBytecodeHash": null, "evmBytecodePath": null, @@ -465,7 +465,7 @@ }, { "contractName": "l2-contracts/EfficientCall", - "zkBytecodeHash": "0x01000007b19ded4808f9a99880bdccc67c40eaa481a02c41eadb16307c6c3215", + "zkBytecodeHash": "0x010000073b1243ad83348f0e1a6220f1846a3e099b91f55576caabeb1b73be9c", "zkBytecodePath": "/l2-contracts/zkout/EfficientCall.sol/EfficientCall.json", "evmBytecodeHash": null, "evmBytecodePath": null, @@ -473,7 +473,7 @@ }, { "contractName": "l2-contracts/ForceDeployUpgrader", - "zkBytecodeHash": "0x0100005b5811383bd367c1657c94134aad2dd42bbf4766415e5d0b3c2e3c6595", + "zkBytecodeHash": "0x0100005b181b0231078fc5ce4eff5dd076c4bef2461c4fee61c7dfa957fbc20b", "zkBytecodePath": "/l2-contracts/zkout/ForceDeployUpgrader.sol/ForceDeployUpgrader.json", "evmBytecodeHash": null, "evmBytecodePath": null, @@ -481,7 +481,7 @@ }, { "contractName": "l2-contracts/L2ContractHelper", - "zkBytecodeHash": "0x01000007ebaa15e086a17169140ea37aac612d0f46a0e1658218923e9a159832", + "zkBytecodeHash": "0x01000007226d64eeda9a4e4fb5c6b544d24eec86050b92d3bb477e01e29e513b", "zkBytecodePath": "/l2-contracts/zkout/L2ContractHelper.sol/L2ContractHelper.json", "evmBytecodeHash": null, "evmBytecodePath": null, @@ -489,7 +489,7 @@ }, { "contractName": "l2-contracts/L2WETH", - "zkBytecodeHash": "0x010002e5255711cd67587f78a831972b3851e904e490ae53588ed9b95a100a56", + "zkBytecodeHash": "0x010002e57c79397ab6beba8ef611b8ba1e6b7685e8d96b062ded4711254f3947", "zkBytecodePath": "/l2-contracts/zkout/L2WETH.sol/L2WETH.json", "evmBytecodeHash": null, "evmBytecodePath": null, @@ -497,7 +497,7 @@ }, { "contractName": "l2-contracts/MathUpgradeable", - "zkBytecodeHash": "0x01000007db5185adf265a16bd500fc9d020754e324124b4314504be07f68f1f6", + "zkBytecodeHash": "0x01000007bb6b9fd701d9b7252a0332fc24f7f8bc258db582a34c535b9aa43134", "zkBytecodePath": "/l2-contracts/zkout/MathUpgradeable.sol/MathUpgradeable.json", "evmBytecodeHash": null, "evmBytecodePath": null, @@ -505,7 +505,7 @@ }, { "contractName": "l2-contracts/Multicall3", - "zkBytecodeHash": "0x010001f56cbdb72a6fe855c492168c55903d82df6a4613edc5ad01281df22862", + "zkBytecodeHash": "0x010001f5aec4505030d04f75946897d109e8c4d3380a5562b47569c4f665334a", "zkBytecodePath": "/l2-contracts/zkout/Multicall3.sol/Multicall3.json", "evmBytecodeHash": null, "evmBytecodePath": null, @@ -513,7 +513,7 @@ }, { "contractName": "l2-contracts/ProxyAdmin", - "zkBytecodeHash": "0x010000d9c029f5b79ef7b1f2e767d71ea15b6c1f0a1fbea6e772b4fa73bb3af0", + "zkBytecodeHash": "0x010000d967c570bf8166852a1a49de5dc1f19c143ad051df19acb060c74625f4", "zkBytecodePath": "/l2-contracts/zkout/ProxyAdmin.sol/ProxyAdmin.json", "evmBytecodeHash": null, "evmBytecodePath": null, @@ -521,7 +521,7 @@ }, { "contractName": "l2-contracts/RLPEncoder", - "zkBytecodeHash": "0x01000007348be6aba511598a7a370d60d5ebf0883818e96bb0c8bed38aea02e4", + "zkBytecodeHash": "0x01000007348af4ba4893d0d7b12b0c6a47249a19d2a308421c368be2c3068fe9", "zkBytecodePath": "/l2-contracts/zkout/RLPEncoder.sol/RLPEncoder.json", "evmBytecodeHash": null, "evmBytecodePath": null, @@ -529,7 +529,7 @@ }, { "contractName": "l2-contracts/RollupL2DAValidator", - "zkBytecodeHash": "0x0100014b21bb1475aa3215366f4883a85cfb90184e29d0b264bb9dfb14de9632", + "zkBytecodeHash": "0x0100014be40cb92ccf49de5c6823a69f20bf3cb044918e2f641ee9b5a206efbe", "zkBytecodePath": "/l2-contracts/zkout/RollupL2DAValidator.sol/RollupL2DAValidator.json", "evmBytecodeHash": null, "evmBytecodePath": null, @@ -537,7 +537,7 @@ }, { "contractName": "l2-contracts/SafeCast", - "zkBytecodeHash": "0x01000007f57bdc0022bce75eeefd40e3b485358ec294cbf21b4e5e7aa54a432b", + "zkBytecodeHash": "0x01000007adc284fdd11f72deaa372d5b878e501db665c480aeef919a7b16d140", "zkBytecodePath": "/l2-contracts/zkout/SafeCast.sol/SafeCast.json", "evmBytecodeHash": null, "evmBytecodePath": null, @@ -545,7 +545,7 @@ }, { "contractName": "l2-contracts/SafeERC20", - "zkBytecodeHash": "0x01000007c94c9308ac4b365db72d73033cf6e7af1f5d58e60f2604bcaa7f95ef", + "zkBytecodeHash": "0x0100000798c279452eb0ab285e0dd86c42dae73c7b66bffd4f0c81e856cbe983", "zkBytecodePath": "/l2-contracts/zkout/SafeERC20.sol/SafeERC20.json", "evmBytecodeHash": null, "evmBytecodePath": null, @@ -553,7 +553,7 @@ }, { "contractName": "l2-contracts/SignedMathUpgradeable", - "zkBytecodeHash": "0x01000007b4ed857a35aba3a0d8b489290fccbf3a1e6126d79f41e5a2e810c72f", + "zkBytecodeHash": "0x010000071191bd2ea19c00e954fcfe00e04d98858c19018a570e652963d00de5", "zkBytecodePath": "/l2-contracts/zkout/SignedMathUpgradeable.sol/SignedMathUpgradeable.json", "evmBytecodeHash": null, "evmBytecodePath": null, @@ -561,7 +561,7 @@ }, { "contractName": "l2-contracts/StdConstants", - "zkBytecodeHash": "0x0100000764ec2385536d811fc53c62ff697671a3f7002dfd655a4c7e79d315ef", + "zkBytecodeHash": "0x01000007198d982251be0e7f886b8682f8e18ddb580af8dbeb027a774022aadc", "zkBytecodePath": "/l2-contracts/zkout/StdConstants.sol/StdConstants.json", "evmBytecodeHash": null, "evmBytecodePath": null, @@ -569,7 +569,7 @@ }, { "contractName": "l2-contracts/stdError", - "zkBytecodeHash": "0x01000031d8221150561a8e6a1ac7cc028327fead2e55070bb8ddba5f875d082e", + "zkBytecodeHash": "0x01000031bdeff50f76fe47291ebb60224f2506e8b8df3073d40fd2351d9ffc71", "zkBytecodePath": "/l2-contracts/zkout/StdError.sol/stdError.json", "evmBytecodeHash": null, "evmBytecodePath": null, @@ -577,7 +577,7 @@ }, { "contractName": "l2-contracts/stdJson", - "zkBytecodeHash": "0x01000007755e4072008e37ea6696493c384d2d22b55eb100440375548b051353", + "zkBytecodeHash": "0x0100000771cbbe7389eede48429ad7c6d3060ce913b3cdd90b1a1b64fc1f21fd", "zkBytecodePath": "/l2-contracts/zkout/StdJson.sol/stdJson.json", "evmBytecodeHash": null, "evmBytecodePath": null, @@ -585,7 +585,7 @@ }, { "contractName": "l2-contracts/stdMath", - "zkBytecodeHash": "0x01000007860c62b3707bf3684450841bd054e29ee37c93725ff4af32313fa798", + "zkBytecodeHash": "0x01000007e82bc475e9bd1176611aa0d6a34cffbdf457756043b890a797ccd293", "zkBytecodePath": "/l2-contracts/zkout/StdMath.sol/stdMath.json", "evmBytecodeHash": null, "evmBytecodePath": null, @@ -593,7 +593,7 @@ }, { "contractName": "l2-contracts/stdStorage", - "zkBytecodeHash": "0x0100000726c60b8b14909681e8e7280b54544cb15e937dd84e2b67da855e4dc1", + "zkBytecodeHash": "0x010000079eaafd55e44e16f44efcbed5540665409d223f008ee9ca9cf01ed4b0", "zkBytecodePath": "/l2-contracts/zkout/StdStorage.sol/stdStorage.json", "evmBytecodeHash": null, "evmBytecodePath": null, @@ -601,7 +601,7 @@ }, { "contractName": "l2-contracts/stdStorageSafe", - "zkBytecodeHash": "0x01000007cae9453a69074253046f3027210ec97fc7350adc547011c6033d3964", + "zkBytecodeHash": "0x01000007b65adc81b7c0558a8878eab325e52bde62040b11d8263bc4c6938051", "zkBytecodePath": "/l2-contracts/zkout/StdStorage.sol/stdStorageSafe.json", "evmBytecodeHash": null, "evmBytecodePath": null, @@ -609,7 +609,7 @@ }, { "contractName": "l2-contracts/StdStyle", - "zkBytecodeHash": "0x0100000707858fdbddd5f7c71dc52b63119de9ec8b259a8cc7e779112e0dac81", + "zkBytecodeHash": "0x01000007be66567fa1acb9cc180b206b3b9e371ade99f535cbaf99fb556092c0", "zkBytecodePath": "/l2-contracts/zkout/StdStyle.sol/StdStyle.json", "evmBytecodeHash": null, "evmBytecodePath": null, @@ -617,7 +617,7 @@ }, { "contractName": "l2-contracts/stdToml", - "zkBytecodeHash": "0x01000007978ba12bb40ccb8875ba1a471f5e47d69a6e3304e5052450fed978b1", + "zkBytecodeHash": "0x01000007d4f218fc6c899e16a56a620572ad9cc7bc15a908bf958c122319d4d7", "zkBytecodePath": "/l2-contracts/zkout/StdToml.sol/stdToml.json", "evmBytecodeHash": null, "evmBytecodePath": null, @@ -625,7 +625,7 @@ }, { "contractName": "l2-contracts/StorageSlot", - "zkBytecodeHash": "0x01000007ab2afc94b64673b7d75478227ca1dabbb0f60b63feb3bdf07249456e", + "zkBytecodeHash": "0x01000007047f5218e161c453c854246002a27fbd3c17495863655da2d587a617", "zkBytecodePath": "/l2-contracts/zkout/StorageSlot.sol/StorageSlot.json", "evmBytecodeHash": null, "evmBytecodePath": null, @@ -633,7 +633,7 @@ }, { "contractName": "l2-contracts/StringsUpgradeable", - "zkBytecodeHash": "0x0100000749bdc91faeb6636df6158b6fc90c508bd87c05b6edbe103955ca25ac", + "zkBytecodeHash": "0x010000072c2c35f6b19ae624dc358b2ff7098fc98a0e7ee346186e07c6030362", "zkBytecodePath": "/l2-contracts/zkout/StringsUpgradeable.sol/StringsUpgradeable.json", "evmBytecodeHash": null, "evmBytecodePath": null, @@ -641,7 +641,7 @@ }, { "contractName": "l2-contracts/SystemContractHelper", - "zkBytecodeHash": "0x01000007e1250c31060b86168e1a096fc6434102801ca9113d045e2a8cfba2bd", + "zkBytecodeHash": "0x0100000748435f72901707bbf0508495262d06e4cdcee53b911cc893d7c17a20", "zkBytecodePath": "/l2-contracts/zkout/SystemContractHelper.sol/SystemContractHelper.json", "evmBytecodeHash": null, "evmBytecodePath": null, @@ -649,7 +649,7 @@ }, { "contractName": "l2-contracts/SystemContractsCaller", - "zkBytecodeHash": "0x0100000790d157277eb09118f28affa3c0e9808483a61e7bd082439349578a6e", + "zkBytecodeHash": "0x01000007ef55a1e44289eb9128dd691a871d9cc8cde326d0997711235ded2e87", "zkBytecodePath": "/l2-contracts/zkout/SystemContractsCaller.sol/SystemContractsCaller.json", "evmBytecodeHash": null, "evmBytecodePath": null, @@ -657,7 +657,7 @@ }, { "contractName": "l2-contracts/Utils", - "zkBytecodeHash": "0x01000007c755141583db5815150eb0feb9f46e621003e6229dddfbe8b29fec98", + "zkBytecodeHash": "0x01000007d8f1ce74e6e8a0545b03b323909db1cf78ed014c8ad75ff7e98df2f8", "zkBytecodePath": "/l2-contracts/zkout/SystemContractsCaller.sol/Utils.json", "evmBytecodeHash": null, "evmBytecodePath": null, @@ -665,7 +665,7 @@ }, { "contractName": "l2-contracts/TestStateDiffComposer", - "zkBytecodeHash": "0x010001e5f2f4b992278dcc672864c7dda3ad2900172c4fdd53d4d3ac2b48606e", + "zkBytecodeHash": "0x010001e59aabc0aad22c61597c0fa218f12ef149f2617b26c1a88186989a294a", "zkBytecodePath": "/l2-contracts/zkout/TestStateDiffComposer.sol/TestStateDiffComposer.json", "evmBytecodeHash": null, "evmBytecodePath": null, @@ -673,7 +673,7 @@ }, { "contractName": "l2-contracts/TestnetPaymaster", - "zkBytecodeHash": "0x010000b7476b64858fc3c1c6dbac933d53fc160c5b4f5541d93d632e87183b94", + "zkBytecodeHash": "0x010000b7b4e5af8b455143f367d167d115fffb47afef8ab92940491b587f9677", "zkBytecodePath": "/l2-contracts/zkout/TestnetPaymaster.sol/TestnetPaymaster.json", "evmBytecodeHash": null, "evmBytecodePath": null, @@ -681,7 +681,7 @@ }, { "contractName": "l2-contracts/TimestampAsserter", - "zkBytecodeHash": "0x0100001b6ba6acccad1a7a6c741dc9e443da33d5fa9da454086d4851acb24a92", + "zkBytecodeHash": "0x0100001bc9b9602acb4e1b4c753603c4e03356f342db7f0e301199c735d93fe7", "zkBytecodePath": "/l2-contracts/zkout/TimestampAsserter.sol/TimestampAsserter.json", "evmBytecodeHash": null, "evmBytecodePath": null, @@ -689,7 +689,7 @@ }, { "contractName": "l2-contracts/TransactionHelper", - "zkBytecodeHash": "0x010000070645dc73ca370a30e1ab0844b0fcf92ae834a2fb51aec90e45b1d2cf", + "zkBytecodeHash": "0x0100000763836004a0881bb173d05a9b11d6e6f75f98745fb20057545d4bd382", "zkBytecodePath": "/l2-contracts/zkout/TransactionHelper.sol/TransactionHelper.json", "evmBytecodeHash": null, "evmBytecodePath": null, @@ -697,7 +697,7 @@ }, { "contractName": "l2-contracts/TransparentUpgradeableProxy", - "zkBytecodeHash": "0x0100012fa3893aa22757bc5e2d550fdcd0a4d618fbd5f6d32f750c67953886f3", + "zkBytecodeHash": "0x0100012fc8a601fbd659a960bbfa7938f28d4735064d4d6a581c2ec894fba631", "zkBytecodePath": "/l2-contracts/zkout/TransparentUpgradeableProxy.sol/TransparentUpgradeableProxy.json", "evmBytecodeHash": null, "evmBytecodePath": null, @@ -705,7 +705,7 @@ }, { "contractName": "l2-contracts/Utils", - "zkBytecodeHash": "0x010000075bda8ff43774719110cd23cc18c90b6ef40edd39ade85a9b1f4dcc35", + "zkBytecodeHash": "0x010000079c44f7cd3ba58fd9dbabb75b24ae3d48bb5fad58cb02182d71818636", "zkBytecodePath": "/l2-contracts/zkout/Utils.sol/Utils.json", "evmBytecodeHash": null, "evmBytecodePath": null, @@ -713,7 +713,7 @@ }, { "contractName": "l2-contracts/ValidiumL2DAValidator", - "zkBytecodeHash": "0x0100001514035ffeada9f49d08e3fc7bd1035416a5e7482e05a25137d770ee16", + "zkBytecodeHash": "0x010000157f293db52cb706a50a05b344ae45713b940fac95a17e23e1e9f9bac0", "zkBytecodePath": "/l2-contracts/zkout/ValidiumL2DAValidator.sol/ValidiumL2DAValidator.json", "evmBytecodeHash": null, "evmBytecodePath": null, @@ -721,7 +721,7 @@ }, { "contractName": "l2-contracts/console", - "zkBytecodeHash": "0x010000076b91d29ad4ffb9f0b13b4f09f636f97369e790d2154f1ac0d7872ebb", + "zkBytecodeHash": "0x01000007f435304ca6a9f0f53b3cac2b47011b5cc01d6f5bbb79f42fe6992041", "zkBytecodePath": "/l2-contracts/zkout/console.sol/console.json", "evmBytecodeHash": null, "evmBytecodePath": null, @@ -729,892 +729,12 @@ }, { "contractName": "l2-contracts/safeconsole", - "zkBytecodeHash": "0x0100000764f8263c26e3c0aef76a265808cff3053dd1d7104bf29cb881d45c47", + "zkBytecodeHash": "0x01000007ea0217e9594391c96e38acfdd91f0b56b2fe1b89ad80179d1859c587", "zkBytecodePath": "/l2-contracts/zkout/safeconsole.sol/safeconsole.json", "evmBytecodeHash": null, "evmBytecodePath": null, "evmDeployedBytecodeHash": null }, - { - "contractName": "l1-contracts/AccessControlRestriction", - "zkBytecodeHash": "0x010002954dfb5e7b6d8202bcb9730694ea17d6d258afe9e3368cd51d0a66682d", - "zkBytecodePath": "/l1-contracts/zkout/AccessControlRestriction.sol/AccessControlRestriction.json", - "evmBytecodeHash": "0x73a9cafcfa99f2e50f0177e0f301aab141a90b1e667068d3d246d8a1d2b219a9", - "evmBytecodePath": "/l1-contracts/out/AccessControlRestriction.sol/AccessControlRestriction.json", - "evmDeployedBytecodeHash": "0xd8b6a2783d982091a9e30d345de5184a5dafc76abb41576599656431a15ce197" - }, - { - "contractName": "l1-contracts/Address", - "zkBytecodeHash": "0x01000007920a76c05c5b8a6eb413a4f61d7406617edbda6fa1e6fda77c58717a", - "zkBytecodePath": "/l1-contracts/zkout/Address.sol/Address.json", - "evmBytecodeHash": "0x50642dd87abdb731d22b845d534a61bbe9c5145492fc6ac2ad5de86e1332cc71", - "evmBytecodePath": "/l1-contracts/out/Address.sol/Address.json", - "evmDeployedBytecodeHash": "0x816f1255a594513f2ebe09ca6f43588b0c34892a1e6e5c235b55e5fa28487816" - }, - { - "contractName": "l1-contracts/AddressAliasHelper", - "zkBytecodeHash": "0x010000078fadbc6298ac00b9ee69ced598d5c9454899747ac6f08a29b86110f9", - "zkBytecodePath": "/l1-contracts/zkout/AddressAliasHelper.sol/AddressAliasHelper.json", - "evmBytecodeHash": "0xc746891e19890ce2a4eec783c469f396838acd66d88642095d2ef3f0401cee99", - "evmBytecodePath": "/l1-contracts/out/AddressAliasHelper.sol/AddressAliasHelper.json", - "evmDeployedBytecodeHash": "0x29bafdde6756da17a3b05174ea233f68abd1849ea534f99c4ab27a2966d29d07" - }, - { - "contractName": "l1-contracts/AddressUpgradeable", - "zkBytecodeHash": "0x01000007dd0acb212a28acc95b5ec6fe781397ecee8013ec1953673209b7cd2b", - "zkBytecodePath": "/l1-contracts/zkout/AddressUpgradeable.sol/AddressUpgradeable.json", - "evmBytecodeHash": "0x9bf8386f143fc1f2f2d174737097e0256fef2b126feebe6f04e06300e8d0a817", - "evmBytecodePath": "/l1-contracts/out/AddressUpgradeable.sol/AddressUpgradeable.json", - "evmDeployedBytecodeHash": "0x9fc2a478f1de0921735a2cf334e9665a96195bcddf21221b31c5ac87d9ba76a7" - }, - { - "contractName": "l1-contracts/AdminFacet", - "zkBytecodeHash": "0x010007b5334e668e12661c2be93c862bd6d89b92a1ebe0cc4fe86aa343cc0ec5", - "zkBytecodePath": "/l1-contracts/zkout/Admin.sol/AdminFacet.json", - "evmBytecodeHash": "0x850fccdf79db21064fa269736902aaf03c1a6fde9f86c7ebc4bac2e5e53d8184", - "evmBytecodePath": "/l1-contracts/out/Admin.sol/AdminFacet.json", - "evmDeployedBytecodeHash": "0x65480e64c68471e1951aceb5ed43eced4b9dbd38bd04854958e768075a7d03f0" - }, - { - "contractName": "l1-contracts/Arrays", - "zkBytecodeHash": "0x01000007ec54bcf91f8c27aa52160019edf07d15a0873f8757f565fbe77be64f", - "zkBytecodePath": "/l1-contracts/zkout/Arrays.sol/Arrays.json", - "evmBytecodeHash": "0x8cdf407dac3e3d354b380a5cd910a01622b4ef0f812ab438bf1b6c583212698e", - "evmBytecodePath": "/l1-contracts/out/Arrays.sol/Arrays.json", - "evmDeployedBytecodeHash": "0x7080ea75be8c190a0727ac4695d2b3cdb77a6ddd9fe1eb16a094ce0f918f4167" - }, - { - "contractName": "l1-contracts/BatchDecoder", - "zkBytecodeHash": "0x01000007452fdfc6919e39b7306a817b614493156eb187505a5b4a296fba4c59", - "zkBytecodePath": "/l1-contracts/zkout/BatchDecoder.sol/BatchDecoder.json", - "evmBytecodeHash": "0x5499ea6cdb2908df091be61e62a57ce4e0850b7d92f2e13ad4d80c30c8d1a154", - "evmBytecodePath": "/l1-contracts/out/BatchDecoder.sol/BatchDecoder.json", - "evmDeployedBytecodeHash": "0xddd5ab3218fb30854215ce165df95f4f3fc6db6848f605a8dcd3f80c32418d05" - }, - { - "contractName": "l1-contracts/BeaconProxy", - "zkBytecodeHash": "0x010000f1477ebc7355591c664c501757b31e9cd0025d565546fc0054f28a6411", - "zkBytecodePath": "/l1-contracts/zkout/BeaconProxy.sol/BeaconProxy.json", - "evmBytecodeHash": "0x70fe6fb533ade74d2bf2cd6ba8e7a10c9bf9831c65b6d01ac968ada913ca5e88", - "evmBytecodePath": "/l1-contracts/out/BeaconProxy.sol/BeaconProxy.json", - "evmDeployedBytecodeHash": "0xd98972a966e6a38b007ca6c285511cbeb70fbebd6a4dbab9b0ba94c29a60392a" - }, - { - "contractName": "l1-contracts/BridgeHelper", - "zkBytecodeHash": "0x0100000749feca609d10d897d325305bca8bb57b1ea0211d56ed0baa488a495e", - "zkBytecodePath": "/l1-contracts/zkout/BridgeHelper.sol/BridgeHelper.json", - "evmBytecodeHash": "0x56217a5771bb03a62f7e565b5a7c1c8eed503876360fa0fdca546c0b396b8965", - "evmBytecodePath": "/l1-contracts/out/BridgeHelper.sol/BridgeHelper.json", - "evmDeployedBytecodeHash": "0x1e2650d7fffe502e0cfaca53a231e2f6431ed31633a469ae7c3e23fc0b4d2b55" - }, - { - "contractName": "l1-contracts/BridgedStandardERC20", - "zkBytecodeHash": "0x010004ed850c2062ea78b93325fb4dd654ed27de35423a7d44b3978b47f1aa89", - "zkBytecodePath": "/l1-contracts/zkout/BridgedStandardERC20.sol/BridgedStandardERC20.json", - "evmBytecodeHash": "0xe2665fdf6ef129ed4270abefd20cc967468f0b594334cdb8acd56bc3d71780ea", - "evmBytecodePath": "/l1-contracts/out/BridgedStandardERC20.sol/BridgedStandardERC20.json", - "evmDeployedBytecodeHash": "0xd819c028797ec0f4e10e2f8ed2a6c3aa692d7430322f4414aae552c7872bf94d" - }, - { - "contractName": "l1-contracts/Bridgehub", - "zkBytecodeHash": "0x010007c1845124aaf94ed994647d91d9b0d4e428d80bfd9a570267f65c24ed7a", - "zkBytecodePath": "/l1-contracts/zkout/Bridgehub.sol/Bridgehub.json", - "evmBytecodeHash": "0x89be061e3ac62465da14d2a87551ddeb8cf7dedcd276f184509286c9159979db", - "evmBytecodePath": "/l1-contracts/out/Bridgehub.sol/Bridgehub.json", - "evmDeployedBytecodeHash": "0x7551ab98814b131211ec3b115d23ef49b764366371bab528d0821d99594d8d26" - }, - { - "contractName": "l1-contracts/BytecodesSupplier", - "zkBytecodeHash": "0x010000bfe2e4cdf8bb5a3e44efa481c55005034b2b4339d07e0aa3537fe6ff2d", - "zkBytecodePath": "/l1-contracts/zkout/BytecodesSupplier.sol/BytecodesSupplier.json", - "evmBytecodeHash": "0xf14893a1eb900825a254be603396e3b7cbb905ecde2c59efc97a35c37fb43806", - "evmBytecodePath": "/l1-contracts/out/BytecodesSupplier.sol/BytecodesSupplier.json", - "evmDeployedBytecodeHash": "0x16843127f45fdfca670eecd19c9ec8823554599e2b43d1c8d4d0178ac63a6d27" - }, - { - "contractName": "l1-contracts/CTMDeploymentTracker", - "zkBytecodeHash": "0x010001bb94c973e764b013e19d2d84e300b9e8685f23597ed553074a44c5629e", - "zkBytecodePath": "/l1-contracts/zkout/CTMDeploymentTracker.sol/CTMDeploymentTracker.json", - "evmBytecodeHash": "0x56bb17266ae1c2c57e2c664d10a12c91e54cddf596a817bdf8b79775228a45cd", - "evmBytecodePath": "/l1-contracts/out/CTMDeploymentTracker.sol/CTMDeploymentTracker.json", - "evmDeployedBytecodeHash": "0x8f639bb4f61a636cd8386790d8acace19be592cb03fd871bfefbcd5b30105894" - }, - { - "contractName": "l1-contracts/ChainAdmin", - "zkBytecodeHash": "0x0100019b4076cebc6397174d0778e0b69a413500f132ad559fe14c31b66e8a76", - "zkBytecodePath": "/l1-contracts/zkout/ChainAdmin.sol/ChainAdmin.json", - "evmBytecodeHash": "0x97edf926749a2210dbc7a59f3798894973f34ab94f13fb894807f301bc4879fa", - "evmBytecodePath": "/l1-contracts/out/ChainAdmin.sol/ChainAdmin.json", - "evmDeployedBytecodeHash": "0xf3a2c3efbf8d8be929140dacf6820b60b6c60f1bc036baa68089876ef22c546e" - }, - { - "contractName": "l1-contracts/ChainAdminOwnable", - "zkBytecodeHash": "0x01000121ae014f9f70f8c00c2fa5005f8e3218a4715c03ef198e234b6b5f7e14", - "zkBytecodePath": "/l1-contracts/zkout/ChainAdminOwnable.sol/ChainAdminOwnable.json", - "evmBytecodeHash": "0xf606b90d7cdd4d503cd2a1f6c5209edce588cadb49f9615b8336221ca2c99e9d", - "evmBytecodePath": "/l1-contracts/out/ChainAdminOwnable.sol/ChainAdminOwnable.json", - "evmDeployedBytecodeHash": "0x3886a8c4bd2190df943fc344570ffc8bf774608bf694afe3a6164c98857871c0" - }, - { - "contractName": "l1-contracts/ChainAssetHandler", - "zkBytecodeHash": "0x0100039f60c7a141b288ce9128e4875b5b26229467a3c713fc41f8f750bbd615", - "zkBytecodePath": "/l1-contracts/zkout/ChainAssetHandler.sol/ChainAssetHandler.json", - "evmBytecodeHash": "0x9a742a2954376a267c245e7e383a3791e1bec174f3ba46351c59055da5a3beb9", - "evmBytecodePath": "/l1-contracts/out/ChainAssetHandler.sol/ChainAssetHandler.json", - "evmDeployedBytecodeHash": "0xf48b095e93764eda4c764fd61466cf8aa3cd0d26c8df10381fb0e8c93855d90b" - }, - { - "contractName": "l1-contracts/ChainRegistrar", - "zkBytecodeHash": "0x010001fbe83aacbb0bff25dce878c06f7f26c642bc80648b520649a5fff11533", - "zkBytecodePath": "/l1-contracts/zkout/ChainRegistrar.sol/ChainRegistrar.json", - "evmBytecodeHash": "0x7becafb7102cc91c0d2c0319f34e8facfd0968fc10f7b343c9e63462321eaeb7", - "evmBytecodePath": "/l1-contracts/out/ChainRegistrar.sol/ChainRegistrar.json", - "evmDeployedBytecodeHash": "0xcd82680d6fb72f4072548c4ecfd3ebbe6af723b2a9ecb08cabcacbdab6d1c228" - }, - { - "contractName": "l1-contracts/ChainTypeManager", - "zkBytecodeHash": "0x0100076f1acaab647645c26e9edd610ef55a79664bcb2cb5dadc2d462cb9b539", - "zkBytecodePath": "/l1-contracts/zkout/ChainTypeManager.sol/ChainTypeManager.json", - "evmBytecodeHash": "0x9261f3dd4604ebfbf8ec92cf1e1f6d90328a3c8066d0f2cef76db2114f4b98d6", - "evmBytecodePath": "/l1-contracts/out/ChainTypeManager.sol/ChainTypeManager.json", - "evmDeployedBytecodeHash": "0xaf04999f8587b2cfacfda47bb30cebbfadec7ba53741e10ed723a4fff8d9a4dd" - }, - { - "contractName": "l1-contracts/CountersUpgradeable", - "zkBytecodeHash": "0x010000076df32a9bc96f42e9f3855c4229b8786a032635908de44c9ceb7bbe91", - "zkBytecodePath": "/l1-contracts/zkout/CountersUpgradeable.sol/CountersUpgradeable.json", - "evmBytecodeHash": "0x2db8e6cd3078849ce3926a8eb9841fb5fd9d5ffe7d1d832cd84b8c7ae267c7e9", - "evmBytecodePath": "/l1-contracts/out/CountersUpgradeable.sol/CountersUpgradeable.json", - "evmDeployedBytecodeHash": "0x5554cc69a5d787990518c0dfb3eb3aeb5fda0ac7d25d756bfa6faa3644fb7ecc" - }, - { - "contractName": "l1-contracts/Create2", - "zkBytecodeHash": "0x01000007f2c54e57fe601024b571320f761a2811d849b0dfd82f4a43ac289a0d", - "zkBytecodePath": "/l1-contracts/zkout/Create2.sol/Create2.json", - "evmBytecodeHash": "0xbf8297a1cb4ff4fc6dcd199d8a66b32f7b21b9e9a18d6d635d4e71e0d54fcc63", - "evmBytecodePath": "/l1-contracts/out/Create2.sol/Create2.json", - "evmDeployedBytecodeHash": "0xed794d8d33062a4df19b10cb44c2eb16b1c89bf1227becbef7622365b9d6d1e5" - }, - { - "contractName": "l1-contracts/DataEncoding", - "zkBytecodeHash": "0x01000007503de9850b46e3d924d669b6b69154e1271147386c2623363392381a", - "zkBytecodePath": "/l1-contracts/zkout/DataEncoding.sol/DataEncoding.json", - "evmBytecodeHash": "0x1e0c5e94b3015caf4b0ff6c1cdb6d91e05d60ea6c9764e249a5381cca25193ae", - "evmBytecodePath": "/l1-contracts/out/DataEncoding.sol/DataEncoding.json", - "evmDeployedBytecodeHash": "0xb699fdb040231945c383327b9cea1a7f74f8f5879452fdf53facb91def0d8621" - }, - { - "contractName": "l1-contracts/DefaultUpgrade", - "zkBytecodeHash": "0x010002c7e5570f05685622ea717e3e3bb4ab015bce1c01ecb1a84b3e890d616c", - "zkBytecodePath": "/l1-contracts/zkout/DefaultUpgrade.sol/DefaultUpgrade.json", - "evmBytecodeHash": "0xa9e80a8efd95814a934e0c9497eb1d1d06ac52d6ba41978d73b788dbee82acee", - "evmBytecodePath": "/l1-contracts/out/DefaultUpgrade.sol/DefaultUpgrade.json", - "evmDeployedBytecodeHash": "0xc955b02967e4006183adf17a075b34702d1d324ef3161dd669add4bce9f579e6" - }, - { - "contractName": "l1-contracts/Diamond", - "zkBytecodeHash": "0x010000077f5dc340b0f3e6bf9e939aac1276e4c69f00f0e515701c04517cfbe8", - "zkBytecodePath": "/l1-contracts/zkout/Diamond.sol/Diamond.json", - "evmBytecodeHash": "0xfaa07386a2355489f5d3eeba1d371fc8e82c91407c5cabb32b36931556b02895", - "evmBytecodePath": "/l1-contracts/out/Diamond.sol/Diamond.json", - "evmDeployedBytecodeHash": "0x45ec689ac5f6096193de62ca0dc7b2751c52c6972142ae1019dba8d350cb9f10" - }, - { - "contractName": "l1-contracts/DiamondInit", - "zkBytecodeHash": "0x0100006db77153311ad1b8ef97199702f74135d5ab087854fd207d2ebdd510b5", - "zkBytecodePath": "/l1-contracts/zkout/DiamondInit.sol/DiamondInit.json", - "evmBytecodeHash": "0x0803ec73a9eec3ac926953861a844eb36d7f6b29f3cba4f6f1a70696d55743b6", - "evmBytecodePath": "/l1-contracts/out/DiamondInit.sol/DiamondInit.json", - "evmDeployedBytecodeHash": "0x38515286d7072635da3f45b870681470aefa97a6735ebe1b0d4a07e8eef02e2a" - }, - { - "contractName": "l1-contracts/DiamondProxy", - "zkBytecodeHash": "0x01000245c7f7ee35d89ad080e2cbdb780224da962bd33e4edadf7874ee77dbbb", - "zkBytecodePath": "/l1-contracts/zkout/DiamondProxy.sol/DiamondProxy.json", - "evmBytecodeHash": "0x08c4e94b9010f9d4e0aa605496a05d9cb8585deab461015dc10f2e2d1b69eea4", - "evmBytecodePath": "/l1-contracts/out/DiamondProxy.sol/DiamondProxy.json", - "evmDeployedBytecodeHash": "0xe556af479fed97520761396e584f4cc8ac65c99977c9885e276a08af8cf68b60" - }, - { - "contractName": "l1-contracts/DualVerifier", - "zkBytecodeHash": "0x010000d30ce4136267fe968979e2e98f302610cdb363f85f63a1fc9816f8c52a", - "zkBytecodePath": "/l1-contracts/zkout/DualVerifier.sol/DualVerifier.json", - "evmBytecodeHash": "0x17fd693bea7c174575a0960c8b783e41c70b18dc408f848d9d333d1ae891f514", - "evmBytecodePath": "/l1-contracts/out/DualVerifier.sol/DualVerifier.json", - "evmDeployedBytecodeHash": "0xb3307c3c7badcaf429798fccb6dcabbb74f741f0ff635e1348d07f4ce8478e0e" - }, - { - "contractName": "l1-contracts/DynamicIncrementalMerkle", - "zkBytecodeHash": "0x01000007951ababa7dc29aafd8e0e0f61af9ad3bb71678c43592a499509572d0", - "zkBytecodePath": "/l1-contracts/zkout/DynamicIncrementalMerkle.sol/DynamicIncrementalMerkle.json", - "evmBytecodeHash": "0x1411a42ca0a6a363fcc35aef3548d0bf82e94746fcfa34c65a356e288401d12f", - "evmBytecodePath": "/l1-contracts/out/DynamicIncrementalMerkle.sol/DynamicIncrementalMerkle.json", - "evmDeployedBytecodeHash": "0x35b9c18410eac52c54a70cac0f8f77a61893e5408d612eeeab4ddd45b77a5ab3" - }, - { - "contractName": "l1-contracts/ECDSAUpgradeable", - "zkBytecodeHash": "0x01000007060437b2f23712de7b3e19db54d9e77235802daf5be2e79f723f32af", - "zkBytecodePath": "/l1-contracts/zkout/ECDSAUpgradeable.sol/ECDSAUpgradeable.json", - "evmBytecodeHash": "0x4dc94826ab3488229991b6a087799cb74c70e08ea543a0b4a79b83cd3738774b", - "evmBytecodePath": "/l1-contracts/out/ECDSAUpgradeable.sol/ECDSAUpgradeable.json", - "evmDeployedBytecodeHash": "0x5f8548a188370531952b89772e90dd048fd6f5f17518bf03f7207d9f9f9e1841" - }, - { - "contractName": "l1-contracts/ERC1967Proxy", - "zkBytecodeHash": "0x010000995b4bcbf4b9d2eede849e79ef7f2019fdbfca92122e14bcd8f21172ee", - "zkBytecodePath": "/l1-contracts/zkout/ERC1967Proxy.sol/ERC1967Proxy.json", - "evmBytecodeHash": "0x76536d2506147297710c71ebb9b13960c8f7aaddd512d48ccd4fe8ac00d6ddc7", - "evmBytecodePath": "/l1-contracts/out/ERC1967Proxy.sol/ERC1967Proxy.json", - "evmDeployedBytecodeHash": "0x95eebd4d5e1c0c7747e3f02a11196ef6bf2096c1cbfb847291cc70481b9ae4c0" - }, - { - "contractName": "l1-contracts/ERC20", - "zkBytecodeHash": "0x0100014f180f4dd3eb99a9434dbc88812b1d0d009b4923a2c8bb1734b406dc06", - "zkBytecodePath": "/l1-contracts/zkout/ERC20.sol/ERC20.json", - "evmBytecodeHash": "0xfdf9dcaa39e27121a9fb4c600f83e3071bea4322fc4c017116eca67995b1c1a4", - "evmBytecodePath": "/l1-contracts/out/ERC20.sol/ERC20.json", - "evmDeployedBytecodeHash": "0xc06fb68d0c98fb02aa89485a16a0972d2858547af602234de6fbcab34663cd1c" - }, - { - "contractName": "l1-contracts/ERC20Upgradeable", - "zkBytecodeHash": "0x010000e522ee538248b60f5b06dc3a55ab2639adecc19bd76edf57a4379dba0e", - "zkBytecodePath": "/l1-contracts/zkout/ERC20Upgradeable.sol/ERC20Upgradeable.json", - "evmBytecodeHash": "0xf043b0e2a047d3cc7fa1a836ec4044b72c649718c0ce9e2505058abb6690c3be", - "evmBytecodePath": "/l1-contracts/out/ERC20Upgradeable.sol/ERC20Upgradeable.json", - "evmDeployedBytecodeHash": "0x4b1e528e3ec0896a541d0abb856de38b7ff3c2ab94ab0964c8ad02019bd56b1a" - }, - { - "contractName": "l1-contracts/EnumerableMap", - "zkBytecodeHash": "0x01000007a146063593c95a2bbfdd41cea358ddc106150b57d75a197d51845684", - "zkBytecodePath": "/l1-contracts/zkout/EnumerableMap.sol/EnumerableMap.json", - "evmBytecodeHash": "0xaad7760e04e0f2fa7a36e860d0a388e6ceca1f0db2f8ac447404af60ca1d3053", - "evmBytecodePath": "/l1-contracts/out/EnumerableMap.sol/EnumerableMap.json", - "evmDeployedBytecodeHash": "0x0aa3f2c62fd0c9b30357162bf66941e800c7ab424912d041c5ff6273d257f0cc" - }, - { - "contractName": "l1-contracts/EnumerableSet", - "zkBytecodeHash": "0x01000007b58459aa05910ae26cf0ae5c1df59de5bd23590c8553f007c47a3240", - "zkBytecodePath": "/l1-contracts/zkout/EnumerableSet.sol/EnumerableSet.json", - "evmBytecodeHash": "0xb08a80781a7a39e6223e61ff850923e15a445dcf501efb19821cf7e906126cfa", - "evmBytecodePath": "/l1-contracts/out/EnumerableSet.sol/EnumerableSet.json", - "evmDeployedBytecodeHash": "0x8152a86ec5da5cb0766a3ad871b04ee4e67e95969d6736dfd01b144436fb4f6c" - }, - { - "contractName": "l1-contracts/EnumerableSetUpgradeable", - "zkBytecodeHash": "0x0100000706bfef0b25446c02d345113acdde8bf899d45ebd46b1efa40fce2ac8", - "zkBytecodePath": "/l1-contracts/zkout/EnumerableSetUpgradeable.sol/EnumerableSetUpgradeable.json", - "evmBytecodeHash": "0xdecae3f6fd4d8f4f3961e32291c54e6ae0a0ca2146d56f8a52dc97eefb39a4e7", - "evmBytecodePath": "/l1-contracts/out/EnumerableSetUpgradeable.sol/EnumerableSetUpgradeable.json", - "evmDeployedBytecodeHash": "0xac0ab9b347d51da6f463f09306e3b5d763e92f5cbe1f324f51a716eb5ecaac24" - }, - { - "contractName": "l1-contracts/ExecutorFacet", - "zkBytecodeHash": "0x010006eb149dfdaba4ea454fd26c1c00918c59ca5a7c7132694233c1eadf7780", - "zkBytecodePath": "/l1-contracts/zkout/Executor.sol/ExecutorFacet.json", - "evmBytecodeHash": "0x678081557a5cbd61c632cd36be335da4e7737c885a180eb393327d3c9b8003e2", - "evmBytecodePath": "/l1-contracts/out/Executor.sol/ExecutorFacet.json", - "evmDeployedBytecodeHash": "0x47029fffbbe7179bc5d65306323da374b3a86306cb7e07db799e97b5dad921b2" - }, - { - "contractName": "l1-contracts/FullMerkle", - "zkBytecodeHash": "0x01000007967466925c2fcc8ac58b02492356e4614dca5aa5bce6764538905cbf", - "zkBytecodePath": "/l1-contracts/zkout/FullMerkle.sol/FullMerkle.json", - "evmBytecodeHash": "0x83fb228a7aafa4bcf9deee78606c9b8c3647df62672bc1c2af8e8cb6be5bdbf8", - "evmBytecodePath": "/l1-contracts/out/FullMerkle.sol/FullMerkle.json", - "evmDeployedBytecodeHash": "0x45f9b730dc8ae0d9c3f688e536f1da2cd96dd2c6970fc530f09c8d80b490b0ff" - }, - { - "contractName": "l1-contracts/GatewayCTMDeployer", - "zkBytecodeHash": "0x010003edc52326e2a5fde49aa80b0b95e4763574f6b8ca2e1bd4b059e6e8deec", - "zkBytecodePath": "/l1-contracts/zkout/GatewayCTMDeployer.sol/GatewayCTMDeployer.json", - "evmBytecodeHash": "0x04774c5c64c44616cedd442f13182acba12c4b7f8446de4b816a2830404c875b", - "evmBytecodePath": "/l1-contracts/out/GatewayCTMDeployer.sol/GatewayCTMDeployer.json", - "evmDeployedBytecodeHash": "0x11195b22a73d4b4276b5ee34376cdd61b7513fa3e45256deee08c6b2ad881788" - }, - { - "contractName": "l1-contracts/GatewayTransactionFilterer", - "zkBytecodeHash": "0x0100013d1c9ac5939eccb5385b5d6032d71bb08e08accb5713fecb71f1f6bbda", - "zkBytecodePath": "/l1-contracts/zkout/GatewayTransactionFilterer.sol/GatewayTransactionFilterer.json", - "evmBytecodeHash": "0xff12582d13f54a0e6062537f6b8b73033affdcefa1baa2a00880f27b38787f21", - "evmBytecodePath": "/l1-contracts/out/GatewayTransactionFilterer.sol/GatewayTransactionFilterer.json", - "evmDeployedBytecodeHash": "0x47f4de8c67c5e301e210fd5b60056382cadc685cd6aee0499b581a9b0c265e18" - }, - { - "contractName": "l1-contracts/GatewayUpgrade", - "zkBytecodeHash": "0x010005810e99fa2c1562c0e2e4a843cf1aa85a5403aa2cd4746170d58120f3be", - "zkBytecodePath": "/l1-contracts/zkout/GatewayUpgrade.sol/GatewayUpgrade.json", - "evmBytecodeHash": "0xa1a34d3b91b500a49ca6b97db22b5bff0cc88b0ca83945c850dd8269730af7ec", - "evmBytecodePath": "/l1-contracts/out/GatewayUpgrade.sol/GatewayUpgrade.json", - "evmDeployedBytecodeHash": "0x9382397e2581cfeb64153836c08c9b0c6fc3934c02a7f4a4b6751053f613b3c6" - }, - { - "contractName": "l1-contracts/GettersFacet", - "zkBytecodeHash": "0x010001af79f5874d8dc172fb58f7953c138b4f25e47a2006141d47d0c281b607", - "zkBytecodePath": "/l1-contracts/zkout/Getters.sol/GettersFacet.json", - "evmBytecodeHash": "0xafc9d5c8a40f9f025e0795689599d93e0aad8131810753e012140317a425f7c4", - "evmBytecodePath": "/l1-contracts/out/Getters.sol/GettersFacet.json", - "evmDeployedBytecodeHash": "0x8a9ad784f30876a463a590f23ebb94a5d8a15bdcf54826619be622b93aa194bd" - }, - { - "contractName": "l1-contracts/Governance", - "zkBytecodeHash": "0x0100030172f1cd4de61aceb401d525750e86628e1b562d0648d98301efbb7e0a", - "zkBytecodePath": "/l1-contracts/zkout/Governance.sol/Governance.json", - "evmBytecodeHash": "0xf00f7ccc8585420d43ac7daad0cbc1f44a664470a9f4ca08bd8afe9cbabe924f", - "evmBytecodePath": "/l1-contracts/out/Governance.sol/Governance.json", - "evmDeployedBytecodeHash": "0x46fa3ac9301e22dfb8a4b77f76462e619491235ba3f717a81bd3fd5eb76737dc" - }, - { - "contractName": "l1-contracts/GovernanceUpgradeTimer", - "zkBytecodeHash": "0x010000c1d9cbaba2af6fe3e8f906016a6698d0a83611e7bf2c6a0a81fda200db", - "zkBytecodePath": "/l1-contracts/zkout/GovernanceUpgradeTimer.sol/GovernanceUpgradeTimer.json", - "evmBytecodeHash": "0xf3733ed0152df69875e199f685abb625f59775018b8e73e783b510bdbba7342f", - "evmBytecodePath": "/l1-contracts/out/GovernanceUpgradeTimer.sol/GovernanceUpgradeTimer.json", - "evmDeployedBytecodeHash": "0x63372a84de151f1868dabc152c3a51203d6150ae0d6ca1c5d35abd2b711b00f2" - }, - { - "contractName": "l1-contracts/L1AssetRouter", - "zkBytecodeHash": "0x010008376cb2294d938944b75b3f78eb2db8e75eb3c611aee9cd67051c1dc2c5", - "zkBytecodePath": "/l1-contracts/zkout/L1AssetRouter.sol/L1AssetRouter.json", - "evmBytecodeHash": "0xba50b65cf61dff785a3b118e44d1b18aa10b6a538cb5836907bdfdf2dc3a31da", - "evmBytecodePath": "/l1-contracts/out/L1AssetRouter.sol/L1AssetRouter.json", - "evmDeployedBytecodeHash": "0x442a0d7d018b9bbe62bc15da35243f47ec685ea63cb0b2a22b8d37d4ab1c41a9" - }, - { - "contractName": "l1-contracts/L1ERC20Bridge", - "zkBytecodeHash": "0x010002e94fdd40b8dbb57ebbf542ae8b21302acb72826cef0782c6b136046097", - "zkBytecodePath": "/l1-contracts/zkout/L1ERC20Bridge.sol/L1ERC20Bridge.json", - "evmBytecodeHash": "0x8bf25130fab07df09f467a3895224e84c6ec85a964b6da2f5e2318035eb78c53", - "evmBytecodePath": "/l1-contracts/out/L1ERC20Bridge.sol/L1ERC20Bridge.json", - "evmDeployedBytecodeHash": "0xca958a8dd6b48d7e70f16545dd139289638e9d13ddb5c52f69b33d019b16d286" - }, - { - "contractName": "l1-contracts/L1GenesisUpgrade", - "zkBytecodeHash": "0x010006c57b2605f5c11f25371be721b16c122af04c6a0952f16a368d81812152", - "zkBytecodePath": "/l1-contracts/zkout/L1GenesisUpgrade.sol/L1GenesisUpgrade.json", - "evmBytecodeHash": "0xe93914112c2dfb7b550be9a889dfb068b1fc38e32ae77391b4fb8d085fdf291f", - "evmBytecodePath": "/l1-contracts/out/L1GenesisUpgrade.sol/L1GenesisUpgrade.json", - "evmDeployedBytecodeHash": "0x7c05c81611fb04e4e174de812def6ca36ec264e413831ca35907ceb5cd014656" - }, - { - "contractName": "l1-contracts/L1NativeTokenVault", - "zkBytecodeHash": "0x010009891e648c0f4597c77f6a6d6358337ebd666add4b3d0251e1c3ac55329e", - "zkBytecodePath": "/l1-contracts/zkout/L1NativeTokenVault.sol/L1NativeTokenVault.json", - "evmBytecodeHash": "0x967d4212421dab1f16c023d10f89c35c1694762dfa61d75c61a158ceda9641eb", - "evmBytecodePath": "/l1-contracts/out/L1NativeTokenVault.sol/L1NativeTokenVault.json", - "evmDeployedBytecodeHash": "0x69f8c6968ea6adedb535a258526fe4669b39884c5571934461456c10477c6bea" - }, - { - "contractName": "l1-contracts/L1Nullifier", - "zkBytecodeHash": "0x0100065959d1fab02aef32844e067a5dbdd4e240fbc6255ce9c566efa54d5061", - "zkBytecodePath": "/l1-contracts/zkout/L1Nullifier.sol/L1Nullifier.json", - "evmBytecodeHash": "0x85fbb684f7772a9e1ca3cabf06b00c0ebb87f4f1e3271f27fd5b335f724816e3", - "evmBytecodePath": "/l1-contracts/out/L1Nullifier.sol/L1Nullifier.json", - "evmDeployedBytecodeHash": "0xdec02b1ded40fe3d2e19e3a4059a7ebb4b9293b1de0bf94134043ba48f3bb1c3" - }, - { - "contractName": "l1-contracts/L1V29Upgrade", - "zkBytecodeHash": "0x01000317dc182d54fca6e1ceabd275594325241d97f533a616d0c6a8633640a2", - "zkBytecodePath": "/l1-contracts/zkout/L1V29Upgrade.sol/L1V29Upgrade.json", - "evmBytecodeHash": "0xca006c23e0719c0e29ade5098a0bf9c1429ec99b41071f3ec48abead39258143", - "evmBytecodePath": "/l1-contracts/out/L1V29Upgrade.sol/L1V29Upgrade.json", - "evmDeployedBytecodeHash": "0x753d8ac22cde0df3af248dd1feffc64a91557604bc4940fef82d2cd7fc1b4017" - }, - { - "contractName": "l1-contracts/L1VerifierFflonk", - "zkBytecodeHash": "0x010009bfe7dc4c879153fb09adcc4b70d62326b1a08400808d70f85b71aa5a3f", - "zkBytecodePath": "/l1-contracts/zkout/L1VerifierFflonk.sol/L1VerifierFflonk.json", - "evmBytecodeHash": "0x949f81e2620f553bdc9c1c508e49cff31e0e396b82375d22a5a12a8453b384cf", - "evmBytecodePath": "/l1-contracts/out/L1VerifierFflonk.sol/L1VerifierFflonk.json", - "evmDeployedBytecodeHash": "0x128280533432f226fa726e2871928432c091a561df838c3f5cdb94de57b431b9" - }, - { - "contractName": "l1-contracts/L1VerifierPlonk", - "zkBytecodeHash": "0x01000dbbfd0d0bd6676b2602f7d788f1e25059a237ae1d12b17cde0d30106e01", - "zkBytecodePath": "/l1-contracts/zkout/L1VerifierPlonk.sol/L1VerifierPlonk.json", - "evmBytecodeHash": "0xdb69906628a7438f698fac4d6f69fe2260028a7bb3aa2a989a4970e13a880152", - "evmBytecodePath": "/l1-contracts/out/L1VerifierPlonk.sol/L1VerifierPlonk.json", - "evmDeployedBytecodeHash": "0x4c27e5b06f0e2b6563d2a3331d4bb27bbc3da8f479ff1d3b887e22367bd9a049" - }, - { - "contractName": "l1-contracts/L2AdminFactory", - "zkBytecodeHash": "0x010000bb1d81997ee5e9502f12c7c5d2c2b02f9aaba22eb9acf9947b84df63d6", - "zkBytecodePath": "/l1-contracts/zkout/L2AdminFactory.sol/L2AdminFactory.json", - "evmBytecodeHash": "0x74e40bda0667164a75e5fb043495b70410c2688157b689d41381fa86dac258ab", - "evmBytecodePath": "/l1-contracts/out/L2AdminFactory.sol/L2AdminFactory.json", - "evmDeployedBytecodeHash": "0xf7fd6429dcfc03d7bb25d77d0aec6200532d2ddf62bea6e107b9b362e2bc2d51" - }, - { - "contractName": "l1-contracts/L2AssetRouter", - "zkBytecodeHash": "0x01000531bb72234d84f2629e2bd6db8957b51584ef9f7168f2a2344748c3cfd7", - "zkBytecodePath": "/l1-contracts/zkout/L2AssetRouter.sol/L2AssetRouter.json", - "evmBytecodeHash": "0x3c56e6d9a43df696618aabcf5fa40b1a8c1573a4d5e3b05dc08a234ba657fb3c", - "evmBytecodePath": "/l1-contracts/out/L2AssetRouter.sol/L2AssetRouter.json", - "evmDeployedBytecodeHash": "0xc532dd57ddc5c7c93f7d0270fa8ed9d03b852e19733538ae6cdc3d2b77546631" - }, - { - "contractName": "l1-contracts/L2ContractHelper", - "zkBytecodeHash": "0x0100000794e130b036a48b2b581a658102b004c037fa0942ace76e1cf01fc07e", - "zkBytecodePath": "/l1-contracts/zkout/L2ContractHelper.sol/L2ContractHelper.json", - "evmBytecodeHash": "0x737d230d03eed68acc6755e7f91d02a2837c1009f0564ee3d6cf49aaa25a6d32", - "evmBytecodePath": "/l1-contracts/out/L2ContractHelper.sol/L2ContractHelper.json", - "evmDeployedBytecodeHash": "0x071504cd16634d41cb93847a7adbf896528926c5ac8813d7fd633bcb12d2ffe7" - }, - { - "contractName": "l1-contracts/L2MessageVerification", - "zkBytecodeHash": "0x0100015945ae851c1f835d37d5f4617757feb132487e84b156c13ad90a70071b", - "zkBytecodePath": "/l1-contracts/zkout/L2MessageVerification.sol/L2MessageVerification.json", - "evmBytecodeHash": "0x22c4579a2043effafafffd53f3a34ca4ee2f1eee8246b85f1601e1358ced9249", - "evmBytecodePath": "/l1-contracts/out/L2MessageVerification.sol/L2MessageVerification.json", - "evmDeployedBytecodeHash": "0x7b5b47c505d993dcc74aa6527fb794fd79d5e2c418a661e75b85165ac3fd8fe8" - }, - { - "contractName": "l1-contracts/L2NativeTokenVault", - "zkBytecodeHash": "0x010008535b849d71a11a1624c551b5f64c00fc036f8a92cc75bc7d82342acf0a", - "zkBytecodePath": "/l1-contracts/zkout/L2NativeTokenVault.sol/L2NativeTokenVault.json", - "evmBytecodeHash": "0x432d3354d97e27eb02b1a19cbd8b9a65d2472c91a13c81301d518e30f865be61", - "evmBytecodePath": "/l1-contracts/out/L2NativeTokenVault.sol/L2NativeTokenVault.json", - "evmDeployedBytecodeHash": "0xbb6d63fc167b9285f13b912648686e879e1d162342c81243cce29e60962aafa7" - }, - { - "contractName": "l1-contracts/L2ProxyAdminDeployer", - "zkBytecodeHash": "0x0100005fcb83d64a2c142996104330e7ce72ae4c2828fa8305d2524cd457e9a5", - "zkBytecodePath": "/l1-contracts/zkout/L2ProxyAdminDeployer.sol/L2ProxyAdminDeployer.json", - "evmBytecodeHash": "0x3d7ac817bf44b7213b2f6672d1eec308f7534b9ee707839b297a34c637a818ee", - "evmBytecodePath": "/l1-contracts/out/L2ProxyAdminDeployer.sol/L2ProxyAdminDeployer.json", - "evmDeployedBytecodeHash": "0x017e0a802b14c0f5070490f38b3a6dae7311de0350d9469b0251ae89a3cd9145" - }, - { - "contractName": "l1-contracts/L2SharedBridgeLegacy", - "zkBytecodeHash": "0x010001958d1b7ec307cfeae5944b19e56c7f12e633e4109c17c0d5e96e8a43dc", - "zkBytecodePath": "/l1-contracts/zkout/L2SharedBridgeLegacy.sol/L2SharedBridgeLegacy.json", - "evmBytecodeHash": "0x4288c8db8c0844a68dd7a60c1af0d7bd6ae4bf28a34cc270d7737137b615cd7f", - "evmBytecodePath": "/l1-contracts/out/L2SharedBridgeLegacy.sol/L2SharedBridgeLegacy.json", - "evmDeployedBytecodeHash": "0xc27cbc0ad475471719e2592fc73d93dd27ef232f505703534e16d05cfd09e91a" - }, - { - "contractName": "l1-contracts/L2VerifierFflonk", - "zkBytecodeHash": "0x010009ed5daafeb4aae604049ce9ab7eb61e4d05659227abdde776e919210d76", - "zkBytecodePath": "/l1-contracts/zkout/L2VerifierFflonk.sol/L2VerifierFflonk.json", - "evmBytecodeHash": "0xdeed467b947f8372c63014d1fe86a2b35a21cf9592a8392c93f919d01884600f", - "evmBytecodePath": "/l1-contracts/out/L2VerifierFflonk.sol/L2VerifierFflonk.json", - "evmDeployedBytecodeHash": "0xd36c222eb93c12f90deac8afce1c51e6d206ecae2a87ec40dad969c1e0895fb6" - }, - { - "contractName": "l1-contracts/L2VerifierPlonk", - "zkBytecodeHash": "0x01000e17a6180a6030aa9bc104dba94746553b97262b0f6be5c1edb16751443e", - "zkBytecodePath": "/l1-contracts/zkout/L2VerifierPlonk.sol/L2VerifierPlonk.json", - "evmBytecodeHash": "0x5295e4d866fb816151251d3049950d53e794f576e1254f4c0da85b36dd6eea38", - "evmBytecodePath": "/l1-contracts/out/L2VerifierPlonk.sol/L2VerifierPlonk.json", - "evmDeployedBytecodeHash": "0xa6baea6e676548e94c1c62f91e93bdf1f4575602d1ebc4acbdac8301bffb3267" - }, - { - "contractName": "l1-contracts/L2WrappedBaseToken", - "zkBytecodeHash": "0x0100034143abddcabf9e1b6e108badda72ed45ff90e319117fb3595722cc8b6a", - "zkBytecodePath": "/l1-contracts/zkout/L2WrappedBaseToken.sol/L2WrappedBaseToken.json", - "evmBytecodeHash": "0xf3e65fc4cb151936c01fe4654e293454ed0c567d3cc853818895531e71dc7fd2", - "evmBytecodePath": "/l1-contracts/out/L2WrappedBaseToken.sol/L2WrappedBaseToken.json", - "evmDeployedBytecodeHash": "0xb8ea70bf8b779b4f68bef6d1f3dbf12322c1a6f97c5821de1f6f35bab55318b8" - }, - { - "contractName": "l1-contracts/L2WrappedBaseTokenStore", - "zkBytecodeHash": "0x010000a9b1a8fa893af1d89e4391f7fbbaf9470db783e1f95d1d20c401e880f1", - "zkBytecodePath": "/l1-contracts/zkout/L2WrappedBaseTokenStore.sol/L2WrappedBaseTokenStore.json", - "evmBytecodeHash": "0xc3a4e1acf08496a96daecd4eabdef166f5b83c6ccad6a59429236bd5d187c373", - "evmBytecodePath": "/l1-contracts/out/L2WrappedBaseTokenStore.sol/L2WrappedBaseTokenStore.json", - "evmDeployedBytecodeHash": "0x588fd40664987a73ada365e4fd27edfd4cfaba52c4565b272c2a7c0862429005" - }, - { - "contractName": "l1-contracts/LibMap", - "zkBytecodeHash": "0x01000007c9d4634530675b17346b57327af5c6f4ee376f121d51ab7b0a2a2111", - "zkBytecodePath": "/l1-contracts/zkout/LibMap.sol/LibMap.json", - "evmBytecodeHash": "0xd675a82c93214994e704e9ca6cb42be1ef15e05f08b62105b94591c1451c16f9", - "evmBytecodePath": "/l1-contracts/out/LibMap.sol/LibMap.json", - "evmDeployedBytecodeHash": "0x5e2fe29366bb5dddde2f3fc4252b29aefc397a93b54fa2e5f4d70da6819c3976" - }, - { - "contractName": "l1-contracts/MailboxFacet", - "zkBytecodeHash": "0x010006af53f0d551e352c10e8965ab4e037917b9ac18395f0af09bfc07421e0b", - "zkBytecodePath": "/l1-contracts/zkout/Mailbox.sol/MailboxFacet.json", - "evmBytecodeHash": "0xd8d0d75ef4fd087105a392c2263f9c0c0d1614982dd78561e4f20e4f0c319920", - "evmBytecodePath": "/l1-contracts/out/Mailbox.sol/MailboxFacet.json", - "evmDeployedBytecodeHash": "0x30fdd01611d21897f89ec7f6d5ef25da20de0592c8bf1c29943e06cea92949ad" - }, - { - "contractName": "l1-contracts/Math", - "zkBytecodeHash": "0x0100000784fa40c1f5aa5ee8bd526141395649512aad43de97ea24e2129e4aa6", - "zkBytecodePath": "/l1-contracts/zkout/Math.sol/Math.json", - "evmBytecodeHash": "0x74db5ccbf8ab82b2f16550c7a2d56dde7247fb48e365b9f204dee84937845f6d", - "evmBytecodePath": "/l1-contracts/out/Math.sol/Math.json", - "evmDeployedBytecodeHash": "0xe48c4cb85f6238d73d834a908c6aa1313060cb7b5950d290a814fdfdcb6368e5" - }, - { - "contractName": "l1-contracts/MathUpgradeable", - "zkBytecodeHash": "0x01000007d5aec9b0ffc3be29e7464aa6833f48bbb44d6485e811e281d6949713", - "zkBytecodePath": "/l1-contracts/zkout/MathUpgradeable.sol/MathUpgradeable.json", - "evmBytecodeHash": "0xf3bf3a6d5324771cba823f95550c6a9eca4ac5d91f3ca7a8797ca4d6f86709cb", - "evmBytecodePath": "/l1-contracts/out/MathUpgradeable.sol/MathUpgradeable.json", - "evmDeployedBytecodeHash": "0x20f7236bd2051084ff472a2dab7230610a1689a79aca2f9108632fe557b6cb35" - }, - { - "contractName": "l1-contracts/Merkle", - "zkBytecodeHash": "0x01000007dff79c74e8fbcd0d3b192b6f813066580c7e05a2bee02de6d0405b16", - "zkBytecodePath": "/l1-contracts/zkout/Merkle.sol/Merkle.json", - "evmBytecodeHash": "0x971d82c1d8f674581baafc7a803aa0a2cf2e0c8d73d7995917ba044897fd75a9", - "evmBytecodePath": "/l1-contracts/out/Merkle.sol/Merkle.json", - "evmDeployedBytecodeHash": "0x350f53c6877935449b79cf05f15eff87dc2724078187b08d4d4b7f9bc037323a" - }, - { - "contractName": "l1-contracts/MessageHashing", - "zkBytecodeHash": "0x01000007adc286e9d8dcda78936b5278d5c1ba4ebe0927e27ca473975ff6c211", - "zkBytecodePath": "/l1-contracts/zkout/MessageHashing.sol/MessageHashing.json", - "evmBytecodeHash": "0xb43fea3c2438866a293030dceb91b1c8e0b37e07cff6506f7cab378df2e5bf33", - "evmBytecodePath": "/l1-contracts/out/MessageHashing.sol/MessageHashing.json", - "evmDeployedBytecodeHash": "0xc1b97abd6fdafd437b364b3be64356f75f97e69c13831c8891e46e070d9e8b88" - }, - { - "contractName": "l1-contracts/MessageRoot", - "zkBytecodeHash": "0x010003d3b552606c72509becee7bffee9533885497a11bd48405c45523e8df41", - "zkBytecodePath": "/l1-contracts/zkout/MessageRoot.sol/MessageRoot.json", - "evmBytecodeHash": "0x4391480eb9a535b9f6498afef10a24127597d61ef317347ff253be9baa7718da", - "evmBytecodePath": "/l1-contracts/out/MessageRoot.sol/MessageRoot.json", - "evmDeployedBytecodeHash": "0x73ddc29148ca5fe5506bc78a6984d48c629e312f84340952c1c47bb99c2ea2e0" - }, - { - "contractName": "l1-contracts/PermanentRestriction", - "zkBytecodeHash": "0x01000311f80968c984cfaaf44c8e873741518221b12fb8f4bf578badf73e4800", - "zkBytecodePath": "/l1-contracts/zkout/PermanentRestriction.sol/PermanentRestriction.json", - "evmBytecodeHash": "0x34b4aeb8f35613bc6d740bd4d7f6ab4792bbc764ac6a265fac6a685997abd9e4", - "evmBytecodePath": "/l1-contracts/out/PermanentRestriction.sol/PermanentRestriction.json", - "evmDeployedBytecodeHash": "0xa392ea402091adfc059d77142cd9b93581868518006f368efdfef5f8cf5f051d" - }, - { - "contractName": "l1-contracts/PriorityQueue", - "zkBytecodeHash": "0x01000007b6a035599b2b08c387adb9fdc86c8a07acf0ac1f11a4f6deaff4fbf5", - "zkBytecodePath": "/l1-contracts/zkout/PriorityQueue.sol/PriorityQueue.json", - "evmBytecodeHash": "0xe347e48f219575c26c7045de7abe81cab5fc86f336fe1f6519c9d4ab403c7143", - "evmBytecodePath": "/l1-contracts/out/PriorityQueue.sol/PriorityQueue.json", - "evmDeployedBytecodeHash": "0x139149421223eb35deae1e5131be538af712a364f94b1f01ebda648dd51e42c5" - }, - { - "contractName": "l1-contracts/PriorityTree", - "zkBytecodeHash": "0x0100000730bb4e2a652fc236db66b5c7ca95de2a2fe67ef35a85917cb91a746c", - "zkBytecodePath": "/l1-contracts/zkout/PriorityTree.sol/PriorityTree.json", - "evmBytecodeHash": "0x5f098781594218970281d23a0dcfe6d05d75a88fb1fa13c4050fab6815244ea5", - "evmBytecodePath": "/l1-contracts/out/PriorityTree.sol/PriorityTree.json", - "evmDeployedBytecodeHash": "0xa955335989d1dfdc58b032c201ca870fb962d25eb2f1e95f1582060e47a58e46" - }, - { - "contractName": "l1-contracts/ProxyAdmin", - "zkBytecodeHash": "0x010000e18d0788d925e16659993ff65cb636c3ed1fd5b90115ee07382b3ce24f", - "zkBytecodePath": "/l1-contracts/zkout/ProxyAdmin.sol/ProxyAdmin.json", - "evmBytecodeHash": "0xae804cba018bd20f1433163bdb40280e81dd2b07ea50524148886c3682abb0a2", - "evmBytecodePath": "/l1-contracts/out/ProxyAdmin.sol/ProxyAdmin.json", - "evmDeployedBytecodeHash": "0x14ab4271cecf41fd1de3364dcfb049553af19593cac645b24ca375c52a9c50ff" - }, - { - "contractName": "l1-contracts/RelayedSLDAValidator", - "zkBytecodeHash": "0x010000fd4635d198ec9bcd5e8e18227046db19bc718bbab2ebdd8753daf3ac6a", - "zkBytecodePath": "/l1-contracts/zkout/RelayedSLDAValidator.sol/RelayedSLDAValidator.json", - "evmBytecodeHash": "0x07041be0d9b0951a479d04b22fcd1ee85f5d22a00ea4a2ffe8b5493ea077d2ec", - "evmBytecodePath": "/l1-contracts/out/RelayedSLDAValidator.sol/RelayedSLDAValidator.json", - "evmDeployedBytecodeHash": "0x43393c4cb2d42cb682e1887312a5fd2b441960679812d5c25b2988c506497ecd" - }, - { - "contractName": "l1-contracts/RestrictionValidator", - "zkBytecodeHash": "0x01000007dfa40a17641ae0476b6b2b92aa6efe674dcaa4eba0a6eeaaf4939352", - "zkBytecodePath": "/l1-contracts/zkout/RestrictionValidator.sol/RestrictionValidator.json", - "evmBytecodeHash": "0x63f5b71f62ad00d9725f53df1d9ef6507cb80c1457c0d653d4f5465e08449255", - "evmBytecodePath": "/l1-contracts/out/RestrictionValidator.sol/RestrictionValidator.json", - "evmDeployedBytecodeHash": "0xc906464730bce6f4706ff868754e4dd24e2ef95b0e11af8be7e6e909b4470b6f" - }, - { - "contractName": "l1-contracts/RevertReceiveAccount", - "zkBytecodeHash": "0x0100001b8591fba336df6685cf15a8f823a0111d0a6370e9f695abd1bd23cf3f", - "zkBytecodePath": "/l1-contracts/zkout/RevertReceiveAccount.sol/RevertReceiveAccount.json", - "evmBytecodeHash": "0x2267239699453c5998d497bbc39e1b64b2c22cf3ad69326b3b5929a27971e12f", - "evmBytecodePath": "/l1-contracts/out/RevertReceiveAccount.sol/RevertReceiveAccount.json", - "evmDeployedBytecodeHash": "0xc900e4080679f84148d32383c2aefce71aaa6ce63504ace61595b5c1b9b0f215" - }, - { - "contractName": "l1-contracts/RevertTransferERC20", - "zkBytecodeHash": "0x0100017b9a39434f86ab39017bcc0fd821445875a6a1aa93ac7a3aef1b7347c7", - "zkBytecodePath": "/l1-contracts/zkout/RevertTransferERC20.sol/RevertTransferERC20.json", - "evmBytecodeHash": "0x398006d07ea9f30a7a7e4fd11eedb254c33957985bedd401b098817d6b72c728", - "evmBytecodePath": "/l1-contracts/out/RevertTransferERC20.sol/RevertTransferERC20.json", - "evmDeployedBytecodeHash": "0xb4afdd7a35adcf6994891369dddefcc5569651f61fa3c20b2da2fb61e59e1252" - }, - { - "contractName": "l1-contracts/RollupDAManager", - "zkBytecodeHash": "0x010000714652fa9c8d807a818086048255fa96aff7cf766dd447b6a7985463a6", - "zkBytecodePath": "/l1-contracts/zkout/RollupDAManager.sol/RollupDAManager.json", - "evmBytecodeHash": "0xb07d21cb4a376e9bf8250f32872f2ab33895b41d6d95339f612a2ee531e4228e", - "evmBytecodePath": "/l1-contracts/out/RollupDAManager.sol/RollupDAManager.json", - "evmDeployedBytecodeHash": "0x8c85467c83c474b7c4caf6040bd64bcf48680b610cbf8ae5a45567975f2a9a2f" - }, - { - "contractName": "l1-contracts/SafeCast", - "zkBytecodeHash": "0x0100000730acac4ef083a37d6ab89aa36cd9963db4e489879b78fd75f23430a5", - "zkBytecodePath": "/l1-contracts/zkout/SafeCast.sol/SafeCast.json", - "evmBytecodeHash": "0x4a0a496059c19390c76f1599fb94254c9edad03ea59b33da8575344807e20c0e", - "evmBytecodePath": "/l1-contracts/out/SafeCast.sol/SafeCast.json", - "evmDeployedBytecodeHash": "0x86f83221f827ae0104c67cbd0c783f95072cfb0062f8e489815a546c349aa9ae" - }, - { - "contractName": "l1-contracts/SafeERC20", - "zkBytecodeHash": "0x010000073b40f6657214c1c08498da4c6044e841db780ec53dcc6e1319ce4ccb", - "zkBytecodePath": "/l1-contracts/zkout/SafeERC20.sol/SafeERC20.json", - "evmBytecodeHash": "0x8bcaaae3edcd704336fb87ff526323636ab7c153592a0804f8b65156f3cbdd73", - "evmBytecodePath": "/l1-contracts/out/SafeERC20.sol/SafeERC20.json", - "evmDeployedBytecodeHash": "0x37bb79938d832f604f20542497f60f8cc41f46a0525d837460755f975bd26202" - }, - { - "contractName": "l1-contracts/SemVer", - "zkBytecodeHash": "0x0100000733c2d2368df4bff2f15475d1cfc5db39cbe975f364b403b0932b99a0", - "zkBytecodePath": "/l1-contracts/zkout/SemVer.sol/SemVer.json", - "evmBytecodeHash": "0x69b82664ac0eff045d6ca1e34974387a3a856a46578b1fa6dafd2ac3020e613c", - "evmBytecodePath": "/l1-contracts/out/SemVer.sol/SemVer.json", - "evmDeployedBytecodeHash": "0xe1f70baa7b9a10beea537323699161a613a10cfd2f5abdccf7eb34e7e2b5eb51" - }, - { - "contractName": "l1-contracts/ServerNotifier", - "zkBytecodeHash": "0x010000f1e7464081aec8cdb5eac47fb43561142aca353551615b7dcc2388a2dc", - "zkBytecodePath": "/l1-contracts/zkout/ServerNotifier.sol/ServerNotifier.json", - "evmBytecodeHash": "0x0940ed095617229188aafb94d09d3d560b6172c10a187e983311b6ea5d236afd", - "evmBytecodePath": "/l1-contracts/out/ServerNotifier.sol/ServerNotifier.json", - "evmDeployedBytecodeHash": "0x69bf71fa263ed1f3e2fedcee3769fa0ff4d72d5b4a100445da15781c1118f38a" - }, - { - "contractName": "l1-contracts/SignedMath", - "zkBytecodeHash": "0x010000073b4ff9ba2f6ae737833f673602e0c344bb2ef794f5303b4edb03c959", - "zkBytecodePath": "/l1-contracts/zkout/SignedMath.sol/SignedMath.json", - "evmBytecodeHash": "0xd1539f05abc9be582f7fd40681d23cf512e79a64c3d1a631f9edfe38780747a7", - "evmBytecodePath": "/l1-contracts/out/SignedMath.sol/SignedMath.json", - "evmDeployedBytecodeHash": "0x59c1227d9c5cf1f3564cafc87031f44398aa3879bc42585902586cc9c4b0cbb1" - }, - { - "contractName": "l1-contracts/SignedMathUpgradeable", - "zkBytecodeHash": "0x01000007e11221e38bbf4cc6f25d26978bb65379e7c9bb0773f04bf4291bc30f", - "zkBytecodePath": "/l1-contracts/zkout/SignedMathUpgradeable.sol/SignedMathUpgradeable.json", - "evmBytecodeHash": "0x4a6177ee9326e3f8062a17735efeecafd301cc501c24196d1cb43221eb4bc67a", - "evmBytecodePath": "/l1-contracts/out/SignedMathUpgradeable.sol/SignedMathUpgradeable.json", - "evmDeployedBytecodeHash": "0x103a3cc591ce8bd1bbd30680ef2096bd064eba508a86f3018087d8f4f2ee177a" - }, - { - "contractName": "l1-contracts/StorageSlot", - "zkBytecodeHash": "0x01000007abfdd8447cec54942b782815aaa2999cbd1fcf9e4805abdd0acbd8bd", - "zkBytecodePath": "/l1-contracts/zkout/StorageSlot.sol/StorageSlot.json", - "evmBytecodeHash": "0x4f21ecace17e117d55148f15fe26ab474d70f2b20057eb87321350a3e7ddec91", - "evmBytecodePath": "/l1-contracts/out/StorageSlot.sol/StorageSlot.json", - "evmDeployedBytecodeHash": "0xebe440b3c783cfdfc4f45dbc5760ba83e9deeb84d67617976ef3f13963860202" - }, - { - "contractName": "l1-contracts/Strings", - "zkBytecodeHash": "0x010000075a354ac6a9ece550e8d3e7379e78946a4b0fcadea45df8f4e500a4b7", - "zkBytecodePath": "/l1-contracts/zkout/Strings.sol/Strings.json", - "evmBytecodeHash": "0x58c632496fb4e72f86cbd208c70e9613accfcd28adf4d7744ee7165bde1fb9fc", - "evmBytecodePath": "/l1-contracts/out/Strings.sol/Strings.json", - "evmDeployedBytecodeHash": "0x83ef366ca7c636a1360ca8ac33cf80e4bedc8bfaa62f4397064751b005d22b33" - }, - { - "contractName": "l1-contracts/StringsUpgradeable", - "zkBytecodeHash": "0x01000007584a040e5c5918b86d8f91401f32a9412673bc604492a5181e38cc25", - "zkBytecodePath": "/l1-contracts/zkout/StringsUpgradeable.sol/StringsUpgradeable.json", - "evmBytecodeHash": "0x34cb6de5b5aa20f3f4f6ccd48308fdb86e53e2684513d7a51b6f4224e7d1fc7f", - "evmBytecodePath": "/l1-contracts/out/StringsUpgradeable.sol/StringsUpgradeable.json", - "evmDeployedBytecodeHash": "0xef6f42791be03f203def1f5cae725ac78bc2ee8cc919539b2a241dc593440355" - }, - { - "contractName": "l1-contracts/SystemContractsCaller", - "zkBytecodeHash": "0x01000007c076e31990f39e6fc3a3f75ebf0a996b0569e7fb3959138fe9171a35", - "zkBytecodePath": "/l1-contracts/zkout/SystemContractsCaller.sol/SystemContractsCaller.json", - "evmBytecodeHash": "0x44fe8239010ab0e654b22798784acf20c757e696601f341c6264dd3e88e8e32c", - "evmBytecodePath": "/l1-contracts/out/SystemContractsCaller.sol/SystemContractsCaller.json", - "evmDeployedBytecodeHash": "0x687e7c4d36fe7c1440cdb911f206c1435a0fbd2ba1ea86a399d56cb74a0d34bd" - }, - { - "contractName": "l1-contracts/Utils", - "zkBytecodeHash": "0x010000074ec6c812a8c90f50cfa47f820f4c3730b109db2082d66d9dc256dc2a", - "zkBytecodePath": "/l1-contracts/zkout/SystemContractsCaller.sol/Utils.json", - "evmBytecodeHash": "0x097909811c04d6f8c68cc0a5dc184dcc30344ec20d203a7991e5c767ca80c23b", - "evmBytecodePath": "/l1-contracts/out/SystemContractsCaller.sol/Utils.json", - "evmDeployedBytecodeHash": "0x3d4fcb77d3739117a9886383f1e60a972805c7ba139606de7ac2a5d0f271ca18" - }, - { - "contractName": "l1-contracts/TestnetVerifier", - "zkBytecodeHash": "0x010000dddae4c0af9488e987126f63d930c1410bd910f2d77c028915da9f1d60", - "zkBytecodePath": "/l1-contracts/zkout/TestnetVerifier.sol/TestnetVerifier.json", - "evmBytecodeHash": "0x32f36a7c8224ea7551605d5bb16733f583f87ef842088c80f6a736e3a1fea16d", - "evmBytecodePath": "/l1-contracts/out/TestnetVerifier.sol/TestnetVerifier.json", - "evmDeployedBytecodeHash": "0x6b0ca478943c7fb5e86ea20a9188eabf4e1c5df578b512fe02c45a9f54d46a29" - }, - { - "contractName": "l1-contracts/TransactionValidator", - "zkBytecodeHash": "0x01000007c39fdb64b7521411150a2b7e5c98d1685ff9492a7968083d8a8b234c", - "zkBytecodePath": "/l1-contracts/zkout/TransactionValidator.sol/TransactionValidator.json", - "evmBytecodeHash": "0x636579038e7d878f7ea65861a629824214213719ce1cf918f7b5033573533589", - "evmBytecodePath": "/l1-contracts/out/TransactionValidator.sol/TransactionValidator.json", - "evmDeployedBytecodeHash": "0xf5402b3e3a7b48b69e91b0f0a21e019203e359bd4fd5b8b3fb907d34f0d965c5" - }, - { - "contractName": "l1-contracts/TransitionaryOwner", - "zkBytecodeHash": "0x0100005bd2f3ba147ba7ae7b091665249e47524c2c777a5eef48df88474f0837", - "zkBytecodePath": "/l1-contracts/zkout/TransitionaryOwner.sol/TransitionaryOwner.json", - "evmBytecodeHash": "0x0b0e968e8b3a3499d6a64465c65caf0e2ee58f0d9822c6a61555d0b4c87e3867", - "evmBytecodePath": "/l1-contracts/out/TransitionaryOwner.sol/TransitionaryOwner.json", - "evmDeployedBytecodeHash": "0xe8e47e802c9f28bc2c2a33e861e00a3d3a77690ec78ec0387f77e90f04e8d949" - }, - { - "contractName": "l1-contracts/TransparentUpgradeableProxy", - "zkBytecodeHash": "0x01000149593c20ec28bef707d918a4f963887591dbe8278c730e860abf0fdb64", - "zkBytecodePath": "/l1-contracts/zkout/TransparentUpgradeableProxy.sol/TransparentUpgradeableProxy.json", - "evmBytecodeHash": "0xeff8a1d98c67d773530551ca091731243869cec1e637b9e35a773dc9ee1ec3d3", - "evmBytecodePath": "/l1-contracts/out/TransparentUpgradeableProxy.sol/TransparentUpgradeableProxy.json", - "evmDeployedBytecodeHash": "0x233c67ec54c6d38b0fc1b57546483b2849e61308832443513d521c4188ff63d7" - }, - { - "contractName": "l1-contracts/UncheckedMath", - "zkBytecodeHash": "0x010000077758666a5353fc097b50d4715d4d63bdcfd0fc93ca7a9dae308c8f15", - "zkBytecodePath": "/l1-contracts/zkout/UncheckedMath.sol/UncheckedMath.json", - "evmBytecodeHash": "0xd11762496af656d6431ef7542844802f76d84004de4648867dd3ba1575ab182e", - "evmBytecodePath": "/l1-contracts/out/UncheckedMath.sol/UncheckedMath.json", - "evmDeployedBytecodeHash": "0x36e00ecf44abe9616f66bccc0dc0dca5c961a21e1df9c45590357cded6401b75" - }, - { - "contractName": "l1-contracts/UnsafeBytes", - "zkBytecodeHash": "0x0100000705aab131e66b26d5976a28c7f8616e43bbaa8d162c637f6f412c8259", - "zkBytecodePath": "/l1-contracts/zkout/UnsafeBytes.sol/UnsafeBytes.json", - "evmBytecodeHash": "0x0e43251a01dea60598d935f22a05c7b5afc2e769f049d035d8cfe36ab6f88e6a", - "evmBytecodePath": "/l1-contracts/out/UnsafeBytes.sol/UnsafeBytes.json", - "evmDeployedBytecodeHash": "0x97b15b9cf3a912e69c3f08a5c2dbe0ec352ba2283f230b17e39c2eaa0a8244ca" - }, - { - "contractName": "l1-contracts/UpgradeStageValidator", - "zkBytecodeHash": "0x010000a30b5295f806ee5d5c63596ef6eff99f19420a589b30d5f3dfe0f91787", - "zkBytecodePath": "/l1-contracts/zkout/UpgradeStageValidator.sol/UpgradeStageValidator.json", - "evmBytecodeHash": "0x067f0345e9d1d7b4ccba2279aff33414585f06e7fd6a5de9da6bc822348506b6", - "evmBytecodePath": "/l1-contracts/out/UpgradeStageValidator.sol/UpgradeStageValidator.json", - "evmDeployedBytecodeHash": "0x5addd217702a551933e824eeb19621e5cc221a999e331b39f37e40b84b233c82" - }, - { - "contractName": "l1-contracts/UpgradeableBeacon", - "zkBytecodeHash": "0x010000674dd9c2b44a5c02408bda04df734b258d1c6ee9e07f5a6904a13d27fc", - "zkBytecodePath": "/l1-contracts/zkout/UpgradeableBeacon.sol/UpgradeableBeacon.json", - "evmBytecodeHash": "0x16e9b6d2d2ff2d4f09e041993b5bb29902e10dc154491fac8e1dcd8cd0faf50e", - "evmBytecodePath": "/l1-contracts/out/UpgradeableBeacon.sol/UpgradeableBeacon.json", - "evmDeployedBytecodeHash": "0xba4bfb9d8fdb5e5690b9c2e10d68acdd886790840a3da73771993f5ddd9cf23f" - }, - { - "contractName": "l1-contracts/ValidatorTimelock", - "zkBytecodeHash": "0x010009b39a56f9de186e37e52118f2bfa1caf20b0bb40562a85208293ebe2b60", - "zkBytecodePath": "/l1-contracts/zkout/ValidatorTimelock.sol/ValidatorTimelock.json", - "evmBytecodeHash": "0x1f974a4351e25f866b98f9914c26c932b85343a4c4f427a3cd83c05ae8c44aec", - "evmBytecodePath": "/l1-contracts/out/ValidatorTimelock.sol/ValidatorTimelock.json", - "evmDeployedBytecodeHash": "0x91f825dbf383a2cddeaebde77211cca384a2a3fbecd86a85307d590f908e7a34" - }, - { - "contractName": "l1-contracts/ValidiumL1DAValidator", - "zkBytecodeHash": "0x010000331928792504544c0ed580394816d1e94cdda9b53589b1c1c8c1e5c60c", - "zkBytecodePath": "/l1-contracts/zkout/ValidiumL1DAValidator.sol/ValidiumL1DAValidator.json", - "evmBytecodeHash": "0x3fa1a1a1d2698b964ed9a983dcd79fbec624084afd5f6628e3a4bd5f6a5f46fa", - "evmBytecodePath": "/l1-contracts/out/ValidiumL1DAValidator.sol/ValidiumL1DAValidator.json", - "evmDeployedBytecodeHash": "0xb161f4596a357f402e32a936cb8f337b76b08b8e7355c7e670b152d2d3ca1699" - }, - { - "contractName": "l1-contracts/ZKChainBase", - "zkBytecodeHash": "0x0100000728b5ea2eedd8316416bb10675eb3a7f2265adf3f6a2dda93d6e54de2", - "zkBytecodePath": "/l1-contracts/zkout/ZKChainBase.sol/ZKChainBase.json", - "evmBytecodeHash": "0xff3718ea8a18e0270e3c0f4c6e620dd41d07f11712865a58177867cdebee5c95", - "evmBytecodePath": "/l1-contracts/out/ZKChainBase.sol/ZKChainBase.json", - "evmDeployedBytecodeHash": "0x71623f5f32348303ded3bcdf27da54d1e944a80413968e6da0f094fd3ad91e60" - }, - { - "contractName": "l1-contracts/Create2AndTransfer", - "evmBytecodeHash": "0xfebf807006627544db6eaf474508d47b688adb3d5195b5071b3bf34ead2f81b6", - "evmBytecodePath": "/l1-contracts/out/Create2AndTransfer.sol/Create2AndTransfer.json", - "evmDeployedBytecodeHash": "0x7e0b5656d9ac680e5d3ad8606eb48aca581a8f125a115c6c01e7cbb7ac068bd7", - "zkBytecodeHash": null, - "zkBytecodePath": null - }, - { - "contractName": "l1-contracts/StdConstants", - "evmBytecodeHash": "0xa204555ddb5b7aae6f985aab731d8bbef3cc8dbd4eb3cd00f003badc5a71bcfc", - "evmBytecodePath": "/l1-contracts/out/StdConstants.sol/StdConstants.json", - "evmDeployedBytecodeHash": "0xcdfd7fa41f81f94facaa07c41ba2ef87058b72fd3c81dd3f3b6145e061faa0dd", - "zkBytecodeHash": null, - "zkBytecodePath": null - }, - { - "contractName": "l1-contracts/stdError", - "evmBytecodeHash": "0xc665c6f2163557700dc7cd809615cf2fcf70af3400a150cb9f68fbb8daa643e2", - "evmBytecodePath": "/l1-contracts/out/StdError.sol/stdError.json", - "evmDeployedBytecodeHash": "0xae396a9f2444f6ca903c33b92aeabe1a6e8f5d74a30ccf57fb9730890b8c353a", - "zkBytecodeHash": null, - "zkBytecodePath": null - }, - { - "contractName": "l1-contracts/stdJson", - "evmBytecodeHash": "0x4e218a599b6fa65d3e466fba80556fd94229593a741f7490b5f5360a310c938d", - "evmBytecodePath": "/l1-contracts/out/StdJson.sol/stdJson.json", - "evmDeployedBytecodeHash": "0xba647b6d04cc8c8e7ac2622358adcefb72176dedb898cf97006a4f2a6f5e1295", - "zkBytecodeHash": null, - "zkBytecodePath": null - }, - { - "contractName": "l1-contracts/stdMath", - "evmBytecodeHash": "0xda78553c78a5f4d3bcd8bf198b63e9e5fba3b22efc22ba73f31e5e19476d0aa6", - "evmBytecodePath": "/l1-contracts/out/StdMath.sol/stdMath.json", - "evmDeployedBytecodeHash": "0x4ceda3e6f661699d507e56828120123765e74d00dada868fd2f3be962286970d", - "zkBytecodeHash": null, - "zkBytecodePath": null - }, - { - "contractName": "l1-contracts/stdStorage", - "evmBytecodeHash": "0xe73c9bc14f4be28ffe7db3da3f3c9ee2f75bef6bdf5048b47b5817a8e67301c5", - "evmBytecodePath": "/l1-contracts/out/StdStorage.sol/stdStorage.json", - "evmDeployedBytecodeHash": "0x8e8eafa5e1ed36eb25521a05c73f6eb2e1651a56a0d8fd923dbd6ef096bc2539", - "zkBytecodeHash": null, - "zkBytecodePath": null - }, - { - "contractName": "l1-contracts/stdStorageSafe", - "evmBytecodeHash": "0xf2fb194607aa51280838aecb0a368ecdd4027c22f83a2189f0ee90e2f50e6cf3", - "evmBytecodePath": "/l1-contracts/out/StdStorage.sol/stdStorageSafe.json", - "evmDeployedBytecodeHash": "0xffab4afc5be82e2526f782907511e29053f316e21720c186b378d9d023740fa5", - "zkBytecodeHash": null, - "zkBytecodePath": null - }, - { - "contractName": "l1-contracts/StdStyle", - "evmBytecodeHash": "0xf139d3e0715a6f0ad32e7ed62f4b8d16fd9c0a98688655cf99a877107e0320be", - "evmBytecodePath": "/l1-contracts/out/StdStyle.sol/StdStyle.json", - "evmDeployedBytecodeHash": "0xd721ed6a39216cce8f9c762756fe81c00b1e98abc25b5b9b44901dfb472c83d4", - "zkBytecodeHash": null, - "zkBytecodePath": null - }, - { - "contractName": "l1-contracts/stdToml", - "evmBytecodeHash": "0x78fd33c1b97e99fe8a23f8bdf7a364426db74b403f575fe7ddb4f6b41d5c76ea", - "evmBytecodePath": "/l1-contracts/out/StdToml.sol/stdToml.json", - "evmDeployedBytecodeHash": "0xf019d02fc84f1ec73a3bed891fa20cc550f68e2975d05021ecf2fb569f884714", - "zkBytecodeHash": null, - "zkBytecodePath": null - }, - { - "contractName": "l1-contracts/console", - "evmBytecodeHash": "0x16e8e6e585a7711fe2b2c1502fe7527ed2cd93c3cf540a3e33965c52f920f870", - "evmBytecodePath": "/l1-contracts/out/console.sol/console.json", - "evmDeployedBytecodeHash": "0x05a5cc84d188bc5c8f296d9c854d7039dd246ef6cd5174379cf7dcf924de2e54", - "zkBytecodeHash": null, - "zkBytecodePath": null - }, - { - "contractName": "l1-contracts/safeconsole", - "evmBytecodeHash": "0x8d4a6c561bee25898bd6a5ba365c5eedf9e0a56fc74dea5486c64a59496431f3", - "evmBytecodePath": "/l1-contracts/out/safeconsole.sol/safeconsole.json", - "evmDeployedBytecodeHash": "0xe8fbe25dd4a1388b6b3556d52ad8ac9ef7b61f03d1c64371803c3338e725c71e", - "zkBytecodeHash": null, - "zkBytecodePath": null - }, { "contractName": "da-contracts/AvailL1DAValidator", "evmBytecodeHash": "0x55172a8886a8522d0e297f10a644a5aa4eb2054437487efc5a4301e0f9a53efc", diff --git a/da-contracts/contracts/CalldataDA.sol b/da-contracts/contracts/CalldataDA.sol index 6fa37638ae..c2c3db6122 100644 --- a/da-contracts/contracts/CalldataDA.sol +++ b/da-contracts/contracts/CalldataDA.sol @@ -16,7 +16,7 @@ uint256 constant BLOB_DATA_OFFSET = 65; uint256 constant BLOB_COMMITMENT_SIZE = 32; /// @notice Contract that contains the functionality for process the calldata DA. -/// @dev The expected l2DAValidator that should be used with it `RollupL2DAValidator`. +/// @dev The expected L2DACommitmentScheme that should be used with it is `BLOBS_AND_PUBDATA_KECCAK256`. abstract contract CalldataDA { /// @notice Parses the input that the L2 DA validator has provided to the contract. /// @param _l2DAValidatorOutputHash The hash of the output of the L2 DA validator. diff --git a/docs/l2_system_contracts/system_contracts_bootloader_description.md b/docs/l2_system_contracts/system_contracts_bootloader_description.md index 8324d3e106..39fc1016f5 100644 --- a/docs/l2_system_contracts/system_contracts_bootloader_description.md +++ b/docs/l2_system_contracts/system_contracts_bootloader_description.md @@ -649,7 +649,7 @@ One of the most expensive resource for a rollup is data availability, so in orde The contract provides two methods: - `publishCompressedBytecode` that verifies the correctness of the bytecode compression and publishes it in form of a message to the DA layer. -- `verifyCompressedStateDiffs` that can verify the correctness of our standard state diff compression. This method can be used by common L2DAValidators and it is for instance utilized by the [RollupL2DAValidator](../../l2-contracts/contracts/data-availability/RollupL2DAValidator.sol). +- `verifyCompressedStateDiffs` that can verify the correctness of our standard state diff compression. This method can be used by common L2DAValidators and it is for instance utilized by the [L2DAValidator](../../system-contracts/contracts/libraries/L2DAValidator.sol). You can read more about how custom DA is handled [here](../settlement_contracts/data_availability/custom_da.md). @@ -657,7 +657,7 @@ You can read more about how custom DA is handled [here](../settlement_contracts/ This contract is responsible for separating pubdata into chunks that each fit into a [4844 blob](../settlement_contracts/data_availability/rollup_da.md) and calculating the hash of the preimage of said blob. If a chunk's size is less than the total number of bytes for a blob, we pad it on the right with zeroes as the circuits will require that the chunk is of exact size. -This contract can be utilized by L2DAValidators, e.g. [RollupL2DAValidator](../../l2-contracts/contracts/data-availability/RollupL2DAValidator.sol) uses it to compress the pubdata into blobs. +This contract can be utilized by L2DAValidators, e.g. [L2DAValidator library](../../system-contracts/contracts/libraries/L2DAValidator.sol) uses it to compress the pubdata into blobs. ### CodeOracle @@ -704,11 +704,14 @@ A contract that is responsible for facilitating initialization of a newly create ### Bridging-related contracts -`L2Bridgehub`, `L2AssetRouter`, `L2NativeTokenVault`, as well as `L2MessageRoot`. +- [`L2Bridgehub`](../../l1-contracts/contracts/bridgehub/L2Bridgehub.sol) +- [`L2AssetRouter`](../../l1-contracts/contracts/bridge/asset-router/L2AssetRouter.sol) +- [`L2NativeTokenVault`](../../l1-contracts/contracts/bridge/ntv/L2NativeTokenVault.sol) +- [`L2MessageRoot`](../../l1-contracts/contracts/bridgehub/L2MessageRoot.sol) These contracts are used to facilitate cross-chain communication as well value bridging. You can read more about then in [the asset router spec](../bridging/asset_router/overview.md). -Note, that [L2AssetRouter](../../l1-contracts/contracts/bridge/asset-router/L2AssetRouter.sol) and [L2NativeTokenVault](../../l1-contracts/contracts/bridge/ntv/L2NativeTokenVault.sol) have unique code, the L2Bridgehub and L2MessageRoot share the same source code with their L1 precompiles, i.e. the L2Bridgehub has [this](../../l1-contracts/contracts/bridgehub/Bridgehub.sol) code and L2MessageRoot has [this](../../l1-contracts/contracts/bridgehub/MessageRoot.sol) code. +Note, that [L2AssetRouter](../../l1-contracts/contracts/bridge/asset-router/L2AssetRouter.sol) and [L2NativeTokenVault](../../l1-contracts/contracts/bridge/ntv/L2NativeTokenVault.sol) have unique code, the L2Bridgehub and L2MessageRoot share the same source code with their L1 precompiles, i.e. the L2Bridgehub has [this](../../l1-contracts/contracts/bridgehub/L2Bridgehub.sol) code and L2MessageRoot has [this](../../l1-contracts/contracts/bridgehub/L2MessageRoot.sol) code. ### SloadContract diff --git a/l1-contracts/.env b/l1-contracts/.env index ba743f817e..946080b2c6 100644 --- a/l1-contracts/.env +++ b/l1-contracts/.env @@ -59,3 +59,5 @@ DEPLOY_GATEWAY_TX_FILTERER_INPUT=/script-config/deploy-gateway-tx-filterer.toml DEPLOY_GATEWAY_TX_FILTERER_OUTPUT=/script-out/deploy-gateway-tx-filterer.toml GATEWAY_VOTE_PREPARATION_INPUT=/script-config/gateway-vote-preparation.toml GATEWAY_VOTE_PREPARATION_OUTPUT=/script-out/gateway-vote-preparation.toml +ZK_OS_V28_1_UPGRADE_ECOSYSTEM_INPUT=/script-config/zk-os-v28-1-upgrade-ecosystem.toml +ZK_OS_V28_1_UPGRADE_ECOSYSTEM_OUTPUT=/script-out/zk-os-v28-1-upgrade-ecosystem.toml diff --git a/l1-contracts/contracts/bridge/BridgedStandardERC20.sol b/l1-contracts/contracts/bridge/BridgedStandardERC20.sol index 58a58d8ac5..93817c37f6 100644 --- a/l1-contracts/contracts/bridge/BridgedStandardERC20.sol +++ b/l1-contracts/contracts/bridge/BridgedStandardERC20.sol @@ -10,7 +10,7 @@ import {IBridgedStandardToken} from "./interfaces/IBridgedStandardToken.sol"; import {NonSequentialVersion, Unauthorized, ZeroAddress} from "../common/L1ContractErrors.sol"; import {L2_NATIVE_TOKEN_VAULT_ADDR} from "../common/l2-helpers/L2ContractAddresses.sol"; import {DataEncoding} from "../common/libraries/DataEncoding.sol"; -import {INativeTokenVault} from "../bridge/ntv/INativeTokenVault.sol"; +import {L2NativeTokenVault} from "../bridge/ntv/L2NativeTokenVault.sol"; /// @author Matter Labs /// @custom:security-contact security@matterlabs.dev @@ -55,7 +55,7 @@ contract BridgedStandardERC20 is ERC20PermitUpgradeable, IBridgedStandardToken, ntv = L2_NATIVE_TOKEN_VAULT_ADDR; nativeTokenVault = L2_NATIVE_TOKEN_VAULT_ADDR; assetId = DataEncoding.encodeNTVAssetId( - INativeTokenVault(L2_NATIVE_TOKEN_VAULT_ADDR).L1_CHAIN_ID(), + L2NativeTokenVault(L2_NATIVE_TOKEN_VAULT_ADDR).L1_CHAIN_ID(), originToken ); } diff --git a/l1-contracts/contracts/bridge/L1Nullifier.sol b/l1-contracts/contracts/bridge/L1Nullifier.sol index 494cb97cb3..0be9483df0 100644 --- a/l1-contracts/contracts/bridge/L1Nullifier.sol +++ b/l1-contracts/contracts/bridge/L1Nullifier.sol @@ -8,7 +8,8 @@ import {PausableUpgradeable} from "@openzeppelin/contracts-upgradeable-v4/securi import {IERC20} from "@openzeppelin/contracts-v4/token/ERC20/IERC20.sol"; import {SafeERC20} from "@openzeppelin/contracts-v4/token/ERC20/utils/SafeERC20.sol"; -import {IAssetRouterBase, LEGACY_ENCODING_VERSION, NEW_ENCODING_VERSION} from "./asset-router/IAssetRouterBase.sol"; +import {LEGACY_ENCODING_VERSION, NEW_ENCODING_VERSION} from "./asset-router/IAssetRouterBase.sol"; +import {AssetRouterBase} from "./asset-router/AssetRouterBase.sol"; import {IL1NativeTokenVault} from "./ntv/IL1NativeTokenVault.sol"; import {IL1ERC20Bridge} from "./interfaces/IL1ERC20Bridge.sol"; @@ -24,7 +25,7 @@ import {ReentrancyGuard} from "../common/ReentrancyGuard.sol"; import {ETH_TOKEN_ADDRESS} from "../common/Config.sol"; import {DataEncoding} from "../common/libraries/DataEncoding.sol"; -import {IBridgehub} from "../bridgehub/IBridgehub.sol"; +import {IL1Bridgehub} from "../bridgehub/IL1Bridgehub.sol"; import {L2_ASSET_ROUTER_ADDR, L2_BASE_TOKEN_SYSTEM_CONTRACT_ADDR} from "../common/l2-helpers/L2ContractAddresses.sol"; import {AddressAlreadySet, DepositDoesNotExist, DepositExists, InvalidProof, InvalidSelector, L2WithdrawalMessageWrongLength, LegacyBridgeNotSet, LegacyMethodForNonL1Token, SharedBridgeKey, SharedBridgeValueNotSet, TokenNotLegacy, Unauthorized, WithdrawalAlreadyFinalized, ZeroAddress} from "../common/L1ContractErrors.sol"; import {EthTransferFailed, NativeTokenVaultAlreadySet, WrongL2Sender, WrongMsgLength} from "./L1BridgeContractErrors.sol"; @@ -37,7 +38,7 @@ contract L1Nullifier is IL1Nullifier, ReentrancyGuard, Ownable2StepUpgradeable, using SafeERC20 for IERC20; /// @dev Bridgehub smart contract that is used to operate with L2 via asynchronous L2 <-> L1 communication. - IBridgehub public immutable override BRIDGE_HUB; + IL1Bridgehub public immutable override BRIDGE_HUB; /// @dev Era's chainID uint256 internal immutable ERA_CHAIN_ID; @@ -134,7 +135,7 @@ contract L1Nullifier is IL1Nullifier, ReentrancyGuard, Ownable2StepUpgradeable, /// @dev Contract is expected to be used as proxy implementation. /// @dev Initialize the implementation to prevent Parity hack. - constructor(IBridgehub _bridgehub, uint256 _eraChainId, address _eraDiamondProxy) reentrancyGuardInitializer { + constructor(IL1Bridgehub _bridgehub, uint256 _eraChainId, address _eraDiamondProxy) reentrancyGuardInitializer { _disableInitializers(); BRIDGE_HUB = _bridgehub; ERA_CHAIN_ID = _eraChainId; @@ -426,7 +427,7 @@ contract L1Nullifier is IL1Nullifier, ReentrancyGuard, Ownable2StepUpgradeable, } } - l1AssetRouter.finalizeDeposit(chainId, assetId, transferData); + AssetRouterBase(address(l1AssetRouter)).finalizeDeposit(chainId, assetId, transferData); } /// @dev Determines if an eth withdrawal was initiated on ZKsync Era before the upgrade to the Shared Bridge. @@ -608,7 +609,7 @@ contract L1Nullifier is IL1Nullifier, ReentrancyGuard, Ownable2StepUpgradeable, _amount: amount, _erc20Metadata: new bytes(0) }); - } else if (bytes4(functionSignature) == IAssetRouterBase.finalizeDeposit.selector) { + } else if (bytes4(functionSignature) == AssetRouterBase.finalizeDeposit.selector) { // The data is expected to be at least 68 bytes long to contain assetId. if (_l2ToL1message.length < 68) { revert WrongMsgLength(68, _l2ToL1message.length); diff --git a/l1-contracts/contracts/bridge/asset-router/AssetRouterBase.sol b/l1-contracts/contracts/bridge/asset-router/AssetRouterBase.sol index fdaad99749..28b221d702 100644 --- a/l1-contracts/contracts/bridge/asset-router/AssetRouterBase.sol +++ b/l1-contracts/contracts/bridge/asset-router/AssetRouterBase.sol @@ -14,9 +14,8 @@ import {DataEncoding} from "../../common/libraries/DataEncoding.sol"; import {L2_NATIVE_TOKEN_VAULT_ADDR} from "../../common/l2-helpers/L2ContractAddresses.sol"; -import {IBridgehub} from "../../bridgehub/IBridgehub.sol"; import {Unauthorized} from "../../common/L1ContractErrors.sol"; -import {INativeTokenVault} from "../ntv/INativeTokenVault.sol"; +import {INativeTokenVaultBase} from "../ntv/INativeTokenVaultBase.sol"; /// @author Matter Labs /// @custom:security-contact security@matterlabs.dev @@ -25,15 +24,6 @@ import {INativeTokenVault} from "../ntv/INativeTokenVault.sol"; abstract contract AssetRouterBase is IAssetRouterBase, Ownable2StepUpgradeable, PausableUpgradeable { using SafeERC20 for IERC20; - /// @dev Bridgehub smart contract that is used to operate with L2 via asynchronous L2 <-> L1 communication. - IBridgehub public immutable override BRIDGE_HUB; - - /// @dev Chain ID of L1 for bridging reasons - uint256 public immutable L1_CHAIN_ID; - - /// @dev Chain ID of Era for legacy reasons - uint256 public immutable ERA_CHAIN_ID; - /// @dev Maps asset ID to address of corresponding asset handler. /// @dev Tracks the address of Asset Handler contracts, where bridged funds are locked for each asset. /// @dev P.S. this liquidity was locked directly in SharedBridge before. @@ -53,27 +43,17 @@ abstract contract AssetRouterBase is IAssetRouterBase, Ownable2StepUpgradeable, */ uint256[48] private __gap; - /// @notice Checks that the message sender is the bridgehub. - modifier onlyBridgehub() { - if (msg.sender != address(BRIDGE_HUB)) { - revert Unauthorized(msg.sender); - } - _; - } - - /// @dev Contract is expected to be used as proxy implementation. - /// @dev Initialize the implementation to prevent Parity hack. - constructor(uint256 _l1ChainId, uint256 _eraChainId, IBridgehub _bridgehub) { - L1_CHAIN_ID = _l1ChainId; - ERA_CHAIN_ID = _eraChainId; - BRIDGE_HUB = _bridgehub; - } - - /// @inheritdoc IAssetRouterBase + /// @notice Sets the asset handler address for a specified asset ID on the chain of the asset deployment tracker. + /// @dev The caller of this function is encoded within the `assetId`, therefore, it should be invoked by the asset deployment tracker contract. + /// @dev No access control on the caller, as msg.sender is encoded in the assetId. + /// @dev Typically, for most tokens, ADT is the native token vault. However, custom tokens may have their own specific asset deployment trackers. + /// @dev `setAssetHandlerAddressOnCounterpart` should be called on L1 to set asset handlers on L2 chains for a specific asset ID. + /// @param _assetRegistrationData The asset data which may include the asset address and any additional required data or encodings. + /// @param _assetHandlerAddress The address of the asset handler to be set for the provided asset. function setAssetHandlerAddressThisChain( bytes32 _assetRegistrationData, address _assetHandlerAddress - ) external virtual override; + ) external virtual; function _setAssetHandlerAddressThisChain( address _nativeTokenVault, @@ -95,7 +75,12 @@ abstract contract AssetRouterBase is IAssetRouterBase, Ownable2StepUpgradeable, Receive transaction Functions //////////////////////////////////////////////////////////////*/ - /// @inheritdoc IAssetRouterBase + /// @notice Finalize the withdrawal and release funds. + /// @param _chainId The chain ID of the transaction to check. + /// @param _assetId The bridged asset ID. + /// @param _transferData The position in the L2 logs Merkle tree of the l2Log that was sent with the message. + /// @dev We have both the legacy finalizeWithdrawal and the new finalizeDeposit functions, + /// finalizeDeposit uses the new format. On the L2 we have finalizeDeposit with new and old formats both. function finalizeDeposit(uint256 _chainId, bytes32 _assetId, bytes calldata _transferData) public payable virtual; function _finalizeDeposit( @@ -153,7 +138,7 @@ abstract contract AssetRouterBase is IAssetRouterBase, Ownable2StepUpgradeable, // Note, that it may "pollute" error handling a bit: instead of getting error for asset handler not being // present, the user will get whatever error the native token vault will return, however, providing // more advanced error handling requires more extensive code and will be added in the future releases. - INativeTokenVault(_nativeTokenVault).tryRegisterTokenFromBurnData(_transferData, _assetId); + INativeTokenVaultBase(_nativeTokenVault).tryRegisterTokenFromBurnData(_transferData, _assetId); // We do not do any additional transformations here (like setting `assetHandler` in the mapping), // because we expect that all those happened inside `tryRegisterTokenFromBurnData` diff --git a/l1-contracts/contracts/bridge/asset-router/IAssetRouterBase.sol b/l1-contracts/contracts/bridge/asset-router/IAssetRouterBase.sol index 4b9639face..95d4bc270a 100644 --- a/l1-contracts/contracts/bridge/asset-router/IAssetRouterBase.sol +++ b/l1-contracts/contracts/bridge/asset-router/IAssetRouterBase.sol @@ -2,8 +2,6 @@ pragma solidity 0.8.28; -import {IBridgehub} from "../../bridgehub/IBridgehub.sol"; - /// @dev The encoding version used for legacy txs. bytes1 constant LEGACY_ENCODING_VERSION = 0x00; @@ -49,26 +47,5 @@ interface IAssetRouterBase { event DepositFinalizedAssetRouter(uint256 indexed chainId, bytes32 indexed assetId, bytes assetData); - function BRIDGE_HUB() external view returns (IBridgehub); - - function L1_CHAIN_ID() external view returns (uint256); - - /// @notice Sets the asset handler address for a specified asset ID on the chain of the asset deployment tracker. - /// @dev The caller of this function is encoded within the `assetId`, therefore, it should be invoked by the asset deployment tracker contract. - /// @dev No access control on the caller, as msg.sender is encoded in the assetId. - /// @dev Typically, for most tokens, ADT is the native token vault. However, custom tokens may have their own specific asset deployment trackers. - /// @dev `setAssetHandlerAddressOnCounterpart` should be called on L1 to set asset handlers on L2 chains for a specific asset ID. - /// @param _assetRegistrationData The asset data which may include the asset address and any additional required data or encodings. - /// @param _assetHandlerAddress The address of the asset handler to be set for the provided asset. - function setAssetHandlerAddressThisChain(bytes32 _assetRegistrationData, address _assetHandlerAddress) external; - function assetHandlerAddress(bytes32 _assetId) external view returns (address); - - /// @notice Finalize the withdrawal and release funds. - /// @param _chainId The chain ID of the transaction to check. - /// @param _assetId The bridged asset ID. - /// @param _transferData The position in the L2 logs Merkle tree of the l2Log that was sent with the message. - /// @dev We have both the legacy finalizeWithdrawal and the new finalizeDeposit functions, - /// finalizeDeposit uses the new format. On the L2 we have finalizeDeposit with new and old formats both. - function finalizeDeposit(uint256 _chainId, bytes32 _assetId, bytes memory _transferData) external payable; } diff --git a/l1-contracts/contracts/bridge/asset-router/IL1AssetRouter.sol b/l1-contracts/contracts/bridge/asset-router/IL1AssetRouter.sol index f39e3c8b78..841afea1f1 100644 --- a/l1-contracts/contracts/bridge/asset-router/IL1AssetRouter.sol +++ b/l1-contracts/contracts/bridge/asset-router/IL1AssetRouter.sol @@ -3,9 +3,9 @@ pragma solidity ^0.8.21; import {IL1Nullifier} from "../interfaces/IL1Nullifier.sol"; -import {INativeTokenVault} from "../ntv/INativeTokenVault.sol"; +import {INativeTokenVaultBase} from "../ntv/INativeTokenVaultBase.sol"; import {IAssetRouterBase} from "./IAssetRouterBase.sol"; -import {L2TransactionRequestTwoBridgesInner} from "../../bridgehub/IBridgehub.sol"; +import {L2TransactionRequestTwoBridgesInner} from "../../bridgehub/IBridgehubBase.sol"; import {IL1SharedBridgeLegacy} from "../interfaces/IL1SharedBridgeLegacy.sol"; import {IL1ERC20Bridge} from "../interfaces/IL1ERC20Bridge.sol"; @@ -79,11 +79,11 @@ interface IL1AssetRouter is IAssetRouterBase, IL1SharedBridgeLegacy { function ETH_TOKEN_ASSET_ID() external view returns (bytes32); - function nativeTokenVault() external view returns (INativeTokenVault); + function nativeTokenVault() external view returns (INativeTokenVaultBase); function setAssetDeploymentTracker(bytes32 _assetRegistrationData, address _assetDeploymentTracker) external; - function setNativeTokenVault(INativeTokenVault _nativeTokenVault) external; + function setNativeTokenVault(INativeTokenVaultBase _nativeTokenVault) external; function setL1Erc20Bridge(IL1ERC20Bridge _legacyBridge) external; diff --git a/l1-contracts/contracts/bridge/asset-router/L1AssetRouter.sol b/l1-contracts/contracts/bridge/asset-router/L1AssetRouter.sol index 895c701767..93e4961591 100644 --- a/l1-contracts/contracts/bridge/asset-router/L1AssetRouter.sol +++ b/l1-contracts/contracts/bridge/asset-router/L1AssetRouter.sol @@ -7,14 +7,14 @@ import {SafeERC20} from "@openzeppelin/contracts-v4/token/ERC20/utils/SafeERC20. import {IL1AssetRouter} from "./IL1AssetRouter.sol"; import {IL2AssetRouter} from "./IL2AssetRouter.sol"; -import {IAssetRouterBase, LEGACY_ENCODING_VERSION, NEW_ENCODING_VERSION, SET_ASSET_HANDLER_COUNTERPART_ENCODING_VERSION} from "./IAssetRouterBase.sol"; +import {LEGACY_ENCODING_VERSION, NEW_ENCODING_VERSION, SET_ASSET_HANDLER_COUNTERPART_ENCODING_VERSION} from "./IAssetRouterBase.sol"; import {AssetRouterBase} from "./AssetRouterBase.sol"; import {IL1AssetHandler} from "../interfaces/IL1AssetHandler.sol"; import {IL1ERC20Bridge} from "../interfaces/IL1ERC20Bridge.sol"; import {IAssetHandler} from "../interfaces/IAssetHandler.sol"; import {IL1Nullifier} from "../interfaces/IL1Nullifier.sol"; -import {INativeTokenVault} from "../ntv/INativeTokenVault.sol"; +import {INativeTokenVaultBase} from "../ntv/INativeTokenVaultBase.sol"; import {IL2SharedBridgeLegacyFunctions} from "../interfaces/IL2SharedBridgeLegacyFunctions.sol"; import {ReentrancyGuard} from "../../common/ReentrancyGuard.sol"; @@ -25,7 +25,8 @@ import {NativeTokenVaultAlreadySet} from "../L1BridgeContractErrors.sol"; import {AddressAlreadySet, AssetHandlerDoesNotExist, AssetIdNotSupported, LegacyBridgeUsesNonNativeToken, LegacyEncodingUsedForNonL1Token, NonEmptyMsgValue, TokenNotSupported, TokensWithFeesNotSupported, Unauthorized, UnsupportedEncodingVersion, ZeroAddress} from "../../common/L1ContractErrors.sol"; import {L2_ASSET_ROUTER_ADDR} from "../../common/l2-helpers/L2ContractAddresses.sol"; -import {IBridgehub, L2TransactionRequestDirect, L2TransactionRequestTwoBridgesInner} from "../../bridgehub/IBridgehub.sol"; +import {IL1Bridgehub} from "../../bridgehub/IL1Bridgehub.sol"; +import {L2TransactionRequestDirect, L2TransactionRequestTwoBridgesInner} from "../../bridgehub/IBridgehubBase.sol"; import {IL1AssetDeploymentTracker} from "../interfaces/IL1AssetDeploymentTracker.sol"; @@ -36,24 +37,37 @@ import {IL1AssetDeploymentTracker} from "../interfaces/IL1AssetDeploymentTracker contract L1AssetRouter is AssetRouterBase, IL1AssetRouter, ReentrancyGuard { using SafeERC20 for IERC20; + /// @dev Bridgehub smart contract that is used to operate with L2 via asynchronous L2 <-> L1 communication. + address public immutable BRIDGE_HUB; + + /// @dev Chain ID of Era for legacy reasons + uint256 public immutable ERA_CHAIN_ID; + /// @dev The address of the WETH token on L1. - address public immutable override L1_WETH_TOKEN; + address public immutable L1_WETH_TOKEN; /// @dev The assetId of the base token. bytes32 public immutable ETH_TOKEN_ASSET_ID; /// @dev The address of ZKsync Era diamond proxy contract. - address internal immutable ERA_DIAMOND_PROXY; + address public immutable ERA_DIAMOND_PROXY; /// @dev Address of nullifier. IL1Nullifier public immutable L1_NULLIFIER; /// @dev Address of native token vault. - INativeTokenVault public nativeTokenVault; + INativeTokenVaultBase public nativeTokenVault; /// @dev Address of legacy bridge. IL1ERC20Bridge public legacyBridge; + /// @notice Legacy function to get the L2 shared bridge address for a chain. + /// @dev In case the chain has been deployed after the gateway release, + /// the returned value is 0. + function l2BridgeAddress(uint256 _chainId) external view override returns (address) { + return L1_NULLIFIER.l2BridgeAddress(_chainId); + } + /// @notice Checks that the message sender is the nullifier. modifier onlyNullifier() { if (msg.sender != address(L1_NULLIFIER)) { @@ -86,17 +100,27 @@ contract L1AssetRouter is AssetRouterBase, IL1AssetRouter, ReentrancyGuard { _; } + /// @notice Checks that the message sender is the bridgehub. + modifier onlyBridgehub() { + if (msg.sender != address(BRIDGE_HUB)) { + revert Unauthorized(msg.sender); + } + _; + } + /// @dev Contract is expected to be used as proxy implementation. /// @dev Initialize the implementation to prevent Parity hack. constructor( - address _l1WethAddress, + address _l1WethToken, address _bridgehub, address _l1Nullifier, uint256 _eraChainId, address _eraDiamondProxy - ) reentrancyGuardInitializer AssetRouterBase(block.chainid, _eraChainId, IBridgehub(_bridgehub)) { + ) reentrancyGuardInitializer { _disableInitializers(); - L1_WETH_TOKEN = _l1WethAddress; + BRIDGE_HUB = _bridgehub; + ERA_CHAIN_ID = _eraChainId; + L1_WETH_TOKEN = _l1WethToken; ERA_DIAMOND_PROXY = _eraDiamondProxy; L1_NULLIFIER = IL1Nullifier(_l1Nullifier); ETH_TOKEN_ASSET_ID = DataEncoding.encodeNTVAssetId(block.chainid, ETH_TOKEN_ADDRESS); @@ -116,7 +140,7 @@ contract L1AssetRouter is AssetRouterBase, IL1AssetRouter, ReentrancyGuard { /// @notice Sets the NativeTokenVault contract address. /// @dev Should be called only once by the owner. /// @param _nativeTokenVault The address of the native token vault. - function setNativeTokenVault(INativeTokenVault _nativeTokenVault) external onlyOwner { + function setNativeTokenVault(INativeTokenVaultBase _nativeTokenVault) external onlyOwner { if (address(nativeTokenVault) != address(0)) { revert NativeTokenVaultAlreadySet(); } @@ -152,11 +176,11 @@ contract L1AssetRouter is AssetRouterBase, IL1AssetRouter, ReentrancyGuard { emit AssetDeploymentTrackerSet(assetId, _assetDeploymentTracker, _assetRegistrationData); } - /// @inheritdoc IAssetRouterBase + /// @inheritdoc AssetRouterBase function setAssetHandlerAddressThisChain( bytes32 _assetRegistrationData, address _assetHandlerAddress - ) external override(AssetRouterBase, IAssetRouterBase) { + ) external override { _setAssetHandlerAddressThisChain(address(nativeTokenVault), _assetRegistrationData, _assetHandlerAddress); } @@ -262,7 +286,7 @@ contract L1AssetRouter is AssetRouterBase, IL1AssetRouter, ReentrancyGuard { revert UnsupportedEncodingVersion(); } - if (BRIDGE_HUB.baseTokenAssetId(_chainId) == assetId) { + if (IL1Bridgehub(BRIDGE_HUB).baseTokenAssetId(_chainId) == assetId) { revert AssetIdNotSupported(assetId); } @@ -315,12 +339,12 @@ contract L1AssetRouter is AssetRouterBase, IL1AssetRouter, ReentrancyGuard { Receive transaction Functions //////////////////////////////////////////////////////////////*/ - /// @inheritdoc IAssetRouterBase + /// @inheritdoc AssetRouterBase function finalizeDeposit( uint256 _chainId, bytes32 _assetId, bytes calldata _transferData - ) public payable override(AssetRouterBase, IAssetRouterBase) onlyNullifier { + ) public payable override onlyNullifier { _finalizeDeposit(_chainId, _assetId, _transferData, address(nativeTokenVault)); emit DepositFinalizedAssetRouter(_chainId, _assetId, _transferData); } @@ -417,7 +441,7 @@ contract L1AssetRouter is AssetRouterBase, IL1AssetRouter, ReentrancyGuard { uint256 _amount, address _originalCaller ) external onlyNativeTokenVault returns (bool) { - address l1TokenAddress = INativeTokenVault(address(nativeTokenVault)).tokenAddress(_assetId); + address l1TokenAddress = nativeTokenVault.tokenAddress(_assetId); if (l1TokenAddress == address(0) || l1TokenAddress == ETH_TOKEN_ADDRESS) { return false; } @@ -485,7 +509,7 @@ contract L1AssetRouter is AssetRouterBase, IL1AssetRouter, ReentrancyGuard { (nativeTokenVault.tokenAddress(_assetId) == address(0)) || (nativeTokenVault.originChainId(_assetId) != block.chainid) ) { - return abi.encodeCall(IAssetRouterBase.finalizeDeposit, (block.chainid, _assetId, _assetData)); + return abi.encodeCall(AssetRouterBase.finalizeDeposit, (block.chainid, _assetId, _assetData)); } else { // slither-disable-next-line unused-return (, address _receiver, address _parsedNativeToken, uint256 _amount, bytes memory _gettersData) = DataEncoding @@ -577,7 +601,7 @@ contract L1AssetRouter is AssetRouterBase, IL1AssetRouter, ReentrancyGuard { factoryDeps: new bytes[](0), refundRecipient: refundRecipient }); - txHash = BRIDGE_HUB.requestL2TransactionDirect{value: msg.value}(request); + txHash = IL1Bridgehub(BRIDGE_HUB).requestL2TransactionDirect{value: msg.value}(request); } { @@ -666,11 +690,4 @@ contract L1AssetRouter is AssetRouterBase, IL1AssetRouter, ReentrancyGuard { ) external view returns (bool) { return L1_NULLIFIER.isWithdrawalFinalized(_chainId, _l2BatchNumber, _l2MessageIndex); } - - /// @notice Legacy function to get the L2 shared bridge address for a chain. - /// @dev In case the chain has been deployed after the gateway release, - /// the returned value is 0. - function l2BridgeAddress(uint256 _chainId) external view override returns (address) { - return L1_NULLIFIER.l2BridgeAddress(_chainId); - } } diff --git a/l1-contracts/contracts/bridge/asset-router/L2AssetRouter.sol b/l1-contracts/contracts/bridge/asset-router/L2AssetRouter.sol index c9acde77cc..8c4c5e3aff 100644 --- a/l1-contracts/contracts/bridge/asset-router/L2AssetRouter.sol +++ b/l1-contracts/contracts/bridge/asset-router/L2AssetRouter.sol @@ -3,19 +3,18 @@ pragma solidity 0.8.28; import {IL2AssetRouter} from "./IL2AssetRouter.sol"; -import {IAssetRouterBase} from "./IAssetRouterBase.sol"; import {AssetRouterBase} from "./AssetRouterBase.sol"; import {IL2NativeTokenVault} from "../ntv/IL2NativeTokenVault.sol"; +import {NativeTokenVaultBase} from "../ntv/NativeTokenVaultBase.sol"; import {IL2SharedBridgeLegacy} from "../interfaces/IL2SharedBridgeLegacy.sol"; import {IBridgedStandardToken} from "../interfaces/IBridgedStandardToken.sol"; import {IL1ERC20Bridge} from "../interfaces/IL1ERC20Bridge.sol"; -import {IBridgehub} from "../../bridgehub/IBridgehub.sol"; import {AddressAliasHelper} from "../../vendor/AddressAliasHelper.sol"; import {ReentrancyGuard} from "../../common/ReentrancyGuard.sol"; -import {L2_BRIDGEHUB_ADDR, L2_NATIVE_TOKEN_VAULT_ADDR} from "../../common/l2-helpers/L2ContractAddresses.sol"; +import {L2_COMPLEX_UPGRADER_ADDR, L2_NATIVE_TOKEN_VAULT_ADDR} from "../../common/l2-helpers/L2ContractAddresses.sol"; import {L2ContractHelper} from "../../common/l2-helpers/L2ContractHelper.sol"; import {DataEncoding} from "../../common/libraries/DataEncoding.sol"; import {AmountMustBeGreaterThanZero, AssetIdNotSupported, EmptyAddress, InvalidCaller, TokenNotLegacy} from "../../common/L1ContractErrors.sol"; @@ -24,15 +23,32 @@ import {AmountMustBeGreaterThanZero, AssetIdNotSupported, EmptyAddress, InvalidC /// @custom:security-contact security@matterlabs.dev /// @notice The "default" bridge implementation for the ERC20 tokens. Note, that it does not /// support any custom token logic, i.e. rebase tokens' functionality is not supported. +/// @dev Important: L2 contracts are not allowed to have any immutable variables or constructors. This is needed for compatibility with ZKsyncOS. contract L2AssetRouter is AssetRouterBase, IL2AssetRouter, ReentrancyGuard { - /// @dev The address of the L2 legacy shared bridge. - address public immutable L2_LEGACY_SHARED_BRIDGE; + /// @dev Chain ID of L1 for bridging reasons. + /// @dev Note, that while it is a simple storage variable, the name is in capslock for the backward compatibility with + /// the old version where it was an immutable. + uint256 public L1_CHAIN_ID; - /// @dev The asset id of the base token. - bytes32 public immutable BASE_TOKEN_ASSET_ID; + /// @dev Chain ID of Era for legacy reasons. + /// @dev Note, that while it is a simple storage variable, the name is in capslock for the backward compatibility with + /// the old version where it was an immutable. + uint256 public ERA_CHAIN_ID; /// @dev The address of the L1 asset router counterpart. - address public immutable override L1_ASSET_ROUTER; + /// @dev Note, that while it is a simple storage variable, the name is in capslock for the backward compatibility with + /// the old version where it was an immutable. + address public L1_ASSET_ROUTER; + + /// @dev The address of the L2 legacy shared bridge. + /// @dev Note, that while it is a simple storage variable, the name is in capslock for the backward compatibility with + /// the old version where it was an immutable. + address public L2_LEGACY_SHARED_BRIDGE; + + /// @dev The asset id of the base token. + /// @dev Note, that while it is a simple storage variable, the name is in capslock for the backward compatibility with + /// the old version where it was an immutable. + bytes32 public BASE_TOKEN_ASSET_ID; /// @notice Checks that the message sender is the L1 Asset Router. modifier onlyAssetRouterCounterpart(uint256 _originChainId) { @@ -75,26 +91,60 @@ contract L2AssetRouter is AssetRouterBase, IL2AssetRouter, ReentrancyGuard { _; } - /// @dev Disable the initialization to prevent Parity hack. - /// @dev this contract is deployed in the L2GenesisUpgrade, and is meant as direct deployment without a proxy. - /// @param _l1AssetRouter The address of the L1 Bridge contract. - constructor( + /// @dev Only allows calls from the complex upgrader contract on L2. + modifier onlyUpgrader() { + if (msg.sender != L2_COMPLEX_UPGRADER_ADDR) { + revert InvalidCaller(msg.sender); + } + _; + } + + /// @notice Initializes the contract. + /// @dev This function is used to initialize the contract with the initial values. + /// @param _l1ChainId The chain id of L1. + /// @param _eraChainId The chain id of Era. + /// @param _l1AssetRouter The address of the L1 asset router. + /// @param _legacySharedBridge The address of the L2 legacy shared bridge. + /// @param _baseTokenAssetId The asset id of the base token. + /// @param _aliasedOwner The address of the owner of the contract. + function initL2( uint256 _l1ChainId, uint256 _eraChainId, address _l1AssetRouter, address _legacySharedBridge, bytes32 _baseTokenAssetId, address _aliasedOwner - ) AssetRouterBase(_l1ChainId, _eraChainId, IBridgehub(L2_BRIDGEHUB_ADDR)) reentrancyGuardInitializer { + ) public reentrancyGuardInitializer onlyUpgrader { + _disableInitializers(); + // solhint-disable-next-line func-named-parameters + updateL2(_l1ChainId, _eraChainId, _l1AssetRouter, _legacySharedBridge, _baseTokenAssetId); + _setAssetHandler(_baseTokenAssetId, L2_NATIVE_TOKEN_VAULT_ADDR); + _transferOwnership(_aliasedOwner); + } + + /// @notice Updates the contract. + /// @dev This function is used to initialize the new implementation of L2AssetRouter on existing chains during + /// the upgrade. + /// @param _l1ChainId The chain id of L1. + /// @param _eraChainId The chain id of Era. + /// @param _l1AssetRouter The address of the L1 asset router. + /// @param _legacySharedBridge The address of the L2 legacy shared bridge. + /// @param _baseTokenAssetId The asset id of the base token. + function updateL2( + uint256 _l1ChainId, + uint256 _eraChainId, + address _l1AssetRouter, + address _legacySharedBridge, + bytes32 _baseTokenAssetId + ) public onlyUpgrader { L2_LEGACY_SHARED_BRIDGE = _legacySharedBridge; if (_l1AssetRouter == address(0)) { revert EmptyAddress(); } + L1_CHAIN_ID = _l1ChainId; L1_ASSET_ROUTER = _l1AssetRouter; - _setAssetHandler(_baseTokenAssetId, L2_NATIVE_TOKEN_VAULT_ADDR); BASE_TOKEN_ASSET_ID = _baseTokenAssetId; - _disableInitializers(); - _transferOwnership(_aliasedOwner); + ERA_CHAIN_ID = _eraChainId; } /// @inheritdoc IL2AssetRouter @@ -106,11 +156,11 @@ contract L2AssetRouter is AssetRouterBase, IL2AssetRouter, ReentrancyGuard { _setAssetHandler(_assetId, _assetHandlerAddress); } - /// @inheritdoc IAssetRouterBase + /// @inheritdoc AssetRouterBase function setAssetHandlerAddressThisChain( bytes32 _assetRegistrationData, address _assetHandlerAddress - ) external override(AssetRouterBase, IAssetRouterBase) { + ) external override { _setAssetHandlerAddressThisChain(L2_NATIVE_TOKEN_VAULT_ADDR, _assetRegistrationData, _assetHandlerAddress); } @@ -132,13 +182,7 @@ contract L2AssetRouter is AssetRouterBase, IL2AssetRouter, ReentrancyGuard { uint256, bytes32 _assetId, bytes calldata _transferData - ) - public - payable - override(AssetRouterBase, IAssetRouterBase) - onlyAssetRouterCounterpartOrSelf(L1_CHAIN_ID) - nonReentrant - { + ) public payable override onlyAssetRouterCounterpartOrSelf(L1_CHAIN_ID) nonReentrant { if (_assetId == BASE_TOKEN_ASSET_ID) { revert AssetIdNotSupported(BASE_TOKEN_ASSET_ID); } @@ -215,7 +259,7 @@ contract L2AssetRouter is AssetRouterBase, IL2AssetRouter, ReentrancyGuard { bytes memory _l1bridgeMintData ) internal view returns (bytes memory) { // solhint-disable-next-line func-named-parameters - return abi.encodePacked(IAssetRouterBase.finalizeDeposit.selector, block.chainid, _assetId, _l1bridgeMintData); + return abi.encodePacked(AssetRouterBase.finalizeDeposit.selector, block.chainid, _assetId, _l1bridgeMintData); } /// @notice Encodes the message for l2ToL1log sent during withdraw initialization. @@ -354,7 +398,7 @@ contract L2AssetRouter is AssetRouterBase, IL2AssetRouter, ReentrancyGuard { // For backwards compatibility, the bridge smust return the address of the token even if it // has not been deployed yet. - return l2NativeTokenVault.calculateCreate2TokenAddress(L1_CHAIN_ID, _l1Token); + return NativeTokenVaultBase(address(l2NativeTokenVault)).calculateCreate2TokenAddress(L1_CHAIN_ID, _l1Token); } /// @notice Returns the address of the L1 asset router. diff --git a/l1-contracts/contracts/bridge/interfaces/IL1Nullifier.sol b/l1-contracts/contracts/bridge/interfaces/IL1Nullifier.sol index d9ae7c4a32..4975a1c91a 100644 --- a/l1-contracts/contracts/bridge/interfaces/IL1Nullifier.sol +++ b/l1-contracts/contracts/bridge/interfaces/IL1Nullifier.sol @@ -2,7 +2,7 @@ pragma solidity 0.8.28; -import {IBridgehub} from "../../bridgehub/IBridgehub.sol"; +import {IL1Bridgehub} from "../../bridgehub/IL1Bridgehub.sol"; import {IL1NativeTokenVault} from "../ntv/IL1NativeTokenVault.sol"; import {IL1ERC20Bridge} from "./IL1ERC20Bridge.sol"; @@ -64,7 +64,7 @@ interface IL1Nullifier { function finalizeDeposit(FinalizeL1DepositParams calldata _finalizeWithdrawalParams) external; - function BRIDGE_HUB() external view returns (IBridgehub); + function BRIDGE_HUB() external view returns (IL1Bridgehub); function legacyBridge() external view returns (IL1ERC20Bridge); diff --git a/l1-contracts/contracts/bridge/interfaces/IL2WrappedBaseToken.sol b/l1-contracts/contracts/bridge/interfaces/IL2WrappedBaseToken.sol index ae7e1a916c..5b9994dda9 100644 --- a/l1-contracts/contracts/bridge/interfaces/IL2WrappedBaseToken.sol +++ b/l1-contracts/contracts/bridge/interfaces/IL2WrappedBaseToken.sol @@ -12,4 +12,20 @@ interface IL2WrappedBaseToken { function depositTo(address _to) external payable; function withdrawTo(address _to, uint256 _amount) external; + + /// @notice Initializes a contract token for later use. Expected to be used in the proxy. + /// @notice This function is used to integrate the previously deployed WETH token with the bridge. + /// @dev Sets up `name`/`symbol`/`decimals` getters. + /// @param name_ The name of the token. + /// @param symbol_ The symbol of the token. + /// @param _l2Bridge Address of the L2 bridge + /// @param _l1Address Address of the L1 token that can be deposited to mint this L2 WETH. + /// Note: The decimals are hardcoded to 18, the same as on Ether. + function initializeV3( + string calldata name_, + string calldata symbol_, + address _l2Bridge, + address _l1Address, + bytes32 _baseTokenAssetId + ) external; } diff --git a/l1-contracts/contracts/bridge/ntv/IL1NativeTokenVault.sol b/l1-contracts/contracts/bridge/ntv/IL1NativeTokenVault.sol index 3c8674e76e..f4278c9bbe 100644 --- a/l1-contracts/contracts/bridge/ntv/IL1NativeTokenVault.sol +++ b/l1-contracts/contracts/bridge/ntv/IL1NativeTokenVault.sol @@ -3,7 +3,7 @@ pragma solidity 0.8.28; import {IL1Nullifier} from "../interfaces/IL1Nullifier.sol"; -import {INativeTokenVault} from "./INativeTokenVault.sol"; +import {INativeTokenVaultBase} from "./INativeTokenVaultBase.sol"; import {IL1AssetDeploymentTracker} from "../interfaces/IL1AssetDeploymentTracker.sol"; /// @title L1 Native token vault contract interface @@ -11,7 +11,7 @@ import {IL1AssetDeploymentTracker} from "../interfaces/IL1AssetDeploymentTracker /// @custom:security-contact security@matterlabs.dev /// @notice The NTV is an Asset Handler for the L1AssetRouter to handle native tokens // is IL1AssetHandler, IL1BaseTokenAssetHandler { -interface IL1NativeTokenVault is INativeTokenVault, IL1AssetDeploymentTracker { +interface IL1NativeTokenVault is INativeTokenVaultBase, IL1AssetDeploymentTracker { /// @notice The L1Nullifier contract function L1_NULLIFIER() external view returns (IL1Nullifier); diff --git a/l1-contracts/contracts/bridge/ntv/IL2NativeTokenVault.sol b/l1-contracts/contracts/bridge/ntv/IL2NativeTokenVault.sol index 237ef899b1..6b2f1654f2 100644 --- a/l1-contracts/contracts/bridge/ntv/IL2NativeTokenVault.sol +++ b/l1-contracts/contracts/bridge/ntv/IL2NativeTokenVault.sol @@ -2,11 +2,11 @@ pragma solidity ^0.8.20; -import {INativeTokenVault} from "./INativeTokenVault.sol"; +import {INativeTokenVaultBase} from "./INativeTokenVaultBase.sol"; /// @author Matter Labs /// @custom:security-contact security@matterlabs.dev -interface IL2NativeTokenVault is INativeTokenVault { +interface IL2NativeTokenVault is INativeTokenVaultBase { event FinalizeDeposit( address indexed l1Sender, address indexed l2Receiver, diff --git a/l1-contracts/contracts/bridge/ntv/INativeTokenVault.sol b/l1-contracts/contracts/bridge/ntv/INativeTokenVaultBase.sol similarity index 74% rename from l1-contracts/contracts/bridge/ntv/INativeTokenVault.sol rename to l1-contracts/contracts/bridge/ntv/INativeTokenVaultBase.sol index 1ad976d1d8..9d6fbdc4da 100644 --- a/l1-contracts/contracts/bridge/ntv/INativeTokenVault.sol +++ b/l1-contracts/contracts/bridge/ntv/INativeTokenVaultBase.sol @@ -2,24 +2,13 @@ pragma solidity 0.8.28; -import {IAssetRouterBase} from "../asset-router/IAssetRouterBase.sol"; - /// @title Base Native token vault contract interface /// @author Matter Labs /// @custom:security-contact security@matterlabs.dev /// @notice The NTV is an Asset Handler for the L1AssetRouter to handle native tokens -interface INativeTokenVault { +interface INativeTokenVaultBase { event BridgedTokenBeaconUpdated(address bridgedTokenBeacon, bytes32 bridgedTokenProxyBytecodeHash); - /// @notice The Weth token address - function WETH_TOKEN() external view returns (address); - - /// @notice The AssetRouter contract - function ASSET_ROUTER() external view returns (IAssetRouterBase); - - /// @notice The chain ID of the L1 chain - function L1_CHAIN_ID() external view returns (uint256); - /// @notice Returns the chain ID of the origin chain for a given asset ID function originChainId(bytes32 assetId) external view returns (uint256); @@ -42,9 +31,6 @@ interface INativeTokenVault { /// @notice Used to get the assetId of a token function assetId(address token) external view returns (bytes32); - /// @notice Used to get the expected bridged token address corresponding to its native counterpart - function calculateCreate2TokenAddress(uint256 _originChainId, address _originToken) external view returns (address); - /// @notice Tries to register a token from the provided `_burnData` and reverts if it is not possible. function tryRegisterTokenFromBurnData(bytes calldata _burnData, bytes32 _expectedAssetId) external; } diff --git a/l1-contracts/contracts/bridge/ntv/L1NativeTokenVault.sol b/l1-contracts/contracts/bridge/ntv/L1NativeTokenVault.sol index 264892f0e1..83b902edbc 100644 --- a/l1-contracts/contracts/bridge/ntv/L1NativeTokenVault.sol +++ b/l1-contracts/contracts/bridge/ntv/L1NativeTokenVault.sol @@ -10,13 +10,13 @@ import {IERC20} from "@openzeppelin/contracts-v4/token/ERC20/IERC20.sol"; import {SafeERC20} from "@openzeppelin/contracts-v4/token/ERC20/utils/SafeERC20.sol"; import {IL1NativeTokenVault} from "./IL1NativeTokenVault.sol"; -import {INativeTokenVault} from "./INativeTokenVault.sol"; -import {NativeTokenVault} from "./NativeTokenVault.sol"; +import {NativeTokenVaultBase} from "./NativeTokenVaultBase.sol"; import {IL1AssetHandler} from "../interfaces/IL1AssetHandler.sol"; import {IL1Nullifier} from "../interfaces/IL1Nullifier.sol"; import {IBridgedStandardToken} from "../interfaces/IBridgedStandardToken.sol"; import {IL1AssetRouter} from "../asset-router/IL1AssetRouter.sol"; +import {IAssetRouterBase} from "../asset-router/IAssetRouterBase.sol"; import {ETH_TOKEN_ADDRESS} from "../../common/Config.sol"; import {L2_NATIVE_TOKEN_VAULT_ADDR} from "../../common/l2-helpers/L2ContractAddresses.sol"; @@ -29,12 +29,47 @@ import {ClaimFailedDepositFailed, WrongAmountTransferred, WrongCounterpart, Zero /// @custom:security-contact security@matterlabs.dev /// @dev Vault holding L1 native ETH and ERC20 tokens bridged into the ZK chains. /// @dev Designed for use with a proxy for upgradability. -contract L1NativeTokenVault is IL1NativeTokenVault, IL1AssetHandler, NativeTokenVault { +contract L1NativeTokenVault is IL1NativeTokenVault, IL1AssetHandler, NativeTokenVaultBase { using SafeERC20 for IERC20; + /// @dev The address of the WETH token. + address public immutable override WETH_TOKEN; + + /// @dev The L1 asset router contract. + IAssetRouterBase public immutable override ASSET_ROUTER; + + /// @dev The assetId of the base token. + bytes32 public immutable override BASE_TOKEN_ASSET_ID; + + /// @dev The chain ID of L1. + uint256 public immutable override L1_CHAIN_ID; + /// @dev L1 nullifier contract that handles legacy functions & finalize withdrawal, confirm l2 tx mappings IL1Nullifier public immutable override L1_NULLIFIER; + /*////////////////////////////////////////////////////////////// + INTERNAL FUNCTIONS + //////////////////////////////////////////////////////////////*/ + + /// @dev Returns the L1 asset router for internal use. + function _assetRouter() internal view override returns (IAssetRouterBase) { + return ASSET_ROUTER; + } + + /// @dev Returns the L1 chain ID for internal use. + function _l1ChainId() internal view override returns (uint256) { + return L1_CHAIN_ID; + } + + /// @dev Returns the base token asset ID for internal use. + function _baseTokenAssetId() internal view override returns (bytes32) { + return BASE_TOKEN_ASSET_ID; + } + + /// @dev Returns the WETH token address for internal use. + function _wethToken() internal view override returns (address) { + return WETH_TOKEN; + } /// @dev Maps token balances for each chain to prevent unauthorized spending across ZK chains. /// This serves as a security measure until hyperbridging is implemented. /// NOTE: this function may be removed in the future, don't rely on it! @@ -42,21 +77,14 @@ contract L1NativeTokenVault is IL1NativeTokenVault, IL1AssetHandler, NativeToken /// @dev Contract is expected to be used as proxy implementation. /// @dev Initialize the implementation to prevent Parity hack. - /// @param _l1WethAddress Address of WETH on deployed chain - /// @param _l1AssetRouter Address of Asset Router on L1. + /// @param _wethToken Address of WETH on deployed chain + /// @param _assetRouter Address of Asset Router on L1. /// @param _l1Nullifier Address of the nullifier contract, which handles transaction progress between L1 and ZK chains. - constructor( - address _l1WethAddress, - address _l1AssetRouter, - IL1Nullifier _l1Nullifier - ) - NativeTokenVault( - _l1WethAddress, - _l1AssetRouter, - DataEncoding.encodeNTVAssetId(block.chainid, ETH_TOKEN_ADDRESS), - block.chainid - ) - { + constructor(address _wethToken, address _assetRouter, IL1Nullifier _l1Nullifier) { + WETH_TOKEN = _wethToken; + ASSET_ROUTER = IAssetRouterBase(_assetRouter); + L1_CHAIN_ID = block.chainid; + BASE_TOKEN_ASSET_ID = DataEncoding.encodeNTVAssetId(block.chainid, ETH_TOKEN_ADDRESS); L1_NULLIFIER = _l1Nullifier; } @@ -236,11 +264,13 @@ contract L1NativeTokenVault is IL1NativeTokenVault, IL1AssetHandler, NativeToken return bytes32(0); } - // get the computed address before the contract DeployWithCreate2 deployed using Bytecode of contract DeployWithCreate2 and salt specified by the sender + /// @notice Used to get the expected bridged token address corresponding to its native counterpart. + /// @param _originChainId The chain id of the origin token. + /// @param _nonNativeToken The address of token on its origin chain. function calculateCreate2TokenAddress( uint256 _originChainId, address _nonNativeToken - ) public view override(INativeTokenVault, NativeTokenVault) returns (address) { + ) public view override returns (address) { bytes32 salt = _getCreate2Salt(_originChainId, _nonNativeToken); return Create2.computeAddress( diff --git a/l1-contracts/contracts/bridge/ntv/L2NativeTokenVault.sol b/l1-contracts/contracts/bridge/ntv/L2NativeTokenVault.sol index bead6873cb..be7d73e9f0 100644 --- a/l1-contracts/contracts/bridge/ntv/L2NativeTokenVault.sol +++ b/l1-contracts/contracts/bridge/ntv/L2NativeTokenVault.sol @@ -4,84 +4,151 @@ pragma solidity 0.8.28; import {BeaconProxy} from "@openzeppelin/contracts-v4/proxy/beacon/BeaconProxy.sol"; import {IBeacon} from "@openzeppelin/contracts-v4/proxy/beacon/IBeacon.sol"; -import {UpgradeableBeacon} from "@openzeppelin/contracts-v4/proxy/beacon/UpgradeableBeacon.sol"; import {IERC20} from "@openzeppelin/contracts-v4/token/ERC20/IERC20.sol"; import {SafeERC20} from "@openzeppelin/contracts-v4/token/ERC20/utils/SafeERC20.sol"; -import {INativeTokenVault} from "./INativeTokenVault.sol"; import {IL2NativeTokenVault} from "./IL2NativeTokenVault.sol"; -import {NativeTokenVault} from "./NativeTokenVault.sol"; +import {NativeTokenVaultBase} from "./NativeTokenVaultBase.sol"; import {IL2SharedBridgeLegacy} from "../interfaces/IL2SharedBridgeLegacy.sol"; -import {BridgedStandardERC20} from "../BridgedStandardERC20.sol"; import {IL2AssetRouter} from "../asset-router/IL2AssetRouter.sol"; -import {L2_ASSET_ROUTER_ADDR, L2_DEPLOYER_SYSTEM_CONTRACT_ADDR} from "../../common/l2-helpers/L2ContractAddresses.sol"; +import {L2_ASSET_ROUTER_ADDR, L2_COMPLEX_UPGRADER_ADDR, L2_DEPLOYER_SYSTEM_CONTRACT_ADDR} from "../../common/l2-helpers/L2ContractAddresses.sol"; import {IContractDeployer, L2ContractHelper} from "../../common/l2-helpers/L2ContractHelper.sol"; import {SystemContractsCaller} from "../../common/l2-helpers/SystemContractsCaller.sol"; import {DataEncoding} from "../../common/libraries/DataEncoding.sol"; -import {AddressMismatch, AssetIdAlreadyRegistered, AssetIdNotSupported, DeployFailed, EmptyAddress, EmptyBytes32, NoLegacySharedBridge, TokenIsLegacy, TokenNotLegacy} from "../../common/L1ContractErrors.sol"; +import {AddressMismatch, AssetIdAlreadyRegistered, AssetIdNotSupported, DeployFailed, EmptyAddress, EmptyBytes32, InvalidCaller, NoLegacySharedBridge, TokenIsLegacy, TokenNotLegacy} from "../../common/L1ContractErrors.sol"; + +import {IAssetRouterBase} from "../asset-router/IAssetRouterBase.sol"; /// @author Matter Labs /// @custom:security-contact security@matterlabs.dev /// @notice The "default" bridge implementation for the ERC20 tokens. Note, that it does not /// support any custom token logic, i.e. rebase tokens' functionality is not supported. -contract L2NativeTokenVault is IL2NativeTokenVault, NativeTokenVault { +/// @dev Important: L2 contracts are not allowed to have any immutable variables or constructors. This is needed for compatibility with ZKsyncOS. +contract L2NativeTokenVault is IL2NativeTokenVault, NativeTokenVaultBase { using SafeERC20 for IERC20; - IL2SharedBridgeLegacy public immutable L2_LEGACY_SHARED_BRIDGE; + /// @dev The address of the WETH token. + /// @dev Note, that while it is a simple storage variable, the name is in capslock for the backward compatibility with + /// the old version where it was an immutable. + address public override WETH_TOKEN; + + /// @dev The assetId of the base token. + /// @dev Note, that while it is a simple storage variable, the name is in capslock for the backward compatibility with + /// the old version where it was an immutable. + bytes32 public override BASE_TOKEN_ASSET_ID; + + /// @dev Chain ID of L1 for bridging reasons. + /// @dev Note, that while it is a simple storage variable, the name is in capslock for the backward compatibility with + /// the old version where it was an immutable. + uint256 public override L1_CHAIN_ID; + + /// @dev The address of the L2 legacy shared bridge + /// @dev Note, that while it is a simple storage variable, the name is in capslock for the backward compatibility with + /// the old version where it was an immutable. + IL2SharedBridgeLegacy public L2_LEGACY_SHARED_BRIDGE; /// @dev Bytecode hash of the proxy for tokens deployed by the bridge. - bytes32 public immutable L2_TOKEN_PROXY_BYTECODE_HASH; + /// @dev Note, that while it is a simple storage variable, the name is in capslock for the backward compatibility with + /// the old version where it was an immutable. + bytes32 public L2_TOKEN_PROXY_BYTECODE_HASH; + + /// @dev The address of the L2 asset router. + /// @dev Note, that while it is a simple storage variable, the name is in capslock for the backward compatibility with + /// the old version where it was an immutable. + IAssetRouterBase public override ASSET_ROUTER; + + /*////////////////////////////////////////////////////////////// + INTERNAL FUNCTIONS + //////////////////////////////////////////////////////////////*/ + + /// @dev Returns the L2 asset router for internal use. + function _assetRouter() internal view override returns (IAssetRouterBase) { + return IAssetRouterBase(ASSET_ROUTER); + } - /// @notice Initializes the bridge contract for later use. - /// @dev this contract is deployed in the L2GenesisUpgrade, and is meant as direct deployment without a proxy. - /// @param _l1ChainId The L1 chain id differs between mainnet and testnets. + /// @dev Returns the L1 chain ID for internal use. + function _l1ChainId() internal view override returns (uint256) { + return L1_CHAIN_ID; + } + + /// @dev Returns the base token asset ID for internal use. + function _baseTokenAssetId() internal view override returns (bytes32) { + return BASE_TOKEN_ASSET_ID; + } + + /// @dev Returns the WETH token address for internal use. + function _wethToken() internal view override returns (address) { + return WETH_TOKEN; + } + + /// @notice Initializes the contract. + /// @dev This function is used to initialize the contract with the initial values. + /// @param _l1ChainId The chain id of L1. + /// @param _aliasedOwner The address of the owner of the contract. /// @param _l2TokenProxyBytecodeHash The bytecode hash of the proxy for tokens deployed by the bridge. - /// @param _aliasedOwner The address of the governor contract. /// @param _legacySharedBridge The address of the L2 legacy shared bridge. /// @param _bridgedTokenBeacon The address of the L2 token beacon for legacy chains. - /// @param _contractsDeployedAlready Ensures beacon proxy for standard ERC20 has not been deployed. - /// @param _wethToken Address of WETH on deployed chain - constructor( + /// @param _wethToken The address of the L2 weth token. + /// @param _baseTokenAssetId The asset ID of the base token. + function initL2( uint256 _l1ChainId, address _aliasedOwner, bytes32 _l2TokenProxyBytecodeHash, address _legacySharedBridge, address _bridgedTokenBeacon, - bool _contractsDeployedAlready, address _wethToken, bytes32 _baseTokenAssetId - ) NativeTokenVault(_wethToken, L2_ASSET_ROUTER_ADDR, _baseTokenAssetId, _l1ChainId) { - L2_LEGACY_SHARED_BRIDGE = IL2SharedBridgeLegacy(_legacySharedBridge); - - if (_l2TokenProxyBytecodeHash == bytes32(0)) { - revert EmptyBytes32(); - } + ) public onlyUpgrader { + _disableInitializers(); + // solhint-disable-next-line func-named-parameters + updateL2(_l1ChainId, _l2TokenProxyBytecodeHash, _legacySharedBridge, _wethToken, _baseTokenAssetId); if (_aliasedOwner == address(0)) { revert EmptyAddress(); } - - L2_TOKEN_PROXY_BYTECODE_HASH = _l2TokenProxyBytecodeHash; _transferOwnership(_aliasedOwner); + bridgedTokenBeacon = IBeacon(_bridgedTokenBeacon); + emit L2TokenBeaconUpdated(address(bridgedTokenBeacon), _l2TokenProxyBytecodeHash); + } - if (_contractsDeployedAlready) { - if (_bridgedTokenBeacon == address(0)) { - revert EmptyAddress(); - } - bridgedTokenBeacon = IBeacon(_bridgedTokenBeacon); - } else { - address l2StandardToken = address(new BridgedStandardERC20{salt: bytes32(0)}()); + /// @dev Only allows calls from the complex upgrader contract on L2. + modifier onlyUpgrader() { + if (msg.sender != L2_COMPLEX_UPGRADER_ADDR) { + revert InvalidCaller(msg.sender); + } + _; + } - UpgradeableBeacon tokenBeacon = new UpgradeableBeacon{salt: bytes32(0)}(l2StandardToken); + /// @notice Updates the contract. + /// @dev This function is used to initialize the new implementation of L2NativeTokenVault on existing chains during + /// the upgrade. + /// @param _l1ChainId The chain id of L1. + /// @param _l2TokenProxyBytecodeHash The bytecode hash of the proxy for tokens deployed by the bridge. + /// @param _legacySharedBridge The address of the L2 legacy shared bridge. + /// @param _wethToken The address of the WETH token. + /// @param _baseTokenAssetId The asset id of the base token. + function updateL2( + uint256 _l1ChainId, + bytes32 _l2TokenProxyBytecodeHash, + address _legacySharedBridge, + address _wethToken, + bytes32 _baseTokenAssetId + ) public onlyUpgrader { + WETH_TOKEN = _wethToken; + BASE_TOKEN_ASSET_ID = _baseTokenAssetId; + L1_CHAIN_ID = _l1ChainId; + ASSET_ROUTER = IAssetRouterBase(L2_ASSET_ROUTER_ADDR); + L2_LEGACY_SHARED_BRIDGE = IL2SharedBridgeLegacy(_legacySharedBridge); - tokenBeacon.transferOwnership(owner()); - bridgedTokenBeacon = IBeacon(address(tokenBeacon)); - emit L2TokenBeaconUpdated(address(bridgedTokenBeacon), _l2TokenProxyBytecodeHash); + if (_l2TokenProxyBytecodeHash == bytes32(0)) { + revert EmptyBytes32(); } + + L2_TOKEN_PROXY_BYTECODE_HASH = _l2TokenProxyBytecodeHash; } function _registerTokenIfBridgedLegacy(address _tokenAddress) internal override returns (bytes32) { @@ -240,7 +307,7 @@ contract L2NativeTokenVault is IL2NativeTokenVault, NativeTokenVault { function calculateCreate2TokenAddress( uint256 _tokenOriginChainId, address _nonNativeToken - ) public view virtual override(INativeTokenVault, NativeTokenVault) returns (address) { + ) public view virtual override returns (address) { if (address(L2_LEGACY_SHARED_BRIDGE) != address(0) && _tokenOriginChainId == L1_CHAIN_ID) { return L2_LEGACY_SHARED_BRIDGE.l2TokenAddress(_nonNativeToken); } else { diff --git a/l1-contracts/contracts/bridge/ntv/L2NativeTokenVaultZKOS.sol b/l1-contracts/contracts/bridge/ntv/L2NativeTokenVaultZKOS.sol new file mode 100644 index 0000000000..70569e5c4b --- /dev/null +++ b/l1-contracts/contracts/bridge/ntv/L2NativeTokenVaultZKOS.sol @@ -0,0 +1,59 @@ +// SPDX-License-Identifier: MIT + +pragma solidity 0.8.28; + +import {BeaconProxy} from "@openzeppelin/contracts-v4/proxy/beacon/BeaconProxy.sol"; +import {Create2} from "@openzeppelin/contracts-v4/utils/Create2.sol"; + +import {IERC20} from "@openzeppelin/contracts-v4/token/ERC20/IERC20.sol"; +import {SafeERC20} from "@openzeppelin/contracts-v4/token/ERC20/utils/SafeERC20.sol"; + +import {L2NativeTokenVault} from "./L2NativeTokenVault.sol"; + +/// @author Matter Labs +/// @custom:security-contact security@matterlabs.dev +/// @notice The "default" bridge implementation for the ERC20 tokens. Note, that it does not +/// support any custom token logic, i.e. rebase tokens' functionality is not supported. +/// @dev Important: L2 contracts are not allowed to have any immutable variables or constructors. This is needed for compatibility with ZKsyncOS. +/// @dev For the ease of future use of ZKOS, this contract should not have ANY storage variables and all of those should be part of the +/// parent `L2NativeTokenVault` contract. +contract L2NativeTokenVaultZKOS is L2NativeTokenVault { + using SafeERC20 for IERC20; + + /// @notice Deploys the beacon proxy for the L2 token, while using ContractDeployer system contract. + /// @dev This function uses raw call to ContractDeployer to make sure that exactly `L2_TOKEN_PROXY_BYTECODE_HASH` is used + /// for the code of the proxy. + /// @param _salt The salt used for beacon proxy deployment of L2 bridged token. + /// @return proxy The beacon proxy, i.e. L2 bridged token. + function _deployBeaconProxy( + bytes32 _salt, + uint256 /* _tokenOriginChainId */ + ) internal virtual override returns (BeaconProxy proxy) { + // For all zkOS-first chains, `L2_LEGACY_SHARED_BRIDGE` is zero and so L2NativeTokenVault + // is the sole deployer of all bridged tokens. + + // Use CREATE2 to deploy the BeaconProxy + address proxyAddress = Create2.deploy( + 0, + _salt, + abi.encodePacked(type(BeaconProxy).creationCode, abi.encode(bridgedTokenBeacon, "")) + ); + return BeaconProxy(payable(proxyAddress)); + } + + /// @notice Calculates L2 wrapped token address given the currently stored beacon proxy bytecode hash and beacon address. + /// @param _tokenOriginChainId The chain id of the origin token. + /// @param _nonNativeToken The address of token on its origin chain. + /// @return Address of an L2 token counterpart. + function calculateCreate2TokenAddress( + uint256 _tokenOriginChainId, + address _nonNativeToken + ) public view override returns (address) { + bytes32 salt = _getCreate2Salt(_tokenOriginChainId, _nonNativeToken); + return + Create2.computeAddress( + salt, + keccak256(abi.encodePacked(type(BeaconProxy).creationCode, abi.encode(bridgedTokenBeacon, ""))) + ); + } +} diff --git a/l1-contracts/contracts/bridge/ntv/NativeTokenVault.sol b/l1-contracts/contracts/bridge/ntv/NativeTokenVaultBase.sol similarity index 91% rename from l1-contracts/contracts/bridge/ntv/NativeTokenVault.sol rename to l1-contracts/contracts/bridge/ntv/NativeTokenVaultBase.sol index 57ff305046..db79be33c0 100644 --- a/l1-contracts/contracts/bridge/ntv/NativeTokenVault.sol +++ b/l1-contracts/contracts/bridge/ntv/NativeTokenVaultBase.sol @@ -11,9 +11,10 @@ import {IERC20} from "@openzeppelin/contracts-v4/token/ERC20/IERC20.sol"; import {SafeERC20} from "@openzeppelin/contracts-v4/token/ERC20/utils/SafeERC20.sol"; import {IBridgedStandardToken} from "../interfaces/IBridgedStandardToken.sol"; -import {INativeTokenVault} from "./INativeTokenVault.sol"; +import {INativeTokenVaultBase} from "./INativeTokenVaultBase.sol"; import {IAssetHandler} from "../interfaces/IAssetHandler.sol"; import {IAssetRouterBase} from "../asset-router/IAssetRouterBase.sol"; +import {AssetRouterBase} from "../asset-router/AssetRouterBase.sol"; import {DataEncoding} from "../../common/libraries/DataEncoding.sol"; import {BridgedStandardERC20} from "../BridgedStandardERC20.sol"; @@ -27,8 +28,8 @@ import {AssetHandlerModifiers} from "../interfaces/AssetHandlerModifiers.sol"; /// @custom:security-contact security@matterlabs.dev /// @dev Vault holding L1 native ETH and ERC20 tokens bridged into the ZK chains. /// @dev Designed for use with a proxy for upgradability. -abstract contract NativeTokenVault is - INativeTokenVault, +abstract contract NativeTokenVaultBase is + INativeTokenVaultBase, IAssetHandler, Ownable2StepUpgradeable, PausableUpgradeable, @@ -36,18 +37,33 @@ abstract contract NativeTokenVault is { using SafeERC20 for IERC20; - /// @dev The address of the WETH token. - address public immutable override WETH_TOKEN; + /*////////////////////////////////////////////////////////////// + EXTERNAL GETTERS + //////////////////////////////////////////////////////////////*/ + + /// @notice The Weth token address + function WETH_TOKEN() external view virtual returns (address); - /// @dev L1 Shared Bridge smart contract that handles communication with its counterparts on L2s - IAssetRouterBase public immutable override ASSET_ROUTER; + /// @notice The AssetRouter contract + function ASSET_ROUTER() external view virtual returns (IAssetRouterBase); - /// @dev The assetId of the base token. - bytes32 public immutable BASE_TOKEN_ASSET_ID; + /// @notice The chain ID of the L1 chain + function L1_CHAIN_ID() external view virtual returns (uint256); - /// @dev Chain ID of L1 for bridging reasons. - uint256 public immutable L1_CHAIN_ID; + /// @notice The base token asset ID + function BASE_TOKEN_ASSET_ID() external view virtual returns (bytes32); + + /*////////////////////////////////////////////////////////////// + INTERNAL FUNCTIONS + //////////////////////////////////////////////////////////////*/ + function _assetRouter() internal view virtual returns (IAssetRouterBase); + + function _l1ChainId() internal view virtual returns (uint256); + + function _baseTokenAssetId() internal view virtual returns (bytes32); + + function _wethToken() internal view virtual returns (address); /// @dev Contract that stores the implementation address for token. /// @dev For more details see https://docs.openzeppelin.com/contracts/3.x/api/proxy#UpgradeableBeacon. IBeacon public bridgedTokenBeacon; @@ -70,36 +86,24 @@ abstract contract NativeTokenVault is /// @notice Checks that the message sender is the bridgehub. modifier onlyAssetRouter() { - if (msg.sender != address(ASSET_ROUTER)) { + if (msg.sender != address(_assetRouter())) { revert Unauthorized(msg.sender); } _; } - /// @dev Contract is expected to be used as proxy implementation. - /// @dev Disable the initialization to prevent Parity hack. - /// @param _wethToken Address of WETH on deployed chain - /// @param _assetRouter Address of assetRouter - constructor(address _wethToken, address _assetRouter, bytes32 _baseTokenAssetId, uint256 _l1ChainId) { - _disableInitializers(); - L1_CHAIN_ID = _l1ChainId; - ASSET_ROUTER = IAssetRouterBase(_assetRouter); - WETH_TOKEN = _wethToken; - BASE_TOKEN_ASSET_ID = _baseTokenAssetId; - } - - /// @inheritdoc INativeTokenVault + /// @inheritdoc INativeTokenVaultBase function registerToken(address _nativeToken) external virtual { _registerToken(_nativeToken); } function _registerToken(address _nativeToken) internal virtual returns (bytes32 newAssetId) { - // We allow registering `WETH_TOKEN` inside `NativeTokenVault` only for L1 native token vault. + // We allow registering `_wethToken()` inside `NativeTokenVault` only for L1 native token vault. // It is needed to allow withdrawing such assets. We restrict all WETH-related // operations to deposits from L1 only to be able to upgrade their logic more easily in the // future. - if (_nativeToken == WETH_TOKEN && block.chainid != L1_CHAIN_ID) { - revert TokenNotSupported(WETH_TOKEN); + if (_nativeToken == _wethToken() && block.chainid != _l1ChainId()) { + revert TokenNotSupported(_wethToken()); } if (_nativeToken.code.length == 0) { revert EmptyToken(); @@ -110,7 +114,7 @@ abstract contract NativeTokenVault is newAssetId = _unsafeRegisterNativeToken(_nativeToken); } - /// @inheritdoc INativeTokenVault + /// @inheritdoc INativeTokenVaultBase function ensureTokenIsRegistered(address _nativeToken) public returns (bytes32 tokenAssetId) { bytes32 currentAssetId = assetId[_nativeToken]; if (currentAssetId == bytes32(0)) { @@ -341,13 +345,13 @@ abstract contract NativeTokenVault is address _receiver, address _nativeToken ) internal virtual returns (bytes memory _bridgeMintData) { - if (_nativeToken == WETH_TOKEN) { - // This ensures that WETH_TOKEN can never be bridged from chains it is native to. + if (_nativeToken == _wethToken()) { + // This ensures that _wethToken() can never be bridged from chains it is native to. // It can only be withdrawn from the chain where it has already gotten. revert BurningNativeWETHNotSupported(); } - if (_assetId == BASE_TOKEN_ASSET_ID) { + if (_assetId == _baseTokenAssetId()) { if (_depositAmount != msg.value) { revert ValueMismatch(_depositAmount, msg.value); } @@ -424,7 +428,10 @@ abstract contract NativeTokenVault is tokenAddress[newAssetId] = _nativeToken; assetId[_nativeToken] = newAssetId; originChainId[newAssetId] = block.chainid; - ASSET_ROUTER.setAssetHandlerAddressThisChain(bytes32(uint256(uint160(_nativeToken))), address(this)); + AssetRouterBase(address(_assetRouter())).setAssetHandlerAddressThisChain( + bytes32(uint256(uint160(_nativeToken))), + address(this) + ); } function _handleChainBalanceIncrease( @@ -476,7 +483,7 @@ abstract contract NativeTokenVault is // slither-disable-next-line unused-return (tokenOriginChainId, , , ) = DataEncoding.decodeTokenData(_erc20Data); if (tokenOriginChainId == 0) { - tokenOriginChainId = L1_CHAIN_ID; + tokenOriginChainId = _l1ChainId(); } } @@ -514,7 +521,7 @@ abstract contract NativeTokenVault is function calculateCreate2TokenAddress( uint256 _tokenOriginChainId, address _bridgeToken - ) public view virtual override returns (address); + ) public view virtual returns (address); /// @notice Deploys and initializes the bridged token for the native counterpart. /// @param _tokenOriginChainId The chain id of the origin token. diff --git a/l1-contracts/contracts/bridge/ntv/UpgradeableBeaconDeployer.sol b/l1-contracts/contracts/bridge/ntv/UpgradeableBeaconDeployer.sol new file mode 100644 index 0000000000..2716c9102e --- /dev/null +++ b/l1-contracts/contracts/bridge/ntv/UpgradeableBeaconDeployer.sol @@ -0,0 +1,23 @@ +// SPDX-License-Identifier: MIT + +pragma solidity 0.8.28; + +import {UpgradeableBeacon} from "@openzeppelin/contracts-v4/proxy/beacon/UpgradeableBeacon.sol"; + +import {BridgedStandardERC20} from "../BridgedStandardERC20.sol"; + +/// @author Matter Labs +/// @custom:security-contact security@matterlabs.dev +/// @notice A contract that deploys the upgradeable beacon for the bridged standard ERC20 token. +/// @dev Besides separation of concerns, we need it as a separate contract to ensure that L2NativeTokenVaultZKOS +/// does not have to include BridgedStandardERC20 and UpgradeableBeacon and so can fit into the code size limit. +contract UpgradeableBeaconDeployer { + function deployUpgradeableBeacon(address _owner) external returns (address) { + address l2StandardToken = address(new BridgedStandardERC20{salt: bytes32(0)}()); + + UpgradeableBeacon tokenBeacon = new UpgradeableBeacon{salt: bytes32(0)}(l2StandardToken); + + tokenBeacon.transferOwnership(_owner); + return address(tokenBeacon); + } +} diff --git a/l1-contracts/contracts/bridgehub/Bridgehub.sol b/l1-contracts/contracts/bridgehub/BridgehubBase.sol similarity index 63% rename from l1-contracts/contracts/bridgehub/Bridgehub.sol rename to l1-contracts/contracts/bridgehub/BridgehubBase.sol index ffcaa313f3..b9f2fb8741 100644 --- a/l1-contracts/contracts/bridgehub/Bridgehub.sol +++ b/l1-contracts/contracts/bridgehub/BridgehubBase.sol @@ -7,41 +7,48 @@ import {EnumerableMap} from "@openzeppelin/contracts-v4/utils/structs/Enumerable import {Ownable2StepUpgradeable} from "@openzeppelin/contracts-upgradeable-v4/access/Ownable2StepUpgradeable.sol"; import {PausableUpgradeable} from "@openzeppelin/contracts-upgradeable-v4/security/PausableUpgradeable.sol"; -import {IBridgehub, L2TransactionRequestDirect, L2TransactionRequestTwoBridgesInner, L2TransactionRequestTwoBridgesOuter} from "./IBridgehub.sol"; +import {IBridgehubBase} from "./IBridgehubBase.sol"; import {IAssetRouterBase} from "../bridge/asset-router/IAssetRouterBase.sol"; -import {IL1AssetRouter} from "../bridge/asset-router/IL1AssetRouter.sol"; import {IL1BaseTokenAssetHandler} from "../bridge/interfaces/IL1BaseTokenAssetHandler.sol"; -import {IChainTypeManager} from "../state-transition/IChainTypeManager.sol"; import {ReentrancyGuard} from "../common/ReentrancyGuard.sol"; import {DataEncoding} from "../common/libraries/DataEncoding.sol"; import {IZKChain} from "../state-transition/chain-interfaces/IZKChain.sol"; -import {BRIDGEHUB_MIN_SECOND_BRIDGE_ADDRESS, ETH_TOKEN_ADDRESS, SETTLEMENT_LAYER_RELAY_SENDER, TWO_BRIDGES_MAGIC_VALUE} from "../common/Config.sol"; +import {SETTLEMENT_LAYER_RELAY_SENDER} from "../common/Config.sol"; import {BridgehubL2TransactionRequest, L2Log, L2Message, TxStatus} from "../common/Messaging.sol"; import {AddressAliasHelper} from "../vendor/AddressAliasHelper.sol"; import {IMessageRoot} from "./IMessageRoot.sol"; import {ICTMDeploymentTracker} from "./ICTMDeploymentTracker.sol"; -import {AlreadyCurrentSL, ChainIdAlreadyPresent, ChainNotLegacy, ChainNotPresentInCTM, NotChainAssetHandler, NotCurrentSL, NotInGatewayMode, NotL1, NotRelayedSender, SLNotWhitelisted, SecondBridgeAddressTooLow} from "./L1BridgehubErrors.sol"; -import {AssetHandlerNotRegistered, AssetIdAlreadyRegistered, AssetIdNotSupported, BridgeHubAlreadyRegistered, CTMAlreadyRegistered, CTMNotRegistered, ChainIdAlreadyExists, ChainIdCantBeCurrentChain, ChainIdMismatch, ChainIdNotRegistered, ChainIdTooBig, EmptyAssetId, IncorrectBridgeHubAddress, MigrationPaused, MsgValueMismatch, NoCTMForAssetId, SettlementLayersMustSettleOnL1, SharedBridgeNotSet, Unauthorized, WrongMagicValue, ZKChainLimitReached, ZeroAddress, ZeroChainId} from "../common/L1ContractErrors.sol"; +import {AlreadyCurrentSL, NotChainAssetHandler, NotCurrentSL, NotInGatewayMode, NotRelayedSender, SLNotWhitelisted} from "./L1BridgehubErrors.sol"; +import {AssetHandlerNotRegistered, AssetIdAlreadyRegistered, AssetIdNotSupported, BridgeHubAlreadyRegistered, CTMAlreadyRegistered, CTMNotRegistered, ChainIdCantBeCurrentChain, ChainIdNotRegistered, ChainIdTooBig, EmptyAssetId, MigrationPaused, NoCTMForAssetId, SettlementLayersMustSettleOnL1, SharedBridgeNotSet, Unauthorized, ZKChainLimitReached, ZeroAddress, ZeroChainId} from "../common/L1ContractErrors.sol"; +import {L2_COMPLEX_UPGRADER_ADDR} from "../common/l2-helpers/L2ContractAddresses.sol"; +import {AssetHandlerModifiers} from "../bridge/interfaces/AssetHandlerModifiers.sol"; /// @author Matter Labs /// @custom:security-contact security@matterlabs.dev /// @dev The Bridgehub contract serves as the primary entry point for L1->L2 communication, /// facilitating interactions between end user and bridges. /// It also manages state transition managers, base tokens, and chain registrations. -contract Bridgehub is IBridgehub, ReentrancyGuard, Ownable2StepUpgradeable, PausableUpgradeable { +/// Bridgehub is also an IL1AssetHandler for the chains themselves, which is used to migrate the chains +/// between different settlement layers (for example from L1 to Gateway). +abstract contract BridgehubBase is + IBridgehubBase, + ReentrancyGuard, + Ownable2StepUpgradeable, + PausableUpgradeable, + AssetHandlerModifiers +{ using EnumerableMap for EnumerableMap.UintToAddressMap; - /// @notice the asset id of Eth. This is only used on L1. - bytes32 internal immutable ETH_TOKEN_ASSET_ID; + /*////////////////////////////////////////////////////////////// + INTERNAL FUNCTIONS + //////////////////////////////////////////////////////////////*/ - /// @notice The chain id of L1. This contract can be deployed on multiple layers, but this value is still equal to the - /// L1 that is at the most base layer. - uint256 public immutable L1_CHAIN_ID; + function _ethTokenAssetId() internal view virtual returns (bytes32); - /// @notice The total number of ZK chains can be created/connected to this CTM. - /// This is the temporary security measure. - uint256 public immutable MAX_NUMBER_OF_ZK_CHAINS; + function _maxNumberOfZKChains() internal view virtual returns (uint256); + + function _l1ChainId() internal view virtual returns (uint256); /// @notice all the ether and ERC20 tokens are held by NativeVaultToken managed by the asset router. address public assetRouter; @@ -103,6 +110,13 @@ contract Bridgehub is IBridgehub, ReentrancyGuard, Ownable2StepUpgradeable, Paus /// @notice the chain asset handler used for chain migration. address public chainAssetHandler; + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[32] private __gap; + modifier onlyOwnerOrAdmin() { if (msg.sender != admin && msg.sender != owner()) { revert Unauthorized(msg.sender); @@ -110,14 +124,22 @@ contract Bridgehub is IBridgehub, ReentrancyGuard, Ownable2StepUpgradeable, Paus _; } - modifier onlyL1() { - if (L1_CHAIN_ID != block.chainid) { - revert NotL1(L1_CHAIN_ID, block.chainid); + modifier onlyOwnerOrUpgrader() { + if (msg.sender != owner() && msg.sender != L2_COMPLEX_UPGRADER_ADDR) { + revert Unauthorized(msg.sender); + } + _; + } + + /// @dev Only allows calls from the complex upgrader contract on L2. + modifier onlyUpgrader() { + if (msg.sender != L2_COMPLEX_UPGRADER_ADDR) { + revert Unauthorized(msg.sender); } _; } - modifier onlySettlementLayerRelayedSender() { + modifier onlySettlementLayerRelayedSender() virtual { /// There is no sender for the wrapping, we use a virtual address. if (msg.sender != SETTLEMENT_LAYER_RELAY_SENDER) { revert NotRelayedSender(msg.sender, SETTLEMENT_LAYER_RELAY_SENDER); @@ -139,42 +161,15 @@ contract Bridgehub is IBridgehub, ReentrancyGuard, Ownable2StepUpgradeable, Paus _; } - /// @notice to avoid parity hack - constructor(uint256 _l1ChainId, address _owner, uint256 _maxNumberOfZKChains) reentrancyGuardInitializer { - _disableInitializers(); - L1_CHAIN_ID = _l1ChainId; - MAX_NUMBER_OF_ZK_CHAINS = _maxNumberOfZKChains; - - // Note that this assumes that the bridgehub only accepts transactions on chains with ETH base token only. - // This is indeed true, since the only methods where this immutable is used are the ones with `onlyL1` modifier. - // We will change this with interop. - ETH_TOKEN_ASSET_ID = DataEncoding.encodeNTVAssetId(L1_CHAIN_ID, ETH_TOKEN_ADDRESS); - _transferOwnership(_owner); - _initializeInner(); - } - - /// @notice used to initialize the contract - /// @notice this contract is also deployed on L2 as a system contract there the owner and the related functions will not be used - /// @param _owner the owner of the contract - function initialize(address _owner) external reentrancyGuardInitializer onlyL1 { - _transferOwnership(_owner); - _initializeInner(); - } - - /// @notice Used to initialize the contract on L1 - function initializeV2() external initializer onlyL1 { - _initializeInner(); - } - /// @notice Initializes the contract function _initializeInner() internal { - assetIdIsRegistered[ETH_TOKEN_ASSET_ID] = true; - whitelistedSettlementLayers[L1_CHAIN_ID] = true; + assetIdIsRegistered[_ethTokenAssetId()] = true; + whitelistedSettlementLayers[_l1ChainId()] = true; } //// Initialization and registration - /// @inheritdoc IBridgehub + /// @inheritdoc IBridgehubBase /// @dev Please note, if the owner wants to enforce the admin change it must execute both `setPendingAdmin` and /// `acceptAdmin` atomically. Otherwise `admin` can set different pending admin and so fail to accept the admin rights. function setPendingAdmin(address _newPendingAdmin) external onlyOwnerOrAdmin { @@ -188,7 +183,7 @@ contract Bridgehub is IBridgehub, ReentrancyGuard, Ownable2StepUpgradeable, Paus emit NewPendingAdmin(oldPendingAdmin, _newPendingAdmin); } - /// @inheritdoc IBridgehub + /// @inheritdoc IBridgehubBase function acceptAdmin() external { address currentPendingAdmin = pendingAdmin; // Only proposed by current admin address can claim the admin rights @@ -214,12 +209,7 @@ contract Bridgehub is IBridgehub, ReentrancyGuard, Ownable2StepUpgradeable, Paus ICTMDeploymentTracker _l1CtmDeployer, IMessageRoot _messageRoot, address _chainAssetHandler - ) external onlyOwner { - assetRouter = _assetRouter; - l1CtmDeployer = _l1CtmDeployer; - messageRoot = _messageRoot; - chainAssetHandler = _chainAssetHandler; - } + ) external virtual; /// @notice Used to set the chain asset handler address. /// @dev Called during v29 upgrade. @@ -228,40 +218,6 @@ contract Bridgehub is IBridgehub, ReentrancyGuard, Ownable2StepUpgradeable, Paus chainAssetHandler = _chainAssetHandler; } - /// @notice Used to set the legacy chain data for the upgrade. - /// @param _chainId The chainId of the legacy chain we are migrating. - function registerLegacyChain(uint256 _chainId) external override onlyL1 { - address ctm = chainTypeManager[_chainId]; - if (ctm == address(0)) { - revert ChainNotLegacy(); - } - if (zkChainMap.contains(_chainId)) { - revert ChainIdAlreadyPresent(); - } - - // From now on, since `zkChainMap` did not contain the chain, we assume - // that the chain is a legacy chain in the process of migration, i.e. - // its stored `baseTokenAssetId`, etc. - - address token = __DEPRECATED_baseToken[_chainId]; - if (token == address(0)) { - revert ChainNotLegacy(); - } - - bytes32 assetId = DataEncoding.encodeNTVAssetId(block.chainid, token); - - baseTokenAssetId[_chainId] = assetId; - assetIdIsRegistered[assetId] = true; - - address chainAddress = IChainTypeManager(ctm).getZKChainLegacy(_chainId); - if (chainAddress == address(0)) { - revert ChainNotPresentInCTM(); - } - _registerNewZKChain(_chainId, chainAddress, false); - messageRoot.addNewChain(_chainId); - settlementLayer[_chainId] = block.chainid; - } - //// Registry /// @notice Chain Type Manager can be any contract with the appropriate interface/functionality @@ -304,26 +260,12 @@ contract Bridgehub is IBridgehub, ReentrancyGuard, Ownable2StepUpgradeable, Paus emit BaseTokenAssetIdRegistered(_baseTokenAssetId); } - /// @notice Used to register a chain as a settlement layer. - /// @param _newSettlementLayerChainId the chainId of the chain - /// @param _isWhitelisted whether the chain is a whitelisted settlement layer - function registerSettlementLayer( - uint256 _newSettlementLayerChainId, - bool _isWhitelisted - ) external onlyOwner onlyL1 { - if (settlementLayer[_newSettlementLayerChainId] != block.chainid) { - revert SettlementLayersMustSettleOnL1(); - } - whitelistedSettlementLayers[_newSettlementLayerChainId] = _isWhitelisted; - emit SettlementLayerRegistered(_newSettlementLayerChainId, _isWhitelisted); - } - /// @dev Used to set the assetAddress for a given assetInfo. /// @param _additionalData the additional data to identify the asset /// @param _assetAddress the asset handler address function setCTMAssetAddress(bytes32 _additionalData, address _assetAddress) external { // It is a simplified version of the logic used by the AssetRouter to manage asset handlers. - // CTM's assetId is `keccak256(abi.encode(L1_CHAIN_ID, l1CtmDeployer, ctmAddress))`. + // CTM's assetId is `keccak256(abi.encode(_l1ChainId(), l1CtmDeployer, ctmAddress))`. // And the l1CtmDeployer is considered the deployment tracker for the CTM asset. // // The l1CtmDeployer will call this method to set the asset handler address for the assetId. @@ -333,7 +275,7 @@ contract Bridgehub is IBridgehub, ReentrancyGuard, Ownable2StepUpgradeable, Paus // it is double checked that `assetId` is indeed derived from the `l1CtmDeployer`. // TODO(EVM-703): This logic should be revised once interchain communication is implemented. - address sender = L1_CHAIN_ID == block.chainid ? msg.sender : AddressAliasHelper.undoL1ToL2Alias(msg.sender); + address sender = _l1ChainId() == block.chainid ? msg.sender : AddressAliasHelper.undoL1ToL2Alias(msg.sender); // This method can be accessed by l1CtmDeployer only if (sender != address(l1CtmDeployer)) { revert Unauthorized(sender); @@ -342,7 +284,7 @@ contract Bridgehub is IBridgehub, ReentrancyGuard, Ownable2StepUpgradeable, Paus revert CTMNotRegistered(); } - bytes32 ctmAssetId = DataEncoding.encodeAssetId(L1_CHAIN_ID, _additionalData, sender); + bytes32 ctmAssetId = DataEncoding.encodeAssetId(_l1ChainId(), _additionalData, sender); ctmAssetIdToAddress[ctmAssetId] = _assetAddress; ctmAssetIdFromAddress[_assetAddress] = ctmAssetId; emit AssetRegistered(ctmAssetId, _assetAddress, _additionalData, msg.sender); @@ -352,52 +294,12 @@ contract Bridgehub is IBridgehub, ReentrancyGuard, Ownable2StepUpgradeable, Paus Chain Registration //////////////////////////////////////////////////////////////*/ - /// @notice register new chain. New chains can be only registered on Bridgehub deployed on L1. Later they can be moved to any other layer. - /// @notice for Eth the baseToken address is 1 - /// @param _chainId the chainId of the chain - /// @param _chainTypeManager the state transition manager address - /// @param _baseTokenAssetId the base token asset id of the chain - /// @param _salt the salt for the chainId, currently not used - /// @param _admin the admin of the chain - /// @param _initData the fixed initialization data for the chain - /// @param _factoryDeps the factory dependencies for the chain's deployment - function createNewChain( - uint256 _chainId, - address _chainTypeManager, - bytes32 _baseTokenAssetId, - // solhint-disable-next-line no-unused-vars - uint256 _salt, - address _admin, - bytes calldata _initData, - bytes[] calldata _factoryDeps - ) external onlyOwnerOrAdmin nonReentrant whenNotPaused onlyL1 returns (uint256) { - _validateChainParams({_chainId: _chainId, _assetId: _baseTokenAssetId, _chainTypeManager: _chainTypeManager}); - - chainTypeManager[_chainId] = _chainTypeManager; - - baseTokenAssetId[_chainId] = _baseTokenAssetId; - settlementLayer[_chainId] = block.chainid; - - address chainAddress = IChainTypeManager(_chainTypeManager).createNewChain({ - _chainId: _chainId, - _baseTokenAssetId: _baseTokenAssetId, - _admin: _admin, - _initData: _initData, - _factoryDeps: _factoryDeps - }); - _registerNewZKChain(_chainId, chainAddress, true); - messageRoot.addNewChain(_chainId); - - emit NewChain(_chainId, _chainTypeManager, _admin); - return _chainId; - } - /// @notice This function is used to register a new zkChain in the system. /// @notice see external counterpart for full natspec. function _registerNewZKChain(uint256 _chainId, address _zkChain, bool _checkMaxNumberOfZKChains) internal { // slither-disable-next-line unused-return zkChainMap.set(_chainId, _zkChain); - if (_checkMaxNumberOfZKChains && zkChainMap.length() > MAX_NUMBER_OF_ZK_CHAINS) { + if (_checkMaxNumberOfZKChains && zkChainMap.length() > _maxNumberOfZKChains()) { revert ZKChainLimitReached(); } } @@ -454,132 +356,6 @@ contract Bridgehub is IBridgehub, ReentrancyGuard, Ownable2StepUpgradeable, Paus Mailbox forwarder //////////////////////////////////////////////////////////////*/ - /// @notice the mailbox is called directly after the assetRouter received the deposit - /// this assumes that either ether is the base token or - /// the msg.sender has approved mintValue allowance for the nativeTokenVault. - /// This means this is not ideal for contract calls, as the contract would have to handle token allowance of the base Token. - /// In case allowance is provided to the Asset Router, then it will be transferred to NTV. - function requestL2TransactionDirect( - L2TransactionRequestDirect calldata _request - ) external payable override nonReentrant whenNotPaused onlyL1 returns (bytes32 canonicalTxHash) { - // Note: If the ZK chain with corresponding `chainId` is not yet created, - // the transaction will revert on `bridgehubRequestL2Transaction` as call to zero address. - { - bytes32 tokenAssetId = baseTokenAssetId[_request.chainId]; - if (tokenAssetId == ETH_TOKEN_ASSET_ID) { - if (msg.value != _request.mintValue) { - revert MsgValueMismatch(_request.mintValue, msg.value); - } - } else { - if (msg.value != 0) { - revert MsgValueMismatch(0, msg.value); - } - } - - // slither-disable-next-line arbitrary-send-eth - IL1AssetRouter(assetRouter).bridgehubDepositBaseToken{value: msg.value}( - _request.chainId, - tokenAssetId, - msg.sender, - _request.mintValue - ); - } - - canonicalTxHash = _sendRequest( - _request.chainId, - _request.refundRecipient, - BridgehubL2TransactionRequest({ - sender: msg.sender, - contractL2: _request.l2Contract, - mintValue: _request.mintValue, - l2Value: _request.l2Value, - l2Calldata: _request.l2Calldata, - l2GasLimit: _request.l2GasLimit, - l2GasPerPubdataByteLimit: _request.l2GasPerPubdataByteLimit, - factoryDeps: _request.factoryDeps, - refundRecipient: address(0) - }) - ); - } - - /// @notice After depositing funds to the assetRouter, the secondBridge is called - /// to return the actual L2 message which is sent to the Mailbox. - /// This assumes that either ether is the base token or - /// the msg.sender has approved the nativeTokenVault with the mintValue, - /// and also the necessary approvals are given for the second bridge. - /// In case allowance is provided to the Shared Bridge, then it will be transferred to NTV. - /// @notice The logic of this bridge is to allow easy depositing for bridges. - /// Each contract that handles the users ERC20 tokens needs approvals from the user, this contract allows - /// the user to approve for each token only its respective bridge - /// @notice This function is great for contract calls to L2, the secondBridge can be any contract. - /// @param _request the request for the L2 transaction - function requestL2TransactionTwoBridges( - L2TransactionRequestTwoBridgesOuter calldata _request - ) external payable override nonReentrant whenNotPaused onlyL1 returns (bytes32 canonicalTxHash) { - if (_request.secondBridgeAddress <= BRIDGEHUB_MIN_SECOND_BRIDGE_ADDRESS) { - revert SecondBridgeAddressTooLow(_request.secondBridgeAddress, BRIDGEHUB_MIN_SECOND_BRIDGE_ADDRESS); - } - - { - bytes32 tokenAssetId = baseTokenAssetId[_request.chainId]; - uint256 baseTokenMsgValue; - if (tokenAssetId == ETH_TOKEN_ASSET_ID) { - if (msg.value != _request.mintValue + _request.secondBridgeValue) { - revert MsgValueMismatch(_request.mintValue + _request.secondBridgeValue, msg.value); - } - baseTokenMsgValue = _request.mintValue; - } else { - if (msg.value != _request.secondBridgeValue) { - revert MsgValueMismatch(_request.secondBridgeValue, msg.value); - } - baseTokenMsgValue = 0; - } - - // slither-disable-next-line arbitrary-send-eth - IL1AssetRouter(assetRouter).bridgehubDepositBaseToken{value: baseTokenMsgValue}( - _request.chainId, - tokenAssetId, - msg.sender, - _request.mintValue - ); - } - - // slither-disable-next-line arbitrary-send-eth - L2TransactionRequestTwoBridgesInner memory outputRequest = IL1AssetRouter(_request.secondBridgeAddress) - .bridgehubDeposit{value: _request.secondBridgeValue}( - _request.chainId, - msg.sender, - _request.l2Value, - _request.secondBridgeCalldata - ); - - if (outputRequest.magicValue != TWO_BRIDGES_MAGIC_VALUE) { - revert WrongMagicValue(uint256(TWO_BRIDGES_MAGIC_VALUE), uint256(outputRequest.magicValue)); - } - - canonicalTxHash = _sendRequest( - _request.chainId, - _request.refundRecipient, - BridgehubL2TransactionRequest({ - sender: _request.secondBridgeAddress, - contractL2: outputRequest.l2Contract, - mintValue: _request.mintValue, - l2Value: _request.l2Value, - l2Calldata: outputRequest.l2Calldata, - l2GasLimit: _request.l2GasLimit, - l2GasPerPubdataByteLimit: _request.l2GasPerPubdataByteLimit, - factoryDeps: outputRequest.factoryDeps, - refundRecipient: address(0) - }) - ); - - IL1AssetRouter(_request.secondBridgeAddress).bridgehubConfirmL2Transaction( - _request.chainId, - outputRequest.txDataHash, - canonicalTxHash - ); - } - /// @notice This function is used to send a request to the ZK chain. /// @param _chainId the chainId of the chain /// @param _refundRecipient the refund recipient @@ -605,8 +381,8 @@ contract Bridgehub is IBridgehub, ReentrancyGuard, Ownable2StepUpgradeable, Paus uint256 _chainId, bytes32 _canonicalTxHash, uint64 _expirationTimestamp - ) external override onlySettlementLayerRelayedSender { - if (L1_CHAIN_ID == block.chainid) { + ) external virtual onlySettlementLayerRelayedSender { + if (_l1ChainId() == block.chainid) { revert NotInGatewayMode(); } address zkChain = zkChainMap.get(_chainId); @@ -782,42 +558,6 @@ contract Bridgehub is IBridgehub, ReentrancyGuard, Ownable2StepUpgradeable, Paus _registerNewZKChain(_chainId, _zkChain, _checkMaxNumberOfZKChains); } - /// @dev Registers an already deployed chain with the bridgehub - /// @param _chainId The chain Id of the chain - /// @param _zkChain Address of the zkChain - function registerAlreadyDeployedZKChain(uint256 _chainId, address _zkChain) external onlyOwner onlyL1 { - if (_zkChain == address(0)) { - revert ZeroAddress(); - } - if (zkChainMap.contains(_chainId)) { - revert ChainIdAlreadyExists(); - } - if (IZKChain(_zkChain).getChainId() != _chainId) { - revert ChainIdMismatch(); - } - - address ctm = IZKChain(_zkChain).getChainTypeManager(); - address chainAdmin = IZKChain(_zkChain).getAdmin(); - bytes32 chainBaseTokenAssetId = IZKChain(_zkChain).getBaseTokenAssetId(); - address bridgeHub = IZKChain(_zkChain).getBridgehub(); - - if (bridgeHub != address(this)) { - revert IncorrectBridgeHubAddress(bridgeHub); - } - - _validateChainParams({_chainId: _chainId, _assetId: chainBaseTokenAssetId, _chainTypeManager: ctm}); - - chainTypeManager[_chainId] = ctm; - - baseTokenAssetId[_chainId] = chainBaseTokenAssetId; - settlementLayer[_chainId] = block.chainid; - - _registerNewZKChain(_chainId, _zkChain, true); - messageRoot.addNewChain(_chainId); - - emit NewChain(_chainId, ctm, chainAdmin); - } - function _validateChainParams(uint256 _chainId, bytes32 _assetId, address _chainTypeManager) internal view { if (_chainId == 0) { revert ZeroChainId(); diff --git a/l1-contracts/contracts/bridgehub/CTMDeploymentTracker.sol b/l1-contracts/contracts/bridgehub/CTMDeploymentTracker.sol index e082ae19e5..1970e49e7e 100644 --- a/l1-contracts/contracts/bridgehub/CTMDeploymentTracker.sol +++ b/l1-contracts/contracts/bridgehub/CTMDeploymentTracker.sol @@ -4,10 +4,11 @@ pragma solidity 0.8.28; import {Ownable2StepUpgradeable} from "@openzeppelin/contracts-upgradeable-v4/access/Ownable2StepUpgradeable.sol"; -import {IBridgehub, L2TransactionRequestTwoBridgesInner} from "./IBridgehub.sol"; +import {IBridgehubBase, L2TransactionRequestTwoBridgesInner} from "./IBridgehubBase.sol"; import {ICTMDeploymentTracker} from "./ICTMDeploymentTracker.sol"; import {IAssetRouterBase} from "../bridge/asset-router/IAssetRouterBase.sol"; +import {AssetRouterBase} from "../bridge/asset-router/AssetRouterBase.sol"; import {TWO_BRIDGES_MAGIC_VALUE} from "../common/Config.sol"; import {L2_BRIDGEHUB_ADDR, L2_CHAIN_ASSET_HANDLER_ADDR} from "../common/l2-helpers/L2ContractAddresses.sol"; import {NoEthAllowed, NotOwner, NotOwnerViaRouter, OnlyBridgehub, WrongCounterPart} from "./L1BridgehubErrors.sol"; @@ -21,7 +22,7 @@ bytes1 constant CTM_DEPLOYMENT_TRACKER_ENCODING_VERSION = 0x01; /// @dev Contract to be deployed on L1, can link together other contracts based on AssetInfo. contract CTMDeploymentTracker is ICTMDeploymentTracker, Ownable2StepUpgradeable { /// @dev Bridgehub smart contract that is used to operate with L2 via asynchronous L2 <-> L1 communication. - IBridgehub public immutable override BRIDGE_HUB; + IBridgehubBase public immutable override BRIDGE_HUB; /// @dev L1AssetRouter smart contract that is used to bridge assets (including chains) between L1 and L2. IAssetRouterBase public immutable override L1_ASSET_ROUTER; @@ -44,7 +45,7 @@ contract CTMDeploymentTracker is ICTMDeploymentTracker, Ownable2StepUpgradeable /// @dev Contract is expected to be used as proxy implementation on L1. /// @dev Initialize the implementation to prevent Parity hack. - constructor(IBridgehub _bridgehub, IAssetRouterBase _l1AssetRouter) { + constructor(IBridgehubBase _bridgehub, IAssetRouterBase _l1AssetRouter) { _disableInitializers(); BRIDGE_HUB = _bridgehub; L1_ASSET_ROUTER = _l1AssetRouter; @@ -64,7 +65,7 @@ contract CTMDeploymentTracker is ICTMDeploymentTracker, Ownable2StepUpgradeable if (!BRIDGE_HUB.chainTypeManagerIsRegistered(_ctmAddress)) { revert CTMNotRegistered(); } - L1_ASSET_ROUTER.setAssetHandlerAddressThisChain( + AssetRouterBase(address(L1_ASSET_ROUTER)).setAssetHandlerAddressThisChain( bytes32(uint256(uint160(_ctmAddress))), BRIDGE_HUB.chainAssetHandler() ); @@ -76,7 +77,7 @@ contract CTMDeploymentTracker is ICTMDeploymentTracker, Ownable2StepUpgradeable /// @dev while `registerCTMAssetOnL1` is called during the ecosystem genesis process. /// @param _ctmAddress the address of the ctm asset. function setCtmAssetHandlerAddressOnL1(address _ctmAddress) external onlyOwner { - L1_ASSET_ROUTER.setAssetHandlerAddressThisChain( + AssetRouterBase(address(L1_ASSET_ROUTER)).setAssetHandlerAddressThisChain( bytes32(uint256(uint160(_ctmAddress))), BRIDGE_HUB.chainAssetHandler() ); @@ -153,7 +154,7 @@ contract CTMDeploymentTracker is ICTMDeploymentTracker, Ownable2StepUpgradeable address _ctmL2Address ) internal pure returns (L2TransactionRequestTwoBridgesInner memory request) { bytes memory l2TxCalldata = abi.encodeCall( - IBridgehub.setCTMAssetAddress, + IBridgehubBase.setCTMAssetAddress, (bytes32(uint256(uint160(_ctmL1Address))), _ctmL2Address) ); diff --git a/l1-contracts/contracts/bridgehub/ChainAssetHandler.sol b/l1-contracts/contracts/bridgehub/ChainAssetHandlerBase.sol similarity index 71% rename from l1-contracts/contracts/bridgehub/ChainAssetHandler.sol rename to l1-contracts/contracts/bridgehub/ChainAssetHandlerBase.sol index 7a41dfdcf8..0a744d1174 100644 --- a/l1-contracts/contracts/bridgehub/ChainAssetHandler.sol +++ b/l1-contracts/contracts/bridgehub/ChainAssetHandlerBase.sol @@ -7,7 +7,7 @@ import {EnumerableMap} from "@openzeppelin/contracts-v4/utils/structs/Enumerable import {Ownable2StepUpgradeable} from "@openzeppelin/contracts-upgradeable-v4/access/Ownable2StepUpgradeable.sol"; import {PausableUpgradeable} from "@openzeppelin/contracts-upgradeable-v4/security/PausableUpgradeable.sol"; -import {BridgehubBurnCTMAssetData, BridgehubMintCTMAssetData, IBridgehub} from "./IBridgehub.sol"; +import {IBridgehubBase, BridgehubBurnCTMAssetData, BridgehubMintCTMAssetData} from "./IBridgehubBase.sol"; import {IChainTypeManager} from "../state-transition/IChainTypeManager.sol"; import {ReentrancyGuard} from "../common/ReentrancyGuard.sol"; import {IZKChain} from "../state-transition/chain-interfaces/IZKChain.sol"; @@ -25,7 +25,7 @@ import {IChainAssetHandler} from "./IChainAssetHandler.sol"; /// @dev The ChainAssetHandler contract is used for migrating chains between settlement layers, /// it is the IL1AssetHandler for the chains themselves, which is used to migrate the chains /// between different settlement layers (for example from L1 to Gateway). -contract ChainAssetHandler is +abstract contract ChainAssetHandlerBase is IChainAssetHandler, ReentrancyGuard, Ownable2StepUpgradeable, @@ -34,25 +34,53 @@ contract ChainAssetHandler is { using EnumerableMap for EnumerableMap.UintToAddressMap; - /// @notice The chain id of the L1. - uint256 internal immutable L1_CHAIN_ID; + /*////////////////////////////////////////////////////////////// + EXTERNAL GETTERS + //////////////////////////////////////////////////////////////*/ + + /// @notice The asset ID of ETH token + function ETH_TOKEN_ASSET_ID() external view virtual returns (bytes32); + + /// @notice The chain ID of L1 + function L1_CHAIN_ID() external view virtual returns (uint256); + + /// @notice The bridgehub contract + function BRIDGEHUB() external view virtual returns (address); + + /// @notice The message root contract + function MESSAGE_ROOT() external view virtual returns (address); + + /// @notice The asset router contract + function ASSET_ROUTER() external view virtual returns (address); + + /*////////////////////////////////////////////////////////////// + INTERNAL FUNCTIONS + //////////////////////////////////////////////////////////////*/ - /// @notice The bridgehub contract. - IBridgehub internal immutable BRIDGEHUB; + function _ethTokenAssetId() internal view virtual returns (bytes32); - /// @notice The message root contract. - IMessageRoot internal immutable MESSAGE_ROOT; + function _l1ChainId() internal view virtual returns (uint256); - /// @notice The asset router contract. - address internal immutable ASSET_ROUTER; + function _bridgehub() internal view virtual returns (address); + + function _messageRoot() internal view virtual returns (address); + + function _assetRouter() internal view virtual returns (address); /// @notice Used to pause the migrations of chains. Used for upgrades. bool public migrationPaused; + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[49] private __gap; + /// @notice Only the asset router can call. modifier onlyAssetRouter() { - if (msg.sender != ASSET_ROUTER) { - revert NotAssetRouter(msg.sender, ASSET_ROUTER); + if (msg.sender != _assetRouter()) { + revert NotAssetRouter(msg.sender, _assetRouter()); } _; } @@ -67,34 +95,12 @@ contract ChainAssetHandler is /// @notice Only when the contract is deployed on L1. modifier onlyL1() { - if (L1_CHAIN_ID != block.chainid) { - revert NotL1(L1_CHAIN_ID, block.chainid); + if (_l1ChainId() != block.chainid) { + revert NotL1(_l1ChainId(), block.chainid); } _; } - /// @notice to avoid parity hack - constructor( - uint256 _l1ChainId, - address _owner, - IBridgehub _bridgehub, - address _assetRouter, - IMessageRoot _messageRoot - ) reentrancyGuardInitializer { - _disableInitializers(); - BRIDGEHUB = _bridgehub; - L1_CHAIN_ID = _l1ChainId; - ASSET_ROUTER = _assetRouter; - MESSAGE_ROOT = _messageRoot; - _transferOwnership(_owner); - } - - /// @dev Initializes the reentrancy guard. Expected to be used in the proxy. - /// @param _owner the owner of the contract - function initialize(address _owner) external reentrancyGuardInitializer { - _transferOwnership(_owner); - } - /*////////////////////////////////////////////////////////////// Chain migration //////////////////////////////////////////////////////////////*/ @@ -121,8 +127,11 @@ contract ChainAssetHandler is returns (bytes memory bridgehubMintData) { BridgehubBurnCTMAssetData memory bridgehubBurnData = abi.decode(_data, (BridgehubBurnCTMAssetData)); - if (_assetId != BRIDGEHUB.ctmAssetIdFromChainId(bridgehubBurnData.chainId)) { - revert IncorrectChainAssetId(_assetId, BRIDGEHUB.ctmAssetIdFromChainId(bridgehubBurnData.chainId)); + if (_assetId != IBridgehubBase(_bridgehub()).ctmAssetIdFromChainId(bridgehubBurnData.chainId)) { + revert IncorrectChainAssetId( + _assetId, + IBridgehubBase(_bridgehub()).ctmAssetIdFromChainId(bridgehubBurnData.chainId) + ); } address zkChain; @@ -130,7 +139,7 @@ contract ChainAssetHandler is // to avoid stack too deep { address ctm; - (zkChain, ctm) = BRIDGEHUB.forwardedBridgeBurnSetSettlementLayer( + (zkChain, ctm) = IBridgehubBase(_bridgehub()).forwardedBridgeBurnSetSettlementLayer( bridgehubBurnData.chainId, _settlementChainId ); @@ -148,20 +157,23 @@ contract ChainAssetHandler is ); // For security reasons, chain migration is temporarily restricted to settlement layers with the same CTM - if (_settlementChainId != L1_CHAIN_ID && BRIDGEHUB.chainTypeManager(_settlementChainId) != ctm) { + if ( + _settlementChainId != _l1ChainId() && + IBridgehubBase(_bridgehub()).chainTypeManager(_settlementChainId) != ctm + ) { revert SLHasDifferentCTM(); } } bytes memory chainMintData = IZKChain(zkChain).forwardedBridgeBurn( - _settlementChainId == L1_CHAIN_ID + _settlementChainId == _l1ChainId() ? L1_SETTLEMENT_LAYER_VIRTUAL_ADDRESS - : BRIDGEHUB.getZKChain(_settlementChainId), + : IBridgehubBase(_bridgehub()).getZKChain(_settlementChainId), _originalCaller, bridgehubBurnData.chainData ); BridgehubMintCTMAssetData memory bridgeMintStruct = BridgehubMintCTMAssetData({ chainId: bridgehubBurnData.chainId, - baseTokenAssetId: BRIDGEHUB.baseTokenAssetId(bridgehubBurnData.chainId), + baseTokenAssetId: IBridgehubBase(_bridgehub()).baseTokenAssetId(bridgehubBurnData.chainId), ctmData: ctmMintData, chainData: chainMintData }); @@ -184,7 +196,7 @@ contract ChainAssetHandler is (BridgehubMintCTMAssetData) ); - (address zkChain, address ctm) = BRIDGEHUB.forwardedBridgeMint( + (address zkChain, address ctm) = IBridgehubBase(_bridgehub()).forwardedBridgeMint( _assetId, bridgehubMintData.chainId, bridgehubMintData.baseTokenAssetId @@ -197,8 +209,8 @@ contract ChainAssetHandler is revert ChainIdNotRegistered(bridgehubMintData.chainId); } // We want to allow any chain to be migrated, - BRIDGEHUB.registerNewZKChain(bridgehubMintData.chainId, zkChain, false); - MESSAGE_ROOT.addNewChain(bridgehubMintData.chainId); + IBridgehubBase(_bridgehub()).registerNewZKChain(bridgehubMintData.chainId, zkChain, false); + IMessageRoot(_messageRoot()).addNewChain(bridgehubMintData.chainId); } IZKChain(zkChain).forwardedBridgeMint(bridgehubMintData.chainData, contractAlreadyDeployed); @@ -220,7 +232,9 @@ contract ChainAssetHandler is ) external payable override requireZeroValue(msg.value) onlyAssetRouter onlyL1 { BridgehubBurnCTMAssetData memory bridgehubBurnData = abi.decode(_data, (BridgehubBurnCTMAssetData)); - (address zkChain, address ctm) = BRIDGEHUB.forwardedBridgeRecoverFailedTransfer(bridgehubBurnData.chainId); + (address zkChain, address ctm) = IBridgehubBase(_bridgehub()).forwardedBridgeRecoverFailedTransfer( + bridgehubBurnData.chainId + ); IChainTypeManager(ctm).forwardedBridgeRecoverFailedTransfer({ _chainId: bridgehubBurnData.chainId, diff --git a/l1-contracts/contracts/bridgehub/IBridgehub.sol b/l1-contracts/contracts/bridgehub/IBridgehubBase.sol similarity index 79% rename from l1-contracts/contracts/bridgehub/IBridgehub.sol rename to l1-contracts/contracts/bridgehub/IBridgehubBase.sol index 12c566e4a1..e5ddd9d923 100644 --- a/l1-contracts/contracts/bridgehub/IBridgehub.sol +++ b/l1-contracts/contracts/bridgehub/IBridgehubBase.sol @@ -53,7 +53,7 @@ struct BridgehubBurnCTMAssetData { /// @author Matter Labs /// @custom:security-contact security@matterlabs.dev -interface IBridgehub { +interface IBridgehubBase { /// @notice pendingAdmin is changed /// @dev Also emitted when new admin is accepted and in this case, `newPendingAdmin` would be zero address event NewPendingAdmin(address indexed oldPendingAdmin, address indexed newPendingAdmin); @@ -71,6 +71,14 @@ interface IBridgehub { event SettlementLayerRegistered(uint256 indexed chainId, bool indexed isWhitelisted); + event NewChain(uint256 indexed chainId, address chainTypeManager, address indexed chainGovernance); + + event ChainTypeManagerAdded(address indexed chainTypeManager); + + event ChainTypeManagerRemoved(address indexed chainTypeManager); + + event BaseTokenAssetIdRegistered(bytes32 indexed assetId); + /// @notice Starts the transfer of admin rights. Only the current admin or owner can propose a new pending one. /// @notice New admin can accept admin rights by calling `acceptAdmin` function. /// @param _newPendingAdmin Address of the new admin @@ -104,8 +112,21 @@ interface IBridgehub { function assetRouter() external view returns (address); - /// Mailbox forwarder + function whitelistedSettlementLayers(uint256 _chainId) external view returns (bool); + + function settlementLayer(uint256 _chainId) external view returns (uint256); + function ctmAssetIdFromChainId(uint256 _chainId) external view returns (bytes32); + + function ctmAssetIdFromAddress(address _ctmAddress) external view returns (bytes32); + + function l1CtmDeployer() external view returns (ICTMDeploymentTracker); + + function ctmAssetIdToAddress(bytes32 _assetInfo) external view returns (address); + + function chainAssetHandler() external view returns (address); + + /// Mailbox forwarder function proveL2MessageInclusion( uint256 _chainId, uint256 _batchNumber, @@ -132,14 +153,6 @@ interface IBridgehub { TxStatus _status ) external view returns (bool); - function requestL2TransactionDirect( - L2TransactionRequestDirect calldata _request - ) external payable returns (bytes32 canonicalTxHash); - - function requestL2TransactionTwoBridges( - L2TransactionRequestTwoBridgesOuter calldata _request - ) external payable returns (bytes32 canonicalTxHash); - function l2TransactionBaseCost( uint256 _chainId, uint256 _gasPrice, @@ -147,85 +160,22 @@ interface IBridgehub { uint256 _l2GasPerPubdataByteLimit ) external view returns (uint256); - //// Registry - - function createNewChain( - uint256 _chainId, - address _chainTypeManager, - bytes32 _baseTokenAssetId, - uint256 _salt, - address _admin, - bytes calldata _initData, - bytes[] calldata _factoryDeps - ) external returns (uint256 chainId); - + /// Registry function addChainTypeManager(address _chainTypeManager) external; function removeChainTypeManager(address _chainTypeManager) external; function addTokenAssetId(bytes32 _baseTokenAssetId) external; - function setAddresses( - address _sharedBridge, - ICTMDeploymentTracker _l1CtmDeployer, - IMessageRoot _messageRoot, - address _chainAssetHandler - ) external; - function setChainAssetHandler(address _chainAssetHandler) external; - event NewChain(uint256 indexed chainId, address chainTypeManager, address indexed chainGovernance); - - event ChainTypeManagerAdded(address indexed chainTypeManager); - - event ChainTypeManagerRemoved(address indexed chainTypeManager); - - event BaseTokenAssetIdRegistered(bytes32 indexed assetId); - - function whitelistedSettlementLayers(uint256 _chainId) external view returns (bool); - - function registerSettlementLayer(uint256 _newSettlementLayerChainId, bool _isWhitelisted) external; - - function settlementLayer(uint256 _chainId) external view returns (uint256); - - // function finalizeMigrationToGateway( - // uint256 _chainId, - // address _baseToken, - // address _sharedBridge, - // address _admin, - // uint256 _expectedProtocolVersion, - // ZKChainCommitment calldata _commitment, - // bytes calldata _diamondCut - // ) external; - - function forwardTransactionOnGateway( - uint256 _chainId, - bytes32 _canonicalTxHash, - uint64 _expirationTimestamp - ) external; - - function ctmAssetIdFromChainId(uint256 _chainId) external view returns (bytes32); - - function ctmAssetIdFromAddress(address _ctmAddress) external view returns (bytes32); - - function l1CtmDeployer() external view returns (ICTMDeploymentTracker); - - function ctmAssetIdToAddress(bytes32 _assetInfo) external view returns (address); - function setCTMAssetAddress(bytes32 _additionalData, address _assetAddress) external; - function L1_CHAIN_ID() external view returns (uint256); - - function chainAssetHandler() external view returns (address); - - function registerAlreadyDeployedZKChain(uint256 _chainId, address _hyperchain) external; - - function registerLegacyChain(uint256 _chainId) external; - function pauseMigration() external; function unpauseMigration() external; + /// Asset Handler functions function forwardedBridgeBurnSetSettlementLayer( uint256 _chainId, uint256 _newSettlementLayerChainId diff --git a/l1-contracts/contracts/bridgehub/ICTMDeploymentTracker.sol b/l1-contracts/contracts/bridgehub/ICTMDeploymentTracker.sol index ac5ad09657..f3c56d0be4 100644 --- a/l1-contracts/contracts/bridgehub/ICTMDeploymentTracker.sol +++ b/l1-contracts/contracts/bridgehub/ICTMDeploymentTracker.sol @@ -2,7 +2,7 @@ pragma solidity 0.8.28; -import {IBridgehub, L2TransactionRequestTwoBridgesInner} from "./IBridgehub.sol"; +import {IBridgehubBase, L2TransactionRequestTwoBridgesInner} from "./IBridgehubBase.sol"; import {IAssetRouterBase} from "../bridge/asset-router/IAssetRouterBase.sol"; import {IL1AssetDeploymentTracker} from "../bridge/interfaces/IL1AssetDeploymentTracker.sol"; @@ -16,7 +16,7 @@ interface ICTMDeploymentTracker is IL1AssetDeploymentTracker { bytes calldata _data ) external payable returns (L2TransactionRequestTwoBridgesInner memory request); - function BRIDGE_HUB() external view returns (IBridgehub); + function BRIDGE_HUB() external view returns (IBridgehubBase); function L1_ASSET_ROUTER() external view returns (IAssetRouterBase); diff --git a/l1-contracts/contracts/bridgehub/IL1Bridgehub.sol b/l1-contracts/contracts/bridgehub/IL1Bridgehub.sol new file mode 100644 index 0000000000..ec53c63891 --- /dev/null +++ b/l1-contracts/contracts/bridgehub/IL1Bridgehub.sol @@ -0,0 +1,40 @@ +// SPDX-License-Identifier: MIT +// We use a floating point pragma here so it can be used within other projects that interact with the ZKsync ecosystem without using our exact pragma version. +pragma solidity ^0.8.21; + +import {IBridgehubBase, L2TransactionRequestDirect, L2TransactionRequestTwoBridgesOuter} from "./IBridgehubBase.sol"; + +/// @author Matter Labs +/// @custom:security-contact security@matterlabs.dev +/// @dev Interface for L1-specific Bridgehub functionality +interface IL1Bridgehub is IBridgehubBase { + /// @notice Request L2 transaction directly + function requestL2TransactionDirect( + L2TransactionRequestDirect calldata _request + ) external payable returns (bytes32 canonicalTxHash); + + /// @notice Request L2 transaction through two bridges + function requestL2TransactionTwoBridges( + L2TransactionRequestTwoBridgesOuter calldata _request + ) external payable returns (bytes32 canonicalTxHash); + + /// @notice Create new chain + function createNewChain( + uint256 _chainId, + address _chainTypeManager, + bytes32 _baseTokenAssetId, + uint256 _salt, + address _admin, + bytes calldata _initData, + bytes[] calldata _factoryDeps + ) external returns (uint256 chainId); + + /// @notice Register settlement layer + function registerSettlementLayer(uint256 _newSettlementLayerChainId, bool _isWhitelisted) external; + + /// @notice Register already deployed ZK chain + function registerAlreadyDeployedZKChain(uint256 _chainId, address _hyperchain) external; + + /// @notice Register legacy chain + function registerLegacyChain(uint256 _chainId) external; +} diff --git a/l1-contracts/contracts/bridgehub/IL2Bridgehub.sol b/l1-contracts/contracts/bridgehub/IL2Bridgehub.sol new file mode 100644 index 0000000000..8c99879ffb --- /dev/null +++ b/l1-contracts/contracts/bridgehub/IL2Bridgehub.sol @@ -0,0 +1,10 @@ +// SPDX-License-Identifier: MIT +// We use a floating point pragma here so it can be used within other projects that interact with the ZKsync ecosystem without using our exact pragma version. +pragma solidity ^0.8.21; + +import {IBridgehubBase} from "./IBridgehubBase.sol"; + +/// @author Matter Labs +/// @custom:security-contact security@matterlabs.dev +/// @dev Interface for L2-specific Bridgehub functionality +interface IL2Bridgehub is IBridgehubBase {} diff --git a/l1-contracts/contracts/bridgehub/IMessageRoot.sol b/l1-contracts/contracts/bridgehub/IMessageRoot.sol index d703928132..b87d64e936 100644 --- a/l1-contracts/contracts/bridgehub/IMessageRoot.sol +++ b/l1-contracts/contracts/bridgehub/IMessageRoot.sol @@ -2,19 +2,17 @@ pragma solidity 0.8.28; -import {IBridgehub} from "./IBridgehub.sol"; - /** * @author Matter Labs * @notice MessageRoot contract is responsible for storing and aggregating the roots of the batches from different chains into the MessageRoot. * @custom:security-contact security@matterlabs.dev */ interface IMessageRoot { - function BRIDGE_HUB() external view returns (IBridgehub); + function BRIDGE_HUB() external view returns (address); function addNewChain(uint256 _chainId) external; - function addChainBatchRoot(uint256 _chainId, uint256 _batchNumber, bytes32 _chainBatchRoot) external; - function historicalRoot(uint256 _blockNumber) external view returns (bytes32); + + function addChainBatchRoot(uint256 _chainId, uint256 _batchNumber, bytes32 _chainBatchRoot) external; } diff --git a/l1-contracts/contracts/bridgehub/L1Bridgehub.sol b/l1-contracts/contracts/bridgehub/L1Bridgehub.sol new file mode 100644 index 0000000000..1b976e784e --- /dev/null +++ b/l1-contracts/contracts/bridgehub/L1Bridgehub.sol @@ -0,0 +1,357 @@ +// SPDX-License-Identifier: MIT + +pragma solidity 0.8.28; + +import {DataEncoding} from "../common/libraries/DataEncoding.sol"; +import {EnumerableMap} from "@openzeppelin/contracts-v4/utils/structs/EnumerableMap.sol"; + +import {ETH_TOKEN_ADDRESS, BRIDGEHUB_MIN_SECOND_BRIDGE_ADDRESS, TWO_BRIDGES_MAGIC_VALUE} from "../common/Config.sol"; +import {BridgehubBase} from "./BridgehubBase.sol"; +import {IL1Bridgehub} from "./IL1Bridgehub.sol"; +import {L2TransactionRequestDirect, L2TransactionRequestTwoBridgesOuter, L2TransactionRequestTwoBridgesInner} from "./IBridgehubBase.sol"; +import {IChainTypeManager} from "../state-transition/IChainTypeManager.sol"; +import {IL1AssetRouter} from "../bridge/asset-router/IL1AssetRouter.sol"; +import {IZKChain} from "../state-transition/chain-interfaces/IZKChain.sol"; +import {ICTMDeploymentTracker} from "./ICTMDeploymentTracker.sol"; +import {IMessageRoot} from "./IMessageRoot.sol"; +import {BridgehubL2TransactionRequest} from "../common/Messaging.sol"; +import {ChainIdAlreadyPresent, ChainNotLegacy, ChainNotPresentInCTM, NotL1, SecondBridgeAddressTooLow} from "./L1BridgehubErrors.sol"; +import {SettlementLayersMustSettleOnL1} from "../common/L1ContractErrors.sol"; +import {ChainIdAlreadyExists, ChainIdMismatch, IncorrectBridgeHubAddress, MsgValueMismatch, WrongMagicValue, ZeroAddress} from "../common/L1ContractErrors.sol"; + +/// @author Matter Labs +/// @custom:security-contact security@matterlabs.dev +/// @dev The Bridgehub contract serves as the primary entry point for L1->L2 communication, +/// facilitating interactions between end user and bridges. +/// It also manages state transition managers, base tokens, and chain registrations. +/// Bridgehub is also an IL1AssetHandler for the chains themselves, which is used to migrate the chains +/// between different settlement layers (for example from L1 to Gateway). +contract L1Bridgehub is BridgehubBase, IL1Bridgehub { + using EnumerableMap for EnumerableMap.UintToAddressMap; + + /// @notice the asset id of Eth. This is only used on L1. + bytes32 internal immutable ETH_TOKEN_ASSET_ID; + + /// @dev Chain ID of L1. + uint256 public immutable L1_CHAIN_ID; + + /// @notice The total number of ZK chains can be created/connected to this CTM. + /// This is a temporary security measure. + uint256 public immutable MAX_NUMBER_OF_ZK_CHAINS; + + /// @notice to avoid parity hack + constructor(address _owner, uint256 _maxNumberOfZKChains) reentrancyGuardInitializer { + L1_CHAIN_ID = block.chainid; + _disableInitializers(); + MAX_NUMBER_OF_ZK_CHAINS = _maxNumberOfZKChains; + + // Note that this assumes that the bridgehub only accepts transactions on chains with ETH base token only. + // This is indeed true, since the only methods where this immutable is used are the ones with `onlyL1` modifier. + // We will change this with interop. + ETH_TOKEN_ASSET_ID = DataEncoding.encodeNTVAssetId(block.chainid, ETH_TOKEN_ADDRESS); + _transferOwnership(_owner); + _initializeInner(); + } + + /// @notice used to initialize the contract + /// @notice this contract is also deployed on L2 as a system contract there the owner and the related functions will not be used + /// @param _owner the owner of the contract + function initialize(address _owner) external reentrancyGuardInitializer { + _transferOwnership(_owner); + _initializeInner(); + } + + /// @notice Used to initialize the contract on L1 + function initializeV2() external initializer { + _initializeInner(); + } + + /// @dev Returns the asset ID of ETH token for internal use. + function _ethTokenAssetId() internal view override returns (bytes32) { + return ETH_TOKEN_ASSET_ID; + } + + /// @dev Returns the maximum number of ZK chains for internal use. + function _maxNumberOfZKChains() internal view override returns (uint256) { + return MAX_NUMBER_OF_ZK_CHAINS; + } + + /// @dev Returns the L1 chain ID for internal use. + function _l1ChainId() internal view override returns (uint256) { + return L1_CHAIN_ID; + } + + modifier onlyL1() { + if (block.chainid != L1_CHAIN_ID) { + revert NotL1(block.chainid, L1_CHAIN_ID); + } + _; + } + + /// @notice Used to set the legacy chain data for the upgrade. + /// @param _chainId The chainId of the legacy chain we are migrating. + function registerLegacyChain(uint256 _chainId) external override onlyL1 { + address ctm = chainTypeManager[_chainId]; + if (ctm == address(0)) { + revert ChainNotLegacy(); + } + // slither-disable-next-line unused-return + (bool exists, ) = zkChainMap.tryGet(_chainId); + if (exists) { + revert ChainIdAlreadyPresent(); + } + + // From now on, since `zkChainMap` did not contain the chain, we assume + // that the chain is a legacy chain in the process of migration, i.e. + // its stored `baseTokenAssetId`, etc. + + address token = __DEPRECATED_baseToken[_chainId]; + if (token == address(0)) { + revert ChainNotLegacy(); + } + + bytes32 assetId = DataEncoding.encodeNTVAssetId(block.chainid, token); + + baseTokenAssetId[_chainId] = assetId; + assetIdIsRegistered[assetId] = true; + + address chainAddress = IChainTypeManager(ctm).getZKChainLegacy(_chainId); + if (chainAddress == address(0)) { + revert ChainNotPresentInCTM(); + } + _registerNewZKChain(_chainId, chainAddress, false); + messageRoot.addNewChain(_chainId); + settlementLayer[_chainId] = block.chainid; + } + + /// @notice Used to register a chain as a settlement layer. + /// @param _newSettlementLayerChainId the chainId of the chain + /// @param _isWhitelisted whether the chain is a whitelisted settlement layer + function registerSettlementLayer( + uint256 _newSettlementLayerChainId, + bool _isWhitelisted + ) external onlyOwner onlyL1 { + if (settlementLayer[_newSettlementLayerChainId] != block.chainid) { + revert SettlementLayersMustSettleOnL1(); + } + whitelistedSettlementLayers[_newSettlementLayerChainId] = _isWhitelisted; + emit SettlementLayerRegistered(_newSettlementLayerChainId, _isWhitelisted); + } + + /// @notice Register new chain. New chains can be only registered on Bridgehub deployed on L1. Later they can be moved to any other layer. + /// @notice for Eth the baseToken address is 1 + /// @param _chainId the chainId of the chain + /// @param _chainTypeManager the state transition manager address + /// @param _baseTokenAssetId the base token asset id of the chain + /// @param _salt the salt for the chainId, currently not used + /// @param _admin the admin of the chain + /// @param _initData the fixed initialization data for the chain + /// @param _factoryDeps the factory dependencies for the chain's deployment + function createNewChain( + uint256 _chainId, + address _chainTypeManager, + bytes32 _baseTokenAssetId, + // solhint-disable-next-line no-unused-vars + uint256 _salt, + address _admin, + bytes calldata _initData, + bytes[] calldata _factoryDeps + ) external onlyOwnerOrAdmin nonReentrant whenNotPaused onlyL1 returns (uint256) { + _validateChainParams({_chainId: _chainId, _assetId: _baseTokenAssetId, _chainTypeManager: _chainTypeManager}); + + chainTypeManager[_chainId] = _chainTypeManager; + + baseTokenAssetId[_chainId] = _baseTokenAssetId; + settlementLayer[_chainId] = block.chainid; + + address chainAddress = IChainTypeManager(_chainTypeManager).createNewChain({ + _chainId: _chainId, + _baseTokenAssetId: _baseTokenAssetId, + _admin: _admin, + _initData: _initData, + _factoryDeps: _factoryDeps + }); + _registerNewZKChain(_chainId, chainAddress, true); + messageRoot.addNewChain(_chainId); + + emit NewChain(_chainId, _chainTypeManager, _admin); + return _chainId; + } + + /// @notice The mailbox is called directly after the assetRouter received the deposit + /// this assumes that either ether is the base token or + /// the msg.sender has approved mintValue allowance for the nativeTokenVault. + /// This means this is not ideal for contract calls, as the contract would have to handle token allowance of the base Token. + /// In case allowance is provided to the Asset Router, then it will be transferred to NTV. + function requestL2TransactionDirect( + L2TransactionRequestDirect calldata _request + ) external payable override nonReentrant whenNotPaused onlyL1 returns (bytes32 canonicalTxHash) { + // Note: If the ZK chain with corresponding `chainId` is not yet created, + // the transaction will revert on `bridgehubRequestL2Transaction` as call to zero address. + { + bytes32 tokenAssetId = baseTokenAssetId[_request.chainId]; + if (tokenAssetId == ETH_TOKEN_ASSET_ID) { + if (msg.value != _request.mintValue) { + revert MsgValueMismatch(_request.mintValue, msg.value); + } + } else { + if (msg.value != 0) { + revert MsgValueMismatch(0, msg.value); + } + } + + // slither-disable-next-line arbitrary-send-eth + IL1AssetRouter(assetRouter).bridgehubDepositBaseToken{value: msg.value}( + _request.chainId, + tokenAssetId, + msg.sender, + _request.mintValue + ); + } + + canonicalTxHash = _sendRequest( + _request.chainId, + _request.refundRecipient, + BridgehubL2TransactionRequest({ + sender: msg.sender, + contractL2: _request.l2Contract, + mintValue: _request.mintValue, + l2Value: _request.l2Value, + l2Calldata: _request.l2Calldata, + l2GasLimit: _request.l2GasLimit, + l2GasPerPubdataByteLimit: _request.l2GasPerPubdataByteLimit, + factoryDeps: _request.factoryDeps, + refundRecipient: address(0) + }) + ); + } + + /// @notice After depositing funds to the assetRouter, the secondBridge is called + /// to return the actual L2 message which is sent to the Mailbox. + /// This assumes that either ether is the base token or + /// the msg.sender has approved the nativeTokenVault with the mintValue, + /// and also the necessary approvals are given for the second bridge. + /// In case allowance is provided to the Shared Bridge, then it will be transferred to NTV. + /// @notice The logic of this bridge is to allow easy depositing for bridges. + /// Each contract that handles the users ERC20 tokens needs approvals from the user, this contract allows + /// the user to approve for each token only its respective bridge + /// @notice This function is great for contract calls to L2, the secondBridge can be any contract. + /// @param _request the request for the L2 transaction + function requestL2TransactionTwoBridges( + L2TransactionRequestTwoBridgesOuter calldata _request + ) external payable override nonReentrant whenNotPaused onlyL1 returns (bytes32 canonicalTxHash) { + if (_request.secondBridgeAddress <= BRIDGEHUB_MIN_SECOND_BRIDGE_ADDRESS) { + revert SecondBridgeAddressTooLow(_request.secondBridgeAddress, BRIDGEHUB_MIN_SECOND_BRIDGE_ADDRESS); + } + + { + bytes32 tokenAssetId = baseTokenAssetId[_request.chainId]; + uint256 baseTokenMsgValue; + if (tokenAssetId == ETH_TOKEN_ASSET_ID) { + if (msg.value != _request.mintValue + _request.secondBridgeValue) { + revert MsgValueMismatch(_request.mintValue + _request.secondBridgeValue, msg.value); + } + baseTokenMsgValue = _request.mintValue; + } else { + if (msg.value != _request.secondBridgeValue) { + revert MsgValueMismatch(_request.secondBridgeValue, msg.value); + } + baseTokenMsgValue = 0; + } + + // slither-disable-next-line arbitrary-send-eth + IL1AssetRouter(assetRouter).bridgehubDepositBaseToken{value: baseTokenMsgValue}( + _request.chainId, + tokenAssetId, + msg.sender, + _request.mintValue + ); + } + + // slither-disable-next-line arbitrary-send-eth + L2TransactionRequestTwoBridgesInner memory outputRequest = IL1AssetRouter(_request.secondBridgeAddress) + .bridgehubDeposit{value: _request.secondBridgeValue}( + _request.chainId, + msg.sender, + _request.l2Value, + _request.secondBridgeCalldata + ); + + if (outputRequest.magicValue != TWO_BRIDGES_MAGIC_VALUE) { + revert WrongMagicValue(uint256(TWO_BRIDGES_MAGIC_VALUE), uint256(outputRequest.magicValue)); + } + + canonicalTxHash = _sendRequest( + _request.chainId, + _request.refundRecipient, + BridgehubL2TransactionRequest({ + sender: _request.secondBridgeAddress, + contractL2: outputRequest.l2Contract, + mintValue: _request.mintValue, + l2Value: _request.l2Value, + l2Calldata: outputRequest.l2Calldata, + l2GasLimit: _request.l2GasLimit, + l2GasPerPubdataByteLimit: _request.l2GasPerPubdataByteLimit, + factoryDeps: outputRequest.factoryDeps, + refundRecipient: address(0) + }) + ); + + IL1AssetRouter(_request.secondBridgeAddress).bridgehubConfirmL2Transaction( + _request.chainId, + outputRequest.txDataHash, + canonicalTxHash + ); + } + + /// @notice Sets contract addresses + function setAddresses( + address _assetRouter, + ICTMDeploymentTracker _l1CtmDeployer, + IMessageRoot _messageRoot, + address _chainAssetHandler + ) external override onlyOwnerOrUpgrader { + assetRouter = _assetRouter; + l1CtmDeployer = _l1CtmDeployer; + messageRoot = _messageRoot; + chainAssetHandler = _chainAssetHandler; + } + + /// @dev Registers an already deployed chain with the bridgehub + /// @param _chainId The chain Id of the chain + /// @param _zkChain Address of the zkChain + function registerAlreadyDeployedZKChain(uint256 _chainId, address _zkChain) external onlyOwner onlyL1 { + if (_zkChain == address(0)) { + revert ZeroAddress(); + } + // slither-disable-next-line unused-return + (bool exists, ) = zkChainMap.tryGet(_chainId); + if (exists) { + revert ChainIdAlreadyExists(); + } + if (IZKChain(_zkChain).getChainId() != _chainId) { + revert ChainIdMismatch(); + } + + address ctm = IZKChain(_zkChain).getChainTypeManager(); + address chainAdmin = IZKChain(_zkChain).getAdmin(); + bytes32 chainBaseTokenAssetId = IZKChain(_zkChain).getBaseTokenAssetId(); + address bridgeHub = IZKChain(_zkChain).getBridgehub(); + + if (bridgeHub != address(this)) { + revert IncorrectBridgeHubAddress(bridgeHub); + } + + _validateChainParams({_chainId: _chainId, _assetId: chainBaseTokenAssetId, _chainTypeManager: ctm}); + + chainTypeManager[_chainId] = ctm; + + baseTokenAssetId[_chainId] = chainBaseTokenAssetId; + settlementLayer[_chainId] = block.chainid; + + _registerNewZKChain(_chainId, _zkChain, true); + messageRoot.addNewChain(_chainId); + + emit NewChain(_chainId, ctm, chainAdmin); + } +} diff --git a/l1-contracts/contracts/bridgehub/L1ChainAssetHandler.sol b/l1-contracts/contracts/bridgehub/L1ChainAssetHandler.sol new file mode 100644 index 0000000000..25c81335d0 --- /dev/null +++ b/l1-contracts/contracts/bridgehub/L1ChainAssetHandler.sol @@ -0,0 +1,71 @@ +// SPDX-License-Identifier: MIT + +pragma solidity 0.8.28; + +import {ChainAssetHandlerBase} from "./ChainAssetHandlerBase.sol"; +import {ETH_TOKEN_ADDRESS} from "../common/Config.sol"; +import {DataEncoding} from "../common/libraries/DataEncoding.sol"; + +/// @author Matter Labs +/// @custom:security-contact security@matterlabs.dev +/// @dev The ChainAssetHandler contract is used for migrating chains between settlement layers, +/// it is the IL1AssetHandler for the chains themselves, which is used to migrate the chains +/// between different settlement layers (for example from L1 to Gateway). +/// @dev L1 version – keeps the cheap immutables set in the constructor. +contract L1ChainAssetHandler is ChainAssetHandlerBase { + /// @dev The assetId of the base token. + bytes32 public immutable override ETH_TOKEN_ASSET_ID; + + /// @dev The chain ID of L1. + uint256 public immutable override L1_CHAIN_ID; + + /// @dev The bridgehub contract. + address public immutable override BRIDGEHUB; + + /// @dev The message root contract. + address public immutable override MESSAGE_ROOT; + + /// @dev The asset router contract. + address public immutable override ASSET_ROUTER; + + /*////////////////////////////////////////////////////////////// + IMMUTABLE GETTERS + //////////////////////////////////////////////////////////////*/ + + function _ethTokenAssetId() internal view override returns (bytes32) { + return ETH_TOKEN_ASSET_ID; + } + function _l1ChainId() internal view override returns (uint256) { + return L1_CHAIN_ID; + } + function _bridgehub() internal view override returns (address) { + return BRIDGEHUB; + } + function _messageRoot() internal view override returns (address) { + return MESSAGE_ROOT; + } + function _assetRouter() internal view override returns (address) { + return ASSET_ROUTER; + } + + constructor( + address _owner, + address _bridgehub, + address _assetRouter, + address _messageRoot + ) reentrancyGuardInitializer { + _disableInitializers(); + BRIDGEHUB = _bridgehub; + ASSET_ROUTER = _assetRouter; + MESSAGE_ROOT = _messageRoot; + L1_CHAIN_ID = block.chainid; + ETH_TOKEN_ASSET_ID = DataEncoding.encodeNTVAssetId(block.chainid, ETH_TOKEN_ADDRESS); + _transferOwnership(_owner); + } + + /// @dev Initializes the reentrancy guard. Expected to be used in the proxy. + /// @param _owner the owner of the contract + function initialize(address _owner) external reentrancyGuardInitializer { + _transferOwnership(_owner); + } +} diff --git a/l1-contracts/contracts/bridgehub/L1MessageRoot.sol b/l1-contracts/contracts/bridgehub/L1MessageRoot.sol new file mode 100644 index 0000000000..00337f3a94 --- /dev/null +++ b/l1-contracts/contracts/bridgehub/L1MessageRoot.sol @@ -0,0 +1,39 @@ +// SPDX-License-Identifier: MIT + +pragma solidity 0.8.28; + +import {MessageRootBase} from "./MessageRootBase.sol"; + +/// @author Matter Labs +/// @custom:security-contact security@matterlabs.dev +/// @dev The MessageRoot contract is responsible for storing the cross message roots of the chains and the aggregated root of all chains. +contract L1MessageRoot is MessageRootBase { + /// @dev Bridgehub smart contract that is used to operate with L2 via asynchronous L2 <-> L1 communication. + address public immutable BRIDGE_HUB; + + /// @dev Contract is expected to be used as proxy implementation on L1, but as a system contract on L2. + /// This means we call the _initialize in both the constructor and the initialize functions. + /// @dev Initialize the implementation to prevent Parity hack. + constructor(address _bridgehub) { + BRIDGE_HUB = _bridgehub; + _initialize(); + _disableInitializers(); + } + + /// @dev Initializes a contract for later use. Expected to be used in the proxy on L1, on L2 it is a system contract without a proxy. + function initialize() external initializer { + _initialize(); + } + + /*////////////////////////////////////////////////////////////// + IMMUTABLE GETTERS + //////////////////////////////////////////////////////////////*/ + + function _bridgehub() internal view override returns (address) { + return BRIDGE_HUB; + } + + function L1_CHAIN_ID() public view override returns (uint256) { + return block.chainid; + } +} diff --git a/l1-contracts/contracts/bridgehub/L2Bridgehub.sol b/l1-contracts/contracts/bridgehub/L2Bridgehub.sol new file mode 100644 index 0000000000..a595aba8e1 --- /dev/null +++ b/l1-contracts/contracts/bridgehub/L2Bridgehub.sol @@ -0,0 +1,126 @@ +// SPDX-License-Identifier: MIT + +pragma solidity 0.8.28; + +import {DataEncoding} from "../common/libraries/DataEncoding.sol"; +import {EnumerableMap} from "@openzeppelin/contracts-v4/utils/structs/EnumerableMap.sol"; + +import {ETH_TOKEN_ADDRESS, SETTLEMENT_LAYER_RELAY_SENDER} from "../common/Config.sol"; +import {BridgehubBase} from "./BridgehubBase.sol"; +import {IL2Bridgehub} from "./IL2Bridgehub.sol"; +import {IZKChain} from "../state-transition/chain-interfaces/IZKChain.sol"; +import {ICTMDeploymentTracker} from "./ICTMDeploymentTracker.sol"; +import {IMessageRoot} from "./IMessageRoot.sol"; +import {NotInGatewayMode, NotRelayedSender} from "./L1BridgehubErrors.sol"; + +/// @author Matter Labs +/// @custom:security-contact security@matterlabs.dev +/// @dev The Bridgehub contract serves as the primary entry point for L1->L2 communication, +/// facilitating interactions between end user and bridges. +/// It also manages state transition managers, base tokens, and chain registrations. +/// Bridgehub is also an IL1AssetHandler for the chains themselves, which is used to migrate the chains +/// between different settlement layers (for example from L1 to Gateway). +/// @dev Important: L2 contracts are not allowed to have any immutable variables or constructors. This is needed for compatibility with ZKsyncOS. +contract L2Bridgehub is BridgehubBase, IL2Bridgehub { + using EnumerableMap for EnumerableMap.UintToAddressMap; + + /// @dev The asset ID of ETH token. + /// @dev Note, that while it is a simple storage variable, the name is in capslock for the backward compatibility with + /// the old version where it was an immutable. + bytes32 public ETH_TOKEN_ASSET_ID; + + /// @dev The chain ID of L1. This contract can be deployed on multiple layers, but this value is still equal to the + /// L1 that is at the most base layer. + /// @dev Note, that while it is a simple storage variable, the name is in capslock for the backward compatibility with + /// the old version where it was an immutable. + uint256 public L1_CHAIN_ID; + + /// @notice The total number of ZK chains can be created/connected to this CTM. + /// This is a temporary security measure. + /// @dev Note, that while it is a simple storage variable, the name is in capslock for the backward compatibility with + /// the old version where it was an immutable. + uint256 public MAX_NUMBER_OF_ZK_CHAINS; + + /// @notice Initializes the contract. + /// @dev This function is used to initialize the contract with the initial values. + /// @param _l1ChainId The chain id of L1. + /// @param _owner The owner of the contract. + /// @param _maxNumberOfZKChains The maximum number of ZK chains that can be created. + function initL2( + uint256 _l1ChainId, + address _owner, + uint256 _maxNumberOfZKChains + ) public reentrancyGuardInitializer onlyUpgrader { + _disableInitializers(); + updateL2(_l1ChainId, _maxNumberOfZKChains); + _transferOwnership(_owner); + _initializeInner(); + } + + /// @notice Updates the contract. + /// @dev This function is used to initialize the new implementation of L2Bridgehub on existing chains during + /// the upgrade. + /// @param _l1ChainId The chain id of L1. + /// @param _maxNumberOfZKChains The maximum number of ZK chains that can be created. + function updateL2(uint256 _l1ChainId, uint256 _maxNumberOfZKChains) public onlyUpgrader { + L1_CHAIN_ID = _l1ChainId; + MAX_NUMBER_OF_ZK_CHAINS = _maxNumberOfZKChains; + + // Note that this assumes that the bridgehub only accepts transactions on chains with ETH base token only. + // This is indeed true, since the only methods where this immutable is used are the ones with `onlyL1` modifier. + // We will change this with interop. + ETH_TOKEN_ASSET_ID = DataEncoding.encodeNTVAssetId(L1_CHAIN_ID, ETH_TOKEN_ADDRESS); + } + + /// @dev Returns the asset ID of ETH token for internal use. + function _ethTokenAssetId() internal view override returns (bytes32) { + return ETH_TOKEN_ASSET_ID; + } + + /// @dev Returns the maximum number of ZK chains for internal use. + function _maxNumberOfZKChains() internal view override returns (uint256) { + return MAX_NUMBER_OF_ZK_CHAINS; + } + + /// @dev Returns the L1 chain ID for internal use. + function _l1ChainId() internal view override returns (uint256) { + return L1_CHAIN_ID; + } + + modifier onlySettlementLayerRelayedSender() override { + /// There is no sender for the wrapping, we use a virtual address. + if (msg.sender != SETTLEMENT_LAYER_RELAY_SENDER) { + revert NotRelayedSender(msg.sender, SETTLEMENT_LAYER_RELAY_SENDER); + } + _; + } + + /// @notice Used to forward a transaction on the gateway to the chains mailbox. + /// @param _chainId the chainId of the chain + /// @param _canonicalTxHash the canonical transaction hash + /// @param _expirationTimestamp the expiration timestamp for the transaction + function forwardTransactionOnGateway( + uint256 _chainId, + bytes32 _canonicalTxHash, + uint64 _expirationTimestamp + ) external override onlySettlementLayerRelayedSender { + if (L1_CHAIN_ID == block.chainid) { + revert NotInGatewayMode(); + } + address zkChain = zkChainMap.get(_chainId); + IZKChain(zkChain).bridgehubRequestL2TransactionOnGateway(_canonicalTxHash, _expirationTimestamp); + } + + /// @notice Set addresses + function setAddresses( + address _assetRouter, + ICTMDeploymentTracker _l1CtmDeployer, + IMessageRoot _messageRoot, + address _chainAssetHandler + ) external override onlyOwnerOrUpgrader { + assetRouter = _assetRouter; + l1CtmDeployer = _l1CtmDeployer; + messageRoot = _messageRoot; + chainAssetHandler = _chainAssetHandler; + } +} diff --git a/l1-contracts/contracts/bridgehub/L2ChainAssetHandler.sol b/l1-contracts/contracts/bridgehub/L2ChainAssetHandler.sol new file mode 100644 index 0000000000..a3947046cc --- /dev/null +++ b/l1-contracts/contracts/bridgehub/L2ChainAssetHandler.sol @@ -0,0 +1,106 @@ +// SPDX-License-Identifier: MIT + +pragma solidity 0.8.28; + +import {ChainAssetHandlerBase} from "./ChainAssetHandlerBase.sol"; +import {ETH_TOKEN_ADDRESS} from "../common/Config.sol"; +import {DataEncoding} from "../common/libraries/DataEncoding.sol"; +import {L2_COMPLEX_UPGRADER_ADDR} from "../common/l2-helpers/L2ContractAddresses.sol"; +import {InvalidCaller} from "../common/L1ContractErrors.sol"; + +/// @author Matter Labs +/// @custom:security-contact security@matterlabs.dev +/// @dev The ChainAssetHandler contract is used for migrating chains between settlement layers, +/// it is the IL1AssetHandler for the chains themselves, which is used to migrate the chains +/// between different settlement layers (for example from L1 to Gateway). +/// @dev Important: L2 contracts are not allowed to have any immutable variables or constructors. This is needed for compatibility with ZKsyncOS. +contract L2ChainAssetHandler is ChainAssetHandlerBase { + /// @dev The assetId of the base token. + /// @dev Note, that while it is a simple storage variable, the name is in capslock for the backward compatibility with + /// the old version where it was an immutable. + bytes32 public override ETH_TOKEN_ASSET_ID; + + /// @dev The chain ID of L1. + /// @dev Note, that while it is a simple storage variable, the name is in capslock for the backward compatibility with + /// the old version where it was an immutable. + uint256 public override L1_CHAIN_ID; + + /// @dev The bridgehub contract. + /// @dev Note, that while it is a simple storage variable, the name is in capslock for the backward compatibility with + /// the old version where it was an immutable. + address public override BRIDGEHUB; + + /// @dev The message root contract. + /// @dev Note, that while it is a simple storage variable, the name is in capslock for the backward compatibility with + /// the old version where it was an immutable. + address public override MESSAGE_ROOT; + + /// @dev The asset router contract. + /// @dev Note, that while it is a simple storage variable, the name is in capslock for the backward compatibility with + /// the old version where it was an immutable. + address public override ASSET_ROUTER; + + /*////////////////////////////////////////////////////////////// + IMMUTABLE GETTERS + //////////////////////////////////////////////////////////////*/ + + function _ethTokenAssetId() internal view override returns (bytes32) { + return ETH_TOKEN_ASSET_ID; + } + + function _l1ChainId() internal view override returns (uint256) { + return L1_CHAIN_ID; + } + + function _bridgehub() internal view override returns (address) { + return BRIDGEHUB; + } + + function _messageRoot() internal view override returns (address) { + return MESSAGE_ROOT; + } + + function _assetRouter() internal view override returns (address) { + return ASSET_ROUTER; + } + + /// @dev Only allows calls from the complex upgrader contract on L2. + modifier onlyUpgrader() { + if (msg.sender != L2_COMPLEX_UPGRADER_ADDR) { + revert InvalidCaller(msg.sender); + } + _; + } + + /// @notice Initializes the contract. + /// @dev This function is used to initialize the contract with the initial values. + function initL2( + uint256 _l1ChainId, + address _owner, + address _bridgehub, + address _assetRouter, + address _messageRoot + ) external reentrancyGuardInitializer onlyUpgrader { + _disableInitializers(); + + updateL2(_l1ChainId, _bridgehub, _assetRouter, _messageRoot); + + _transferOwnership(_owner); + } + + /// @notice Updates the contract. + /// @dev This function is used to initialize the new implementation of L2ChainAssetHandler on existing chains during + /// the upgrade. + function updateL2( + uint256 _l1ChainId, + address _bridgehub, + address _assetRouter, + address _messageRoot + ) public onlyUpgrader { + BRIDGEHUB = _bridgehub; + L1_CHAIN_ID = _l1ChainId; + ASSET_ROUTER = _assetRouter; + MESSAGE_ROOT = _messageRoot; + ETH_TOKEN_ASSET_ID = DataEncoding.encodeNTVAssetId(_l1ChainId, ETH_TOKEN_ADDRESS); + } +} diff --git a/l1-contracts/contracts/bridgehub/L2MessageRoot.sol b/l1-contracts/contracts/bridgehub/L2MessageRoot.sol new file mode 100644 index 0000000000..fe04c0b248 --- /dev/null +++ b/l1-contracts/contracts/bridgehub/L2MessageRoot.sol @@ -0,0 +1,98 @@ +// SPDX-License-Identifier: MIT + +pragma solidity 0.8.28; + +import {MessageRootBase} from "./MessageRootBase.sol"; + +import {L2_BRIDGEHUB_ADDR} from "../common/l2-helpers/L2ContractAddresses.sol"; + +import {MessageRootNotRegistered} from "./L1BridgehubErrors.sol"; +import {MessageHashing} from "../common/libraries/MessageHashing.sol"; + +import {FullMerkle} from "../common/libraries/FullMerkle.sol"; +import {DynamicIncrementalMerkle} from "../common/libraries/DynamicIncrementalMerkle.sol"; +import {L2_COMPLEX_UPGRADER_ADDR} from "../common/l2-helpers/L2ContractAddresses.sol"; +import {InvalidCaller} from "../common/L1ContractErrors.sol"; + +/// @author Matter Labs +/// @custom:security-contact security@matterlabs.dev +/// @dev The MessageRoot contract is responsible for storing the cross message roots of the chains and the aggregated root of all chains. +/// @dev Important: L2 contracts are not allowed to have any immutable variables or constructors. This is needed for compatibility with ZKsyncOS. +contract L2MessageRoot is MessageRootBase { + using FullMerkle for FullMerkle.FullTree; + using DynamicIncrementalMerkle for DynamicIncrementalMerkle.Bytes32PushTree; + + /// @dev Chain ID of L1 for bridging reasons. + /// @dev Note, that while it is a simple storage variable, the name is in capslock for the backward compatibility with + /// the old version where it was an immutable. + uint256 internal l1ChainId; + + /*////////////////////////////////////////////////////////////// + IMMUTABLE GETTERS + //////////////////////////////////////////////////////////////*/ + + function _bridgehub() internal view override returns (address) { + return L2_BRIDGEHUB_ADDR; + } + + // A method for backwards compatibility with the old implementation + function BRIDGE_HUB() public view returns (address) { + return L2_BRIDGEHUB_ADDR; + } + + function L1_CHAIN_ID() public view override returns (uint256) { + return l1ChainId; + } + + /// @dev Only allows calls from the complex upgrader contract on L2. + modifier onlyUpgrader() { + if (msg.sender != L2_COMPLEX_UPGRADER_ADDR) { + revert InvalidCaller(msg.sender); + } + _; + } + + /// @notice Initializes the contract. + /// @dev This function is used to initialize the contract with the initial values. + /// @param _l1ChainId The chain id of L1. + function initL2(uint256 _l1ChainId) public onlyUpgrader { + _disableInitializers(); + l1ChainId = _l1ChainId; + _initialize(); + } + + /// @notice Adds a new chainBatchRoot to the chainTree. + /// @param _chainId The ID of the chain whose chainBatchRoot is being added to the chainTree. + /// @param _batchNumber The number of the batch to which _chainBatchRoot belongs. + /// @param _chainBatchRoot The value of chainBatchRoot which is being added. + function addChainBatchRoot( + uint256 _chainId, + uint256 _batchNumber, + bytes32 _chainBatchRoot + ) external override onlyChain(_chainId) { + // Make sure that chain is registered. + if (!chainRegistered(_chainId)) { + revert MessageRootNotRegistered(); + } + + // Push chainBatchRoot to the chainTree related to specified chainId and get the new root. + bytes32 chainRoot; + // slither-disable-next-line unused-return + (, chainRoot) = chainTree[_chainId].push(MessageHashing.batchLeafHash(_chainBatchRoot, _batchNumber)); + + emit AppendedChainBatchRoot(_chainId, _batchNumber, _chainBatchRoot); + + // Update leaf corresponding to the specified chainId with newly acquired value of the chainRoot. + bytes32 cachedChainIdLeafHash = MessageHashing.chainIdLeafHash(chainRoot, _chainId); + bytes32 sharedTreeRoot = sharedTree.updateLeaf(chainIndex[_chainId], cachedChainIdLeafHash); + + emit NewChainRoot(_chainId, chainRoot, cachedChainIdLeafHash); + + // What happens here is we query for the current sharedTreeRoot and emit the event stating that new InteropRoot is "created". + // The reason for the usage of "bytes32[] memory _sides" to store the InteropRoot is explained in L2InteropRootStorage contract. + bytes32[] memory _sides = new bytes32[](1); + _sides[0] = sharedTreeRoot; + emit NewInteropRoot(block.chainid, block.number, 0, _sides); + historicalRoot[block.number] = sharedTreeRoot; + } +} diff --git a/l1-contracts/contracts/bridgehub/MessageRoot.sol b/l1-contracts/contracts/bridgehub/MessageRootBase.sol similarity index 72% rename from l1-contracts/contracts/bridgehub/MessageRoot.sol rename to l1-contracts/contracts/bridgehub/MessageRootBase.sol index 2326159c0a..692e240379 100644 --- a/l1-contracts/contracts/bridgehub/MessageRoot.sol +++ b/l1-contracts/contracts/bridgehub/MessageRootBase.sol @@ -5,11 +5,10 @@ pragma solidity 0.8.28; import {Initializable} from "@openzeppelin/contracts-v4/proxy/utils/Initializable.sol"; import {DynamicIncrementalMerkle} from "../common/libraries/DynamicIncrementalMerkle.sol"; -import {IBridgehub} from "./IBridgehub.sol"; +import {IBridgehubBase} from "./IBridgehubBase.sol"; import {IMessageRoot} from "./IMessageRoot.sol"; -import {ChainExists, MessageRootNotRegistered, OnlyBridgehubOrChainAssetHandler, OnlyChain, NotL2} from "./L1BridgehubErrors.sol"; +import {ChainExists, MessageRootNotRegistered, NotL2, OnlyBridgehubOrChainAssetHandler, OnlyChain} from "./L1BridgehubErrors.sol"; import {FullMerkle} from "../common/libraries/FullMerkle.sol"; - import {MessageHashing} from "../common/libraries/MessageHashing.sol"; // Chain tree consists of batch commitments as their leaves. We use hash of "new bytes(96)" as the hash of an empty leaf. @@ -25,10 +24,18 @@ bytes32 constant SHARED_ROOT_TREE_EMPTY_HASH = bytes32( /// @author Matter Labs /// @custom:security-contact security@matterlabs.dev /// @dev The MessageRoot contract is responsible for storing the cross message roots of the chains and the aggregated root of all chains. -contract MessageRoot is IMessageRoot, Initializable { +abstract contract MessageRootBase is IMessageRoot, Initializable { using FullMerkle for FullMerkle.FullTree; using DynamicIncrementalMerkle for DynamicIncrementalMerkle.Bytes32PushTree; + /*////////////////////////////////////////////////////////////// + IMMUTABLE GETTERS + //////////////////////////////////////////////////////////////*/ + + function _bridgehub() internal view virtual returns (address); + + function L1_CHAIN_ID() public view virtual returns (uint256); + /// @notice Emitted when a new chain is added to the MessageRoot. /// @param chainId The ID of the chain that is being added to the MessageRoot. /// @param chainIndex The index of the chain that is being added. Note, that chain where @@ -55,13 +62,6 @@ contract MessageRoot is IMessageRoot, Initializable { /// of length one, which only include the interop root itself. More on that in `L2InteropRootStorage` contract. event NewInteropRoot(uint256 indexed chainId, uint256 indexed blockNumber, uint256 indexed logId, bytes32[] sides); - /// @dev Bridgehub smart contract that is used to operate with L2 via asynchronous L2 <-> L1 communication. - IBridgehub public immutable override BRIDGE_HUB; - - /// @notice The chain id of L1. This contract can be deployed on multiple layers, but this value is still equal to the - /// L1 that is at the most base layer. - uint256 public immutable L1_CHAIN_ID; - /// @notice The number of chains that are registered. uint256 public chainCount; @@ -83,13 +83,20 @@ contract MessageRoot is IMessageRoot, Initializable { /// from the earlier ones. mapping(uint256 blockNumber => bytes32 globalMessageRoot) public historicalRoot; + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[41] private __gap; + /// @notice Checks that the message sender is the bridgehub or the chain asset handler. modifier onlyBridgehubOrChainAssetHandler() { - if (msg.sender != address(BRIDGE_HUB) && msg.sender != address(BRIDGE_HUB.chainAssetHandler())) { + if (msg.sender != _bridgehub() && msg.sender != address(IBridgehubBase(_bridgehub()).chainAssetHandler())) { revert OnlyBridgehubOrChainAssetHandler( msg.sender, - address(BRIDGE_HUB), - address(BRIDGE_HUB.chainAssetHandler()) + address(_bridgehub()), + address(IBridgehubBase(_bridgehub()).chainAssetHandler()) ); } _; @@ -98,36 +105,25 @@ contract MessageRoot is IMessageRoot, Initializable { /// @notice Checks that the message sender is the specified ZK Chain. /// @param _chainId The ID of the chain that is required to be the caller. modifier onlyChain(uint256 _chainId) { - if (msg.sender != BRIDGE_HUB.getZKChain(_chainId)) { - revert OnlyChain(msg.sender, BRIDGE_HUB.getZKChain(_chainId)); + if (msg.sender != IBridgehubBase(_bridgehub()).getZKChain(_chainId)) { + revert OnlyChain(msg.sender, IBridgehubBase(_bridgehub()).getZKChain(_chainId)); } _; } /// @notice Checks that the Chain ID is not L1 when adding chain batch root. modifier onlyL2() { - if (block.chainid == L1_CHAIN_ID) { + if (block.chainid == L1_CHAIN_ID()) { revert NotL2(); } _; } - /// @dev Contract is expected to be used as proxy implementation on L1, but as a system contract on L2. - /// This means we call the _initialize in both the constructor and the initialize functions. - /// @dev Initialize the implementation to prevent Parity hack. - /// @param _bridgehub Address of the Bridgehub. - /// @param _l1ChainId Chain ID of L1. - constructor(IBridgehub _bridgehub, uint256 _l1ChainId) { - BRIDGE_HUB = _bridgehub; - L1_CHAIN_ID = _l1ChainId; - _initialize(); - _disableInitializers(); - } - - /// @dev Initializes a contract for later use. Expected to be used in the proxy on L1, on L2 it is a system contract without a proxy. - function initialize() external initializer { - _initialize(); - } + /// @notice Adds a new chainBatchRoot to the chainTree. + /// @param _chainId The ID of the chain whose chainBatchRoot is being added to the chainTree. + /// @param _batchNumber The number of the batch to which _chainBatchRoot belongs. + /// @param _chainBatchRoot The value of chainBatchRoot which is being added. + function addChainBatchRoot(uint256 _chainId, uint256 _batchNumber, bytes32 _chainBatchRoot) external virtual {} /// @notice Adds a single chain to the message root. /// @param _chainId The ID of the chain that is being added to the message root. @@ -142,41 +138,6 @@ contract MessageRoot is IMessageRoot, Initializable { return (_chainId == block.chainid || chainIndex[_chainId] != 0); } - /// @notice Adds a new chainBatchRoot to the chainTree. - /// @param _chainId The ID of the chain whose chainBatchRoot is being added to the chainTree. - /// @param _batchNumber The number of the batch to which _chainBatchRoot belongs. - /// @param _chainBatchRoot The value of chainBatchRoot which is being added. - function addChainBatchRoot( - uint256 _chainId, - uint256 _batchNumber, - bytes32 _chainBatchRoot - ) external onlyChain(_chainId) onlyL2 { - // Make sure that chain is registered. - if (!chainRegistered(_chainId)) { - revert MessageRootNotRegistered(); - } - - // Push chainBatchRoot to the chainTree related to specified chainId and get the new root. - bytes32 chainRoot; - // slither-disable-next-line unused-return - (, chainRoot) = chainTree[_chainId].push(MessageHashing.batchLeafHash(_chainBatchRoot, _batchNumber)); - - emit AppendedChainBatchRoot(_chainId, _batchNumber, _chainBatchRoot); - - // Update leaf corresponding to the specified chainId with newly acquired value of the chainRoot. - bytes32 cachedChainIdLeafHash = MessageHashing.chainIdLeafHash(chainRoot, _chainId); - bytes32 sharedTreeRoot = sharedTree.updateLeaf(chainIndex[_chainId], cachedChainIdLeafHash); - - emit NewChainRoot(_chainId, chainRoot, cachedChainIdLeafHash); - - // What happens here is we query for the current sharedTreeRoot and emit the event stating that new InteropRoot is "created". - // The reason for the usage of "bytes32[] memory _sides" to store the InteropRoot is explained in L2InteropRootStorage contract. - bytes32[] memory _sides = new bytes32[](1); - _sides[0] = sharedTreeRoot; - emit NewInteropRoot(block.chainid, block.number, 0, _sides); - historicalRoot[block.number] = sharedTreeRoot; - } - /// @notice Gets the aggregated root of all chains. function getAggregatedRoot() external view returns (bytes32) { if (chainCount == 0) { diff --git a/l1-contracts/contracts/chain-registrar/ChainRegistrar.sol b/l1-contracts/contracts/chain-registrar/ChainRegistrar.sol index 1d3d1edb47..aab0e44598 100644 --- a/l1-contracts/contracts/chain-registrar/ChainRegistrar.sol +++ b/l1-contracts/contracts/chain-registrar/ChainRegistrar.sol @@ -2,7 +2,7 @@ pragma solidity 0.8.28; -import {IBridgehub} from "../bridgehub/IBridgehub.sol"; +import {IL1Bridgehub} from "../bridgehub/IL1Bridgehub.sol"; import {IL1SharedBridgeLegacy} from "../bridge/interfaces/IL1SharedBridgeLegacy.sol"; import {PubdataPricingMode} from "../state-transition/chain-deps/ZKChainStorage.sol"; import {IChainTypeManager} from "../state-transition/IChainTypeManager.sol"; @@ -29,7 +29,7 @@ contract ChainRegistrar is Ownable2StepUpgradeable { address public l2Deployer; /// @notice Address of ZKsync Bridgehub. - IBridgehub public bridgehub; + IL1Bridgehub public bridgehub; /// @notice Mapping of proposed chains by author and chain ID. /// @notice Stores chain proposals made by users, where each address can propose a chain with a unique chain ID. @@ -110,7 +110,7 @@ contract ChainRegistrar is Ownable2StepUpgradeable { /// @param _l2Deployer Address of the L2 deployer. /// @param _owner Address of the contract owner. function initialize(address _bridgehub, address _l2Deployer, address _owner) external initializer { - bridgehub = IBridgehub(_bridgehub); + bridgehub = IL1Bridgehub(_bridgehub); l2Deployer = _l2Deployer; _transferOwnership(_owner); } diff --git a/l1-contracts/contracts/common/Config.sol b/l1-contracts/contracts/common/Config.sol index 86840c36d9..3b27121c37 100644 --- a/l1-contracts/contracts/common/Config.sol +++ b/l1-contracts/contracts/common/Config.sol @@ -20,12 +20,18 @@ bytes32 constant L2_L1_LOGS_TREE_DEFAULT_LEAF_HASH = 0x72abee45b59e344af8a6e5202 bytes32 constant DEFAULT_L2_LOGS_TREE_ROOT_HASH = bytes32(0); -/// @dev Denotes the type of the ZKsync transaction that came from L1. +/// @dev Denotes the type of the ZKsync Era transaction that came from L1. uint256 constant PRIORITY_OPERATION_L2_TX_TYPE = 255; -/// @dev Denotes the type of the ZKsync transaction that is used for system upgrades. +/// @dev Denotes the type of the ZKsync Era transaction that is used for system upgrades. uint256 constant SYSTEM_UPGRADE_L2_TX_TYPE = 254; +/// @dev Denotes the type of the ZKsync OS transaction that came from L1. +uint256 constant ZKSYNC_OS_PRIORITY_OPERATION_L2_TX_TYPE = 127; + +/// @dev Denotes the type of the ZKsync OS transaction that is used for system upgrades. +uint256 constant ZKSYNC_OS_SYSTEM_UPGRADE_L2_TX_TYPE = 126; + /// @dev The maximal allowed difference between protocol minor versions in an upgrade. The 100 gap is needed /// in case a protocol version has been tested on testnet, but then not launched on mainnet, e.g. /// due to a bug found. @@ -83,6 +89,34 @@ uint256 constant MAX_NEW_FACTORY_DEPS = 64; /// @dev The L2 gasPricePerPubdata required to be used in bridges. uint256 constant REQUIRED_L2_GAS_PRICE_PER_PUBDATA = 800; +/// @dev The native price for L1->L2 transactions in ZKsync OS. +uint256 constant ZKSYNC_OS_L1_TX_NATIVE_PRICE = 10; + +/// @dev The intrinsic cost of the L1->L2 transaction in computational L2 gas for ZKsync OS. +uint256 constant L1_TX_INTRINSIC_L2_GAS_ZKSYNC_OS = 21000; + +/// @dev The cost of calldata byte for the L1->L2 transaction in computational L2 gas for ZKsync OS. +uint256 constant L1_TX_CALLDATA_PRICE_L2_GAS_ZKSYNC_OS = 16; + +/// @dev The static part of the L1->l2 transaction native cost for ZKsync OS. +/// It includes intrinsic cost(130_000) and static part of hashing cost(2500). +uint256 constant L1_TX_STATIC_NATIVE_ZKSYNC_OS = 132_500; + +/// @dev The encoding cost per keccak256 round(136 bytes) of the L1->l2 transaction in native resource for ZKsync OS. +uint256 constant L1_TX_ENCODING_136_BYTES_COST_NATIVE_ZKSYNC_OS = 17500; + +/// @dev The cost of calldata byte for the L1->L2 transaction in native resource for ZKsync OS. +uint256 constant L1_TX_CALLDATA_COST_NATIVE_ZKSYNC_OS = 1; + +/// @dev The intrinsic cost of the L1->l2 transaction in pubdata for ZKsync OS +uint256 constant L1_TX_INTRINSIC_PUBDATA_ZSKYNC_OS = 88; + +/// @dev The minimal L1->L2 transaction gas limit in ZKsync OS to be extra safe +uint256 constant L1_TX_MINIMAL_GAS_LIMIT_ZSKYNC_OS = 200_000; + +/// @dev The native per gas ratio for upgrade transactions in ZKsync OS. +uint256 constant UPGRADE_TX_NATIVE_PER_GAS = 10_000; + /// @dev The mask which should be applied to the packed batch and L2 block timestamp in order /// to obtain the L2 block timestamp. Applying this mask is equivalent to calculating modulo 2**128 uint256 constant PACKED_L2_BLOCK_TIMESTAMP_MASK = 0xffffffffffffffffffffffffffffffff; @@ -179,3 +213,18 @@ bytes32 constant DEFAULT_PRECOMMITMENT_FOR_THE_LAST_BATCH = bytes32(uint256(1)); /// @dev The length of a packed transaction precommitment in bytes. It consists of two parts: 32-byte tx hash and 1-byte status (0 or 1). uint256 constant PACKED_L2_PRECOMMITMENT_LENGTH = 33; + +/// @dev Pubdata commitment scheme used for DA. +/// @param NONE Invalid option. +/// @param EMPTY_NO_DA No DA commitment, used by Validiums. +/// @param PUBDATA_KECCAK256 Keccak of stateDiffHash and keccak(pubdata). Can be used by custom DA solutions. +/// @param BLOBS_AND_PUBDATA_KECCAK256 This commitment includes EIP-4844 blobs data. Used by default RollupL1DAValidator. +enum L2DACommitmentScheme { + NONE, + EMPTY_NO_DA, + PUBDATA_KECCAK256, + BLOBS_AND_PUBDATA_KECCAK256 +} + +/// @dev The L2 data availability commitment scheme that permanent rollups are expected to use. +L2DACommitmentScheme constant ROLLUP_L2_DA_COMMITMENT_SCHEME = L2DACommitmentScheme.BLOBS_AND_PUBDATA_KECCAK256; diff --git a/l1-contracts/contracts/common/Dependencies.sol b/l1-contracts/contracts/common/Dependencies.sol index fceaa77dde..1c08745436 100644 --- a/l1-contracts/contracts/common/Dependencies.sol +++ b/l1-contracts/contracts/common/Dependencies.sol @@ -3,6 +3,5 @@ pragma solidity ^0.8.21; /* solhint-disable-next-line no-unused-import */ -import {TransparentUpgradeableProxy} from "@openzeppelin/contracts-v4/proxy/transparent/TransparentUpgradeableProxy.sol"; + /* solhint-disable-next-line no-unused-import */ -import {ProxyAdmin} from "@openzeppelin/contracts-v4/proxy/transparent/ProxyAdmin.sol"; diff --git a/l1-contracts/contracts/common/L1ContractErrors.sol b/l1-contracts/contracts/common/L1ContractErrors.sol index 90f19fe4f7..2be90c1877 100644 --- a/l1-contracts/contracts/common/L1ContractErrors.sol +++ b/l1-contracts/contracts/common/L1ContractErrors.sol @@ -115,8 +115,6 @@ error GasPerPubdataMismatch(); error GenesisBatchCommitmentZero(); // 0x7940c83f error GenesisBatchHashZero(); -// 0xb4fc6835 -error GenesisIndexStorageZero(); // 0x3a1a8589 error GenesisUpgradeZero(); // 0xd356e6ba @@ -130,6 +128,8 @@ error IncorrectBatchBounds( uint256 processFromProvided, uint256 processToProvided ); +// 0xc1b4bc7b +error IncorrectBatchChainId(uint256, uint256); // 0xdd381a4c error IncorrectBridgeHubAddress(address bridgehub); // 0x1929b7de @@ -140,8 +140,12 @@ error InsufficientChainBalance(); error InvalidBatchNumber(uint256 provided, uint256 expected); // 0xcbd9d2e0 error InvalidCaller(address); +// 0x7a47c9a2 +error InvalidChainId(); // 0x92daded2 error InvalidDAForPermanentRollup(); +// 0x3f98a77e +error InvalidL2DACommitmentScheme(uint8); // 0x4fbe5dba error InvalidDelay(); // 0xc1780bd6 @@ -368,6 +372,8 @@ error WrongMagicValue(uint256 expectedMagicValue, uint256 providedMagicValue); error ZeroAddress(); // 0xc84885d4 error ZeroChainId(); +// 0x1bc36e67 +error ZeroGasPriceL1TxZKSyncOS(); // 0x601b6882 error ZKChainLimitReached(); diff --git a/l1-contracts/contracts/common/interfaces/ISystemContext.sol b/l1-contracts/contracts/common/interfaces/ISystemContext.sol new file mode 100644 index 0000000000..ff083fd0b5 --- /dev/null +++ b/l1-contracts/contracts/common/interfaces/ISystemContext.sol @@ -0,0 +1,63 @@ +// SPDX-License-Identifier: MIT +// We use a floating point pragma here so it can be used within other projects that interact with the ZKsync ecosystem without using our exact pragma version. +pragma solidity ^0.8.20; + +/** + * @author Matter Labs + * @custom:security-contact security@matterlabs.dev + * @notice Contract that stores some of the context variables, that may be either + * block-scoped, tx-scoped or system-wide. + */ +interface ISystemContext { + struct BlockInfo { + uint128 timestamp; + uint128 number; + } + + /// @notice A structure representing the timeline for the upgrade from the batch numbers to the L2 block numbers. + /// @dev It will be used for the L1 batch -> L2 block migration in Q3 2023 only. + struct VirtualBlockUpgradeInfo { + /// @notice In order to maintain consistent results for `blockhash` requests, we'll + /// have to remember the number of the batch when the upgrade to the virtual blocks has been done. + /// The hashes for virtual blocks before the upgrade are identical to the hashes of the corresponding batches. + uint128 virtualBlockStartBatch; + /// @notice L2 block when the virtual blocks have caught up with the L2 blocks. Starting from this block, + /// all the information returned to users for block.timestamp/number, etc should be the information about the L2 blocks and + /// not virtual blocks. + uint128 virtualBlockFinishL2Block; + } + + function chainId() external view returns (uint256); + + function origin() external view returns (address); + + function gasPrice() external view returns (uint256); + + function blockGasLimit() external view returns (uint256); + + function coinbase() external view returns (address); + + function difficulty() external view returns (uint256); + + function baseFee() external view returns (uint256); + + function txNumberInBlock() external view returns (uint16); + + function getBlockHashEVM(uint256 _block) external view returns (bytes32); + + function getBatchHash(uint256 _batchNumber) external view returns (bytes32 hash); + + function getBlockNumber() external view returns (uint128); + + function getBlockTimestamp() external view returns (uint128); + + function getBatchNumberAndTimestamp() external view returns (uint128 blockNumber, uint128 blockTimestamp); + + function getL2BlockNumberAndTimestamp() external view returns (uint128 blockNumber, uint128 blockTimestamp); + + function gasPerPubdataByte() external view returns (uint256 gasPerPubdataByte); + + function getCurrentPubdataSpent() external view returns (uint256 currentPubdataSpent); + + function setChainId(uint256 _newChainId) external; +} diff --git a/l1-contracts/contracts/common/l2-helpers/L2ContractAddresses.sol b/l1-contracts/contracts/common/l2-helpers/L2ContractAddresses.sol index 1555ec5600..1245827552 100644 --- a/l1-contracts/contracts/common/l2-helpers/L2ContractAddresses.sol +++ b/l1-contracts/contracts/common/l2-helpers/L2ContractAddresses.sol @@ -75,6 +75,9 @@ address constant L2_NATIVE_TOKEN_VAULT_ADDR = address(USER_CONTRACTS_OFFSET + 0x /// @dev the address of the l2 asset router. address constant L2_MESSAGE_ROOT_ADDR = address(USER_CONTRACTS_OFFSET + 0x05); +/// @dev The address of the l2 wrapped base token. +address constant L2_WRAPPED_BASE_TOKEN_IMPL_ADDR = address(USER_CONTRACTS_OFFSET + 0x07); + /// @dev The address of the SloadContract system contract, which provides a method to read values from arbitrary storage slots address constant SLOAD_CONTRACT_ADDR = address(USER_CONTRACTS_OFFSET + 0x06); @@ -89,3 +92,8 @@ IMessageVerification constant L2_MESSAGE_VERIFICATION = IMessageVerification(add /// @dev The address of the L2 chain handler system contract address constant L2_CHAIN_ASSET_HANDLER_ADDR = address(USER_CONTRACTS_OFFSET + 0x0a); + +/// @dev UpgradeableBeaconDeployer that's responsible for deploying the upgradeable beacons for the bridged standard ERC20 tokens +/// @dev Besides separation of concerns, we need it as a separate contract to ensure that L2NativeTokenVaultZKOS +/// does not have to include BridgedStandardERC20 and UpgradeableBeacon and so can fit into the code size limit. +address constant L2_NTV_BEACON_DEPLOYER_ADDR = address(USER_CONTRACTS_OFFSET + 0x0b); diff --git a/l1-contracts/contracts/common/libraries/DataEncoding.sol b/l1-contracts/contracts/common/libraries/DataEncoding.sol index e813db1d72..85132acdd1 100644 --- a/l1-contracts/contracts/common/libraries/DataEncoding.sol +++ b/l1-contracts/contracts/common/libraries/DataEncoding.sol @@ -4,7 +4,7 @@ pragma solidity 0.8.28; import {L2_NATIVE_TOKEN_VAULT_ADDR} from "../l2-helpers/L2ContractAddresses.sol"; import {LEGACY_ENCODING_VERSION, NEW_ENCODING_VERSION} from "../../bridge/asset-router/IAssetRouterBase.sol"; -import {INativeTokenVault} from "../../bridge/ntv/INativeTokenVault.sol"; +import {INativeTokenVaultBase} from "../../bridge/ntv/INativeTokenVaultBase.sol"; import {IncorrectTokenAddressFromNTV, InvalidNTVBurnData, UnsupportedEncodingVersion} from "../L1ContractErrors.sol"; /** @@ -141,7 +141,7 @@ library DataEncoding { bytes memory _transferData ) internal view returns (bytes32 txDataHash) { if (_encodingVersion == LEGACY_ENCODING_VERSION) { - address tokenAddress = INativeTokenVault(_nativeTokenVault).tokenAddress(_assetId); + address tokenAddress = INativeTokenVaultBase(_nativeTokenVault).tokenAddress(_assetId); // This is a double check to ensure that the used token for the legacy encoding is correct. // This revert should never be emitted and in real life and should only serve as a guard in diff --git a/l2-contracts/contracts/dev-contracts/IL2StandardToken.sol b/l1-contracts/contracts/dev-contracts/IL2StandardToken.sol similarity index 100% rename from l2-contracts/contracts/dev-contracts/IL2StandardToken.sol rename to l1-contracts/contracts/dev-contracts/IL2StandardToken.sol diff --git a/l2-contracts/contracts/dev-contracts/IL2WETH.sol b/l1-contracts/contracts/dev-contracts/IL2WETH.sol similarity index 100% rename from l2-contracts/contracts/dev-contracts/IL2WETH.sol rename to l1-contracts/contracts/dev-contracts/IL2WETH.sol diff --git a/l1-contracts/contracts/dev-contracts/L1NullifierDev.sol b/l1-contracts/contracts/dev-contracts/L1NullifierDev.sol index fe59f79859..f21461caab 100644 --- a/l1-contracts/contracts/dev-contracts/L1NullifierDev.sol +++ b/l1-contracts/contracts/dev-contracts/L1NullifierDev.sol @@ -2,11 +2,11 @@ pragma solidity 0.8.28; -import {IBridgehub, L1Nullifier} from "../bridge/L1Nullifier.sol"; +import {IL1Bridgehub, L1Nullifier} from "../bridge/L1Nullifier.sol"; contract L1NullifierDev is L1Nullifier { constructor( - IBridgehub _bridgehub, + IL1Bridgehub _bridgehub, uint256 _eraChainId, address _eraDiamondProxy ) L1Nullifier(_bridgehub, _eraChainId, _eraDiamondProxy) {} diff --git a/l1-contracts/contracts/dev-contracts/L2SharedBridgeLegacyDev.sol b/l1-contracts/contracts/dev-contracts/L2SharedBridgeLegacyDev.sol index e32effc93b..c10d15642d 100644 --- a/l1-contracts/contracts/dev-contracts/L2SharedBridgeLegacyDev.sol +++ b/l1-contracts/contracts/dev-contracts/L2SharedBridgeLegacyDev.sol @@ -7,7 +7,7 @@ import {UpgradeableBeacon} from "@openzeppelin/contracts-v4/proxy/beacon/Upgrade import {BridgedStandardERC20} from "../bridge/BridgedStandardERC20.sol"; import {L2SharedBridgeLegacy} from "../bridge/L2SharedBridgeLegacy.sol"; -import {AmountMustBeGreaterThanZero, DeployFailed, EmptyBytes32, InvalidCaller, Unauthorized, ZeroAddress} from "../common/L1ContractErrors.sol"; +import {EmptyBytes32, ZeroAddress} from "../common/L1ContractErrors.sol"; contract L2SharedBridgeLegacyDev is L2SharedBridgeLegacy { constructor() L2SharedBridgeLegacy() {} diff --git a/l2-contracts/contracts/dev-contracts/L2WETH.sol b/l1-contracts/contracts/dev-contracts/L2WETH.sol similarity index 85% rename from l2-contracts/contracts/dev-contracts/L2WETH.sol rename to l1-contracts/contracts/dev-contracts/L2WETH.sol index 92ca54e04c..bbbf512025 100644 --- a/l2-contracts/contracts/dev-contracts/L2WETH.sol +++ b/l1-contracts/contracts/dev-contracts/L2WETH.sol @@ -5,6 +5,8 @@ pragma solidity ^0.8.0; import "@openzeppelin/contracts-upgradeable-v4/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol"; import "./IL2WETH.sol"; import "./IL2StandardToken.sol"; +import {InvalidCaller} from "../common/L1ContractErrors.sol"; +import {L2_COMPLEX_UPGRADER_ADDR} from "../common/l2-helpers/L2ContractAddresses.sol"; /// @author Matter Labs /// @notice The canonical implementation of the WETH token. @@ -17,18 +19,21 @@ import "./IL2StandardToken.sol"; /// Note: This is an upgradeable contract. In the future, we will remove upgradeability to make it trustless. /// But for now, when the Rollup has instant upgradability, we leave the possibility of upgrading to improve the contract if needed. contract L2WETH is ERC20PermitUpgradeable, IL2WETH, IL2StandardToken { - /// @dev Contract is expected to be used as proxy implementation. - constructor() { - // Disable initialization to prevent Parity hack. - _disableInitializers(); + /// @dev Only allows calls from the complex upgrader contract on L2. + modifier onlyUpgrader() { + if (msg.sender != L2_COMPLEX_UPGRADER_ADDR) { + revert InvalidCaller(msg.sender); + } + _; } - /// @notice Initializes a contract token for later use. Expected to be used in the proxy. - /// @dev Stores the L1 address of the bridge and set `name`/`symbol`/`decimals` getters. + /// @notice Initializes the contract. + /// @dev This function is used to initialize the contract with the initial values. /// @param name_ The name of the token. /// @param symbol_ The symbol of the token. /// Note: The decimals are hardcoded to 18, the same as on Ether. - function initialize(string memory name_, string memory symbol_) external initializer { + function initL2(string memory name_, string memory symbol_) external onlyUpgrader { + _disableInitializers(); // Set decoded values for name and symbol. __ERC20_init_unchained(name_, symbol_); diff --git a/l1-contracts/contracts/dev-contracts/MockContract.sol b/l1-contracts/contracts/dev-contracts/MockContract.sol new file mode 100644 index 0000000000..9d01f289c3 --- /dev/null +++ b/l1-contracts/contracts/dev-contracts/MockContract.sol @@ -0,0 +1,70 @@ +// SPDX-License-Identifier: MIT + +pragma solidity 0.8.28; + +contract MockContract { + event Called(uint256 value, bytes data); + + struct CallResult { + bytes input; + bool failure; + bytes returnData; + } + + CallResult[] private results; + + constructor() { + // Clean results if mock was redeployed. + assembly { + sstore(results.slot, 0) + } + } + + // This function call will not pass to fallback, but this is fine for the tests. + function setResult(CallResult calldata result) external { + bytes32 inputKeccak = keccak256(result.input); + for (uint256 i = 0; i < results.length; i++) { + if (keccak256(results[i].input) == inputKeccak) { + results[i] = result; + return; + } + } + results.push(result); + } + + fallback() external payable { + bytes memory data = msg.data; + bytes32 inputKeccak = keccak256(data); + + // empty return data with successful result by default. + bool failure; + bytes memory returnData; + + for (uint256 i = 0; i < results.length; i++) { + if (keccak256(results[i].input) == inputKeccak) { + failure = results[i].failure; + returnData = results[i].returnData; + break; + } + } + + // Emitting event only if empty successful result expected. + // Can fail if call context is static, but usually it's not a case, + // because view/pure call without return data doesn't make sense. + // Useful, because for such calls we can check for this event, + // to be sure that the needed call was made. + if (!failure && returnData.length == 0) { + emit Called(msg.value, data); + } + + assembly { + switch failure + case 0 { + return(add(returnData, 0x20), mload(returnData)) + } + default { + revert(add(returnData, 0x20), mload(returnData)) + } + } + } +} diff --git a/l1-contracts/contracts/dev-contracts/test/DummyAdminFacetNoOverlap.sol b/l1-contracts/contracts/dev-contracts/test/DummyAdminFacetNoOverlap.sol index b7418c5a6d..4fb61da4dc 100644 --- a/l1-contracts/contracts/dev-contracts/test/DummyAdminFacetNoOverlap.sol +++ b/l1-contracts/contracts/dev-contracts/test/DummyAdminFacetNoOverlap.sol @@ -4,8 +4,6 @@ pragma solidity 0.8.28; import {Diamond} from "../../state-transition/libraries/Diamond.sol"; import {ZKChainBase} from "../../state-transition/chain-deps/facets/ZKChainBase.sol"; -import {IL1AssetRouter} from "../../bridge/asset-router/IL1AssetRouter.sol"; -import {DataEncoding} from "../../common/libraries/DataEncoding.sol"; /// selectors do not overlap with normal facet selectors (getName does not count) contract DummyAdminFacetNoOverlap is ZKChainBase { diff --git a/l1-contracts/contracts/dev-contracts/test/DummyBridgehubSetter.sol b/l1-contracts/contracts/dev-contracts/test/DummyBridgehubSetter.sol index c5ab48f865..ea59d5c988 100644 --- a/l1-contracts/contracts/dev-contracts/test/DummyBridgehubSetter.sol +++ b/l1-contracts/contracts/dev-contracts/test/DummyBridgehubSetter.sol @@ -2,18 +2,14 @@ pragma solidity 0.8.28; -import {Bridgehub} from "../../bridgehub/Bridgehub.sol"; +import {L1Bridgehub} from "../../bridgehub/L1Bridgehub.sol"; -contract DummyBridgehubSetter is Bridgehub { +contract DummyBridgehubSetter is L1Bridgehub { // add this to be excluded from coverage report function test() internal virtual {} /// @notice Constructor - constructor( - uint256 _l1ChainId, - address _owner, - uint256 _maxNumberOfZKChains - ) Bridgehub(_l1ChainId, _owner, _maxNumberOfZKChains) {} + constructor(address _owner, uint256 _maxNumberOfZKChains) L1Bridgehub(_owner, _maxNumberOfZKChains) {} function setZKChain(uint256 _chainId, address _zkChain) external { _registerNewZKChain(_chainId, _zkChain, true); diff --git a/l1-contracts/contracts/dev-contracts/test/DummyPlonkVerifier.sol b/l1-contracts/contracts/dev-contracts/test/DummyPlonkVerifier.sol index dbf0dadf8c..754d98356b 100644 --- a/l1-contracts/contracts/dev-contracts/test/DummyPlonkVerifier.sol +++ b/l1-contracts/contracts/dev-contracts/test/DummyPlonkVerifier.sol @@ -2,13 +2,13 @@ pragma solidity 0.8.28; -import {L1VerifierPlonk} from "../../state-transition/verifiers/L1VerifierPlonk.sol"; +import {EraVerifierPlonk} from "../../state-transition/verifiers/EraVerifierPlonk.sol"; -contract DummyPlonkVerifier is L1VerifierPlonk { +contract DummyPlonkVerifier is EraVerifierPlonk { // add this to be excluded from coverage report function test() internal virtual {} - constructor() L1VerifierPlonk() { + constructor() EraVerifierPlonk() { assert(block.chainid != 1); } diff --git a/l1-contracts/contracts/dev-contracts/test/DummySharedBridge.sol b/l1-contracts/contracts/dev-contracts/test/DummySharedBridge.sol index bf54739250..f8d3c881b4 100644 --- a/l1-contracts/contracts/dev-contracts/test/DummySharedBridge.sol +++ b/l1-contracts/contracts/dev-contracts/test/DummySharedBridge.sol @@ -4,7 +4,7 @@ pragma solidity 0.8.28; import {IERC20} from "@openzeppelin/contracts-v4/token/ERC20/IERC20.sol"; -import {L2TransactionRequestTwoBridgesInner} from "../../bridgehub/IBridgehub.sol"; +import {L2TransactionRequestTwoBridgesInner} from "../../bridgehub/IBridgehubBase.sol"; import {PausableUpgradeable} from "@openzeppelin/contracts-upgradeable-v4/security/PausableUpgradeable.sol"; import {ETH_TOKEN_ADDRESS, TWO_BRIDGES_MAGIC_VALUE} from "../../common/Config.sol"; import {IL1NativeTokenVault} from "../../bridge/ntv/L1NativeTokenVault.sol"; diff --git a/l1-contracts/contracts/dev-contracts/test/L1ERC20BridgeTest.sol b/l1-contracts/contracts/dev-contracts/test/L1ERC20BridgeTest.sol index ed7aa5a5c3..ebc39efb8e 100644 --- a/l1-contracts/contracts/dev-contracts/test/L1ERC20BridgeTest.sol +++ b/l1-contracts/contracts/dev-contracts/test/L1ERC20BridgeTest.sol @@ -4,7 +4,7 @@ pragma solidity 0.8.28; import {L1ERC20Bridge} from "../../bridge/L1ERC20Bridge.sol"; import {IL1NativeTokenVault} from "../../bridge/ntv/IL1NativeTokenVault.sol"; -import {IBridgehub} from "../../bridgehub/IBridgehub.sol"; +import {IL1Bridgehub} from "../../bridgehub/IL1Bridgehub.sol"; import {IL1AssetRouter} from "../../bridge/asset-router/IL1AssetRouter.sol"; import {IL1Nullifier} from "../../bridge/interfaces/IL1Nullifier.sol"; @@ -14,6 +14,6 @@ contract L1ERC20BridgeTest is L1ERC20Bridge { function test() internal virtual {} constructor( - IBridgehub _zkSync + IL1Bridgehub _zkSync ) L1ERC20Bridge(IL1Nullifier(address(0)), IL1AssetRouter(address(0)), IL1NativeTokenVault(address(0)), 1) {} } diff --git a/l1-contracts/contracts/dev-contracts/test/L2NativeTokenVaultDev.sol b/l1-contracts/contracts/dev-contracts/test/L2NativeTokenVaultDev.sol index 8c377c266a..76a2ff5b78 100644 --- a/l1-contracts/contracts/dev-contracts/test/L2NativeTokenVaultDev.sol +++ b/l1-contracts/contracts/dev-contracts/test/L2NativeTokenVaultDev.sol @@ -7,41 +7,18 @@ import {Create2} from "@openzeppelin/contracts-v4/utils/Create2.sol"; import {IBeacon} from "@openzeppelin/contracts-v4/proxy/beacon/IBeacon.sol"; import {UpgradeableBeacon} from "@openzeppelin/contracts-v4/proxy/beacon/UpgradeableBeacon.sol"; -import {INativeTokenVault} from "contracts/bridge/ntv/INativeTokenVault.sol"; -import {NativeTokenVault} from "contracts/bridge/ntv/NativeTokenVault.sol"; +import {NativeTokenVaultBase} from "contracts/bridge/ntv/NativeTokenVaultBase.sol"; import {L2NativeTokenVault} from "contracts/bridge/ntv/L2NativeTokenVault.sol"; import {BridgedStandardERC20} from "contracts/bridge/BridgedStandardERC20.sol"; /// @author Matter Labs /// @notice This is used for fast debugging of the L2NTV by running it in L1 context, i.e. normal foundry instead of foundry --zksync. contract L2NativeTokenVaultDev is L2NativeTokenVault { - constructor( - uint256 _l1ChainId, - address _aliasedOwner, - bytes32 _l2TokenProxyBytecodeHash, - address _legacySharedBridge, - address _bridgedTokenBeacon, - bool _contractsDeployedAlready, - address _wethToken, - bytes32 _baseTokenAssetId - ) - L2NativeTokenVault( - _l1ChainId, - _aliasedOwner, - _l2TokenProxyBytecodeHash, - _legacySharedBridge, - _bridgedTokenBeacon, - _contractsDeployedAlready, - _wethToken, - _baseTokenAssetId - ) - {} - /// @notice copied from L1NTV for L1 compilation function calculateCreate2TokenAddress( uint256 _originChainId, address _l1Token - ) public view override(L2NativeTokenVault) returns (address) { + ) public view override returns (address) { bytes32 salt = _getCreate2Salt(_originChainId, _l1Token); return Create2.computeAddress( diff --git a/l1-contracts/contracts/dev-contracts/test/L2PlonkVerifierRecursiveTest.sol b/l1-contracts/contracts/dev-contracts/test/L2PlonkVerifierRecursiveTest.sol deleted file mode 100644 index 4b4408d4ed..0000000000 --- a/l1-contracts/contracts/dev-contracts/test/L2PlonkVerifierRecursiveTest.sol +++ /dev/null @@ -1,70 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity 0.8.28; - -import {L2VerifierPlonk} from "../../state-transition/verifiers/L2VerifierPlonk.sol"; - -/// @author Matter Labs -contract L2PlonkVerifierRecursiveTest is L2VerifierPlonk { - // add this to be excluded from coverage report - function test() internal virtual {} - - function _loadVerificationKey() internal pure override { - assembly { - // gate setup commitments - mstore(VK_GATE_SETUP_0_X_SLOT, 0x046e45fd137982bd0f6cf731b4650d2d520e8d675827744e1edf1308583599bb) - mstore(VK_GATE_SETUP_0_Y_SLOT, 0x177f14d16b716d4298be5e07b83add3fb61ff1ee08dce19f9a54fa8f04937f7e) - mstore(VK_GATE_SETUP_1_X_SLOT, 0x169ad5156d25b56f7b67ea6382f88b845ed5bae5b91aacfe51d8f0716afff2fb) - mstore(VK_GATE_SETUP_1_Y_SLOT, 0x2406e3268e4d5fa672142998ecf834034638a4a6f8b5e90205552c6aa1dde163) - mstore(VK_GATE_SETUP_2_X_SLOT, 0x05fd0ce0fdc590938d29c738c8dc956b32ca8e69c3babfbb49dc1c13a6d9a8d4) - mstore(VK_GATE_SETUP_2_Y_SLOT, 0x0a27dac323a04dd319d9805be879875c95063d0a55c96214cd45c913fba84460) - mstore(VK_GATE_SETUP_3_X_SLOT, 0x0d58a2a86b208a4976beb9bfd918514d448656e0ee66175eb344a4a17bba99f8) - mstore(VK_GATE_SETUP_3_Y_SLOT, 0x215fa609a1a425b84c9dc218c6cf999596d9eba6d35597ad7aaf2d077a6616ed) - mstore(VK_GATE_SETUP_4_X_SLOT, 0x1a26e6deccf91174ab13613363eb4939680828f0c6031f5039f9e6f264afa68c) - mstore(VK_GATE_SETUP_4_Y_SLOT, 0x1f5b2d6bffac1839edfd02cd0e41acc411f0ecbf6c5c4b1da0e12b68b99cb25d) - mstore(VK_GATE_SETUP_5_X_SLOT, 0x09b71be2e8a45dcbe7654cf369c4f1f2e7eab4b97869a469fb7a149d989f7226) - mstore(VK_GATE_SETUP_5_Y_SLOT, 0x197e1e2cefbd4f99558b89ca875e01fec0f14f05e5128bd869c87d6bf2f307fa) - mstore(VK_GATE_SETUP_6_X_SLOT, 0x0d7cef745da686fd44760403d452d72be504bb41b0a7f4fbe973a07558893871) - mstore(VK_GATE_SETUP_6_Y_SLOT, 0x1e9a863307cdfd3fdcf119f72279ddfda08b6f23c3672e8378dbb9d548734c29) - mstore(VK_GATE_SETUP_7_X_SLOT, 0x16af3f5d978446fdb37d84f5cf12e59f5c1088bde23f8260c0bb6792c5f78e99) - mstore(VK_GATE_SETUP_7_Y_SLOT, 0x167d3aeee50c0e53fd1e8a33941a806a34cfae5dc8b66578486e5d7207b5d546) - - // gate selectors commitments - mstore(VK_GATE_SELECTORS_0_X_SLOT, 0x1addc8e154c74bed403dc19558096ce22f1ceb2c656a2a5e85e56d2be6580ed1) - mstore(VK_GATE_SELECTORS_0_Y_SLOT, 0x1420d38f0ef206828efc36d0f5ad2b4d85fe768097f358fc671b7b3ec0239234) - mstore(VK_GATE_SELECTORS_1_X_SLOT, 0x2d5c06d0c8aa6a3520b8351f82341affcbb1a0bf27bceb9bab175e3e1d38cf47) - mstore(VK_GATE_SELECTORS_1_Y_SLOT, 0x0ff8d923a0374308147f6dd4fc513f6d0640f5df699f4836825ef460df3f8d6a) - - // permutation commitments - mstore(VK_PERMUTATION_0_X_SLOT, 0x1de8943a8f67d9f6fcbda10a1f37a82de9e9ffd0a0102ea5ce0ce6dd13b4031b) - mstore(VK_PERMUTATION_0_Y_SLOT, 0x1e04b0824853ab5d7c3412a217a1c5b88a2b4011be7e7e849485be8ed7332e41) - mstore(VK_PERMUTATION_1_X_SLOT, 0x2aa1817b9cc40b6cc7a7b3f832f3267580f9fb8e539666c00541e1a77e34a3da) - mstore(VK_PERMUTATION_1_Y_SLOT, 0x0edb3cde226205b01212fc1861303c49ef3ff66f060b5833dc9a3f661ef31dd9) - mstore(VK_PERMUTATION_2_X_SLOT, 0x13f5ae93c8eccc1455a0095302923442d4b0b3c8233d66ded99ffcf2ad641c27) - mstore(VK_PERMUTATION_2_Y_SLOT, 0x2dd42d42ccdea8b1901435ace12bc9e52c7dbbeb409d20c517ba942ed0cc7519) - mstore(VK_PERMUTATION_3_X_SLOT, 0x1a15a70a016be11af71e46e9c8a8d31ece32a7e657ae90356dd9535e6566645f) - mstore(VK_PERMUTATION_3_Y_SLOT, 0x0381d23e115521c6fc233c5346f79a6777bfa8871b7ee623d990cdcb5d8c3ce1) - - // lookup tables commitments - mstore(VK_LOOKUP_TABLE_0_X_SLOT, 0x2c513ed74d9d57a5ec901e074032741036353a2c4513422e96e7b53b302d765b) - mstore(VK_LOOKUP_TABLE_0_Y_SLOT, 0x04dd964427e430f16004076d708c0cb21e225056cc1d57418cfbd3d472981468) - mstore(VK_LOOKUP_TABLE_1_X_SLOT, 0x1ea83e5e65c6f8068f4677e2911678cf329b28259642a32db1f14b8347828aac) - mstore(VK_LOOKUP_TABLE_1_Y_SLOT, 0x1d22bc884a2da4962a893ba8de13f57aaeb785ed52c5e686994839cab8f7475d) - mstore(VK_LOOKUP_TABLE_2_X_SLOT, 0x0b2e7212d0d9cff26d0bdf3d79b2cac029a25dfeb1cafdf49e2349d7db348d89) - mstore(VK_LOOKUP_TABLE_2_Y_SLOT, 0x1301f9b252419ea240eb67fda720ca0b16d92364027285f95e9b1349490fa283) - mstore(VK_LOOKUP_TABLE_3_X_SLOT, 0x02f7b99fdfa5b418548c2d777785820e02383cfc87e7085e280a375a358153bf) - mstore(VK_LOOKUP_TABLE_3_Y_SLOT, 0x09d004fe08dc4d19c382df36fad22ef676185663543703e6a4b40203e50fd8a6) - - // lookup selector commitment - mstore(VK_LOOKUP_SELECTOR_X_SLOT, 0x1641f5d312e6f62720b1e6cd1d1be5bc0e69d10d20a12dc97ff04e2107e10ccc) - mstore(VK_LOOKUP_SELECTOR_Y_SLOT, 0x277f435d376acc3261ef9d5748e6705086214daf46d04edc80fbd657f8d9e73d) - - // table type commitment - mstore(VK_LOOKUP_TABLE_TYPE_X_SLOT, 0x1b5f1cfddd6713cf25d9e6850a1b3fe80d6ef7fe2c67248f25362d5f9b31893c) - mstore(VK_LOOKUP_TABLE_TYPE_Y_SLOT, 0x0945076de03a0d240067e5f02b8fc11eaa589df3343542576eb59fdb3ecb57e0) - - // flag for using recursive part - mstore(VK_RECURSIVE_FLAG_SLOT, 1) - } - } -} diff --git a/l1-contracts/contracts/dev-contracts/test/L2VerifierTest.sol b/l1-contracts/contracts/dev-contracts/test/L2VerifierTest.sol deleted file mode 100644 index 4e9e9ddfab..0000000000 --- a/l1-contracts/contracts/dev-contracts/test/L2VerifierTest.sol +++ /dev/null @@ -1,70 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity 0.8.28; - -import {L1VerifierPlonk} from "../../state-transition/verifiers/L1VerifierPlonk.sol"; - -/// @author Matter Labs -contract L1PlonkVerifierTest is L1VerifierPlonk { - // add this to be excluded from coverage report - function test() internal virtual {} - - function _loadVerificationKey() internal pure override { - assembly { - // gate setup commitments - mstore(VK_GATE_SETUP_0_X_SLOT, 0x046e45fd137982bd0f6cf731b4650d2d520e8d675827744e1edf1308583599bb) - mstore(VK_GATE_SETUP_0_Y_SLOT, 0x177f14d16b716d4298be5e07b83add3fb61ff1ee08dce19f9a54fa8f04937f7e) - mstore(VK_GATE_SETUP_1_X_SLOT, 0x169ad5156d25b56f7b67ea6382f88b845ed5bae5b91aacfe51d8f0716afff2fb) - mstore(VK_GATE_SETUP_1_Y_SLOT, 0x2406e3268e4d5fa672142998ecf834034638a4a6f8b5e90205552c6aa1dde163) - mstore(VK_GATE_SETUP_2_X_SLOT, 0x05fd0ce0fdc590938d29c738c8dc956b32ca8e69c3babfbb49dc1c13a6d9a8d4) - mstore(VK_GATE_SETUP_2_Y_SLOT, 0x0a27dac323a04dd319d9805be879875c95063d0a55c96214cd45c913fba84460) - mstore(VK_GATE_SETUP_3_X_SLOT, 0x0d58a2a86b208a4976beb9bfd918514d448656e0ee66175eb344a4a17bba99f8) - mstore(VK_GATE_SETUP_3_Y_SLOT, 0x215fa609a1a425b84c9dc218c6cf999596d9eba6d35597ad7aaf2d077a6616ed) - mstore(VK_GATE_SETUP_4_X_SLOT, 0x1a26e6deccf91174ab13613363eb4939680828f0c6031f5039f9e6f264afa68c) - mstore(VK_GATE_SETUP_4_Y_SLOT, 0x1f5b2d6bffac1839edfd02cd0e41acc411f0ecbf6c5c4b1da0e12b68b99cb25d) - mstore(VK_GATE_SETUP_5_X_SLOT, 0x09b71be2e8a45dcbe7654cf369c4f1f2e7eab4b97869a469fb7a149d989f7226) - mstore(VK_GATE_SETUP_5_Y_SLOT, 0x197e1e2cefbd4f99558b89ca875e01fec0f14f05e5128bd869c87d6bf2f307fa) - mstore(VK_GATE_SETUP_6_X_SLOT, 0x0d7cef745da686fd44760403d452d72be504bb41b0a7f4fbe973a07558893871) - mstore(VK_GATE_SETUP_6_Y_SLOT, 0x1e9a863307cdfd3fdcf119f72279ddfda08b6f23c3672e8378dbb9d548734c29) - mstore(VK_GATE_SETUP_7_X_SLOT, 0x16af3f5d978446fdb37d84f5cf12e59f5c1088bde23f8260c0bb6792c5f78e99) - mstore(VK_GATE_SETUP_7_Y_SLOT, 0x167d3aeee50c0e53fd1e8a33941a806a34cfae5dc8b66578486e5d7207b5d546) - - // gate selectors commitments - mstore(VK_GATE_SELECTORS_0_X_SLOT, 0x1addc8e154c74bed403dc19558096ce22f1ceb2c656a2a5e85e56d2be6580ed1) - mstore(VK_GATE_SELECTORS_0_Y_SLOT, 0x1420d38f0ef206828efc36d0f5ad2b4d85fe768097f358fc671b7b3ec0239234) - mstore(VK_GATE_SELECTORS_1_X_SLOT, 0x2d5c06d0c8aa6a3520b8351f82341affcbb1a0bf27bceb9bab175e3e1d38cf47) - mstore(VK_GATE_SELECTORS_1_Y_SLOT, 0x0ff8d923a0374308147f6dd4fc513f6d0640f5df699f4836825ef460df3f8d6a) - - // permutation commitments - mstore(VK_PERMUTATION_0_X_SLOT, 0x1de8943a8f67d9f6fcbda10a1f37a82de9e9ffd0a0102ea5ce0ce6dd13b4031b) - mstore(VK_PERMUTATION_0_Y_SLOT, 0x1e04b0824853ab5d7c3412a217a1c5b88a2b4011be7e7e849485be8ed7332e41) - mstore(VK_PERMUTATION_1_X_SLOT, 0x2aa1817b9cc40b6cc7a7b3f832f3267580f9fb8e539666c00541e1a77e34a3da) - mstore(VK_PERMUTATION_1_Y_SLOT, 0x0edb3cde226205b01212fc1861303c49ef3ff66f060b5833dc9a3f661ef31dd9) - mstore(VK_PERMUTATION_2_X_SLOT, 0x13f5ae93c8eccc1455a0095302923442d4b0b3c8233d66ded99ffcf2ad641c27) - mstore(VK_PERMUTATION_2_Y_SLOT, 0x2dd42d42ccdea8b1901435ace12bc9e52c7dbbeb409d20c517ba942ed0cc7519) - mstore(VK_PERMUTATION_3_X_SLOT, 0x1a15a70a016be11af71e46e9c8a8d31ece32a7e657ae90356dd9535e6566645f) - mstore(VK_PERMUTATION_3_Y_SLOT, 0x0381d23e115521c6fc233c5346f79a6777bfa8871b7ee623d990cdcb5d8c3ce1) - - // lookup tables commitments - mstore(VK_LOOKUP_TABLE_0_X_SLOT, 0x2c513ed74d9d57a5ec901e074032741036353a2c4513422e96e7b53b302d765b) - mstore(VK_LOOKUP_TABLE_0_Y_SLOT, 0x04dd964427e430f16004076d708c0cb21e225056cc1d57418cfbd3d472981468) - mstore(VK_LOOKUP_TABLE_1_X_SLOT, 0x1ea83e5e65c6f8068f4677e2911678cf329b28259642a32db1f14b8347828aac) - mstore(VK_LOOKUP_TABLE_1_Y_SLOT, 0x1d22bc884a2da4962a893ba8de13f57aaeb785ed52c5e686994839cab8f7475d) - mstore(VK_LOOKUP_TABLE_2_X_SLOT, 0x0b2e7212d0d9cff26d0bdf3d79b2cac029a25dfeb1cafdf49e2349d7db348d89) - mstore(VK_LOOKUP_TABLE_2_Y_SLOT, 0x1301f9b252419ea240eb67fda720ca0b16d92364027285f95e9b1349490fa283) - mstore(VK_LOOKUP_TABLE_3_X_SLOT, 0x02f7b99fdfa5b418548c2d777785820e02383cfc87e7085e280a375a358153bf) - mstore(VK_LOOKUP_TABLE_3_Y_SLOT, 0x09d004fe08dc4d19c382df36fad22ef676185663543703e6a4b40203e50fd8a6) - - // lookup selector commitment - mstore(VK_LOOKUP_SELECTOR_X_SLOT, 0x1641f5d312e6f62720b1e6cd1d1be5bc0e69d10d20a12dc97ff04e2107e10ccc) - mstore(VK_LOOKUP_SELECTOR_Y_SLOT, 0x277f435d376acc3261ef9d5748e6705086214daf46d04edc80fbd657f8d9e73d) - - // table type commitment - mstore(VK_LOOKUP_TABLE_TYPE_X_SLOT, 0x1b5f1cfddd6713cf25d9e6850a1b3fe80d6ef7fe2c67248f25362d5f9b31893c) - mstore(VK_LOOKUP_TABLE_TYPE_Y_SLOT, 0x0945076de03a0d240067e5f02b8fc11eaa589df3343542576eb59fdb3ecb57e0) - - // flag for using recursive part - mstore(VK_RECURSIVE_FLAG_SLOT, 0) - } - } -} diff --git a/l1-contracts/contracts/dev-contracts/test/PlonkVerifierRecursiveTest.sol b/l1-contracts/contracts/dev-contracts/test/PlonkVerifierRecursiveTest.sol index b87f9bc259..05cbe15ad5 100644 --- a/l1-contracts/contracts/dev-contracts/test/PlonkVerifierRecursiveTest.sol +++ b/l1-contracts/contracts/dev-contracts/test/PlonkVerifierRecursiveTest.sol @@ -2,10 +2,10 @@ pragma solidity 0.8.28; -import {L1VerifierPlonk} from "../../state-transition/verifiers/L1VerifierPlonk.sol"; +import {EraVerifierPlonk} from "../../state-transition/verifiers/EraVerifierPlonk.sol"; /// @author Matter Labs -contract PlonkVerifierRecursiveTest is L1VerifierPlonk { +contract PlonkVerifierRecursiveTest is EraVerifierPlonk { // add this to be excluded from coverage report function test() internal virtual {} diff --git a/l1-contracts/contracts/dev-contracts/test/PlonkVerifierTest.sol b/l1-contracts/contracts/dev-contracts/test/PlonkVerifierTest.sol index 414d8365ab..d6fe3d4a86 100644 --- a/l1-contracts/contracts/dev-contracts/test/PlonkVerifierTest.sol +++ b/l1-contracts/contracts/dev-contracts/test/PlonkVerifierTest.sol @@ -2,10 +2,10 @@ pragma solidity 0.8.28; -import {L1VerifierPlonk} from "../../state-transition/verifiers/L1VerifierPlonk.sol"; +import {EraVerifierPlonk} from "../../state-transition/verifiers/EraVerifierPlonk.sol"; /// @author Matter Labs -contract PlonkVerifierTest is L1VerifierPlonk { +contract PlonkVerifierTest is EraVerifierPlonk { // add this to be excluded from coverage report function test() internal virtual {} diff --git a/l1-contracts/contracts/dev-contracts/test/L2VerifierRecursiveTest.sol b/l1-contracts/contracts/dev-contracts/test/VerifierRecursiveTest.sol similarity index 97% rename from l1-contracts/contracts/dev-contracts/test/L2VerifierRecursiveTest.sol rename to l1-contracts/contracts/dev-contracts/test/VerifierRecursiveTest.sol index 4b4408d4ed..05cbe15ad5 100644 --- a/l1-contracts/contracts/dev-contracts/test/L2VerifierRecursiveTest.sol +++ b/l1-contracts/contracts/dev-contracts/test/VerifierRecursiveTest.sol @@ -2,10 +2,10 @@ pragma solidity 0.8.28; -import {L2VerifierPlonk} from "../../state-transition/verifiers/L2VerifierPlonk.sol"; +import {EraVerifierPlonk} from "../../state-transition/verifiers/EraVerifierPlonk.sol"; /// @author Matter Labs -contract L2PlonkVerifierRecursiveTest is L2VerifierPlonk { +contract PlonkVerifierRecursiveTest is EraVerifierPlonk { // add this to be excluded from coverage report function test() internal virtual {} diff --git a/l1-contracts/contracts/dev-contracts/test/L2PlonkVerifierTest.sol b/l1-contracts/contracts/dev-contracts/test/VerifierTest.sol similarity index 97% rename from l1-contracts/contracts/dev-contracts/test/L2PlonkVerifierTest.sol rename to l1-contracts/contracts/dev-contracts/test/VerifierTest.sol index 409e64b668..bf38433e87 100644 --- a/l1-contracts/contracts/dev-contracts/test/L2PlonkVerifierTest.sol +++ b/l1-contracts/contracts/dev-contracts/test/VerifierTest.sol @@ -2,10 +2,10 @@ pragma solidity 0.8.28; -import {L2VerifierPlonk} from "../../state-transition/verifiers/L2VerifierPlonk.sol"; +import {EraVerifierPlonk} from "../../state-transition/verifiers/EraVerifierPlonk.sol"; /// @author Matter Labs -contract L2PlonkVerifierTest is L2VerifierPlonk { +contract VerifierTest is EraVerifierPlonk { // add this to be excluded from coverage report function test() internal virtual {} diff --git a/l1-contracts/contracts/governance/PermanentRestriction.sol b/l1-contracts/contracts/governance/PermanentRestriction.sol index 22ac599b4f..7d9fdaf852 100644 --- a/l1-contracts/contracts/governance/PermanentRestriction.sol +++ b/l1-contracts/contracts/governance/PermanentRestriction.sol @@ -4,7 +4,8 @@ pragma solidity 0.8.28; import {AlreadyWhitelisted, CallNotAllowed, NotAllowed, RemovingPermanentRestriction, TooHighDeploymentNonce, UnallowedImplementation, ZeroAddress} from "../common/L1ContractErrors.sol"; -import {BridgehubBurnCTMAssetData, IBridgehub, L2TransactionRequestTwoBridgesOuter} from "../bridgehub/IBridgehub.sol"; +import {IL1Bridgehub} from "../bridgehub/IL1Bridgehub.sol"; +import {BridgehubBurnCTMAssetData, L2TransactionRequestTwoBridgesOuter} from "../bridgehub/IBridgehubBase.sol"; import {Ownable2StepUpgradeable} from "@openzeppelin/contracts-upgradeable-v4/access/Ownable2StepUpgradeable.sol"; import {L2ContractHelper} from "../common/l2-helpers/L2ContractHelper.sol"; import {IAssetRouterBase, NEW_ENCODING_VERSION} from "../bridge/asset-router/IAssetRouterBase.sol"; @@ -32,7 +33,7 @@ uint256 constant MAX_ALLOWED_NONCE = (1 << 48); /// @dev Once of the instances of such contract is to ensure that a ZkSyncHyperchain is a rollup forever. contract PermanentRestriction is Restriction, IPermanentRestriction, Ownable2StepUpgradeable { /// @notice The address of the Bridgehub contract. - IBridgehub public immutable BRIDGE_HUB; + IL1Bridgehub public immutable BRIDGE_HUB; /// @notice The address of the L2 admin factory that should be used to deploy the chain admins /// for chains that migrated on top of an L2 settlement layer. @@ -52,7 +53,7 @@ contract PermanentRestriction is Restriction, IPermanentRestriction, Ownable2Ste /// @notice The mapping of whitelisted L2 admins. mapping(address adminAddress => bool isWhitelisted) public allowedL2Admins; - constructor(IBridgehub _bridgehub, address _l2AdminFactory) { + constructor(IL1Bridgehub _bridgehub, address _l2AdminFactory) { _disableInitializers(); BRIDGE_HUB = _bridgehub; L2_ADMIN_FACTORY = _l2AdminFactory; @@ -287,7 +288,7 @@ contract PermanentRestriction is Restriction, IPermanentRestriction, Ownable2Ste return (address(0), false); } - if (bytes4(_call.data[:4]) != IBridgehub.requestL2TransactionTwoBridges.selector) { + if (bytes4(_call.data[:4]) != IL1Bridgehub.requestL2TransactionTwoBridges.selector) { return (address(0), false); } diff --git a/l1-contracts/contracts/l2-upgrades/IZKOSContractDeployer.sol b/l1-contracts/contracts/l2-upgrades/IZKOSContractDeployer.sol new file mode 100644 index 0000000000..5c420fa14c --- /dev/null +++ b/l1-contracts/contracts/l2-upgrades/IZKOSContractDeployer.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: MIT + +pragma solidity 0.8.28; + +/// @notice Interface for contract deployer system hook on ZKsyncOS. +/// @dev Note, that the actual implementation of this interface is implemented in Rust +/// as a system hook. +interface IZKOSContractDeployer { + /// @notice Sets the bytecode details for a contract on ZKsyncOS. + /// @dev This function is used to set the bytecode details for a contract on ZKsyncOS, + /// it is an alternative to the `forceDeployOnAddresses` function from Era. + /// @param _addr The address of the contract. + /// @param _bytecodeHash The hash of the bytecode. + /// @param _bytecodeLength The length of the bytecode. + /// @param _observableBytecodeHash The hash of the observable bytecode. + function setBytecodeDetailsEVM( + address _addr, + bytes32 _bytecodeHash, + uint32 _bytecodeLength, + bytes32 _observableBytecodeHash + ) external; +} diff --git a/system-contracts/contracts/ComplexUpgrader.sol b/l1-contracts/contracts/l2-upgrades/L2ComplexUpgrader.sol similarity index 54% rename from system-contracts/contracts/ComplexUpgrader.sol rename to l1-contracts/contracts/l2-upgrades/L2ComplexUpgrader.sol index 32b08d0911..87c014c854 100644 --- a/system-contracts/contracts/ComplexUpgrader.sol +++ b/l1-contracts/contracts/l2-upgrades/L2ComplexUpgrader.sol @@ -2,10 +2,13 @@ pragma solidity 0.8.28; -import {IComplexUpgrader} from "./interfaces/IComplexUpgrader.sol"; -import {ForceDeployment} from "./interfaces/IContractDeployer.sol"; -import {DEPLOYER_SYSTEM_CONTRACT, FORCE_DEPLOYER} from "./Constants.sol"; -import {AddressHasNoCode, Unauthorized} from "./SystemContractErrors.sol"; +import {IL2ContractDeployer} from "../common/interfaces/IL2ContractDeployer.sol"; +import {L2_DEPLOYER_SYSTEM_CONTRACT_ADDR, L2_FORCE_DEPLOYER_ADDR} from "../common/l2-helpers/L2ContractAddresses.sol"; +import {AddressHasNoCode, Unauthorized} from "../common/L1ContractErrors.sol"; + +import {IComplexUpgrader} from "../state-transition/l2-deps/IComplexUpgrader.sol"; + +import {L2GenesisForceDeploymentsHelper} from "./L2GenesisForceDeploymentsHelper.sol"; /** * @author Matter Labs @@ -13,13 +16,13 @@ import {AddressHasNoCode, Unauthorized} from "./SystemContractErrors.sol"; * @notice Upgrader which should be used to perform complex multistep upgrades on L2. In case some custom logic for an upgrade is needed * this logic should be deployed into the user space and then this contract will delegatecall to the deployed contract. */ -contract ComplexUpgrader is IComplexUpgrader { +contract L2ComplexUpgrader is IComplexUpgrader { /// @notice Ensures that only the `FORCE_DEPLOYER` can call the function. /// @dev Note that it is vital to put this modifier at the start of *each* function, /// since even temporary anauthorized access can be dangerous. modifier onlyForceDeployer() { // Note, that it is not - if (msg.sender != FORCE_DEPLOYER) { + if (msg.sender != L2_FORCE_DEPLOYER_ADDR) { revert Unauthorized(msg.sender); } _; @@ -29,16 +32,41 @@ contract ComplexUpgrader is IComplexUpgrader { /// @dev This function allows only the `FORCE_DEPLOYER` to initiate the upgrade. /// If the delegate call fails, the function will revert the transaction, returning the error message /// provided by the delegated contract. + /// @dev Compatible with Era only. /// @param _forceDeployments the list of initial deployments that should be performed before the upgrade. /// They would typically, though not necessarily include the deployment of the upgrade implementation itself. /// @param _delegateTo the address of the contract to which the calls will be delegated /// @param _calldata the calldata to be delegate called in the `_delegateTo` contract function forceDeployAndUpgrade( - ForceDeployment[] calldata _forceDeployments, + IL2ContractDeployer.ForceDeployment[] calldata _forceDeployments, + address _delegateTo, + bytes calldata _calldata + ) external payable onlyForceDeployer { + IL2ContractDeployer(L2_DEPLOYER_SYSTEM_CONTRACT_ADDR).forceDeployOnAddresses(_forceDeployments); + + upgrade(_delegateTo, _calldata); + } + + /// @notice Executes an upgrade process by delegating calls to another contract. + /// @dev Similar to `forceDeployAndUpgrade`, but allows for universal force deployments, that + /// work for both ZKsyncOS and Era. + /// @param _forceDeployments the list of initial deployments that should be performed before the upgrade. + /// They would typically, though not necessarily include the deployment of the upgrade implementation itself. + /// @param _delegateTo the address of the contract to which the calls will be delegated + /// @param _calldata the calldata to be delegate called in the `_delegateTo` contract + function forceDeployAndUpgradeUniversal( + UniversalForceDeploymentInfo[] calldata _forceDeployments, address _delegateTo, bytes calldata _calldata - ) external payable override onlyForceDeployer { - DEPLOYER_SYSTEM_CONTRACT.forceDeployOnAddresses(_forceDeployments); + ) external payable onlyForceDeployer { + // solhint-disable-next-line gas-length-in-loops + for (uint256 i = 0; i < _forceDeployments.length; ++i) { + L2GenesisForceDeploymentsHelper.forceDeployOnAddress( + _forceDeployments[i].isZKsyncOS, + _forceDeployments[i].deployedBytecodeInfo, + _forceDeployments[i].newAddress + ); + } upgrade(_delegateTo, _calldata); } @@ -53,6 +81,7 @@ contract ComplexUpgrader is IComplexUpgrader { if (_delegateTo.code.length == 0) { revert AddressHasNoCode(_delegateTo); } + // slither-disable-next-line controlled-delegatecall (bool success, bytes memory returnData) = _delegateTo.delegatecall(_calldata); assembly { if iszero(success) { diff --git a/l1-contracts/contracts/l2-upgrades/L2GenesisForceDeploymentsHelper.sol b/l1-contracts/contracts/l2-upgrades/L2GenesisForceDeploymentsHelper.sol new file mode 100644 index 0000000000..92074d8558 --- /dev/null +++ b/l1-contracts/contracts/l2-upgrades/L2GenesisForceDeploymentsHelper.sol @@ -0,0 +1,314 @@ +// SPDX-License-Identifier: MIT + +pragma solidity 0.8.28; + +import {L2_ASSET_ROUTER_ADDR, L2_BRIDGEHUB_ADDR, L2_CHAIN_ASSET_HANDLER_ADDR, L2_DEPLOYER_SYSTEM_CONTRACT_ADDR, L2_MESSAGE_ROOT_ADDR, L2_NATIVE_TOKEN_VAULT_ADDR, L2_NTV_BEACON_DEPLOYER_ADDR, L2_WRAPPED_BASE_TOKEN_IMPL_ADDR} from "../common/l2-helpers/L2ContractAddresses.sol"; +import {IL2ContractDeployer} from "../common/interfaces/IL2ContractDeployer.sol"; +import {FixedForceDeploymentsData, ZKChainSpecificForceDeploymentsData} from "../state-transition/l2-deps/IL2GenesisUpgrade.sol"; +import {IL2WrappedBaseToken} from "../bridge/interfaces/IL2WrappedBaseToken.sol"; + +import {TransparentUpgradeableProxy} from "@openzeppelin/contracts-v4/proxy/transparent/TransparentUpgradeableProxy.sol"; + +import {IZKOSContractDeployer} from "./IZKOSContractDeployer.sol"; +import {L2NativeTokenVault} from "../bridge/ntv/L2NativeTokenVault.sol"; +import {L2MessageRoot} from "../bridgehub/L2MessageRoot.sol"; +import {L2Bridgehub} from "../bridgehub/L2Bridgehub.sol"; +import {L2AssetRouter} from "../bridge/asset-router/L2AssetRouter.sol"; +import {L2ChainAssetHandler} from "../bridgehub/L2ChainAssetHandler.sol"; +import {DeployFailed} from "../common/L1ContractErrors.sol"; + +import {L2NativeTokenVaultZKOS} from "../bridge/ntv/L2NativeTokenVaultZKOS.sol"; + +import {ICTMDeploymentTracker} from "../bridgehub/ICTMDeploymentTracker.sol"; +import {IMessageRoot} from "../bridgehub/IMessageRoot.sol"; + +import {UpgradeableBeaconDeployer} from "../bridge/ntv/UpgradeableBeaconDeployer.sol"; + +/// @title L2GenesisForceDeploymentsHelper +/// @author Matter Labs +/// @custom:security-contact security@matterlabs.dev +/// @notice A helper library for initializing and managing force-deployed contracts during either the L2 gateway upgrade or +/// the genesis after the gateway protocol upgrade. +library L2GenesisForceDeploymentsHelper { + function forceDeployEra(bytes memory _bytecodeInfo, address _newAddress) internal { + bytes32 bytecodeHash = abi.decode(_bytecodeInfo, (bytes32)); + IL2ContractDeployer.ForceDeployment[] memory forceDeployments = new IL2ContractDeployer.ForceDeployment[](1); + forceDeployments[0] = IL2ContractDeployer.ForceDeployment({ + bytecodeHash: bytecodeHash, + newAddress: _newAddress, + callConstructor: false, + value: 0, + input: hex"" + }); + + IL2ContractDeployer(L2_DEPLOYER_SYSTEM_CONTRACT_ADDR).forceDeployOnAddresses(forceDeployments); + } + + function forceDeployZKsyncOS(bytes memory _bytecodeInfo, address _newAddress) internal { + (bytes32 bytecodeHash, uint32 bytecodeLength, bytes32 observableBytecodeHash) = abi.decode( + _bytecodeInfo, + (bytes32, uint32, bytes32) + ); + + bytes memory data = abi.encodeCall( + IZKOSContractDeployer.setBytecodeDetailsEVM, + (_newAddress, bytecodeHash, bytecodeLength, observableBytecodeHash) + ); + + // Note, that we dont use interface, but raw call to avoid Solidity checking for empty bytecode + (bool success, ) = L2_DEPLOYER_SYSTEM_CONTRACT_ADDR.call(data); + if (!success) { + revert DeployFailed(); + } + } + + /// @notice Unified function to force deploy contracts based on whether it's ZKSyncOS or Era. + /// @param _isZKsyncOS Whether the deployment is for ZKSyncOS or Era. + /// @param _bytecodeInfo The bytecode information for deployment. + /// @param _newAddress The address where the contract should be deployed. + function forceDeployOnAddress(bool _isZKsyncOS, bytes memory _bytecodeInfo, address _newAddress) internal { + if (_isZKsyncOS) { + forceDeployZKsyncOS(_bytecodeInfo, _newAddress); + } else { + forceDeployEra(_bytecodeInfo, _newAddress); + } + } + + /// @notice Initializes force-deployed contracts. + /// @param _ctmDeployer Address of the CTM Deployer contract. + /// @param _fixedForceDeploymentsData Encoded data for forced deployment that + /// is the same for all the chains. + /// @param _additionalForceDeploymentsData Encoded data for force deployments that + /// is specific for each ZK Chain. + function performForceDeployedContractsInit( + bool _isZKsyncOS, + address _ctmDeployer, + bytes memory _fixedForceDeploymentsData, + bytes memory _additionalForceDeploymentsData, + bool _isGenesisUpgrade + ) internal { + // Decode the fixed and additional force deployments data. + FixedForceDeploymentsData memory fixedForceDeploymentsData = abi.decode( + _fixedForceDeploymentsData, + (FixedForceDeploymentsData) + ); + ZKChainSpecificForceDeploymentsData memory additionalForceDeploymentsData = abi.decode( + _additionalForceDeploymentsData, + (ZKChainSpecificForceDeploymentsData) + ); + + forceDeployOnAddress( + _isZKsyncOS, + fixedForceDeploymentsData.messageRootBytecodeInfo, + address(L2_MESSAGE_ROOT_ADDR) + ); + // If this is a genesis upgrade, we need to initialize the MessageRoot contract. + // We dont need to do anything for already deployed chains. + if (_isGenesisUpgrade) { + L2MessageRoot(L2_MESSAGE_ROOT_ADDR).initL2(fixedForceDeploymentsData.l1ChainId); + } + + forceDeployOnAddress(_isZKsyncOS, fixedForceDeploymentsData.bridgehubBytecodeInfo, address(L2_BRIDGEHUB_ADDR)); + if (_isGenesisUpgrade) { + L2Bridgehub(L2_BRIDGEHUB_ADDR).initL2( + fixedForceDeploymentsData.l1ChainId, + fixedForceDeploymentsData.aliasedL1Governance, + fixedForceDeploymentsData.maxNumberOfZKChains + ); + } else { + L2Bridgehub(L2_BRIDGEHUB_ADDR).updateL2( + fixedForceDeploymentsData.l1ChainId, + fixedForceDeploymentsData.maxNumberOfZKChains + ); + } + + // For new chains, there is no legacy shared bridge, but the already existing ones, + // we should be able to query it. + address l2LegacySharedBridge = _isGenesisUpgrade + ? address(0) + : L2AssetRouter(L2_ASSET_ROUTER_ADDR).L2_LEGACY_SHARED_BRIDGE(); + + forceDeployOnAddress( + _isZKsyncOS, + fixedForceDeploymentsData.l2AssetRouterBytecodeInfo, + address(L2_ASSET_ROUTER_ADDR) + ); + if (_isGenesisUpgrade) { + // solhint-disable-next-line func-named-parameters + L2AssetRouter(L2_ASSET_ROUTER_ADDR).initL2( + fixedForceDeploymentsData.l1ChainId, + fixedForceDeploymentsData.eraChainId, + fixedForceDeploymentsData.l1AssetRouter, + l2LegacySharedBridge, + additionalForceDeploymentsData.baseTokenAssetId, + fixedForceDeploymentsData.aliasedL1Governance + ); + } else { + // solhint-disable-next-line func-named-parameters + L2AssetRouter(L2_ASSET_ROUTER_ADDR).updateL2( + fixedForceDeploymentsData.l1ChainId, + fixedForceDeploymentsData.eraChainId, + fixedForceDeploymentsData.l1AssetRouter, + l2LegacySharedBridge, + additionalForceDeploymentsData.baseTokenAssetId + ); + } + + address predeployedL2WethAddress = _isGenesisUpgrade + ? address(0) + : L2NativeTokenVault(L2_NATIVE_TOKEN_VAULT_ADDR).WETH_TOKEN(); + bytes32 previousL2TokenProxyBytecodeHash = _isGenesisUpgrade + ? bytes32(0) + : L2NativeTokenVault(L2_NATIVE_TOKEN_VAULT_ADDR).L2_TOKEN_PROXY_BYTECODE_HASH(); + + // Ensure the WETH token is deployed and retrieve its address. + address wrappedBaseTokenAddress = _ensureWethToken({ + _predeployedWethToken: predeployedL2WethAddress, + _aliasedL1Governance: fixedForceDeploymentsData.aliasedL1Governance, + _baseTokenL1Address: additionalForceDeploymentsData.baseTokenL1Address, + _baseTokenAssetId: additionalForceDeploymentsData.baseTokenAssetId, + _baseTokenName: additionalForceDeploymentsData.baseTokenName, + _baseTokenSymbol: additionalForceDeploymentsData.baseTokenSymbol + }); + + // Now initializing the upgradeable token beacon + forceDeployOnAddress(_isZKsyncOS, fixedForceDeploymentsData.l2NtvBytecodeInfo, L2_NATIVE_TOKEN_VAULT_ADDR); + + if (_isGenesisUpgrade) { + address deployedTokenBeacon; + // In production, the `fixedForceDeploymentsData.dangerousTestOnlyForcedBeacon` must always + // be equal to 0. It is only for simplifying testing. + if (fixedForceDeploymentsData.dangerousTestOnlyForcedBeacon == address(0)) { + // We need to deploy the beacon, we will use a separate contract for that to save + // up on size of this contract. + forceDeployOnAddress( + _isZKsyncOS, + fixedForceDeploymentsData.beaconDeployerInfo, + L2_NTV_BEACON_DEPLOYER_ADDR + ); + + deployedTokenBeacon = UpgradeableBeaconDeployer(L2_NTV_BEACON_DEPLOYER_ADDR).deployUpgradeableBeacon( + fixedForceDeploymentsData.aliasedL1Governance + ); + } else { + deployedTokenBeacon = fixedForceDeploymentsData.dangerousTestOnlyForcedBeacon; + } + + // solhint-disable-next-line func-named-parameters + L2NativeTokenVaultZKOS(L2_NATIVE_TOKEN_VAULT_ADDR).initL2( + fixedForceDeploymentsData.l1ChainId, + fixedForceDeploymentsData.aliasedL1Governance, + fixedForceDeploymentsData.l2TokenProxyBytecodeHash, + additionalForceDeploymentsData.l2LegacySharedBridge, + deployedTokenBeacon, + wrappedBaseTokenAddress, + additionalForceDeploymentsData.baseTokenAssetId + ); + } else { + // solhint-disable-next-line func-named-parameters + L2NativeTokenVault(L2_NATIVE_TOKEN_VAULT_ADDR).updateL2( + fixedForceDeploymentsData.l1ChainId, + previousL2TokenProxyBytecodeHash, + l2LegacySharedBridge, + wrappedBaseTokenAddress, + additionalForceDeploymentsData.baseTokenAssetId + ); + } + + forceDeployOnAddress( + _isZKsyncOS, + fixedForceDeploymentsData.chainAssetHandlerBytecodeInfo, + address(L2_CHAIN_ASSET_HANDLER_ADDR) + ); + if (_isGenesisUpgrade) { + // solhint-disable-next-line func-named-parameters + L2ChainAssetHandler(L2_CHAIN_ASSET_HANDLER_ADDR).initL2( + fixedForceDeploymentsData.l1ChainId, + fixedForceDeploymentsData.aliasedL1Governance, + L2_BRIDGEHUB_ADDR, + L2_ASSET_ROUTER_ADDR, + L2_MESSAGE_ROOT_ADDR + ); + } else { + L2ChainAssetHandler(L2_CHAIN_ASSET_HANDLER_ADDR).updateL2( + fixedForceDeploymentsData.l1ChainId, + L2_BRIDGEHUB_ADDR, + L2_ASSET_ROUTER_ADDR, + L2_MESSAGE_ROOT_ADDR + ); + } + + // It is expected that either through the force deployments above + // or upon initialization, both the L2 deployment of BridgeHub, AssetRouter, and MessageRoot are deployed. + // However, there is still some follow-up finalization that needs to be done. + L2Bridgehub(L2_BRIDGEHUB_ADDR).setAddresses( + L2_ASSET_ROUTER_ADDR, + ICTMDeploymentTracker(_ctmDeployer), + IMessageRoot(L2_MESSAGE_ROOT_ADDR), + L2_CHAIN_ASSET_HANDLER_ADDR + ); + } + + /// @notice Constructs the initialization calldata for the L2WrappedBaseToken. + /// @param _wrappedBaseTokenName The name of the wrapped base token. + /// @param _wrappedBaseTokenSymbol The symbol of the wrapped base token. + /// @param _baseTokenL1Address The L1 address of the base token. + /// @param _baseTokenAssetId The asset ID of the base token. + /// @return initData The encoded initialization calldata. + function getWethInitData( + string memory _wrappedBaseTokenName, + string memory _wrappedBaseTokenSymbol, + address _baseTokenL1Address, + bytes32 _baseTokenAssetId + ) internal pure returns (bytes memory initData) { + initData = abi.encodeCall( + IL2WrappedBaseToken.initializeV3, + ( + _wrappedBaseTokenName, + _wrappedBaseTokenSymbol, + L2_ASSET_ROUTER_ADDR, + _baseTokenL1Address, + _baseTokenAssetId + ) + ); + } + + /// @notice Ensures that the WETH token is deployed. If not predeployed, deploys it. + /// @param _predeployedWethToken The potential address of the predeployed WETH token. + /// @param _aliasedL1Governance Address of the aliased L1 governance. + /// @param _baseTokenL1Address L1 address of the base token. + /// @param _baseTokenAssetId Asset ID of the base token. + /// @param _baseTokenName Name of the base token. + /// @param _baseTokenSymbol Symbol of the base token. + /// @return The address of the ensured WETH token. + function _ensureWethToken( + address _predeployedWethToken, + address _aliasedL1Governance, + address _baseTokenL1Address, + bytes32 _baseTokenAssetId, + string memory _baseTokenName, + string memory _baseTokenSymbol + ) private returns (address) { + if (_predeployedWethToken != address(0)) { + return _predeployedWethToken; + } + + string memory wrappedBaseTokenName = string.concat("Wrapped ", _baseTokenName); + string memory wrappedBaseTokenSymbol = string.concat("W", _baseTokenSymbol); + + bytes memory initData = getWethInitData( + wrappedBaseTokenName, + wrappedBaseTokenSymbol, + _baseTokenL1Address, + _baseTokenAssetId + ); + + TransparentUpgradeableProxy proxy = new TransparentUpgradeableProxy{salt: bytes32(0)}( + L2_WRAPPED_BASE_TOKEN_IMPL_ADDR, + _aliasedL1Governance, + initData + ); + + return address(proxy); + } +} diff --git a/system-contracts/contracts/L2GenesisUpgrade.sol b/l1-contracts/contracts/l2-upgrades/L2GenesisUpgrade.sol similarity index 59% rename from system-contracts/contracts/L2GenesisUpgrade.sol rename to l1-contracts/contracts/l2-upgrades/L2GenesisUpgrade.sol index 60bfe14171..171df7e058 100644 --- a/system-contracts/contracts/L2GenesisUpgrade.sol +++ b/l1-contracts/contracts/l2-upgrades/L2GenesisUpgrade.sol @@ -2,13 +2,14 @@ pragma solidity 0.8.28; -import {SYSTEM_CONTEXT_CONTRACT} from "./Constants.sol"; -import {ISystemContext} from "./interfaces/ISystemContext.sol"; -import {InvalidChainId} from "contracts/SystemContractErrors.sol"; -import {IL2GenesisUpgrade} from "./interfaces/IL2GenesisUpgrade.sol"; +import {L2_SYSTEM_CONTEXT_SYSTEM_CONTRACT_ADDR} from "../common/l2-helpers/L2ContractAddresses.sol"; +import {ISystemContext} from "../state-transition/l2-deps/ISystemContext.sol"; +import {IL2GenesisUpgrade} from "../state-transition/l2-deps/IL2GenesisUpgrade.sol"; import {L2GenesisForceDeploymentsHelper} from "./L2GenesisForceDeploymentsHelper.sol"; +import {InvalidChainId} from "../common/L1ContractErrors.sol"; + /// @custom:security-contact security@matterlabs.dev /// @author Matter Labs /// @notice The l2 component of the genesis upgrade. @@ -19,21 +20,31 @@ contract L2GenesisUpgrade is IL2GenesisUpgrade { /// @param _ctmDeployer the address of the ctm deployer /// @param _fixedForceDeploymentsData the force deployments data /// @param _additionalForceDeploymentsData the additional force deployments data + // slither-disable-next-line locked-ether function genesisUpgrade( + bool _isZKsyncOS, uint256 _chainId, address _ctmDeployer, bytes calldata _fixedForceDeploymentsData, bytes calldata _additionalForceDeploymentsData - ) external payable { + ) external { if (_chainId == 0) { revert InvalidChainId(); } - ISystemContext(SYSTEM_CONTEXT_CONTRACT).setChainId(_chainId); + // On ZKsyncOS, the chain Id is a part of implicit block properties + // and so does not need to set inside the genesis upgrade. + if (!_isZKsyncOS) { + ISystemContext(L2_SYSTEM_CONTEXT_SYSTEM_CONTRACT_ADDR).setChainId(_chainId); + } + + // solhint-disable-next-line func-named-parameters L2GenesisForceDeploymentsHelper.performForceDeployedContractsInit( + _isZKsyncOS, _ctmDeployer, _fixedForceDeploymentsData, - _additionalForceDeploymentsData + _additionalForceDeploymentsData, + true ); emit UpgradeComplete(_chainId); diff --git a/l1-contracts/contracts/state-transition/AccessControlEnumerablePerChainAddressUpgradeable.sol b/l1-contracts/contracts/state-transition/AccessControlEnumerablePerChainAddressUpgradeable.sol index 055f57d26f..2b07b1dee1 100644 --- a/l1-contracts/contracts/state-transition/AccessControlEnumerablePerChainAddressUpgradeable.sol +++ b/l1-contracts/contracts/state-transition/AccessControlEnumerablePerChainAddressUpgradeable.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.28; import {EnumerableSetUpgradeable} from "@openzeppelin/contracts-upgradeable-v4/utils/structs/EnumerableSetUpgradeable.sol"; -import {RoleAccessDenied, DefaultAdminTransferNotAllowed} from "../common/L1ContractErrors.sol"; +import {DefaultAdminTransferNotAllowed, RoleAccessDenied} from "../common/L1ContractErrors.sol"; /// @title Chain‑Address‑Aware Role‑Based Access Control with Enumeration /// @notice It is an adapted version of OpenZeppelin's `AccessControlEnumerable` that keeps a completely separate diff --git a/l1-contracts/contracts/state-transition/ChainTypeManager.sol b/l1-contracts/contracts/state-transition/ChainTypeManager.sol index c80e492691..d15b6ee30d 100644 --- a/l1-contracts/contracts/state-transition/ChainTypeManager.sol +++ b/l1-contracts/contracts/state-transition/ChainTypeManager.sol @@ -16,9 +16,9 @@ import {FeeParams} from "./chain-deps/ZKChainStorage.sol"; import {Ownable2StepUpgradeable} from "@openzeppelin/contracts-upgradeable-v4/access/Ownable2StepUpgradeable.sol"; import {DEFAULT_L2_LOGS_TREE_ROOT_HASH, EMPTY_STRING_KECCAK, L2_TO_L1_LOG_SERIALIZE_SIZE} from "../common/Config.sol"; import {AdminZero, InitialForceDeploymentMismatch, OutdatedProtocolVersion} from "./L1StateTransitionErrors.sol"; -import {ChainAlreadyLive, GenesisBatchCommitmentZero, GenesisBatchHashZero, GenesisIndexStorageZero, GenesisUpgradeZero, HashMismatch, MigrationsNotPaused, Unauthorized, ZeroAddress} from "../common/L1ContractErrors.sol"; +import {ChainAlreadyLive, GenesisBatchCommitmentZero, GenesisBatchHashZero, GenesisUpgradeZero, HashMismatch, MigrationsNotPaused, Unauthorized, ZeroAddress} from "../common/L1ContractErrors.sol"; import {SemVer} from "../common/libraries/SemVer.sol"; -import {IBridgehub} from "../bridgehub/IBridgehub.sol"; +import {IL1Bridgehub} from "../bridgehub/IL1Bridgehub.sol"; import {ReentrancyGuard} from "../common/ReentrancyGuard.sol"; @@ -107,7 +107,7 @@ contract ChainTypeManager is IChainTypeManager, ReentrancyGuard, Ownable2StepUpg /// @notice only the chain asset handler can call modifier onlyChainAssetHandler() { - if (msg.sender != IBridgehub(BRIDGE_HUB).chainAssetHandler()) { + if (msg.sender != IL1Bridgehub(BRIDGE_HUB).chainAssetHandler()) { revert Unauthorized(msg.sender); } _; @@ -121,7 +121,7 @@ contract ChainTypeManager is IChainTypeManager, ReentrancyGuard, Ownable2StepUpg /// @notice return the chain contract address for a chainId function getZKChain(uint256 _chainId) public view returns (address) { - return IBridgehub(BRIDGE_HUB).getZKChain(_chainId); + return IL1Bridgehub(BRIDGE_HUB).getZKChain(_chainId); } /// @notice return the chain contract address for a chainId @@ -167,9 +167,6 @@ contract ChainTypeManager is IChainTypeManager, ReentrancyGuard, Ownable2StepUpg if (_chainCreationParams.genesisBatchHash == bytes32(0)) { revert GenesisBatchHashZero(); } - if (_chainCreationParams.genesisIndexRepeatedStorageChanges == uint64(0)) { - revert GenesisIndexStorageZero(); - } if (_chainCreationParams.genesisBatchCommitment == bytes32(0)) { revert GenesisBatchCommitmentZero(); } @@ -278,7 +275,7 @@ contract ChainTypeManager is IChainTypeManager, ReentrancyGuard, Ownable2StepUpg uint256 _oldProtocolVersionDeadline, uint256 _newProtocolVersion ) external onlyOwner { - if (!IBridgehub(BRIDGE_HUB).migrationPaused()) { + if (!IL1Bridgehub(BRIDGE_HUB).migrationPaused()) { revert MigrationsNotPaused(); } @@ -477,7 +474,7 @@ contract ChainTypeManager is IChainTypeManager, ReentrancyGuard, Ownable2StepUpg // genesis upgrade, deploys some contracts, sets chainId IAdmin(zkChainAddress).genesisUpgrade( l1GenesisUpgrade, - address(IBridgehub(BRIDGE_HUB).l1CtmDeployer()), + address(IL1Bridgehub(BRIDGE_HUB).l1CtmDeployer()), _forceDeploymentData, _factoryDeps ); @@ -511,7 +508,7 @@ contract ChainTypeManager is IChainTypeManager, ReentrancyGuard, Ownable2StepUpg return abi.encode( - IBridgehub(BRIDGE_HUB).baseTokenAssetId(_chainId), + IL1Bridgehub(BRIDGE_HUB).baseTokenAssetId(_chainId), _newSettlementLayerAdmin, protocolVersion, _diamondCut diff --git a/l1-contracts/contracts/state-transition/IChainTypeManager.sol b/l1-contracts/contracts/state-transition/IChainTypeManager.sol index 428495b774..1178aec235 100644 --- a/l1-contracts/contracts/state-transition/IChainTypeManager.sol +++ b/l1-contracts/contracts/state-transition/IChainTypeManager.sol @@ -6,8 +6,6 @@ import {Diamond} from "./libraries/Diamond.sol"; import {L2CanonicalTransaction} from "../common/Messaging.sol"; import {FeeParams} from "./chain-deps/ZKChainStorage.sol"; -// import {IBridgehub} from "../bridgehub/IBridgehub.sol"; - /// @notice Struct that holds all data needed for initializing CTM Proxy. /// @dev We use struct instead of raw parameters in `initialize` function to prevent "Stack too deep" error /// @param owner The address who can manage non-critical updates in the contract diff --git a/l1-contracts/contracts/state-transition/IValidatorTimelock.sol b/l1-contracts/contracts/state-transition/IValidatorTimelock.sol index eaec950dc7..4aa19b49cb 100644 --- a/l1-contracts/contracts/state-transition/IValidatorTimelock.sol +++ b/l1-contracts/contracts/state-transition/IValidatorTimelock.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.28; -import {IBridgehub} from "../bridgehub/IBridgehub.sol"; +import {IL1Bridgehub} from "../bridgehub/IL1Bridgehub.sol"; import {IExecutor} from "./chain-interfaces/IExecutor.sol"; /// @author Matter Labs @@ -51,7 +51,7 @@ interface IValidatorTimelock is IExecutor { function OPTIONAL_EXECUTOR_ADMIN_ROLE() external view returns (bytes32); /// @notice The address of the bridgehub - function BRIDGE_HUB() external view returns (IBridgehub); + function BRIDGE_HUB() external view returns (IL1Bridgehub); /// @dev The delay between committing and executing batches. function executionDelay() external view returns (uint32); /// @dev Part of the IBase interface. Not used in this contract. diff --git a/l1-contracts/contracts/state-transition/L1StateTransitionErrors.sol b/l1-contracts/contracts/state-transition/L1StateTransitionErrors.sol index c9dd4d39ef..508a156dff 100644 --- a/l1-contracts/contracts/state-transition/L1StateTransitionErrors.sol +++ b/l1-contracts/contracts/state-transition/L1StateTransitionErrors.sol @@ -20,8 +20,6 @@ error ExecutedIsNotConsistentWithVerified(uint256 batchesExecuted, uint256 batch error InitialForceDeploymentMismatch(bytes32 forceDeploymentHash, bytes32 initialForceDeploymentHash); // 0xfbd630b8 error InvalidBatchesDataLength(uint256 batchesDataLength, uint256 priorityOpsDataLength); -// 0x7a47c9a2 -error InvalidChainId(); // 0xc06789fa error InvalidCommitment(); // 0xd2531c15 @@ -44,16 +42,14 @@ error InvalidUnprocessedIndex(uint256 treeUnprocessedIndex, uint256 commitmentUn error L1DAValidatorAddressIsZero(); // 0x7fbff2dd error L1DAValidatorInvalidSender(address msgSender); -// 0x944bc075 -error L2DAValidatorAddressIsZero(); // 0xa969e486 error LocalRootIsZero(); // 0xbdaf7d42 error LocalRootMustBeZero(); // 0x9b5f85eb error MessageRootIsZero(); -// 0x2237c426 -error MismatchL2DAValidator(); +// 0x32fff278 +error MismatchL2DACommitmentScheme(uint256 operatorProvidedScheme, uint256 expectedScheme); // 0x2c01a4af error MismatchNumberOfLayer1Txs(uint256 numberOfLayer1Txs, uint256 expectedLength); // 0xf9ba09d6 @@ -72,6 +68,8 @@ error NotL1(uint256 blockChainId); error NotMigrated(); // 0xd0266e26 error NotSettlementLayer(); +// 0xeee8a4d9 +error OnlyCtmOwner(); // 0x04e05fd1 error OnlyOneBlobWithCalldataAllowed(); // 0x885ae069 @@ -84,6 +82,8 @@ error ProtocolVersionNotUpToDate(uint256 currentProtocolVersion, uint256 protoco error PubdataInputTooSmall(uint256 pubdataInputLength, uint256 totalBlobsCommitmentSize); // 0x9044dff9 error PubdataLengthTooBig(uint256 pubdataLength, uint256 totalBlobSizeBytes); +// 0x0baf1d48 +error UnknownVerifierVersion(); // 0x79274f04 error UnsupportedProofMetadataVersion(uint256 metadataVersion); // 0x52595598 diff --git a/l1-contracts/contracts/state-transition/ValidatorTimelock.sol b/l1-contracts/contracts/state-transition/ValidatorTimelock.sol index 080bab5842..392584eaae 100644 --- a/l1-contracts/contracts/state-transition/ValidatorTimelock.sol +++ b/l1-contracts/contracts/state-transition/ValidatorTimelock.sol @@ -5,8 +5,8 @@ import {Ownable2StepUpgradeable} from "@openzeppelin/contracts-upgradeable-v4/ac import {AccessControlEnumerablePerChainAddressUpgradeable} from "./AccessControlEnumerablePerChainAddressUpgradeable.sol"; import {LibMap} from "./libraries/LibMap.sol"; import {IZKChain} from "./chain-interfaces/IZKChain.sol"; -import {TimeNotReached, NotAZKChain} from "../common/L1ContractErrors.sol"; -import {IBridgehub} from "../bridgehub/IBridgehub.sol"; +import {NotAZKChain, TimeNotReached} from "../common/L1ContractErrors.sol"; +import {IL1Bridgehub} from "../bridgehub/IL1Bridgehub.sol"; import {IValidatorTimelock} from "./IValidatorTimelock.sol"; /// @author Matter Labs @@ -62,7 +62,7 @@ contract ValidatorTimelock is bytes32 public constant override OPTIONAL_EXECUTOR_ADMIN_ROLE = keccak256("OPTIONAL_EXECUTOR_ADMIN_ROLE"); /// @inheritdoc IValidatorTimelock - IBridgehub public immutable override BRIDGE_HUB; + IL1Bridgehub public immutable override BRIDGE_HUB; /// @dev The mapping of ZK chain address => batch number => timestamp when it was committed. mapping(address chainAddress => LibMap.Uint32Map batchNumberToTimestampMapping) internal committedBatchTimestamp; @@ -71,7 +71,7 @@ contract ValidatorTimelock is uint32 public override executionDelay; constructor(address _bridgehubAddr) { - BRIDGE_HUB = IBridgehub(_bridgehubAddr); + BRIDGE_HUB = IL1Bridgehub(_bridgehubAddr); // Disable initialization to prevent Parity hack. _disableInitializers(); } @@ -288,7 +288,7 @@ contract ValidatorTimelock is // Firstly, we check that the chain is indeed a part of the ecosystem uint256 chainId = IZKChain(_chainAddress).getChainId(); - if (IBridgehub(BRIDGE_HUB).getZKChain(chainId) != _chainAddress) { + if (IL1Bridgehub(BRIDGE_HUB).getZKChain(chainId) != _chainAddress) { revert NotAZKChain(_chainAddress); } diff --git a/l1-contracts/contracts/state-transition/chain-deps/DiamondInit.sol b/l1-contracts/contracts/state-transition/chain-deps/DiamondInit.sol index 9bb6359322..83b14b955f 100644 --- a/l1-contracts/contracts/state-transition/chain-deps/DiamondInit.sol +++ b/l1-contracts/contracts/state-transition/chain-deps/DiamondInit.sol @@ -4,7 +4,7 @@ pragma solidity 0.8.28; import {Diamond} from "../libraries/Diamond.sol"; import {ZKChainBase} from "./facets/ZKChainBase.sol"; -import {L2_TO_L1_LOG_SERIALIZE_SIZE, MAX_GAS_PER_TRANSACTION, DEFAULT_PRECOMMITMENT_FOR_THE_LAST_BATCH} from "../../common/Config.sol"; +import {DEFAULT_PRECOMMITMENT_FOR_THE_LAST_BATCH, L2_TO_L1_LOG_SERIALIZE_SIZE, MAX_GAS_PER_TRANSACTION} from "../../common/Config.sol"; import {IDiamondInit, InitializeData} from "../chain-interfaces/IDiamondInit.sol"; import {PriorityQueue} from "../libraries/PriorityQueue.sol"; import {PriorityTree} from "../libraries/PriorityTree.sol"; @@ -17,13 +17,19 @@ contract DiamondInit is ZKChainBase, IDiamondInit { using PriorityTree for PriorityTree.Tree; using PriorityQueue for PriorityQueue.Queue; + bool public immutable IS_ZKSYNC_OS; + /// @dev Initialize the implementation to prevent any possibility of a Parity hack. - constructor() reentrancyGuardInitializer {} + constructor(bool _isZKOS) reentrancyGuardInitializer { + IS_ZKSYNC_OS = _isZKOS; + } /// @notice ZK chain diamond contract initialization /// @return Magic 32 bytes, which indicates that the contract logic is expected to be used as a diamond proxy /// initializer - function initialize(InitializeData calldata _initializeData) external reentrancyGuardInitializer returns (bytes32) { + function initialize( + InitializeData calldata _initializeData + ) public virtual reentrancyGuardInitializer returns (bytes32) { if (address(_initializeData.verifier) == address(0)) { revert ZeroAddress(); } @@ -77,6 +83,7 @@ contract DiamondInit is ZKChainBase, IDiamondInit { s.feeParams = _initializeData.feeParams; s.priorityTree.setup(s.__DEPRECATED_priorityQueue.getTotalPriorityTxs()); s.precommitmentForTheLatestBatch = DEFAULT_PRECOMMITMENT_FOR_THE_LAST_BATCH; + s.zksyncOS = IS_ZKSYNC_OS; // While this does not provide a protection in the production, it is needed for local testing // Length of the L2Log encoding should not be equal to the length of other L2Logs' tree nodes preimages diff --git a/l1-contracts/contracts/state-transition/chain-deps/GatewayCTMDeployer.sol b/l1-contracts/contracts/state-transition/chain-deps/GatewayCTMDeployer.sol index 61640d136d..dc09606bbb 100644 --- a/l1-contracts/contracts/state-transition/chain-deps/GatewayCTMDeployer.sol +++ b/l1-contracts/contracts/state-transition/chain-deps/GatewayCTMDeployer.sol @@ -12,11 +12,15 @@ import {RollupDAManager} from "../data-availability/RollupDAManager.sol"; import {RelayedSLDAValidator} from "../data-availability/RelayedSLDAValidator.sol"; import {ValidiumL1DAValidator} from "../data-availability/ValidiumL1DAValidator.sol"; -import {DualVerifier} from "../verifiers/DualVerifier.sol"; -import {L1VerifierFflonk} from "../verifiers/L1VerifierFflonk.sol"; -import {L1VerifierPlonk} from "../verifiers/L1VerifierPlonk.sol"; +import {EraDualVerifier} from "../verifiers/EraDualVerifier.sol"; +import {ZKsyncOSDualVerifier} from "../verifiers/ZKsyncOSDualVerifier.sol"; +import {EraVerifierFflonk} from "contracts/state-transition/verifiers/EraVerifierFflonk.sol"; +import {EraVerifierPlonk} from "contracts/state-transition/verifiers/EraVerifierPlonk.sol"; +import {ZKsyncOSVerifierFflonk} from "contracts/state-transition/verifiers/ZKsyncOSVerifierFflonk.sol"; +import {ZKsyncOSVerifierPlonk} from "contracts/state-transition/verifiers/ZKsyncOSVerifierPlonk.sol"; import {IVerifier, VerifierParams} from "../chain-interfaces/IVerifier.sol"; +import {IVerifierV2} from "../chain-interfaces/IVerifierV2.sol"; import {TestnetVerifier} from "../verifiers/TestnetVerifier.sol"; import {ValidatorTimelock} from "../ValidatorTimelock.sol"; import {FeeParams} from "../chain-deps/ZKChainStorage.sol"; @@ -28,6 +32,7 @@ import {Diamond} from "../libraries/Diamond.sol"; import {ChainTypeManager} from "../ChainTypeManager.sol"; import {L2_BRIDGEHUB_ADDR} from "../../common/l2-helpers/L2ContractAddresses.sol"; +import {ROLLUP_L2_DA_COMMITMENT_SCHEME} from "../../common/Config.sol"; import {ProxyAdmin} from "@openzeppelin/contracts-v4/proxy/transparent/ProxyAdmin.sol"; import {TransparentUpgradeableProxy} from "@openzeppelin/contracts-v4/proxy/transparent/TransparentUpgradeableProxy.sol"; @@ -36,6 +41,7 @@ import {ChainCreationParams, ChainTypeManagerInitializeData, IChainTypeManager} import {ServerNotifier} from "../../governance/ServerNotifier.sol"; /// @notice Configuration parameters for deploying the GatewayCTMDeployer contract. +// solhint-disable-next-line gas-struct-packing struct GatewayCTMDeployerConfig { /// @notice Address of the aliased governance contract. address aliasedGovernanceAddress; @@ -45,10 +51,10 @@ struct GatewayCTMDeployerConfig { uint256 eraChainId; /// @notice Chain ID of the L1 chain. uint256 l1ChainId; - /// @notice Address of the Rollup L2 Data Availability Validator. - address rollupL2DAValidatorAddress; /// @notice Flag indicating whether to use the testnet verifier. bool testnetVerifier; + /// @notice Flag indicating whether to use ZKsync OS mode. + bool isZKsyncOS; /// @notice Array of function selectors for the Admin facet. bytes4[] adminSelectors; /// @notice Array of function selectors for the Executor facet. @@ -181,11 +187,11 @@ contract GatewayCTMDeployer { _salt: salt, _eraChainId: eraChainId, _l1ChainId: l1ChainId, - _rollupL2DAValidatorAddress: _config.rollupL2DAValidatorAddress, _aliasedGovernanceAddress: _config.aliasedGovernanceAddress, _deployedContracts: contracts }); - _deployVerifier(salt, _config.testnetVerifier, contracts); + // solhint-disable-next-line func-named-parameters + _deployVerifier(salt, _config.testnetVerifier, _config.isZKsyncOS, contracts, _config.aliasedGovernanceAddress); _deployProxyAdmin(salt, _config.aliasedGovernanceAddress, contracts); @@ -207,7 +213,6 @@ contract GatewayCTMDeployer { /// @param _salt Salt used for CREATE2 deployments. /// @param _eraChainId Era Chain ID. /// @param _l1ChainId L1 Chain ID. - /// @param _rollupL2DAValidatorAddress The expected L2 DA Validator to be /// used by permanent rollups. /// @param _aliasedGovernanceAddress The aliased address of the governnace. /// @param _deployedContracts The struct with deployed contracts, that will be mofiied @@ -216,7 +221,6 @@ contract GatewayCTMDeployer { bytes32 _salt, uint256 _eraChainId, uint256 _l1ChainId, - address _rollupL2DAValidatorAddress, address _aliasedGovernanceAddress, DeployedContracts memory _deployedContracts ) internal { @@ -228,7 +232,6 @@ contract GatewayCTMDeployer { RollupDAManager rollupDAManager = _deployRollupDAContracts( _salt, - _rollupL2DAValidatorAddress, _aliasedGovernanceAddress, _deployedContracts ); @@ -236,7 +239,7 @@ contract GatewayCTMDeployer { new AdminFacet{salt: _salt}(_l1ChainId, rollupDAManager) ); - _deployedContracts.stateTransition.diamondInit = address(new DiamondInit{salt: _salt}()); + _deployedContracts.stateTransition.diamondInit = address(new DiamondInit{salt: _salt}(false)); _deployedContracts.stateTransition.genesisUpgrade = address(new L1GenesisUpgrade{salt: _salt}()); } @@ -294,38 +297,64 @@ contract GatewayCTMDeployer { /// @notice Deploys verifier. /// @param _salt Salt used for CREATE2 deployments. /// @param _testnetVerifier Whether testnet verifier should be used. + /// @param _isZKsyncOS Whether ZKsync OS mode should be used. /// @param _deployedContracts The struct with deployed contracts, that will be mofiied + /// @param _verifierOwner The owner that can add additional verification keys. /// in the process of the execution of this function. function _deployVerifier( bytes32 _salt, bool _testnetVerifier, - DeployedContracts memory _deployedContracts + bool _isZKsyncOS, + DeployedContracts memory _deployedContracts, + address _verifierOwner ) internal { - L1VerifierFflonk fflonkVerifier = new L1VerifierFflonk{salt: _salt}(); - _deployedContracts.stateTransition.verifierFflonk = address(fflonkVerifier); - L1VerifierPlonk verifierPlonk = new L1VerifierPlonk{salt: _salt}(); - _deployedContracts.stateTransition.verifierPlonk = address(verifierPlonk); + address fflonkVerifier; + address verifierPlonk; + + if (_isZKsyncOS) { + fflonkVerifier = address(new ZKsyncOSVerifierFflonk{salt: _salt}()); + verifierPlonk = address(new ZKsyncOSVerifierPlonk{salt: _salt}()); + } else { + fflonkVerifier = address(new EraVerifierFflonk{salt: _salt}()); + verifierPlonk = address(new EraVerifierPlonk{salt: _salt}()); + } + + _deployedContracts.stateTransition.verifierFflonk = fflonkVerifier; + _deployedContracts.stateTransition.verifierPlonk = verifierPlonk; if (_testnetVerifier) { _deployedContracts.stateTransition.verifier = address( - new TestnetVerifier{salt: _salt}(fflonkVerifier, verifierPlonk) + new TestnetVerifier{salt: _salt}( + IVerifierV2(fflonkVerifier), + IVerifier(verifierPlonk), + _verifierOwner, + _isZKsyncOS + ) ); } else { - _deployedContracts.stateTransition.verifier = address( - new DualVerifier{salt: _salt}(fflonkVerifier, verifierPlonk) - ); + if (_isZKsyncOS) { + _deployedContracts.stateTransition.verifier = address( + new ZKsyncOSDualVerifier{salt: _salt}( + IVerifierV2(fflonkVerifier), + IVerifier(verifierPlonk), + _verifierOwner + ) + ); + } else { + _deployedContracts.stateTransition.verifier = address( + new EraDualVerifier{salt: _salt}(IVerifierV2(fflonkVerifier), IVerifier(verifierPlonk)) + ); + } } } /// @notice Deploys DA-related contracts. /// @param _salt Salt used for CREATE2 deployments. - /// @param _rollupL2DAValidatorAddress The expected L2 DA Validator to be /// used by permanent rollups. /// @param _aliasedGovernanceAddress The aliased address of the governnace. /// @param _deployedContracts The struct with deployed contracts, that will be mofiied /// in the process of the execution of this function. function _deployRollupDAContracts( bytes32 _salt, - address _rollupL2DAValidatorAddress, address _aliasedGovernanceAddress, DeployedContracts memory _deployedContracts ) internal returns (RollupDAManager rollupDAManager) { @@ -334,7 +363,7 @@ contract GatewayCTMDeployer { ValidiumL1DAValidator validiumDAValidator = new ValidiumL1DAValidator{salt: _salt}(); RelayedSLDAValidator relayedSLDAValidator = new RelayedSLDAValidator{salt: _salt}(); - rollupDAManager.updateDAPair(address(relayedSLDAValidator), _rollupL2DAValidatorAddress, true); + rollupDAManager.updateDAPair(address(relayedSLDAValidator), ROLLUP_L2_DA_COMMITMENT_SCHEME, true); // Note, that the governance still has to accept it. // It will happen in a separate voting after the deployment is done. diff --git a/l1-contracts/contracts/state-transition/chain-deps/ZKChainStorage.sol b/l1-contracts/contracts/state-transition/chain-deps/ZKChainStorage.sol index 7eb8d14562..a05f7858e0 100644 --- a/l1-contracts/contracts/state-transition/chain-deps/ZKChainStorage.sol +++ b/l1-contracts/contracts/state-transition/chain-deps/ZKChainStorage.sol @@ -5,6 +5,7 @@ pragma solidity 0.8.28; import {IVerifier, VerifierParams} from "../chain-interfaces/IVerifier.sol"; import {PriorityQueue} from "../../state-transition/libraries/PriorityQueue.sol"; import {PriorityTree} from "../../state-transition/libraries/PriorityTree.sol"; +import {L2DACommitmentScheme} from "../../common/Config.sol"; /// @notice Indicates whether an upgrade is initiated and if yes what type /// @param None Upgrade is NOT initiated @@ -159,7 +160,7 @@ struct ZKChainStorage { address l1DAValidator; /// @dev The address of the contract on L2 that is responsible for the data availability verification. /// This contract sends `l2DAValidatorOutputHash` to L1 via L2->L1 system log and it will routed to the `l1DAValidator` contract. - address l2DAValidator; + address __DEPRECATED_l2DAValidator; /// @dev the Asset Id of the baseToken bytes32 baseTokenAssetId; /// @dev If this ZKchain settles on this chain, then this is zero. Otherwise it is the address of the ZKchain that is a @@ -177,4 +178,8 @@ struct ZKChainStorage { /// @dev Whenever the `totalBatchesCommitted` changes, this variable is reset to `DEFAULT_PRECOMMITMENT_FOR_THE_LAST_BATCH` /// (the value of the constant can be found in Config.sol). bytes32 precommitmentForTheLatestBatch; + /// @dev ZKsync OS flag, if `true` state transition is done with ZKsync OS, otherwise Era VM + bool zksyncOS; + /// @dev The scheme of L2 DA commitment. Different L1 validators may use different schemes. + L2DACommitmentScheme l2DACommitmentScheme; } diff --git a/l1-contracts/contracts/state-transition/chain-deps/facets/Admin.sol b/l1-contracts/contracts/state-transition/chain-deps/facets/Admin.sol index b4d49a67da..3f89b59279 100644 --- a/l1-contracts/contracts/state-transition/chain-deps/facets/Admin.sol +++ b/l1-contracts/contracts/state-transition/chain-deps/facets/Admin.sol @@ -5,21 +5,20 @@ pragma solidity 0.8.28; import {IAdmin} from "../../chain-interfaces/IAdmin.sol"; import {IMailbox} from "../../chain-interfaces/IMailbox.sol"; import {Diamond} from "../../libraries/Diamond.sol"; -import {MAX_GAS_PER_TRANSACTION, ZKChainCommitment} from "../../../common/Config.sol"; +import {L1_SETTLEMENT_LAYER_VIRTUAL_ADDRESS, L2DACommitmentScheme, MAX_GAS_PER_TRANSACTION, ZKChainCommitment} from "../../../common/Config.sol"; import {FeeParams, PubdataPricingMode} from "../ZKChainStorage.sol"; import {PriorityTree} from "../../../state-transition/libraries/PriorityTree.sol"; import {PriorityQueue} from "../../../state-transition/libraries/PriorityQueue.sol"; import {IZKChain} from "../../../state-transition/chain-interfaces/IZKChain.sol"; -import {IBridgehub} from "../../../bridgehub/IBridgehub.sol"; +import {IL1Bridgehub} from "../../../bridgehub/IL1Bridgehub.sol"; import {ZKChainBase} from "./ZKChainBase.sol"; import {IChainTypeManager} from "../../IChainTypeManager.sol"; import {IL1GenesisUpgrade} from "../../../upgrades/IL1GenesisUpgrade.sol"; -import {AlreadyPermanentRollup, DenominatorIsZero, DiamondAlreadyFrozen, DiamondNotFrozen, HashMismatch, InvalidDAForPermanentRollup, InvalidPubdataPricingMode, NotAZKChain, PriorityTxPubdataExceedsMaxPubDataPerBatch, ProtocolIdMismatch, ProtocolIdNotGreater, TooMuchGas, Unauthorized} from "../../../common/L1ContractErrors.sol"; -import {AlreadyMigrated, ContractNotDeployed, ExecutedIsNotConsistentWithVerified, InvalidNumberOfBatchHashes, L1DAValidatorAddressIsZero, L2DAValidatorAddressIsZero, NotAllBatchesExecuted, NotChainAdmin, NotEraChain, NotHistoricalRoot, NotL1, NotMigrated, OutdatedProtocolVersion, ProtocolVersionNotUpToDate, VerifiedIsNotConsistentWithCommitted} from "../../L1StateTransitionErrors.sol"; +import {AlreadyPermanentRollup, DenominatorIsZero, DiamondAlreadyFrozen, DiamondNotFrozen, HashMismatch, InvalidDAForPermanentRollup, InvalidL2DACommitmentScheme, InvalidPubdataPricingMode, NotAZKChain, PriorityTxPubdataExceedsMaxPubDataPerBatch, ProtocolIdMismatch, ProtocolIdNotGreater, TooMuchGas, Unauthorized} from "../../../common/L1ContractErrors.sol"; +import {AlreadyMigrated, ContractNotDeployed, ExecutedIsNotConsistentWithVerified, InvalidNumberOfBatchHashes, L1DAValidatorAddressIsZero, NotAllBatchesExecuted, NotChainAdmin, NotEraChain, NotHistoricalRoot, NotL1, NotMigrated, OutdatedProtocolVersion, ProtocolVersionNotUpToDate, VerifiedIsNotConsistentWithCommitted} from "../../L1StateTransitionErrors.sol"; import {RollupDAManager} from "../../data-availability/RollupDAManager.sol"; import {L2_DEPLOYER_SYSTEM_CONTRACT_ADDR} from "../../../common/l2-helpers/L2ContractAddresses.sol"; import {AllowedBytecodeTypes, IL2ContractDeployer} from "../../../common/interfaces/IL2ContractDeployer.sol"; -import {L1_SETTLEMENT_LAYER_VIRTUAL_ADDRESS} from "../../../common/Config.sol"; // While formally the following import is not used, it is needed to inherit documentation from it import {IZKChainBase} from "../../chain-interfaces/IZKChainBase.sol"; @@ -154,31 +153,34 @@ contract AdminFacet is ZKChainBase, IAdmin { return address(ROLLUP_DA_MANAGER); } - /// @notice Sets the DA validator pair with the given addresses. - /// @dev It does not check for these addresses to be non-zero, since when migrating to a new settlement + /// @notice Sets the DA validator pair with the given values. + /// @param _l1DAValidator The address of the L1 DA validator. + /// @param _l2DACommitmentScheme The scheme of the L2 DA commitment. + /// @dev It does not check for these values to be non-zero, since when migrating to a new settlement /// layer, we set them to zero. - function _setDAValidatorPair(address _l1DAValidator, address _l2DAValidator) internal { + function _setDAValidatorPair(address _l1DAValidator, L2DACommitmentScheme _l2DACommitmentScheme) internal { emit NewL1DAValidator(s.l1DAValidator, _l1DAValidator); - emit NewL2DAValidator(s.l2DAValidator, _l2DAValidator); + emit NewL2DACommitmentScheme(s.l2DACommitmentScheme, _l2DACommitmentScheme); s.l1DAValidator = _l1DAValidator; - s.l2DAValidator = _l2DAValidator; + s.l2DACommitmentScheme = _l2DACommitmentScheme; } /// @inheritdoc IAdmin - function setDAValidatorPair(address _l1DAValidator, address _l2DAValidator) external onlyAdmin { + function setDAValidatorPair(address _l1DAValidator, L2DACommitmentScheme _l2DACommitmentScheme) external onlyAdmin { if (_l1DAValidator == address(0)) { revert L1DAValidatorAddressIsZero(); } - if (_l2DAValidator == address(0)) { - revert L2DAValidatorAddressIsZero(); + + if (_l2DACommitmentScheme == L2DACommitmentScheme.NONE) { + revert InvalidL2DACommitmentScheme(uint8(_l2DACommitmentScheme)); } - if (s.isPermanentRollup && !ROLLUP_DA_MANAGER.isPairAllowed(_l1DAValidator, _l2DAValidator)) { + if (s.isPermanentRollup && !ROLLUP_DA_MANAGER.isPairAllowed(_l1DAValidator, _l2DACommitmentScheme)) { revert InvalidDAForPermanentRollup(); } - _setDAValidatorPair(_l1DAValidator, _l2DAValidator); + _setDAValidatorPair(_l1DAValidator, _l2DACommitmentScheme); } /// @inheritdoc IAdmin @@ -187,7 +189,7 @@ contract AdminFacet is ZKChainBase, IAdmin { revert AlreadyPermanentRollup(); } - if (!ROLLUP_DA_MANAGER.isPairAllowed(s.l1DAValidator, s.l2DAValidator)) { + if (!ROLLUP_DA_MANAGER.isPairAllowed(s.l1DAValidator, s.l2DACommitmentScheme)) { // The correct data availability pair should be set beforehand. revert InvalidDAForPermanentRollup(); } @@ -308,10 +310,10 @@ contract AdminFacet is ZKChainBase, IAdmin { // Otherwise a malicious settlement layer could forge an interop message from an Era chain. if (_settlementLayer != L1_SETTLEMENT_LAYER_VIRTUAL_ADDRESS) { uint256 chainId = IZKChain(_settlementLayer).getChainId(); - if (_settlementLayer != IBridgehub(s.bridgehub).getZKChain(chainId)) { + if (_settlementLayer != IL1Bridgehub(s.bridgehub).getZKChain(chainId)) { revert NotAZKChain(_settlementLayer); } - if (s.chainTypeManager != IBridgehub(s.bridgehub).chainTypeManager(chainId)) { + if (s.chainTypeManager != IL1Bridgehub(s.bridgehub).chainTypeManager(chainId)) { revert NotEraChain(); } } @@ -416,7 +418,7 @@ contract AdminFacet is ZKChainBase, IAdmin { // Set the settlement to 0 - as this is the current settlement chain. s.settlementLayer = address(0); - _setDAValidatorPair(address(0), address(0)); + _setDAValidatorPair(address(0), L2DACommitmentScheme.NONE); emit MigrationComplete(); } diff --git a/l1-contracts/contracts/state-transition/chain-deps/facets/Executor.sol b/l1-contracts/contracts/state-transition/chain-deps/facets/Executor.sol index e9c8354901..69551d4b68 100644 --- a/l1-contracts/contracts/state-transition/chain-deps/facets/Executor.sol +++ b/l1-contracts/contracts/state-transition/chain-deps/facets/Executor.sol @@ -3,9 +3,9 @@ pragma solidity 0.8.28; import {ZKChainBase} from "./ZKChainBase.sol"; -import {IBridgehub} from "../../../bridgehub/IBridgehub.sol"; +import {IL1Bridgehub} from "../../../bridgehub/IL1Bridgehub.sol"; import {IMessageRoot} from "../../../bridgehub/IMessageRoot.sol"; -import {COMMIT_TIMESTAMP_APPROXIMATION_DELTA, EMPTY_STRING_KECCAK, L2_TO_L1_LOG_SERIALIZE_SIZE, MAINNET_CHAIN_ID, MAINNET_COMMIT_TIMESTAMP_NOT_OLDER, MAX_L2_TO_L1_LOGS_COMMITMENT_BYTES, PACKED_L2_BLOCK_TIMESTAMP_MASK, PUBLIC_INPUT_SHIFT, TESTNET_COMMIT_TIMESTAMP_NOT_OLDER, DEFAULT_PRECOMMITMENT_FOR_THE_LAST_BATCH, PACKED_L2_PRECOMMITMENT_LENGTH} from "../../../common/Config.sol"; +import {COMMIT_TIMESTAMP_APPROXIMATION_DELTA, DEFAULT_PRECOMMITMENT_FOR_THE_LAST_BATCH, EMPTY_STRING_KECCAK, L2_TO_L1_LOG_SERIALIZE_SIZE, MAINNET_CHAIN_ID, MAINNET_COMMIT_TIMESTAMP_NOT_OLDER, MAX_L2_TO_L1_LOGS_COMMITMENT_BYTES, PACKED_L2_BLOCK_TIMESTAMP_MASK, PACKED_L2_PRECOMMITMENT_LENGTH, PUBLIC_INPUT_SHIFT, TESTNET_COMMIT_TIMESTAMP_NOT_OLDER} from "../../../common/Config.sol"; import {IExecutor, L2_LOG_ADDRESS_OFFSET, L2_LOG_KEY_OFFSET, L2_LOG_VALUE_OFFSET, LogProcessingOutput, MAX_LOG_KEY, SystemLogKey, TOTAL_BLOBS_IN_COMMITMENT} from "../../chain-interfaces/IExecutor.sol"; import {BatchDecoder} from "../../libraries/BatchDecoder.sol"; import {UncheckedMath} from "../../../common/libraries/UncheckedMath.sol"; @@ -14,8 +14,8 @@ import {L2_BOOTLOADER_ADDRESS, L2_SYSTEM_CONTEXT_SYSTEM_CONTRACT_ADDR, L2_TO_L1_ import {IChainTypeManager} from "../../IChainTypeManager.sol"; import {PriorityOpsBatchInfo, PriorityTree} from "../../libraries/PriorityTree.sol"; import {IL1DAValidator, L1DAValidatorOutput} from "../../chain-interfaces/IL1DAValidator.sol"; -import {BatchHashMismatch, BatchNumberMismatch, CanOnlyProcessOneBatch, CantExecuteUnprovenBatches, CantRevertExecutedBatch, HashMismatch, InvalidLogSender, InvalidMessageRoot, InvalidNumberOfBlobs, InvalidProof, InvalidProtocolVersion, InvalidSystemLogsLength, L2TimestampTooBig, LogAlreadyProcessed, MissingSystemLogs, NonIncreasingTimestamp, NonSequentialBatch, PriorityOperationsRollingHashMismatch, RevertedBatchNotAfterNewLastBatch, SystemLogsSizeTooBig, TimeNotReached, TimestampError, TxHashMismatch, UnexpectedSystemLog, UpgradeBatchNumberIsNotZero, ValueMismatch, VerifiedBatchesExceedsCommittedBatches, InvalidBatchNumber, EmptyPrecommitData, PrecommitmentMismatch, InvalidPackedPrecommitmentLength} from "../../../common/L1ContractErrors.sol"; -import {CommitBasedInteropNotSupported, DependencyRootsRollingHashMismatch, InvalidBatchesDataLength, MessageRootIsZero, MismatchL2DAValidator, MismatchNumberOfLayer1Txs} from "../../L1StateTransitionErrors.sol"; +import {BatchHashMismatch, BatchNumberMismatch, CanOnlyProcessOneBatch, CantExecuteUnprovenBatches, CantRevertExecutedBatch, EmptyPrecommitData, HashMismatch, IncorrectBatchChainId, InvalidBatchNumber, InvalidLogSender, InvalidMessageRoot, InvalidNumberOfBlobs, InvalidPackedPrecommitmentLength, InvalidProof, InvalidProtocolVersion, InvalidSystemLogsLength, L2TimestampTooBig, LogAlreadyProcessed, MissingSystemLogs, NonIncreasingTimestamp, NonSequentialBatch, PrecommitmentMismatch, PriorityOperationsRollingHashMismatch, RevertedBatchNotAfterNewLastBatch, SystemLogsSizeTooBig, TimeNotReached, TimestampError, TxHashMismatch, UnexpectedSystemLog, UpgradeBatchNumberIsNotZero, ValueMismatch, VerifiedBatchesExceedsCommittedBatches} from "../../../common/L1ContractErrors.sol"; +import {CommitBasedInteropNotSupported, DependencyRootsRollingHashMismatch, InvalidBatchesDataLength, MessageRootIsZero, MismatchL2DACommitmentScheme, MismatchNumberOfLayer1Txs} from "../../L1StateTransitionErrors.sol"; // While formally the following import is not used, it is needed to inherit documentation from it import {IZKChainBase} from "../../chain-interfaces/IZKChainBase.sol"; @@ -24,6 +24,9 @@ import {InteropRoot} from "../../../common/Messaging.sol"; /// @dev The version that is used for the `Executor` calldata used for relaying the /// stored batch info. uint8 constant RELAYED_EXECUTOR_VERSION = 0; +/// @dev The version that is used for the `Executor` calldata used for relaying the +/// ZKSync OS stored batch info. +uint8 constant RELAYED_EXECUTOR_VERSION_ZKSYNC_OS = 1; /// @title ZK chain Executor contract capable of processing events emitted in the ZK chain protocol. /// @author Matter Labs @@ -136,9 +139,88 @@ contract ExecutorFacet is ZKChainBase, IExecutor { } } + function _commitOneBatchZKsyncOS( + StoredBatchInfo memory _previousBatch, + CommitBatchInfoZKsyncOS memory _newBatch, + bytes32 _expectedSystemContractUpgradeTxHash + ) internal returns (StoredBatchInfo memory storedBatchInfo) { + // only commit next batch + if (_newBatch.batchNumber != _previousBatch.batchNumber + 1) { + revert BatchNumberMismatch(_previousBatch.batchNumber + 1, _newBatch.batchNumber); + } + + // we can just ignore l1 da validator output with ZKsync OS: + // - used state diffs hash correctness verifier within state transition program + // - blobs not supported yet, and likely even once it's supported design will allow to ignore blobs related values anyway + // slither-disable-next-line unused-return + IL1DAValidator(s.l1DAValidator).checkDA({ + _chainId: s.chainId, + _batchNumber: uint256(_newBatch.batchNumber), + _l2DAValidatorOutputHash: _newBatch.daCommitment, + _operatorDAInput: _newBatch.operatorDAInput, + _maxBlobsSupported: TOTAL_BLOBS_IN_COMMITMENT + }); + + if (block.timestamp - COMMIT_TIMESTAMP_NOT_OLDER > _newBatch.firstBlockTimestamp) { + revert TimeNotReached(_newBatch.firstBlockTimestamp, block.timestamp - COMMIT_TIMESTAMP_NOT_OLDER); + } + if (_newBatch.lastBlockTimestamp > block.timestamp + COMMIT_TIMESTAMP_APPROXIMATION_DELTA) { + revert L2TimestampTooBig(); + } + if (_newBatch.chainId != s.chainId) { + revert IncorrectBatchChainId(_newBatch.chainId, s.chainId); + } + + // The batch proof public input can be calculated as keccak256(state_commitment_before & state_commitment_after & batch_output_hash) + // batch output hash commits to information about batch that needs to be opened on l1. + // So below we are calculating batch output hash to later include it in the batch public input and thereby verify batch values correctness. + bytes32 batchOutputHash = keccak256( + abi.encodePacked( + _newBatch.chainId, + _newBatch.firstBlockTimestamp, + _newBatch.lastBlockTimestamp, + uint160(_newBatch.l2DaValidator), + _newBatch.daCommitment, + _newBatch.numberOfLayer1Txs, + _newBatch.priorityOperationsHash, + _newBatch.l2LogsTreeRoot, + _expectedSystemContractUpgradeTxHash, + _newBatch.dependencyRootsRollingHash + ) + ); + + // We are using same stored batch info structure as was used for Era VM state transition. + // But we set some fields differently: + // `batchHash` commitments now contains full commitment to the state and `indexRepeatedStorageChanges` not used(always set to 0) + // `timestamp` is not used anymore(set to 0), for Era we used it to validate that committed batch timestamp is consistent with last stored, + // but in ZKsync OS we are validating it within the state transition program + storedBatchInfo = StoredBatchInfo({ + batchNumber: _newBatch.batchNumber, + batchHash: _newBatch.newStateCommitment, + indexRepeatedStorageChanges: 0, + numberOfLayer1Txs: _newBatch.numberOfLayer1Txs, + priorityOperationsHash: _newBatch.priorityOperationsHash, + l2LogsTreeRoot: _newBatch.l2LogsTreeRoot, + dependencyRootsRollingHash: _newBatch.dependencyRootsRollingHash, + timestamp: 0, + commitment: batchOutputHash + }); + + if (L1_CHAIN_ID != block.chainid) { + // If we are settling on top of Gateway, we always relay the data needed to construct + // a proof for a new batch (and finalize it) even if the data for Gateway transactions has been fully lost. + // For ZKsync OS this data includes only `StoredBatchInfo`: that is needed to commit and prove a batch on top of the previous one. + // slither-disable-next-line unused-return + L2_TO_L1_MESSENGER_SYSTEM_CONTRACT.sendToL1( + abi.encode(RELAYED_EXECUTOR_VERSION_ZKSYNC_OS, storedBatchInfo) + ); + } + } + /// @notice Verifies that a stored precommitment for a given batch matches the expected rolling hash. /// @param _batchNumber The batch number whose precommitment is being verified. /// @param _expectedL2TxsStatusRollingHash The expected rolling hash of L2 transaction statuses for the batch. + /// @dev Note, that precommitments are only supported for Era VM. function _verifyAndResetBatchPrecommitment(uint256 _batchNumber, bytes32 _expectedL2TxsStatusRollingHash) internal { bytes32 storedPrecommitment = s.precommitmentForTheLatestBatch; // The default value for the `storedPrecommitment` is expected to be `DEFAULT_PRECOMMITMENT_FOR_THE_LAST_BATCH`. @@ -266,8 +348,8 @@ contract ExecutorFacet is ZKChainBase, IExecutor { if (logSender != L2_TO_L1_MESSENGER_SYSTEM_CONTRACT_ADDR) { revert InvalidLogSender(logSender, logKey); } - if (s.l2DAValidator != address(uint160(uint256(logValue)))) { - revert MismatchL2DAValidator(); + if (uint256(s.l2DACommitmentScheme) != uint256(logValue)) { + revert MismatchL2DACommitmentScheme(uint256(logValue), uint256(s.l2DACommitmentScheme)); } } else if (logKey == uint256(SystemLogKey.L2_DA_VALIDATOR_OUTPUT_HASH_KEY)) { if (logSender != L2_TO_L1_MESSENGER_SYSTEM_CONTRACT_ADDR) { @@ -378,23 +460,11 @@ contract ExecutorFacet is ZKChainBase, IExecutor { } } - /// @inheritdoc IExecutor - function commitBatchesSharedBridge( - address, // _chainAddress + function _commitBatchesSharedBridgeEra( uint256 _processFrom, uint256 _processTo, bytes calldata _commitData - ) external nonReentrant onlyValidator onlySettlementLayer { - // check that we have the right protocol version - // three comments: - // 1. A chain has to keep their protocol version up to date, as processing a block requires the latest or previous protocol version - // to solve this we will need to add the feature to create batches with only the protocol upgrade tx, without any other txs. - // 2. A chain might become out of sync if it launches while we are in the middle of a protocol upgrade. This would mean they cannot process their genesis upgrade - // as their protocolversion would be outdated, and they also cannot process the protocol upgrade tx as they have a pending upgrade. - // 3. The protocol upgrade is increased in the BaseZkSyncUpgrade, in the executor only the systemContractsUpgradeTxHash is checked - if (!IChainTypeManager(s.chainTypeManager).protocolVersionIsActive(s.protocolVersion)) { - revert InvalidProtocolVersion(); - } + ) internal { (StoredBatchInfo memory lastCommittedBatchData, CommitBatchInfo[] memory newBatchesData) = BatchDecoder .decodeAndCheckCommitData(_commitData, _processFrom, _processTo); // With the new changes for EIP-4844, namely the restriction on number of blobs per block, we only allow for a single batch to be committed at a time. @@ -428,6 +498,60 @@ contract ExecutorFacet is ZKChainBase, IExecutor { s.totalBatchesCommitted = s.totalBatchesCommitted + newBatchesData.length; } + function _commitBatchesSharedBridgeZKsyncOS( + uint256 _processFrom, + uint256 _processTo, + bytes calldata _commitData + ) internal { + (StoredBatchInfo memory lastCommittedBatchData, CommitBatchInfoZKsyncOS[] memory newBatchesData) = BatchDecoder + .decodeAndCheckCommitDataZKsyncOS(_commitData, _processFrom, _processTo); + // With the new changes for EIP-4844, namely the restriction on number of blobs per block, we only allow for a single batch to be committed at a time. + // Note: Don't need to check that `_processFrom` == `_processTo` because there is only one batch, + // and so the range checked in the `decodeAndCheckCommitData` is enough. + if (newBatchesData.length != 1) { + revert CanOnlyProcessOneBatch(); + } + // Check that we commit batches after last committed batch + if (s.storedBatchHashes[s.totalBatchesCommitted] != _hashStoredBatchInfo(lastCommittedBatchData)) { + // incorrect previous batch data + revert BatchHashMismatch( + s.storedBatchHashes[s.totalBatchesCommitted], + _hashStoredBatchInfo(lastCommittedBatchData) + ); + } + + bytes32 systemContractsUpgradeTxHash = s.l2SystemContractsUpgradeTxHash; + bool processSystemUpgradeTx = systemContractsUpgradeTxHash != bytes32(0) && + s.l2SystemContractsUpgradeBatchNumber == 0; + _commitBatchesZKsyncOS(lastCommittedBatchData, newBatchesData, processSystemUpgradeTx); + + s.totalBatchesCommitted = s.totalBatchesCommitted + newBatchesData.length; + } + + /// @inheritdoc IExecutor + function commitBatchesSharedBridge( + address, // _chainAddress + uint256 _processFrom, + uint256 _processTo, + bytes calldata _commitData + ) external nonReentrant onlyValidator onlySettlementLayer { + // check that we have the right protocol version + // three comments: + // 1. A chain has to keep their protocol version up to date, as processing a block requires the latest or previous protocol version + // to solve this we will need to add the feature to create batches with only the protocol upgrade tx, without any other txs. + // 2. A chain might become out of sync if it launches while we are in the middle of a protocol upgrade. This would mean they cannot process their genesis upgrade + // as their protocolversion would be outdated, and they also cannot process the protocol upgrade tx as they have a pending upgrade. + // 3. The protocol upgrade is increased in the BaseZkSyncUpgrade, in the executor only the systemContractsUpgradeTxHash is checked + if (!IChainTypeManager(s.chainTypeManager).protocolVersionIsActive(s.protocolVersion)) { + revert InvalidProtocolVersion(); + } + if (s.zksyncOS) { + _commitBatchesSharedBridgeZKsyncOS(_processFrom, _processTo, _commitData); + } else { + _commitBatchesSharedBridgeEra(_processFrom, _processTo, _commitData); + } + } + /// @dev Commits new batches without any system contracts upgrade. /// @param _lastCommittedBatchData The data of the last committed batch. /// @param _newBatchesData An array of batch data that needs to be committed. @@ -491,6 +615,47 @@ contract ExecutorFacet is ZKChainBase, IExecutor { } } + function _commitBatchesZKsyncOS( + StoredBatchInfo memory _lastCommittedBatchData, + CommitBatchInfoZKsyncOS[] memory _newBatchesData, + bool _processSystemUpgradeTx + ) internal { + bytes32 upgradeTxHash; + if (_processSystemUpgradeTx) { + // While the logic of the contract ensures that the s.l2SystemContractsUpgradeBatchNumber is 0 when _processSystemUpgradeTx is true, + // this check is added just in case. Since it is a hot read, it does not incur noticeable gas cost. + if (s.l2SystemContractsUpgradeBatchNumber != 0) { + revert UpgradeBatchNumberIsNotZero(); + } + + // Save the batch number where the upgrade transaction was executed. + s.l2SystemContractsUpgradeBatchNumber = _newBatchesData[0].batchNumber; + upgradeTxHash = s.l2SystemContractsUpgradeTxHash; + } + + // We disable this check because calldata array length is cheap. + // solhint-disable-next-line gas-length-in-loops + for (uint256 i = 0; i < _newBatchesData.length; i = i.uncheckedInc()) { + _lastCommittedBatchData = _commitOneBatchZKsyncOS( + _lastCommittedBatchData, + _newBatchesData[i], + upgradeTxHash + ); + + s.storedBatchHashes[_lastCommittedBatchData.batchNumber] = _hashStoredBatchInfo(_lastCommittedBatchData); + emit BlockCommit( + _lastCommittedBatchData.batchNumber, + _lastCommittedBatchData.batchHash, + _lastCommittedBatchData.commitment + ); + + // reset upgradeTxHash after the first batch + if (i == 0) { + upgradeTxHash = bytes32(0); + } + } + } + function _rollingHash(bytes32[] memory _hashes) internal pure returns (bytes32) { bytes32 hash = EMPTY_STRING_KECCAK; uint256 nHashes = _hashes.length; @@ -556,7 +721,7 @@ contract ExecutorFacet is ZKChainBase, IExecutor { InteropRoot[] memory _dependencyRoots ) internal view returns (bytes32 dependencyRootsRollingHash) { uint256 length = _dependencyRoots.length; - IMessageRoot messageRootContract = IBridgehub(s.bridgehub).messageRoot(); + IMessageRoot messageRootContract = IL1Bridgehub(s.bridgehub).messageRoot(); for (uint256 i = 0; i < length; i = i.uncheckedInc()) { InteropRoot memory interopRoot = _dependencyRoots[i]; @@ -597,7 +762,7 @@ contract ExecutorFacet is ZKChainBase, IExecutor { // To ease up the migration, we never append messages to message root on L1. if (block.chainid != L1_CHAIN_ID) { // Once the batch is executed, we include its message to the message root. - IMessageRoot messageRootContract = IBridgehub(s.bridgehub).messageRoot(); + IMessageRoot messageRootContract = IMessageRoot(address(IL1Bridgehub(s.bridgehub).messageRoot())); messageRootContract.addChainBatchRoot(s.chainId, _batchNumber, _messageRoot); } } @@ -638,6 +803,7 @@ contract ExecutorFacet is ZKChainBase, IExecutor { } /// @inheritdoc IExecutor + // Warning: removed onlyValidator to make it permisionless. function proveBatchesSharedBridge( address, // _chainAddress uint256 _processBatchFrom, @@ -667,6 +833,7 @@ contract ExecutorFacet is ZKChainBase, IExecutor { } bytes32 prevBatchCommitment = prevBatch.commitment; + bytes32 prevBatchStateCommitment = prevBatch.batchHash; for (uint256 i = 0; i < committedBatchesLength; i = i.uncheckedInc()) { currentTotalBatchesVerified = currentTotalBatchesVerified.uncheckedInc(); if (_hashStoredBatchInfo(committedBatches[i]) != s.storedBatchHashes[currentTotalBatchesVerified]) { @@ -677,9 +844,25 @@ contract ExecutorFacet is ZKChainBase, IExecutor { } bytes32 currentBatchCommitment = committedBatches[i].commitment; - proofPublicInput[i] = _getBatchProofPublicInput(prevBatchCommitment, currentBatchCommitment); + bytes32 currentBatchStateCommitment = committedBatches[i].batchHash; + if (s.zksyncOS) { + proofPublicInput[i] = + uint256( + keccak256( + abi.encodePacked( + prevBatchStateCommitment, + currentBatchStateCommitment, + currentBatchCommitment + ) + ) + ) >> + PUBLIC_INPUT_SHIFT; + } else { + proofPublicInput[i] = _getBatchProofPublicInput(prevBatchCommitment, currentBatchCommitment); + } prevBatchCommitment = currentBatchCommitment; + prevBatchStateCommitment = currentBatchStateCommitment; } if (currentTotalBatchesVerified > s.totalBatchesCommitted) { revert VerifiedBatchesExceedsCommittedBatches(); @@ -692,8 +875,9 @@ contract ExecutorFacet is ZKChainBase, IExecutor { } function _verifyProof(uint256[] memory proofPublicInput, uint256[] memory _proof) internal view { - // We can only process 1 batch proof at a time. - if (proofPublicInput.length != 1) { + // We only allow processing of 1 batch proof at a time on Era Chains. + // We allow processing multiple proofs at once on ZKsync OS Chains. + if (!s.zksyncOS && proofPublicInput.length != 1) { revert CanOnlyProcessOneBatch(); } diff --git a/l1-contracts/contracts/state-transition/chain-deps/facets/Getters.sol b/l1-contracts/contracts/state-transition/chain-deps/facets/Getters.sol index 24e6f33a6e..a878497417 100644 --- a/l1-contracts/contracts/state-transition/chain-deps/facets/Getters.sol +++ b/l1-contracts/contracts/state-transition/chain-deps/facets/Getters.sol @@ -9,11 +9,12 @@ import {PubdataPricingMode} from "../ZKChainStorage.sol"; import {VerifierParams} from "../../../state-transition/chain-interfaces/IVerifier.sol"; import {Diamond} from "../../libraries/Diamond.sol"; import {PriorityTree} from "../../../state-transition/libraries/PriorityTree.sol"; -import {IBridgehub} from "../../../bridgehub/IBridgehub.sol"; +import {IL1Bridgehub} from "../../../bridgehub/IL1Bridgehub.sol"; import {UncheckedMath} from "../../../common/libraries/UncheckedMath.sol"; import {IGetters} from "../../chain-interfaces/IGetters.sol"; import {ILegacyGetters} from "../../chain-interfaces/ILegacyGetters.sol"; import {SemVer} from "../../../common/libraries/SemVer.sol"; +import {L2DACommitmentScheme} from "../../../common/Config.sol"; // While formally the following import is not used, it is needed to inherit documentation from it import {IZKChainBase} from "../../chain-interfaces/IZKChainBase.sol"; @@ -64,7 +65,7 @@ contract GettersFacet is ZKChainBase, IGetters, ILegacyGetters { /// @inheritdoc IGetters function getBaseToken() external view returns (address) { - return IBridgehub(s.bridgehub).baseToken(s.chainId); + return IL1Bridgehub(s.bridgehub).baseToken(s.chainId); } /// @inheritdoc IGetters @@ -237,8 +238,9 @@ contract GettersFacet is ZKChainBase, IGetters, ILegacyGetters { return s.settlementLayer; } - function getDAValidatorPair() external view returns (address, address) { - return (s.l1DAValidator, s.l2DAValidator); + /// @inheritdoc IGetters + function getDAValidatorPair() external view returns (address, L2DACommitmentScheme) { + return (s.l1DAValidator, s.l2DACommitmentScheme); } /*////////////////////////////////////////////////////////////// diff --git a/l1-contracts/contracts/state-transition/chain-deps/facets/Mailbox.sol b/l1-contracts/contracts/state-transition/chain-deps/facets/Mailbox.sol index 5e24e50e98..fa9a6eaef1 100644 --- a/l1-contracts/contracts/state-transition/chain-deps/facets/Mailbox.sol +++ b/l1-contracts/contracts/state-transition/chain-deps/facets/Mailbox.sol @@ -6,7 +6,8 @@ import {Math} from "@openzeppelin/contracts-v4/utils/math/Math.sol"; import {IMailbox} from "../../chain-interfaces/IMailbox.sol"; import {IMailboxImpl} from "../../chain-interfaces/IMailboxImpl.sol"; -import {IBridgehub} from "../../../bridgehub/IBridgehub.sol"; +import {IBridgehubBase} from "../../../bridgehub/IBridgehubBase.sol"; +import {BridgehubBase} from "../../../bridgehub/BridgehubBase.sol"; import {ITransactionFilterer} from "../../chain-interfaces/ITransactionFilterer.sol"; import {PriorityTree} from "../../libraries/PriorityTree.sol"; @@ -18,17 +19,17 @@ import {UncheckedMath} from "../../../common/libraries/UncheckedMath.sol"; import {L2ContractHelper} from "../../../common/l2-helpers/L2ContractHelper.sol"; import {AddressAliasHelper} from "../../../vendor/AddressAliasHelper.sol"; import {ZKChainBase} from "./ZKChainBase.sol"; -import {L1_GAS_PER_PUBDATA_BYTE, MAX_NEW_FACTORY_DEPS, PRIORITY_EXPIRATION, PRIORITY_OPERATION_L2_TX_TYPE, REQUIRED_L2_GAS_PRICE_PER_PUBDATA, SERVICE_TRANSACTION_SENDER, SETTLEMENT_LAYER_RELAY_SENDER} from "../../../common/Config.sol"; +import {L1_GAS_PER_PUBDATA_BYTE, MAX_NEW_FACTORY_DEPS, PRIORITY_EXPIRATION, REQUIRED_L2_GAS_PRICE_PER_PUBDATA, SERVICE_TRANSACTION_SENDER, SETTLEMENT_LAYER_RELAY_SENDER} from "../../../common/Config.sol"; import {L2_BOOTLOADER_ADDRESS, L2_BRIDGEHUB_ADDR} from "../../../common/l2-helpers/L2ContractAddresses.sol"; import {IL1AssetRouter} from "../../../bridge/asset-router/IL1AssetRouter.sol"; -import {BaseTokenGasPriceDenominatorNotSet, BatchNotExecuted, GasPerPubdataMismatch, MsgValueTooLow, OnlyEraSupported, TooManyFactoryDeps, TransactionNotAllowed} from "../../../common/L1ContractErrors.sol"; -import {InvalidChainId, LocalRootIsZero, LocalRootMustBeZero, NotHyperchain, NotL1, NotSettlementLayer} from "../../L1StateTransitionErrors.sol"; +import {BaseTokenGasPriceDenominatorNotSet, BatchNotExecuted, GasPerPubdataMismatch, InvalidChainId, MsgValueTooLow, OnlyEraSupported, TooManyFactoryDeps, TransactionNotAllowed} from "../../../common/L1ContractErrors.sol"; +import {LocalRootIsZero, LocalRootMustBeZero, NotHyperchain, NotL1, NotSettlementLayer} from "../../L1StateTransitionErrors.sol"; // While formally the following import is not used, it is needed to inherit documentation from it import {IZKChainBase} from "../../chain-interfaces/IZKChainBase.sol"; -import {MessageVerification, IMessageVerification} from "./MessageVerification.sol"; +import {IMessageVerification, MessageVerification} from "./MessageVerification.sol"; /// @title ZKsync Mailbox contract providing interfaces for L1 <-> L2 interaction. /// @author Matter Labs @@ -254,10 +255,10 @@ contract MailboxFacet is ZKChainBase, IMailboxImpl, MessageVerification { // to a chain's message root only if the chain has indeed executed its batch on top of it. // // We trust all chains whitelisted by the Bridgehub governance. - if (!IBridgehub(s.bridgehub).whitelistedSettlementLayers(proofData.settlementLayerChainId)) { + if (!IBridgehubBase(s.bridgehub).whitelistedSettlementLayers(proofData.settlementLayerChainId)) { revert NotSettlementLayer(); } - address settlementLayerAddress = IBridgehub(s.bridgehub).getZKChain(proofData.settlementLayerChainId); + address settlementLayerAddress = IBridgehubBase(s.bridgehub).getZKChain(proofData.settlementLayerChainId); return IMailbox(settlementLayerAddress).proveL2LeafInclusion( @@ -313,10 +314,10 @@ contract MailboxFacet is ZKChainBase, IMailboxImpl, MessageVerification { bytes32 _canonicalTxHash, uint64 _expirationTimestamp ) external override onlyL1 returns (bytes32 canonicalTxHash) { - if (!IBridgehub(s.bridgehub).whitelistedSettlementLayers(s.chainId)) { + if (!IBridgehubBase(s.bridgehub).whitelistedSettlementLayers(s.chainId)) { revert NotSettlementLayer(); } - if (IBridgehub(s.bridgehub).getZKChain(_chainId) != msg.sender) { + if (IBridgehubBase(s.bridgehub).getZKChain(_chainId) != msg.sender) { revert NotHyperchain(); } @@ -345,7 +346,7 @@ contract MailboxFacet is ZKChainBase, IMailboxImpl, MessageVerification { ) internal view returns (BridgehubL2TransactionRequest memory) { // solhint-disable-next-line func-named-parameters bytes memory data = abi.encodeCall( - IBridgehub.forwardTransactionOnGateway, + BridgehubBase.forwardTransactionOnGateway, (_chainId, _canonicalTxHash, _expirationTimestamp) ); return @@ -433,6 +434,7 @@ contract MailboxFacet is ZKChainBase, IMailboxImpl, MessageVerification { function _requestL2Transaction(WritePriorityOpParams memory _params) internal returns (bytes32 canonicalTxHash) { BridgehubL2TransactionRequest memory request = _params.request; + // Factory deps are not used in ZKsync OS in non-upgrade transactions. if (request.factoryDeps.length > MAX_NEW_FACTORY_DEPS) { revert TooManyFactoryDeps(); } @@ -492,10 +494,10 @@ contract MailboxFacet is ZKChainBase, IMailboxImpl, MessageVerification { function _serializeL2Transaction( WritePriorityOpParams memory _priorityOpParams - ) internal pure returns (L2CanonicalTransaction memory transaction) { + ) internal view returns (L2CanonicalTransaction memory transaction) { BridgehubL2TransactionRequest memory request = _priorityOpParams.request; transaction = L2CanonicalTransaction({ - txType: PRIORITY_OPERATION_L2_TX_TYPE, + txType: _getPriorityTxType(), from: uint256(uint160(request.sender)), to: uint256(uint160(request.contractL2)), gasLimit: request.l2GasLimit, @@ -520,11 +522,13 @@ contract MailboxFacet is ZKChainBase, IMailboxImpl, MessageVerification { ) internal view returns (L2CanonicalTransaction memory transaction, bytes32 canonicalTxHash) { transaction = _serializeL2Transaction(_priorityOpParams); bytes memory transactionEncoding = abi.encode(transaction); + // solhint-disable-next-line func-named-parameters TransactionValidator.validateL1ToL2Transaction( transaction, transactionEncoding, s.priorityTxMaxGasLimit, - s.feeParams.priorityTxMaxPubdata + s.feeParams.priorityTxMaxPubdata, + s.zksyncOS ); canonicalTxHash = keccak256(transactionEncoding); } @@ -563,7 +567,7 @@ contract MailboxFacet is ZKChainBase, IMailboxImpl, MessageVerification { if (s.chainId != ERA_CHAIN_ID) { revert OnlyEraSupported(); } - address sharedBridge = IBridgehub(s.bridgehub).assetRouter(); + address sharedBridge = IBridgehubBase(s.bridgehub).assetRouter(); IL1AssetRouter(sharedBridge).finalizeWithdrawal({ _chainId: ERA_CHAIN_ID, _l2BatchNumber: _l2BatchNumber, @@ -600,7 +604,7 @@ contract MailboxFacet is ZKChainBase, IMailboxImpl, MessageVerification { refundRecipient: _refundRecipient }) ); - address sharedBridge = IBridgehub(s.bridgehub).assetRouter(); + address sharedBridge = IBridgehubBase(s.bridgehub).assetRouter(); IL1AssetRouter(sharedBridge).bridgehubDepositBaseToken{value: msg.value}( s.chainId, s.baseTokenAssetId, diff --git a/l1-contracts/contracts/state-transition/chain-deps/facets/ZKChainBase.sol b/l1-contracts/contracts/state-transition/chain-deps/facets/ZKChainBase.sol index aad2b56899..93e94b27b4 100644 --- a/l1-contracts/contracts/state-transition/chain-deps/facets/ZKChainBase.sol +++ b/l1-contracts/contracts/state-transition/chain-deps/facets/ZKChainBase.sol @@ -8,7 +8,8 @@ import {PriorityQueue} from "../../libraries/PriorityQueue.sol"; import {PriorityTree} from "../../libraries/PriorityTree.sol"; import {NotSettlementLayer} from "../../L1StateTransitionErrors.sol"; import {Unauthorized} from "../../../common/L1ContractErrors.sol"; -import {IBridgehub} from "../../../bridgehub/IBridgehub.sol"; +import {IL1Bridgehub} from "../../../bridgehub/IL1Bridgehub.sol"; +import {PRIORITY_OPERATION_L2_TX_TYPE, SYSTEM_UPGRADE_L2_TX_TYPE, ZKSYNC_OS_PRIORITY_OPERATION_L2_TX_TYPE, ZKSYNC_OS_SYSTEM_UPGRADE_L2_TX_TYPE} from "../../../common/Config.sol"; /// @title Base contract containing functions accessible to the other facets. /// @author Matter Labs @@ -51,7 +52,7 @@ contract ZKChainBase is ReentrancyGuard { } modifier onlyChainAssetHandler() { - if (msg.sender != IBridgehub(s.bridgehub).chainAssetHandler()) { + if (msg.sender != IL1Bridgehub(s.bridgehub).chainAssetHandler()) { revert Unauthorized(msg.sender); } _; @@ -106,4 +107,12 @@ contract ZKChainBase is ReentrancyGuard { function _getTotalPriorityTxs() internal view returns (uint256) { return s.priorityTree.getTotalPriorityTxs(); } + + function _getPriorityTxType() internal view returns (uint256) { + return s.zksyncOS ? ZKSYNC_OS_PRIORITY_OPERATION_L2_TX_TYPE : PRIORITY_OPERATION_L2_TX_TYPE; + } + + function _getUpgradeTxType() internal view returns (uint256) { + return s.zksyncOS ? ZKSYNC_OS_SYSTEM_UPGRADE_L2_TX_TYPE : SYSTEM_UPGRADE_L2_TX_TYPE; + } } diff --git a/l1-contracts/contracts/state-transition/chain-interfaces/IAdmin.sol b/l1-contracts/contracts/state-transition/chain-interfaces/IAdmin.sol index 60546534c3..73d00b98ba 100644 --- a/l1-contracts/contracts/state-transition/chain-interfaces/IAdmin.sol +++ b/l1-contracts/contracts/state-transition/chain-interfaces/IAdmin.sol @@ -6,7 +6,7 @@ import {IZKChainBase} from "../chain-interfaces/IZKChainBase.sol"; import {Diamond} from "../libraries/Diamond.sol"; import {FeeParams, PubdataPricingMode} from "../chain-deps/ZKChainStorage.sol"; -import {ZKChainCommitment} from "../../common/Config.sol"; +import {L2DACommitmentScheme, ZKChainCommitment} from "../../common/Config.sol"; /// @title The interface of the Admin Contract that controls access rights for contract management. /// @author Matter Labs @@ -78,13 +78,13 @@ interface IAdmin is IZKChainBase { /// @notice Returns address of the RollupDAManager of the ZK Chain. function getRollupDAManager() external view returns (address); - /// @notice Set the L1 DA validator address as well as the L2 DA validator address. - /// @dev While in principle it is possible that updating only one of the addresses is needed, + /// @notice Set the L1 DA validator address as well as the L2 DA commitment scheme. + /// @dev While in principle it is possible that updating only one of the values is needed, /// usually these should work in pair and L1 validator typically expects a specific input from the L2 Validator. /// That's why we change those together to prevent admins of chains from shooting themselves in the foot. /// @param _l1DAValidator The address of the L1 DA validator - /// @param _l2DAValidator The address of the L2 DA validator - function setDAValidatorPair(address _l1DAValidator, address _l2DAValidator) external; + /// @param _l2DACommitmentScheme The scheme of the L2 DA commitment + function setDAValidatorPair(address _l1DAValidator, L2DACommitmentScheme _l2DACommitmentScheme) external; /// @notice Makes the chain as permanent rollup. /// @dev This is a security feature needed for chains that should be @@ -141,8 +141,11 @@ interface IAdmin is IZKChainBase { /// @notice The EVM emulator has been enabled event EnableEvmEmulator(); - /// @notice New pair of DA validators set - event NewL2DAValidator(address indexed oldL2DAValidator, address indexed newL2DAValidator); + /// @notice New L2 DA commitment scheme set + event NewL2DACommitmentScheme( + L2DACommitmentScheme indexed oldL2DACommitmentScheme, + L2DACommitmentScheme indexed newL2DACommitmentScheme + ); event NewL1DAValidator(address indexed oldL1DAValidator, address indexed newL1DAValidator); event BridgeMint(address indexed _account, uint256 _amount); diff --git a/l1-contracts/contracts/state-transition/chain-interfaces/IExecutor.sol b/l1-contracts/contracts/state-transition/chain-interfaces/IExecutor.sol index 4f93cd4186..8f46b3dca1 100644 --- a/l1-contracts/contracts/state-transition/chain-interfaces/IExecutor.sol +++ b/l1-contracts/contracts/state-transition/chain-interfaces/IExecutor.sol @@ -58,26 +58,26 @@ uint256 constant TOTAL_BLOBS_IN_COMMITMENT = 16; /// @author Matter Labs /// @custom:security-contact security@matterlabs.dev interface IExecutor is IZKChainBase { - /// @notice Rollup batch stored data + /// @notice Rollup batch stored data, this structure used for both: Era VM and ZKsync OS batches, however some fields have different meaning /// @param batchNumber Rollup batch number - /// @param batchHash Hash of L2 batch - /// @param indexRepeatedStorageChanges The serial number of the shortcut index that's used as a unique identifier for storage keys that were used twice or more + /// @param batchHash Hash of L2 batch, for ZKsync OS batches we'll store here full state commitment + /// @param indexRepeatedStorageChanges The serial number of the shortcut index that's used as a unique identifier for storage keys that were used twice or more. For ZKsync OS not used, always set to 0 /// @param numberOfLayer1Txs Number of priority operations to be processed /// @param priorityOperationsHash Hash of all priority operations from this batch /// @param l2LogsTreeRoot Root hash of tree that contains L2 -> L1 messages from this batch - /// @param timestamp Rollup batch timestamp, have the same format as Ethereum batch constant - /// @param commitment Verified input for the ZKsync circuit + /// @param timestamp Rollup batch timestamp, have the same format as Ethereum batch constant. For ZKsync OS not used, always set to 0 + /// @param commitment Verified input for the ZKsync circuit. For ZKsync OS batches we'll store batch output hash here // solhint-disable-next-line gas-struct-packing struct StoredBatchInfo { uint64 batchNumber; - bytes32 batchHash; - uint64 indexRepeatedStorageChanges; + bytes32 batchHash; // For ZKsync OS batches we'll store here full state commitment + uint64 indexRepeatedStorageChanges; // For ZKsync OS not used, always set to 0 uint256 numberOfLayer1Txs; bytes32 priorityOperationsHash; bytes32 dependencyRootsRollingHash; bytes32 l2LogsTreeRoot; - uint256 timestamp; - bytes32 commitment; + uint256 timestamp; // For ZKsync OS not used, always set to 0 + bytes32 commitment; // For ZKsync OS batches we'll store batch output hash here } /// @notice Legacy StoredBatchInfo struct @@ -125,6 +125,33 @@ interface IExecutor is IZKChainBase { bytes operatorDAInput; } + /// @notice Commit batch info for ZKsync OS + /// @param batchNumber Number of the committed batch + /// @param newStateCommitment State commitment of the new state. + /// @dev chain state commitment, this preimage is not opened on l1, + /// it's guaranteed that this commitment commits to any state that needed for execution + /// (state root, block number, bloch hahes) + /// @param numberOfLayer1Txs Number of priority operations to be processed + /// @param priorityOperationsHash Hash of all priority operations from this batch + /// @param l2LogsTreeRoot Root hash of tree that contains L2 -> L1 messages from this batch + /// @param l2DaValidator Address of the L2 DA validator + /// @param daCommitment Commitment to the DA input + // solhint-disable-next-line gas-struct-packing + struct CommitBatchInfoZKsyncOS { + uint64 batchNumber; + bytes32 newStateCommitment; + uint256 numberOfLayer1Txs; + bytes32 priorityOperationsHash; + bytes32 dependencyRootsRollingHash; + bytes32 l2LogsTreeRoot; + address l2DaValidator; + bytes32 daCommitment; + uint64 firstBlockTimestamp; + uint64 lastBlockTimestamp; + uint256 chainId; + bytes operatorDAInput; + } + /// @notice Container for a list of transaction statuses to precommit. /// @param txs A packed array of individual transaction status commitments for the batch. Each is expected to be /// of length 33 and have the following format: <32-byte tx hash, 1-byte status>. where status is either 0 (failed) or 1 (success). diff --git a/l1-contracts/contracts/state-transition/chain-interfaces/IGetters.sol b/l1-contracts/contracts/state-transition/chain-interfaces/IGetters.sol index bb8b23aa61..1f0364aeb7 100644 --- a/l1-contracts/contracts/state-transition/chain-interfaces/IGetters.sol +++ b/l1-contracts/contracts/state-transition/chain-interfaces/IGetters.sol @@ -5,6 +5,7 @@ pragma solidity ^0.8.21; import {VerifierParams} from "../chain-interfaces/IVerifier.sol"; import {PubdataPricingMode} from "../chain-deps/ZKChainStorage.sol"; import {IZKChainBase} from "./IZKChainBase.sol"; +import {L2DACommitmentScheme} from "../../common/Config.sol"; /// @title The interface of the Getters Contract that implements functions for getting contract state from outside the blockchain. /// @author Matter Labs @@ -170,4 +171,7 @@ interface IGetters is IZKChainBase { /// @return The address of the current settlement layer. function getSettlementLayer() external view returns (address); + + /// @return DA configuration. + function getDAValidatorPair() external view returns (address, L2DACommitmentScheme); } diff --git a/l1-contracts/contracts/state-transition/data-availability/CalldataDA.sol b/l1-contracts/contracts/state-transition/data-availability/CalldataDA.sol index 323de2ed37..65d9de6a96 100644 --- a/l1-contracts/contracts/state-transition/data-availability/CalldataDA.sol +++ b/l1-contracts/contracts/state-transition/data-availability/CalldataDA.sol @@ -16,7 +16,7 @@ uint256 constant BLOB_DATA_OFFSET = 65; uint256 constant BLOB_COMMITMENT_SIZE = 32; /// @notice Contract that contains the functionality for process the calldata DA. -/// @dev The expected l2DAValidator that should be used with it `RollupL2DAValidator`. +/// @dev The expected L2DACommitmentScheme that should be used with it is `BLOBS_AND_PUBDATA_KECCAK256`. abstract contract CalldataDA { /// @notice Parses the input that the L2 DA validator has provided to the contract. /// @param _l2DAValidatorOutputHash The hash of the output of the L2 DA validator. diff --git a/l1-contracts/contracts/state-transition/data-availability/CalldataDAGateway.sol b/l1-contracts/contracts/state-transition/data-availability/CalldataDAGateway.sol index cbce597a3b..8237de079f 100644 --- a/l1-contracts/contracts/state-transition/data-availability/CalldataDAGateway.sol +++ b/l1-contracts/contracts/state-transition/data-availability/CalldataDAGateway.sol @@ -6,7 +6,7 @@ import {BLOB_COMMITMENT_SIZE, BLOB_SIZE_BYTES, CalldataDA} from "./CalldataDA.so import {InvalidPubdataHash, PubdataInputTooSmall, PubdataLengthTooBig} from "../L1StateTransitionErrors.sol"; /// @notice Contract that contains the functionality for processing the calldata DA. -/// @dev The expected l2DAValidator that should be used with it `RollupL2DAValidator`. +/// @dev The expected L2DACommitmentScheme that should be used with it is `BLOBS_AND_PUBDATA_KECCAK256`. abstract contract CalldataDAGateway is CalldataDA { /// @inheritdoc CalldataDA function _processCalldataDA( diff --git a/l1-contracts/contracts/state-transition/data-availability/RelayedSLDAValidator.sol b/l1-contracts/contracts/state-transition/data-availability/RelayedSLDAValidator.sol index 9e01bb46d9..1ecaebf859 100644 --- a/l1-contracts/contracts/state-transition/data-availability/RelayedSLDAValidator.sol +++ b/l1-contracts/contracts/state-transition/data-availability/RelayedSLDAValidator.sol @@ -5,7 +5,7 @@ pragma solidity 0.8.28; import {IL1DAValidator, L1DAValidatorOutput, PubdataSource} from "../chain-interfaces/IL1DAValidator.sol"; import {CalldataDAGateway} from "./CalldataDAGateway.sol"; -import {IBridgehub} from "../../bridgehub/IBridgehub.sol"; +import {IL2Bridgehub} from "../../bridgehub/IL2Bridgehub.sol"; import {L2_BRIDGEHUB_ADDR, L2_TO_L1_MESSENGER_SYSTEM_CONTRACT} from "../../common/l2-helpers/L2ContractAddresses.sol"; import {BlobHashBlobCommitmentMismatchValue, InvalidPubdataSource, L1DAValidatorInvalidSender} from "../L1StateTransitionErrors.sol"; @@ -23,7 +23,7 @@ contract RelayedSLDAValidator is IL1DAValidator, CalldataDAGateway { function _ensureOnlyChainSender(uint256 _chainId) internal view { // Note that this contract is only supposed to be deployed on L2, where the // bridgehub is predeployed at `L2_BRIDGEHUB_ADDR` address. - if (IBridgehub(L2_BRIDGEHUB_ADDR).getZKChain(_chainId) != msg.sender) { + if (IL2Bridgehub(L2_BRIDGEHUB_ADDR).getZKChain(_chainId) != msg.sender) { revert L1DAValidatorInvalidSender(msg.sender); } } diff --git a/l1-contracts/contracts/state-transition/data-availability/RollupDAManager.sol b/l1-contracts/contracts/state-transition/data-availability/RollupDAManager.sol index 83987a0206..d6b5e8ca5a 100644 --- a/l1-contracts/contracts/state-transition/data-availability/RollupDAManager.sol +++ b/l1-contracts/contracts/state-transition/data-availability/RollupDAManager.sol @@ -2,61 +2,70 @@ pragma solidity ^0.8.18; import {Ownable2Step} from "@openzeppelin/contracts-v4/access/Ownable2Step.sol"; -import {ZeroAddress} from "../../common/L1ContractErrors.sol"; +import {InvalidL2DACommitmentScheme, ZeroAddress} from "../../common/L1ContractErrors.sol"; +import {L2DACommitmentScheme} from "../../common/Config.sol"; /// @title The RollupManager contract /// @author Matter Labs /// @custom:security-contact security@matterlabs.dev -/// @notice Responsible for determining which DA pairs are allowed to be used +/// @notice Responsible for determining which DA configurations (DAPairs) are allowed to be used /// for permanent rollups. contract RollupDAManager is Ownable2Step { /// @dev Mapping to track the status (enabled/disabled) of each DAPair. - mapping(address l1DAValidator => mapping(address l2DAValidator => bool)) public allowedDAPairs; + mapping(address l1DAValidator => mapping(L2DACommitmentScheme => bool)) public isAllowedDAConfiguration; /// @dev Emitted when a DAPair is added or updated. /// @param l1DAValidator Address of the L1 data availability validator. - /// @param l2DAValidator Address of the L2 data availability validator. + /// @param l2DACommitmentScheme The scheme of L2 DA commitment. Different L1 validators may use different schemes. /// @param status Boolean representing the state of the DAPair. - event DAPairUpdated(address indexed l1DAValidator, address indexed l2DAValidator, bool status); + event DAPairUpdated(address indexed l1DAValidator, L2DACommitmentScheme indexed l2DACommitmentScheme, bool status); - /// @dev Modifier to ensure addresses in DAPair are not zero addresses. + /// @dev Modifier to ensure address in DAPair is not zero address and l2DACommitmentScheme is not NONE. /// @param l1DAValidator Address of the L1 data availability validator. - /// @param l2DAValidator Address of the L2 data availability validator. - modifier validAddresses(address l1DAValidator, address l2DAValidator) { - if (l1DAValidator == address(0) || l2DAValidator == address(0)) { + /// @param l2DACommitmentScheme The scheme of L2 DA commitment. Different L1 validators may use different schemes. + modifier validDAConfiguration(address l1DAValidator, L2DACommitmentScheme l2DACommitmentScheme) { + if (l1DAValidator == address(0)) { revert ZeroAddress(); } + + if (l2DACommitmentScheme == L2DACommitmentScheme.NONE) { + revert InvalidL2DACommitmentScheme(uint8(l2DACommitmentScheme)); + } _; } - /// @dev Adds or updates a DAPair in the `allowedDAPairs` mapping. Only callable by the contract owner. + /// @dev Adds or updates a DAPair in the `isAllowedDAConfiguration` mapping. Only callable by the contract owner. /// /// Emits a {DAPairUpdated} event. /// /// @param _l1DAValidator Address of the L1 data availability validator. - /// @param _l2DAValidator Address of the L2 data availability validator. + /// @param _l2DACommitmentScheme The scheme of L2 DA commitment. Different L1 validators may use different schemes. /// @param _status Boolean representing whether the DAPair is active or not. /// /// Requirements: /// - /// - The `l1DAValidator` and `l2DAValidator` must be valid addresses (non-zero). + /// - The `l1DAValidator` must be valid address (non-zero). + /// - The `l2DACommitmentScheme` must be valid scheme (not NONE). /// - Only the owner of the contract can call this function. function updateDAPair( address _l1DAValidator, - address _l2DAValidator, + L2DACommitmentScheme _l2DACommitmentScheme, bool _status - ) external onlyOwner validAddresses(_l1DAValidator, _l2DAValidator) { - allowedDAPairs[_l1DAValidator][_l2DAValidator] = _status; + ) external onlyOwner validDAConfiguration(_l1DAValidator, _l2DACommitmentScheme) { + isAllowedDAConfiguration[_l1DAValidator][_l2DACommitmentScheme] = _status; - emit DAPairUpdated(_l1DAValidator, _l2DAValidator, _status); + emit DAPairUpdated(_l1DAValidator, _l2DACommitmentScheme, _status); } /// @notice Returns whether the DA pair is allowed. /// /// @param _l1DAValidator Address of the L1 data availability validator. - /// @param _l2DAValidator Address of the L2 data availability validator. + /// @param _l2DACommitmentScheme The scheme of L2 DA commitment. Different L1 validators may use different schemes. /// @return bool indicating if the DA pair is allowed. - function isPairAllowed(address _l1DAValidator, address _l2DAValidator) external view returns (bool) { - return allowedDAPairs[_l1DAValidator][_l2DAValidator]; + function isPairAllowed( + address _l1DAValidator, + L2DACommitmentScheme _l2DACommitmentScheme + ) external view returns (bool) { + return isAllowedDAConfiguration[_l1DAValidator][_l2DACommitmentScheme]; } } diff --git a/l1-contracts/contracts/state-transition/l2-deps/IComplexUpgrader.sol b/l1-contracts/contracts/state-transition/l2-deps/IComplexUpgrader.sol index c65c42fc84..e57cabc83a 100644 --- a/l1-contracts/contracts/state-transition/l2-deps/IComplexUpgrader.sol +++ b/l1-contracts/contracts/state-transition/l2-deps/IComplexUpgrader.sol @@ -6,6 +6,28 @@ import {IL2ContractDeployer} from "../../common/interfaces/IL2ContractDeployer.s /// @author Matter Labs /// @custom:security-contact security@matterlabs.dev interface IComplexUpgrader { + /// @notice Information about the force deployment. + /// @dev This struct is used to store the information about the force deployment. + /// @dev For ZKsyncOS, the `deployedBytecodeInfo` is the abi-encoded tuple of `(bytes32, uint32, bytes32)`, + /// for Era, it is the abi-encoded `bytes32`. + /// @dev Note, that ZKsyncOS does not support constructors, so the `deployedBytecodeInfo` should only describe the + /// deployed bytecode. + /// @param isZKsyncOS whether the deployment is for ZKsyncOS or Era. + /// @param deployedBytecodeInfo the bytecode information for deployment. + /// @param newAddress the address where the contract should be deployed. + // solhint-disable-next-line gas-struct-packing + struct UniversalForceDeploymentInfo { + bool isZKsyncOS; + bytes deployedBytecodeInfo; + address newAddress; + } + + /// @notice Executes an upgrade process by delegating calls to another contract. + /// @dev Compatible with Era only. + /// @param _forceDeployments the list of initial deployments that should be performed before the upgrade. + /// They would typically, though not necessarily include the deployment of the upgrade implementation itself. + /// @param _delegateTo the address of the contract to which the calls will be delegated + /// @param _calldata the calldata to be delegate called in the `_delegateTo` contract function forceDeployAndUpgrade( IL2ContractDeployer.ForceDeployment[] calldata _forceDeployments, address _delegateTo, diff --git a/l1-contracts/contracts/state-transition/l2-deps/IL2GenesisUpgrade.sol b/l1-contracts/contracts/state-transition/l2-deps/IL2GenesisUpgrade.sol index 704fe916c5..22a406f39f 100644 --- a/l1-contracts/contracts/state-transition/l2-deps/IL2GenesisUpgrade.sol +++ b/l1-contracts/contracts/state-transition/l2-deps/IL2GenesisUpgrade.sol @@ -38,11 +38,12 @@ struct FixedForceDeploymentsData { bytes32 l2TokenProxyBytecodeHash; address aliasedL1Governance; uint256 maxNumberOfZKChains; - bytes32 bridgehubBytecodeHash; - bytes32 l2AssetRouterBytecodeHash; - bytes32 l2NtvBytecodeHash; - bytes32 messageRootBytecodeHash; - bytes32 chainAssetHandlerBytecodeHash; + bytes bridgehubBytecodeInfo; + bytes l2AssetRouterBytecodeInfo; + bytes l2NtvBytecodeInfo; + bytes messageRootBytecodeInfo; + bytes chainAssetHandlerBytecodeInfo; + bytes beaconDeployerInfo; address l2SharedBridgeLegacyImpl; address l2BridgedStandardERC20Impl; // The forced beacon address. It is needed only for internal testing. @@ -57,9 +58,10 @@ interface IL2GenesisUpgrade { event UpgradeComplete(uint256 _chainId); function genesisUpgrade( + bool _isZKsyncOS, uint256 _chainId, address _ctmDeployer, bytes calldata _fixedForceDeploymentsData, bytes calldata _additionalForceDeploymentsData - ) external payable; + ) external; } diff --git a/l1-contracts/contracts/state-transition/libraries/BatchDecoder.sol b/l1-contracts/contracts/state-transition/libraries/BatchDecoder.sol index 6a9e3b2e77..2a508c017d 100644 --- a/l1-contracts/contracts/state-transition/libraries/BatchDecoder.sol +++ b/l1-contracts/contracts/state-transition/libraries/BatchDecoder.sol @@ -15,6 +15,9 @@ import {InteropRoot} from "../../common/Messaging.sol"; library BatchDecoder { /// @notice The currently supported encoding version. uint8 internal constant SUPPORTED_ENCODING_VERSION = 1; + /// @notice The currently supported encoding version for ZKSync OS commit data. + /// We use different encoding only for commit, while prove/execute are common for Era VM and ZKsync OS chains. + uint8 internal constant SUPPORTED_ENCODING_VERSION_COMMIT_ZKSYNC_OS = 2; /// @notice Decodes commit data from a calldata bytes into the last committed batch data and an array of new batch data. /// @param _commitData The calldata byte array containing the data for committing batches. @@ -45,6 +48,34 @@ library BatchDecoder { } } + // exactly the same as regular `_decodeCommitData`, except for 2 differences: + // - encoding version is different + // - uses different structure for the commit batch info + function _decodeCommitDataZKsyncOS( + bytes calldata _commitData + ) + private + pure + returns ( + IExecutor.StoredBatchInfo memory lastCommittedBatchData, + IExecutor.CommitBatchInfoZKsyncOS[] memory newBatchesData + ) + { + if (_commitData.length == 0) { + revert EmptyData(); + } + + uint8 encodingVersion = uint8(_commitData[0]); + if (encodingVersion == SUPPORTED_ENCODING_VERSION_COMMIT_ZKSYNC_OS) { + (lastCommittedBatchData, newBatchesData) = abi.decode( + _commitData[1:], + (IExecutor.StoredBatchInfo, IExecutor.CommitBatchInfoZKsyncOS[]) + ); + } else { + revert UnsupportedCommitBatchEncoding(encodingVersion); + } + } + /// @notice Decodes and validates precommit data for a batch, ensuring the encoding version is supported. /// @dev The first byte of `_precommitData` is interpreted as the encoding version and must equal `SUPPORTED_ENCODING_VERSION`. /// If it does, the remainder of the data is decoded into an `IExecutor.PrecommitInfo` struct. Otherwise, this call reverts. @@ -100,6 +131,39 @@ library BatchDecoder { } } + // exactly the same as regular `decodeAndCheckCommitData`, except for one difference: + // uses different structure for the commit batch info + function decodeAndCheckCommitDataZKsyncOS( + bytes calldata _commitData, + uint256 _processBatchFrom, + uint256 _processBatchTo + ) + internal + pure + returns ( + IExecutor.StoredBatchInfo memory lastCommittedBatchData, + IExecutor.CommitBatchInfoZKsyncOS[] memory newBatchesData + ) + { + (lastCommittedBatchData, newBatchesData) = _decodeCommitDataZKsyncOS(_commitData); + + if (newBatchesData.length == 0) { + revert EmptyData(); + } + + if ( + newBatchesData[0].batchNumber != _processBatchFrom || + newBatchesData[newBatchesData.length - 1].batchNumber != _processBatchTo + ) { + revert IncorrectBatchBounds( + _processBatchFrom, + _processBatchTo, + newBatchesData[0].batchNumber, + newBatchesData[newBatchesData.length - 1].batchNumber + ); + } + } + /// @notice Decodes proof data from a calldata byte array into the previous batch, an array of proved batches, and a proof array. /// @param _proofData The calldata byte array containing the data for proving batches. /// @return prevBatch The batch information before the batches to be verified. diff --git a/l1-contracts/contracts/state-transition/libraries/TransactionValidator.sol b/l1-contracts/contracts/state-transition/libraries/TransactionValidator.sol index 2cb98889e5..5aaf03e472 100644 --- a/l1-contracts/contracts/state-transition/libraries/TransactionValidator.sol +++ b/l1-contracts/contracts/state-transition/libraries/TransactionValidator.sol @@ -5,8 +5,8 @@ pragma solidity ^0.8.21; import {Math} from "@openzeppelin/contracts-v4/utils/math/Math.sol"; import {L2CanonicalTransaction} from "../../common/Messaging.sol"; -import {L1_TX_DELTA_544_ENCODING_BYTES, L1_TX_DELTA_FACTORY_DEPS_L2_GAS, L1_TX_DELTA_FACTORY_DEPS_PUBDATA, L1_TX_INTRINSIC_L2_GAS, L1_TX_INTRINSIC_PUBDATA, L1_TX_MIN_L2_GAS_BASE, MEMORY_OVERHEAD_GAS, TX_SLOT_OVERHEAD_L2_GAS} from "../../common/Config.sol"; -import {InvalidUpgradeTxn, PubdataGreaterThanLimit, TooMuchGas, TxnBodyGasLimitNotEnoughGas, UpgradeTxVerifyParam, ValidateTxnNotEnoughGas} from "../../common/L1ContractErrors.sol"; +import {L1_TX_CALLDATA_COST_NATIVE_ZKSYNC_OS, L1_TX_CALLDATA_PRICE_L2_GAS_ZKSYNC_OS, L1_TX_DELTA_544_ENCODING_BYTES, L1_TX_DELTA_FACTORY_DEPS_L2_GAS, L1_TX_DELTA_FACTORY_DEPS_PUBDATA, L1_TX_ENCODING_136_BYTES_COST_NATIVE_ZKSYNC_OS, L1_TX_INTRINSIC_L2_GAS, L1_TX_INTRINSIC_L2_GAS_ZKSYNC_OS, L1_TX_INTRINSIC_PUBDATA, L1_TX_INTRINSIC_PUBDATA_ZSKYNC_OS, L1_TX_MINIMAL_GAS_LIMIT_ZSKYNC_OS, L1_TX_MIN_L2_GAS_BASE, L1_TX_STATIC_NATIVE_ZKSYNC_OS, MEMORY_OVERHEAD_GAS, TX_SLOT_OVERHEAD_L2_GAS, UPGRADE_TX_NATIVE_PER_GAS, ZKSYNC_OS_L1_TX_NATIVE_PRICE, ZKSYNC_OS_SYSTEM_UPGRADE_L2_TX_TYPE} from "../../common/Config.sol"; +import {InvalidUpgradeTxn, PubdataGreaterThanLimit, TooMuchGas, TxnBodyGasLimitNotEnoughGas, UpgradeTxVerifyParam, ValidateTxnNotEnoughGas, ZeroGasPriceL1TxZKSyncOS} from "../../common/L1ContractErrors.sol"; /// @title ZKsync Library for validating L1 -> L2 transactions /// @author Matter Labs @@ -17,13 +17,15 @@ library TransactionValidator { /// @param _encoded The abi encoded bytes of the transaction /// @param _priorityTxMaxGasLimit The max gas limit, generally provided from Storage.sol /// @param _priorityTxMaxPubdata The maximal amount of pubdata that a single L1->L2 transaction can emit + /// @param zksyncOS ZKsync OS state transition flag function validateL1ToL2Transaction( L2CanonicalTransaction memory _transaction, bytes memory _encoded, uint256 _priorityTxMaxGasLimit, - uint256 _priorityTxMaxPubdata + uint256 _priorityTxMaxPubdata, + bool zksyncOS ) internal pure { - uint256 l2GasForTxBody = getTransactionBodyGasLimit(_transaction.gasLimit, _encoded.length); + uint256 l2GasForTxBody = getTransactionBodyGasLimit(_transaction.gasLimit, _encoded.length, zksyncOS); // Ensuring that the transaction is provable if (l2GasForTxBody > _priorityTxMaxGasLimit) { @@ -34,13 +36,24 @@ library TransactionValidator { revert PubdataGreaterThanLimit(_priorityTxMaxPubdata, l2GasForTxBody / _transaction.gasPerPubdataByteLimit); } + // Currently we don't support L1->L2 transactions with 0 `maxFeePerGas` in ZKSyncOS, + // it's allowed only for upgrade transactions. + // It should be ensured by constants in FeeParams, although we are double-checking it just in case. + if (zksyncOS && _transaction.maxFeePerGas == 0 && _transaction.txType != ZKSYNC_OS_SYSTEM_UPGRADE_L2_TX_TYPE) { + revert ZeroGasPriceL1TxZKSyncOS(); + } + // Ensuring that the transaction covers the minimal costs for its processing: // hashing its content, publishing the factory dependencies, etc. if ( + // solhint-disable-next-line func-named-parameters getMinimalPriorityTransactionGasLimit( _encoded.length, + _transaction.data.length, _transaction.factoryDeps.length, - _transaction.gasPerPubdataByteLimit + _transaction.gasPerPubdataByteLimit, + _transaction.maxFeePerGas, + zksyncOS ) > l2GasForTxBody ) { revert ValidateTxnNotEnoughGas(); @@ -96,41 +109,78 @@ library TransactionValidator { /// @param _encodingLength The length of the priority transaction encoding in bytes. /// @param _numberOfFactoryDependencies The number of new factory dependencies that will be added. /// @param _l2GasPricePerPubdata The L2 gas price for publishing the priority transaction on L2. + /// @param _maxFeePerGas The maximal gas price for the transaction. + /// @param zksyncOS ZKsync OS state transition flag /// @return The minimum gas limit required to execute the priority transaction. /// Note: The calculation includes the main cost of the priority transaction, however, in reality, the operator can spend a little more gas on overheads. function getMinimalPriorityTransactionGasLimit( uint256 _encodingLength, + uint256 _calldataLength, uint256 _numberOfFactoryDependencies, - uint256 _l2GasPricePerPubdata + uint256 _l2GasPricePerPubdata, + uint256 _maxFeePerGas, + bool zksyncOS ) internal pure returns (uint256) { - uint256 costForComputation; - { - // Adding the intrinsic cost for the transaction, i.e. auxiliary prices which cannot be easily accounted for - costForComputation = L1_TX_INTRINSIC_L2_GAS; - - // Taking into account the hashing costs that depend on the length of the transaction - // Note that L1_TX_DELTA_544_ENCODING_BYTES is the delta in the price for every 544 bytes of - // the transaction's encoding. It is taken as LCM between 136 and 32 (the length for each keccak256 round - // and the size of each new encoding word). - costForComputation += Math.ceilDiv(_encodingLength * L1_TX_DELTA_544_ENCODING_BYTES, 544); - - // Taking into the account the additional costs of providing new factory dependencies - costForComputation += _numberOfFactoryDependencies * L1_TX_DELTA_FACTORY_DEPS_L2_GAS; - - // There is a minimal amount of computational L2 gas that the transaction should cover - costForComputation = Math.max(costForComputation, L1_TX_MIN_L2_GAS_BASE); - } - - uint256 costForPubdata = 0; - { - // Adding the intrinsic cost for the transaction, i.e. auxiliary prices which cannot be easily accounted for - costForPubdata = L1_TX_INTRINSIC_PUBDATA * _l2GasPricePerPubdata; - - // Taking into the account the additional costs of providing new factory dependencies - costForPubdata += _numberOfFactoryDependencies * L1_TX_DELTA_FACTORY_DEPS_PUBDATA * _l2GasPricePerPubdata; + if (zksyncOS) { + uint256 gasCost = L1_TX_INTRINSIC_L2_GAS_ZKSYNC_OS; + // we are always a bit overcharging for zero bytes + gasCost += L1_TX_CALLDATA_PRICE_L2_GAS_ZKSYNC_OS * _calldataLength; + + uint256 nativeComputationalCost = L1_TX_STATIC_NATIVE_ZKSYNC_OS; // static computational native part + nativeComputationalCost += + Math.max(1, Math.ceilDiv(_encodingLength, 136)) * + L1_TX_ENCODING_136_BYTES_COST_NATIVE_ZKSYNC_OS; // dynamic computational native part for hashing + nativeComputationalCost += _calldataLength * L1_TX_CALLDATA_COST_NATIVE_ZKSYNC_OS; // dynamic computational part for calldata + uint256 gasNeededToCoverComputationalNative; + // 0 gas price is possible only for upgrade transactions currently, it's validated before calling this method. + // In the future, we may redesign our fee model to support zero gas price for L1->L2 transactions. + if (_maxFeePerGas == 0) { + gasNeededToCoverComputationalNative = nativeComputationalCost / UPGRADE_TX_NATIVE_PER_GAS; + } else { + gasNeededToCoverComputationalNative = + (nativeComputationalCost * ZKSYNC_OS_L1_TX_NATIVE_PRICE) / + _maxFeePerGas; + } + + uint256 pubdataGasCost = L1_TX_INTRINSIC_PUBDATA_ZSKYNC_OS * _l2GasPricePerPubdata; + + uint256 totalGasForNative = gasNeededToCoverComputationalNative + pubdataGasCost; + + // We have `L1_TX_MINIMAL_GAS_LIMIT_ZSKYNC_OS` to be extra safe + return Math.max(Math.max(gasCost, totalGasForNative), L1_TX_MINIMAL_GAS_LIMIT_ZSKYNC_OS); + } else { + uint256 costForComputation; + { + // Adding the intrinsic cost for the transaction, i.e. auxiliary prices which cannot be easily accounted for + costForComputation = L1_TX_INTRINSIC_L2_GAS; + + // Taking into account the hashing costs that depend on the length of the transaction + // Note that L1_TX_DELTA_544_ENCODING_BYTES is the delta in the price for every 544 bytes of + // the transaction's encoding. It is taken as LCM between 136 and 32 (the length for each keccak256 round + // and the size of each new encoding word). + costForComputation += Math.ceilDiv(_encodingLength * L1_TX_DELTA_544_ENCODING_BYTES, 544); + + // Taking into the account the additional costs of providing new factory dependencies + costForComputation += _numberOfFactoryDependencies * L1_TX_DELTA_FACTORY_DEPS_L2_GAS; + + // There is a minimal amount of computational L2 gas that the transaction should cover + costForComputation = Math.max(costForComputation, L1_TX_MIN_L2_GAS_BASE); + } + + uint256 costForPubdata = 0; + { + // Adding the intrinsic cost for the transaction, i.e. auxiliary prices which cannot be easily accounted for + costForPubdata = L1_TX_INTRINSIC_PUBDATA * _l2GasPricePerPubdata; + + // Taking into the account the additional costs of providing new factory dependencies + costForPubdata += + _numberOfFactoryDependencies * + L1_TX_DELTA_FACTORY_DEPS_PUBDATA * + _l2GasPricePerPubdata; + } + + return costForComputation + costForPubdata; } - - return costForComputation + costForPubdata; } /// @notice Based on the full L2 gas limit (that includes the batch overhead) and other @@ -138,10 +188,16 @@ library TransactionValidator { /// @param _totalGasLimit The L2 gas limit that includes both the overhead for processing the batch /// and the L2 gas needed to process the transaction itself (i.e. the actual l2GasLimit that will be used for the transaction). /// @param _encodingLength The length of the ABI-encoding of the transaction. + /// @param zksyncOS ZKsync OS state transition flag function getTransactionBodyGasLimit( uint256 _totalGasLimit, - uint256 _encodingLength + uint256 _encodingLength, + bool zksyncOS ) internal pure returns (uint256 txBodyGasLimit) { + // There is no overhead in ZKsync OS + if (zksyncOS) { + return _totalGasLimit; + } uint256 overhead = getOverheadForTransaction(_encodingLength); // provided gas limit doesn't cover transaction overhead diff --git a/l1-contracts/contracts/state-transition/verifiers/DualVerifier.sol b/l1-contracts/contracts/state-transition/verifiers/EraDualVerifier.sol similarity index 99% rename from l1-contracts/contracts/state-transition/verifiers/DualVerifier.sol rename to l1-contracts/contracts/state-transition/verifiers/EraDualVerifier.sol index 8dab693430..7e969a6c6a 100644 --- a/l1-contracts/contracts/state-transition/verifiers/DualVerifier.sol +++ b/l1-contracts/contracts/state-transition/verifiers/EraDualVerifier.sol @@ -13,7 +13,7 @@ import {EmptyProofLength, UnknownVerifierType} from "../../common/L1ContractErro /// to the correct verifier based on the provided proof type. It reuses the same interface as on the original `Verifier` /// contract, while abusing on of the fields (`_recursiveAggregationInput`) for proof verification type. The contract is /// needed for the smooth transition from PLONK based verifier to the FFLONK verifier. -contract DualVerifier is IVerifier { +contract EraDualVerifier is IVerifier { /// @notice The latest FFLONK verifier contract. IVerifierV2 public immutable FFLONK_VERIFIER; diff --git a/l1-contracts/contracts/state-transition/verifiers/L1VerifierFflonk.sol b/l1-contracts/contracts/state-transition/verifiers/EraVerifierFflonk.sol similarity index 99% rename from l1-contracts/contracts/state-transition/verifiers/L1VerifierFflonk.sol rename to l1-contracts/contracts/state-transition/verifiers/EraVerifierFflonk.sol index d7f5273a22..21548099fb 100644 --- a/l1-contracts/contracts/state-transition/verifiers/L1VerifierFflonk.sol +++ b/l1-contracts/contracts/state-transition/verifiers/EraVerifierFflonk.sol @@ -11,7 +11,7 @@ import {IVerifierV2} from "../chain-interfaces/IVerifierV2.sol"; /// * Fflonk Paper: https://eprint.iacr.org/2021/1167 /// @dev Contract was generated from a verification key with a hash of 0x49eae0bf5c7ea580f4979b366e52b386adc5f42e2ce50fc1d3c4de9a86052bff /// @custom:security-contact security@matterlabs.dev -contract L1VerifierFflonk is IVerifierV2 { +contract EraVerifierFflonk is IVerifierV2 { // ================Constants================ uint32 internal constant DST_0 = 0; uint32 internal constant DST_1 = 1; diff --git a/l1-contracts/contracts/state-transition/verifiers/L1VerifierPlonk.sol b/l1-contracts/contracts/state-transition/verifiers/EraVerifierPlonk.sol similarity index 99% rename from l1-contracts/contracts/state-transition/verifiers/L1VerifierPlonk.sol rename to l1-contracts/contracts/state-transition/verifiers/EraVerifierPlonk.sol index ec763fc091..5399adf2de 100644 --- a/l1-contracts/contracts/state-transition/verifiers/L1VerifierPlonk.sol +++ b/l1-contracts/contracts/state-transition/verifiers/EraVerifierPlonk.sol @@ -18,7 +18,7 @@ import {IVerifier} from "../chain-interfaces/IVerifier.sol"; /// * Plonk for ZKsync v1.1: https://github.com/matter-labs/solidity_plonk_verifier/raw/recursive/bellman_vk_codegen_recursive/RecursivePlonkUnrolledForEthereum.pdf /// The notation used in the code is the same as in the papers. /* solhint-enable max-line-length */ -contract L1VerifierPlonk is IVerifier { +contract EraVerifierPlonk is IVerifier { /*////////////////////////////////////////////////////////////// Verification keys //////////////////////////////////////////////////////////////*/ diff --git a/l1-contracts/contracts/state-transition/verifiers/TestnetVerifier.sol b/l1-contracts/contracts/state-transition/verifiers/TestnetVerifier.sol index df7c0febd1..6195d3d14a 100644 --- a/l1-contracts/contracts/state-transition/verifiers/TestnetVerifier.sol +++ b/l1-contracts/contracts/state-transition/verifiers/TestnetVerifier.sol @@ -2,7 +2,8 @@ pragma solidity 0.8.28; -import {DualVerifier} from "./DualVerifier.sol"; +import {EraDualVerifier} from "./EraDualVerifier.sol"; +import {ZKsyncOSDualVerifier} from "./ZKsyncOSDualVerifier.sol"; import {IVerifierV2} from "../chain-interfaces/IVerifierV2.sol"; import {IVerifier} from "../chain-interfaces/IVerifier.sol"; @@ -12,9 +13,17 @@ import {IVerifier} from "../chain-interfaces/IVerifier.sol"; /// @dev This contract is used to skip the zkp verification for the testnet environment. /// If the proof is not empty, it will verify it using the main verifier contract, /// otherwise, it will skip the verification. -contract TestnetVerifier is DualVerifier { - constructor(IVerifierV2 _fflonkVerifier, IVerifier _plonkVerifier) DualVerifier(_fflonkVerifier, _plonkVerifier) { +contract TestnetVerifier is IVerifier { + IVerifier public immutable dualVerifier; + + constructor(IVerifierV2 _fflonkVerifier, IVerifier _plonkVerifier, address _ctmOwner, bool _isZKsyncOS) { assert(block.chainid != 1); + + if (_isZKsyncOS) { + dualVerifier = new ZKsyncOSDualVerifier(_fflonkVerifier, _plonkVerifier, _ctmOwner); + } else { + dualVerifier = new EraDualVerifier(_fflonkVerifier, _plonkVerifier); + } } /// @dev Verifies a zk-SNARK proof, skipping the verification if the proof is empty. @@ -26,6 +35,11 @@ contract TestnetVerifier is DualVerifier { return true; } - return super.verify(_publicInputs, _proof); + return dualVerifier.verify(_publicInputs, _proof); + } + + /// @inheritdoc IVerifier + function verificationKeyHash() external view override returns (bytes32) { + return dualVerifier.verificationKeyHash(); } } diff --git a/l1-contracts/contracts/state-transition/verifiers/ZKsyncOSDualVerifier.sol b/l1-contracts/contracts/state-transition/verifiers/ZKsyncOSDualVerifier.sol new file mode 100644 index 0000000000..183409aba6 --- /dev/null +++ b/l1-contracts/contracts/state-transition/verifiers/ZKsyncOSDualVerifier.sol @@ -0,0 +1,207 @@ +// SPDX-License-Identifier: MIT + +pragma solidity 0.8.28; + +import {OnlyCtmOwner, UnknownVerifierVersion} from "../L1StateTransitionErrors.sol"; +import {IVerifierV2} from "../chain-interfaces/IVerifierV2.sol"; +import {IVerifier} from "../chain-interfaces/IVerifier.sol"; +import {EmptyProofLength, UnknownVerifierType} from "../../common/L1ContractErrors.sol"; + +// 0xd08a97e6 +error InvalidMockProofLength(); +// 0x09bde339 +error InvalidProof(); + +// 0x616008dd +error UnsupportedChainIdForMockVerifier(); + +/// @title Dual Verifier +/// @author Matter Labs +/// @custom:security-contact security@matterlabs.dev +/// @notice This contract wraps two different verifiers (FFLONK and PLONK) and routes zk-SNARK proof verification +/// to the correct verifier based on the provided proof type. It reuses the same interface as on the original `Verifier` +/// contract, while abusing on of the fields (`_recursiveAggregationInput`) for proof verification type. The contract is +/// needed for the smooth transition from PLONK based verifier to the FFLONK verifier. +contract ZKsyncOSDualVerifier is IVerifier { + /// @notice Type of verification for FFLONK verifier. + uint256 internal constant FFLONK_VERIFICATION_TYPE = 0; + + /// @notice Type of verification for PLONK verifier. + uint256 internal constant PLONK_VERIFICATION_TYPE = 1; + + uint256 internal constant ZKSYNC_OS_PLONK_VERIFICATION_TYPE = 2; + + // @notice This is test only verifier (mock), and must be removed before prod. + uint256 internal constant ZKSYNC_OS_MOCK_VERIFICATION_TYPE = 3; + + address public ctmOwner; + + mapping(uint32 => IVerifierV2) public fflonkVerifiers; + mapping(uint32 => IVerifier) public plonkVerifiers; + + /// @param _fflonkVerifier The address of the FFLONK verifier contract. + /// @param _plonkVerifier The address of the PLONK verifier contract. + /// @param _ctmOwner The address of the contract owner, who can add or remove verifiers. + constructor(IVerifierV2 _fflonkVerifier, IVerifier _plonkVerifier, address _ctmOwner) { + ctmOwner = _ctmOwner; + fflonkVerifiers[0] = _fflonkVerifier; + plonkVerifiers[0] = _plonkVerifier; + } + + function addVerifier(uint32 version, IVerifierV2 _fflonkVerifier, IVerifier _plonkVerifier) external { + if (msg.sender != ctmOwner) { + revert OnlyCtmOwner(); + } + // Add logic to add verifiers + fflonkVerifiers[version] = _fflonkVerifier; + plonkVerifiers[version] = _plonkVerifier; + } + + function removeVerifier(uint32 version) external { + if (msg.sender != ctmOwner) { + revert OnlyCtmOwner(); + } + delete fflonkVerifiers[version]; + delete plonkVerifiers[version]; + } + + /// @notice Routes zk-SNARK proof verification to the appropriate verifier (FFLONK or PLONK) based on the proof type. + /// @param _publicInputs The public inputs to the proof. + /// @param _proof The zk-SNARK proof itself. + /// @dev The first element of the `_proof` determines the verifier type. + /// - 0 indicates the FFLONK verifier should be used. + /// - 1 indicates the PLONK verifier should be used. + /// @return Returns `true` if the proof verification succeeds, otherwise throws an error. + function verify(uint256[] calldata _publicInputs, uint256[] calldata _proof) public view virtual returns (bool) { + // Ensure the proof has a valid length (at least one element + // for the proof system differentiator). + if (_proof.length == 0) { + revert EmptyProofLength(); + } + + // The first element of `_proof` determines the verifier type (either FFLONK or PLONK). + uint256 verifierType = _proof[0] & 255; + uint32 verifierVersion = uint32(_proof[0] >> 8); + if ( + fflonkVerifiers[verifierVersion] == IVerifierV2(address(0)) && + plonkVerifiers[verifierVersion] == IVerifier(address(0)) + ) { + revert UnknownVerifierVersion(); + } + + if (verifierType == FFLONK_VERIFICATION_TYPE) { + return fflonkVerifiers[verifierVersion].verify(_publicInputs, _extractProof(_proof)); + } else if (verifierType == PLONK_VERIFICATION_TYPE) { + return plonkVerifiers[verifierVersion].verify(_publicInputs, _extractProof(_proof)); + } else if (verifierType == ZKSYNC_OS_PLONK_VERIFICATION_TYPE) { + uint256[] memory args = new uint256[](1); + args[0] = computeZKSyncOSHash(_proof[1], _publicInputs); + + return plonkVerifiers[verifierVersion].verify(args, _extractZKSyncOSProof(_proof)); + } else if (verifierType == ZKSYNC_OS_MOCK_VERIFICATION_TYPE) { + // just for safety - only allowing default anvil chain and sepolia testnet + if (block.chainid != 31337 && block.chainid != 11155111) { + revert UnsupportedChainIdForMockVerifier(); + } + + uint256[] memory args = new uint256[](1); + args[0] = computeZKSyncOSHash(_proof[1], _publicInputs); + + return mockverify(args, _extractZKSyncOSProof(_proof)); + } + // If the verifier type is unknown, revert with an error. + else { + revert UnknownVerifierType(); + } + } + + function mockverify(uint256[] memory _publicInputs, uint256[] memory _proof) public view virtual returns (bool) { + if (_proof.length != 2) { + revert InvalidMockProofLength(); + } + if (_proof[0] != 13) { + revert InvalidProof(); + } + if (_proof[1] != _publicInputs[0]) { + revert InvalidProof(); + } + return true; + } + + /// @inheritdoc IVerifier + /// @dev Used for backward compatibility with older Verifier implementation. Returns PLONK verification key hash. + function verificationKeyHash() external view returns (bytes32) { + return plonkVerifiers[0].verificationKeyHash(); + } + + /// @notice Calculates a keccak256 hash of the runtime loaded verification keys from the selected verifier. + /// @return The keccak256 hash of the loaded verification keys based on the verifier. + function verificationKeyHash(uint256 _verifierType) external view returns (bytes32) { + uint256 verifierType = _verifierType & 255; + uint32 verifierVersion = uint32(verifierType >> 8); + + if ( + fflonkVerifiers[verifierVersion] == IVerifierV2(address(0)) && + plonkVerifiers[verifierVersion] == IVerifier(address(0)) + ) { + revert UnknownVerifierVersion(); + } + + if (verifierType == FFLONK_VERIFICATION_TYPE) { + return fflonkVerifiers[verifierVersion].verificationKeyHash(); + } else if (verifierType == PLONK_VERIFICATION_TYPE) { + return plonkVerifiers[verifierVersion].verificationKeyHash(); + } + // If the verifier type is unknown, revert with an error. + else { + revert UnknownVerifierType(); + } + } + + /// @notice Extract the proof by removing the first element (proof type differentiator). + /// @param _proof The proof array array. + /// @return result A new array with the first element removed. The first element was used as a hack for + /// differentiator between FFLONK and PLONK proofs. + function _extractProof(uint256[] calldata _proof) internal pure returns (uint256[] memory result) { + uint256 resultLength = _proof.length - 1; + + // Allocate memory for the new array (_proof.length - 1) since the first element is omitted. + result = new uint256[](resultLength); + + // Copy elements starting from index 1 (the second element) of the original array. + assembly { + calldatacopy(add(result, 0x20), add(_proof.offset, 0x20), mul(resultLength, 0x20)) + } + } + + function _extractZKSyncOSProof(uint256[] calldata _proof) internal pure returns (uint256[] memory result) { + uint256 resultLength = _proof.length - 1 - 1; + + // Allocate memory for the new array (_proof.length - 1) since the first element is omitted. + result = new uint256[](resultLength); + + // Copy elements starting from index 1 (the second element) of the original array. + assembly { + calldatacopy(add(result, 0x20), add(_proof.offset, 0x40), mul(resultLength, 0x20)) + } + } + + function computeZKSyncOSHash( + uint256 initialHash, + uint256[] calldata _publicInputs + ) public pure returns (uint256 result) { + uint256 publicInputsLength = _publicInputs.length; + if (initialHash == 0) { + initialHash = _publicInputs[0]; + for (uint256 i = 1; i < publicInputsLength; ++i) { + initialHash = uint256(keccak256(abi.encodePacked(initialHash, _publicInputs[i]))) >> 32; + } + } else { + for (uint256 i = 0; i < publicInputsLength; ++i) { + initialHash = uint256(keccak256(abi.encodePacked(initialHash, _publicInputs[i]))) >> 32; + } + } + + result = initialHash; + } +} diff --git a/l1-contracts/contracts/state-transition/verifiers/L2VerifierFflonk.sol b/l1-contracts/contracts/state-transition/verifiers/ZKsyncOSVerifierFflonk.sol similarity index 99% rename from l1-contracts/contracts/state-transition/verifiers/L2VerifierFflonk.sol rename to l1-contracts/contracts/state-transition/verifiers/ZKsyncOSVerifierFflonk.sol index b311f14c87..1bcfd391dd 100644 --- a/l1-contracts/contracts/state-transition/verifiers/L2VerifierFflonk.sol +++ b/l1-contracts/contracts/state-transition/verifiers/ZKsyncOSVerifierFflonk.sol @@ -9,9 +9,9 @@ import {IVerifierV2} from "../chain-interfaces/IVerifierV2.sol"; /// @notice FFT inspired version of PlonK to optimize on-chain gas cost /// @dev For better understanding of the protocol follow the below papers: /// * Fflonk Paper: https://eprint.iacr.org/2021/1167 -/// @dev Contract was generated from a verification key with a hash of 0x49eae0bf5c7ea580f4979b366e52b386adc5f42e2ce50fc1d3c4de9a86052bff +/// @dev Contract was generated from a verification key with a hash of 0x6f36a08c517b060fa97308cdb3e23b04842ff839d451a753ec8fae1a5408304a /// @custom:security-contact security@matterlabs.dev -contract L2VerifierFflonk is IVerifierV2 { +contract ZKsyncOSVerifierFflonk is IVerifierV2 { // ================Constants================ uint32 internal constant DST_0 = 0; uint32 internal constant DST_1 = 1; @@ -24,8 +24,8 @@ contract L2VerifierFflonk is IVerifierV2 { // ================Verification Key================ uint256 internal constant VK_NUM_INPUTS = 1; // [C0]1 = qL(X^8)+ X*qR(X^8)+ X^2*qO(X^8)+ X^3*qM(X^8)+ X^4*qC(X^8)+ X^5*Sσ1(X^8)+ X^6*Sσ2(X^8)+ X^7*Sσ3(X^8) - uint256 internal constant VK_C0_G1_X = 0x196013309322dc5ce901c20b2d8079da2a3d68cd8b98c943785298ead0b2ba4d; - uint256 internal constant VK_C0_G1_Y = 0x1d08f60c613bfe68af690cecb6f2232c28b7eaa8fc582f76cd7112a164211890; + uint256 internal constant VK_C0_G1_X = 0x183ae375b758fc764f96e7846c43499f62282531a6b717e789179c6da8cfef41; + uint256 internal constant VK_C0_G1_Y = 0x088d7b4d525ea29bfc5a6f0464589e4eaa4d85d9dd6849a5708b29002626ca36; // k1 = 5, k2 = 7 uint256 internal constant VK_NON_RESIDUES_0 = 0x05; @@ -1605,18 +1605,16 @@ contract L2VerifierFflonk is IVerifierV2 { * The free memory pointer is not updated as it stays unused throughout the code execution. */ function modexp(value, power) -> res { - res := 1 - for { - - } gt(power, 0) { - - } { - if mod(power, 2) { - res := mulmod(res, value, R_MOD) - } - value := mulmod(value, value, R_MOD) - power := shr(1, power) + mstore(0x00, 0x20) + mstore(0x20, 0x20) + mstore(0x40, 0x20) + mstore(0x60, value) + mstore(0x80, power) + mstore(0xa0, R_MOD) + if iszero(staticcall(gas(), 5, 0, 0xc0, 0x00, 0x20)) { + revertWithMessage(24, "modexp precompile failed") } + res := mload(0x00) } } } diff --git a/l1-contracts/contracts/state-transition/verifiers/L2VerifierPlonk.sol b/l1-contracts/contracts/state-transition/verifiers/ZKsyncOSVerifierPlonk.sol similarity index 95% rename from l1-contracts/contracts/state-transition/verifiers/L2VerifierPlonk.sol rename to l1-contracts/contracts/state-transition/verifiers/ZKsyncOSVerifierPlonk.sol index 67f7aa13d9..b2cfbf3b26 100644 --- a/l1-contracts/contracts/state-transition/verifiers/L2VerifierPlonk.sol +++ b/l1-contracts/contracts/state-transition/verifiers/ZKsyncOSVerifierPlonk.sol @@ -9,7 +9,7 @@ import {IVerifier} from "../chain-interfaces/IVerifier.sol"; /// @notice Modified version of the Permutations over Lagrange-bases for Oecumenical Noninteractive arguments of /// Knowledge (PLONK) verifier. /// Modifications have been made to optimize the proof system for ZK chain circuits. -/// @dev Contract was generated from a verification key with a hash of 0x1ffc56111a5cfaf5db387f6a31408ad20217e9bc1f31f2f5c1bd38b0d6d7968b +/// @dev Contract was generated from a verification key with a hash of 0x6a4509801ec284b8921c63dc6aaba668a0d71382d87ae4095ffc2235154e9fa3 /// @dev It uses a custom memory layout inside the inline assembly block. Each reserved memory cell is declared in the /// constants below. /// @dev For a better understanding of the verifier algorithm please refer to the following papers: @@ -18,7 +18,7 @@ import {IVerifier} from "../chain-interfaces/IVerifier.sol"; /// * Plonk for ZKsync v1.1: https://github.com/matter-labs/solidity_plonk_verifier/raw/recursive/bellman_vk_codegen_recursive/RecursivePlonkUnrolledForEthereum.pdf /// The notation used in the code is the same as in the papers. /* solhint-enable max-line-length */ -contract L2VerifierPlonk is IVerifier { +contract ZKsyncOSVerifierPlonk is IVerifier { /*////////////////////////////////////////////////////////////// Verification keys //////////////////////////////////////////////////////////////*/ @@ -284,38 +284,38 @@ contract L2VerifierPlonk is IVerifier { function _loadVerificationKey() internal pure virtual { assembly { // gate setup commitments - mstore(VK_GATE_SETUP_0_X_SLOT, 0x0a04da14b87f44a2b1e8c3b4f4e39a14c0dd2e8bdb38d05b068800fca24be3ed) - mstore(VK_GATE_SETUP_0_Y_SLOT, 0x0bc51e8894d9270da4079ae6c6acd0502bd5c173a8b3f8ac76fe528560862f2b) - mstore(VK_GATE_SETUP_1_X_SLOT, 0x04659caf7b05471ba5ba85b1ab62267aa6c456836e625f169f7119d55b9462d2) - mstore(VK_GATE_SETUP_1_Y_SLOT, 0x0ea63403692148d2ad22189a1e5420076312f4d46e62036a043a6b0b84d5b410) - mstore(VK_GATE_SETUP_2_X_SLOT, 0x0e6696d09d65fce1e42805be03fca1f14aea247281f688981f925e77d4ce2291) - mstore(VK_GATE_SETUP_2_Y_SLOT, 0x0228f6cf8fe20c1e07e5b78bf8c41d50e55975a126d22a198d1e56acd4bbb3dd) - mstore(VK_GATE_SETUP_3_X_SLOT, 0x14685dafe340b1dec5eafcd5e7faddaf24f3781ddc53309cc25d0b42c00541dd) - mstore(VK_GATE_SETUP_3_Y_SLOT, 0x0e651cff9447cb360198899b80fa23e89ec13bc94ff161729aa841d2b55ea5be) - mstore(VK_GATE_SETUP_4_X_SLOT, 0x16e9ef76cb68f2750eb0ee72382dd9911a982308d0ab10ef94dada13c382ae73) - mstore(VK_GATE_SETUP_4_Y_SLOT, 0x22e404bc91350f3bc7daad1d1025113742436983c85eac5ab7b42221a181b81e) - mstore(VK_GATE_SETUP_5_X_SLOT, 0x0d9b29613037a5025655c82b143d2b7449c98f3aea358307c8529249cc54f3b9) - mstore(VK_GATE_SETUP_5_Y_SLOT, 0x15b3c4c946ad1babfc4c03ff7c2423fd354af3a9305c499b7fb3aaebe2fee746) - mstore(VK_GATE_SETUP_6_X_SLOT, 0x08532fa83bfdb26399b55fddeec4b35aa83ab1bd79b095d8732613712daae577) - mstore(VK_GATE_SETUP_6_Y_SLOT, 0x1b92521d7adf52f1f808927ae7a18648cd33d0abb85c2fa0282c25df76595688) - mstore(VK_GATE_SETUP_7_X_SLOT, 0x283344a1ab3e55ecfd904d0b8e9f4faea338df5a4ead2fa9a42f0e103da40abc) - mstore(VK_GATE_SETUP_7_Y_SLOT, 0x223b37b83b9687512d322993edd70e508dd80adb10bcf7321a3cc8a44c269521) + mstore(VK_GATE_SETUP_0_X_SLOT, 0x219d2213cfcb8af0868c83d659e49052d72d2e4119809034e96e82685a727ec8) + mstore(VK_GATE_SETUP_0_Y_SLOT, 0x2a48c8d09206cb271404359c31d3088a7c5cecc2e380738300e90600ab6425bf) + mstore(VK_GATE_SETUP_1_X_SLOT, 0x0feda978f4639d0a725df74c4738bf178adca34e6a4f7cc38d6a9ae9ee49f695) + mstore(VK_GATE_SETUP_1_Y_SLOT, 0x2f7068beedb881aea392246c33ccc026ea9c8f6ea558a055b6df00ebfdf210a3) + mstore(VK_GATE_SETUP_2_X_SLOT, 0x06eccb685da5c8cc09a13698b2a22e383025abc75393d68c1da5a7dbacffbd9b) + mstore(VK_GATE_SETUP_2_Y_SLOT, 0x2fdec4198afacb1100a01ced19e44a1a6febeb4ffcf8abb17a3f3d66105dcb70) + mstore(VK_GATE_SETUP_3_X_SLOT, 0x29b770817d0b0dec872b16748541d19052503979fccf123ceddbae53278a8d2f) + mstore(VK_GATE_SETUP_3_Y_SLOT, 0x2ce58ae47dbbe600272d0e05ec7336c86c34925852a700d6f4b64c6357ca4c7e) + mstore(VK_GATE_SETUP_4_X_SLOT, 0x0c9c10bbbe0ce680bbff4415ce6a6f60909f228f7432371513434c6aa14005e1) + mstore(VK_GATE_SETUP_4_Y_SLOT, 0x1ac2f036e3de6e4a9bacd5eacc778fa3fbdf5fd4b06e551038c704adecbeb639) + mstore(VK_GATE_SETUP_5_X_SLOT, 0x048e2130f16d54d7e07df66330b4d892753b5141ecacb4007573d9ea4a8ff028) + mstore(VK_GATE_SETUP_5_Y_SLOT, 0x13a3819d4cb80114e51de741a5fb48ce4ba20e82c5d39d16f70ca0461f49a131) + mstore(VK_GATE_SETUP_6_X_SLOT, 0x0b7a2ef1fabe150bf63039a13cebf4d2ea7f0146781d22dcdf0a3dddca452fa8) + mstore(VK_GATE_SETUP_6_Y_SLOT, 0x19e1fff4dd608b8860bf384e6bec543af0e1ef5efd3bae85c293401b2d665a96) + mstore(VK_GATE_SETUP_7_X_SLOT, 0x1affeacdceb1b6f018bbb6762bb5aebcd54c3e24801ce01d06146d1bf0938b2c) + mstore(VK_GATE_SETUP_7_Y_SLOT, 0x19a277dd9eaac40538f3177e3390ec21d097f88afb04158dd59e963a327fe9da) // gate selectors commitments - mstore(VK_GATE_SELECTORS_0_X_SLOT, 0x1f67f0ba5f7e837bc680acb4e612ebd938ad35211aa6e05b96cad19e66b82d2d) - mstore(VK_GATE_SELECTORS_0_Y_SLOT, 0x2820641a84d2e8298ac2ac42bd4b912c0c37f768ecc83d3a29e7c720763d15a1) - mstore(VK_GATE_SELECTORS_1_X_SLOT, 0x0353257957562270292a17860ca8e8827703f828f440ee004848b1e23fdf9de2) - mstore(VK_GATE_SELECTORS_1_Y_SLOT, 0x305f4137fee253dff8b2bfe579038e8f25d5bd217865072af5d89fc8800ada24) + mstore(VK_GATE_SELECTORS_0_X_SLOT, 0x0c1b062db6ce4bce6d7399f1cbe8d6699f4f1347cb12ee03a29a6f866f097157) + mstore(VK_GATE_SELECTORS_0_Y_SLOT, 0x2ccd1faf9fbcb74d9065cf41200c6abc231cfe35ca63635f63a78504546cac32) + mstore(VK_GATE_SELECTORS_1_X_SLOT, 0x28b4bfae1424569b8d16c3cfd032dde76e3d20d1fa371c9c075ab48df15293cb) + mstore(VK_GATE_SELECTORS_1_Y_SLOT, 0x26feac8f167c72597b96268386d1fa846979ad70b135aeff7f502dace923ff37) // permutation commitments - mstore(VK_PERMUTATION_0_X_SLOT, 0x13a600154b369ff3237706d00948e465ee1c32c7a6d3e18bccd9c4a15910f2e5) - mstore(VK_PERMUTATION_0_Y_SLOT, 0x138aa24fbf4cdddc75114811b3d59040394c218ecef3eb46ef9bd646f7e53776) - mstore(VK_PERMUTATION_1_X_SLOT, 0x277fff1f80c409357e2d251d79f6e3fd2164b755ce69cfd72de5c690289df662) - mstore(VK_PERMUTATION_1_Y_SLOT, 0x25235588e28c70eea3e35531c80deac25cd9b53ea3f98993f120108bc7abf670) - mstore(VK_PERMUTATION_2_X_SLOT, 0x0990e07a9b001048b947d0e5bd6157214c7359b771f01bf52bd771ba563a900e) - mstore(VK_PERMUTATION_2_Y_SLOT, 0x05e5fb090dd40914c8606d875e301167ae3047d684a02b44d9d36f1eaf43d0b4) - mstore(VK_PERMUTATION_3_X_SLOT, 0x1d4656690b33299db5631401a282afab3e16c78ee2c9ad9efea628171dcbc6bc) - mstore(VK_PERMUTATION_3_Y_SLOT, 0x0ebda2ebe582f601f813ec1e3970d13ef1500c742a85cce9b7f190f333de03b0) + mstore(VK_PERMUTATION_0_X_SLOT, 0x2a18b299ceb0147394e977efd325f396aa3a71030f0e35769bc73d47c715a9bc) + mstore(VK_PERMUTATION_0_Y_SLOT, 0x148faf98afff1e3432cb3d5d12b51b3f3b5920d7cbaac6f90c1139bda4cde25b) + mstore(VK_PERMUTATION_1_X_SLOT, 0x1b7a1b73eb7db8f8dc98f406f831d3ac8b096f82d95ebba2e4bd246f4ecda392) + mstore(VK_PERMUTATION_1_Y_SLOT, 0x028bbe6f5e7ed35dfd6b6223005dffa0a33f4eef2baf3a2ceededbd2b160be38) + mstore(VK_PERMUTATION_2_X_SLOT, 0x27098508285af56d01f548e81c087eee9a6159f894bf24e3f95e170e36b8d071) + mstore(VK_PERMUTATION_2_Y_SLOT, 0x0100393b56d329ea167ca8e20022045077305f486fde53673c56f972b68d8d40) + mstore(VK_PERMUTATION_3_X_SLOT, 0x0477507b2bdb4e5dbd6ee360a753d547f7bf6f8429c7878e487cda8c98668105) + mstore(VK_PERMUTATION_3_Y_SLOT, 0x1f78c9aa4d4850197f46dc08a2410e83d9747eff8b438b32e1982a58f3473f54) // lookup tables commitments mstore(VK_LOOKUP_TABLE_0_X_SLOT, 0x2c513ed74d9d57a5ec901e074032741036353a2c4513422e96e7b53b302d765b) @@ -328,12 +328,12 @@ contract L2VerifierPlonk is IVerifier { mstore(VK_LOOKUP_TABLE_3_Y_SLOT, 0x09d004fe08dc4d19c382df36fad22ef676185663543703e6a4b40203e50fd8a6) // lookup selector commitment - mstore(VK_LOOKUP_SELECTOR_X_SLOT, 0x2f4d347c7fb61daaadfff881e24f4b5dcfdc0d70a95bcb148168b90ef93e0007) - mstore(VK_LOOKUP_SELECTOR_Y_SLOT, 0x2322632465ba8e28cd0a4befd813ea85a972f4f6fa8e8603cf5d062dbcb14065) + mstore(VK_LOOKUP_SELECTOR_X_SLOT, 0x08fa12af80386a748fc92c096fe68daf692678bbe46fe594a131bf79ca1b0918) + mstore(VK_LOOKUP_SELECTOR_Y_SLOT, 0x260335f894e5b49890730e4f32435427ea20695302d97a6a2d85e7d81549987d) // table type commitment - mstore(VK_LOOKUP_TABLE_TYPE_X_SLOT, 0x1e3c9fc98c118e4bc34f1f93d214a5d86898e980c40d8e2c180c6ada377a7467) - mstore(VK_LOOKUP_TABLE_TYPE_Y_SLOT, 0x2260a13535c35a15c173f5e5797d4b675b55d164a9995bfb7624971324bd84a8) + mstore(VK_LOOKUP_TABLE_TYPE_X_SLOT, 0x12f2dd86299ff99099d8408e8940d7c05e66b60040fe9e1aaf3351057cc53998) + mstore(VK_LOOKUP_TABLE_TYPE_Y_SLOT, 0x008e376cb09b70ce3180f1b4c40fe05904cab4f02ec8a1ca393c1470ba8fa8b2) // flag for using recursive part mstore(VK_RECURSIVE_FLAG_SLOT, 0) @@ -374,18 +374,16 @@ contract L2VerifierPlonk is IVerifier { /// @dev Performs modular exponentiation using the formula (value ^ power) mod R_MOD. function modexp(value, power) -> res { - res := 1 - for { - - } gt(power, 0) { - - } { - if mod(power, 2) { - res := mulmod(res, value, R_MOD) - } - value := mulmod(value, value, R_MOD) - power := shr(1, power) + mstore(0x00, 0x20) + mstore(0x20, 0x20) + mstore(0x40, 0x20) + mstore(0x60, value) + mstore(0x80, power) + mstore(0xa0, R_MOD) + if iszero(staticcall(gas(), 5, 0, 0xc0, 0x00, 0x20)) { + revertWithMessage(24, "modexp precompile failed") } + res := mload(0x00) } /// @dev Performs a point multiplication operation and stores the result in a given memory destination. diff --git a/l1-contracts/contracts/transactionFilterer/GatewayTransactionFilterer.sol b/l1-contracts/contracts/transactionFilterer/GatewayTransactionFilterer.sol index 52a965cd1a..5bbd61103c 100644 --- a/l1-contracts/contracts/transactionFilterer/GatewayTransactionFilterer.sol +++ b/l1-contracts/contracts/transactionFilterer/GatewayTransactionFilterer.sol @@ -7,8 +7,8 @@ import {Ownable2StepUpgradeable} from "@openzeppelin/contracts-upgradeable-v4/ac import {AlreadyWhitelisted, InvalidSelector, NotWhitelisted, ZeroAddress} from "../common/L1ContractErrors.sol"; import {L2_ASSET_ROUTER_ADDR} from "../common/l2-helpers/L2ContractAddresses.sol"; import {ITransactionFilterer} from "../state-transition/chain-interfaces/ITransactionFilterer.sol"; -import {IBridgehub} from "../bridgehub/IBridgehub.sol"; -import {IAssetRouterBase} from "../bridge/asset-router/IAssetRouterBase.sol"; +import {IBridgehubBase} from "../bridgehub/IBridgehubBase.sol"; +import {AssetRouterBase} from "../bridge/asset-router/AssetRouterBase.sol"; import {IL2AssetRouter} from "../bridge/asset-router/IL2AssetRouter.sol"; /// @dev We want to ensure that only whitelisted contracts can ever be deployed, @@ -28,7 +28,7 @@ contract GatewayTransactionFilterer is ITransactionFilterer, Ownable2StepUpgrade event WhitelistRevoked(address indexed sender); /// @notice The ecosystem's Bridgehub - IBridgehub public immutable BRIDGE_HUB; + IBridgehubBase public immutable BRIDGE_HUB; /// @notice The L1 asset router address public immutable L1_ASSET_ROUTER; @@ -38,7 +38,7 @@ contract GatewayTransactionFilterer is ITransactionFilterer, Ownable2StepUpgrade /// @dev Contract is expected to be used as proxy implementation. /// @dev Initialize the implementation to prevent Parity hack. - constructor(IBridgehub _bridgeHub, address _assetRouter) { + constructor(IBridgehubBase _bridgeHub, address _assetRouter) { BRIDGE_HUB = _bridgeHub; L1_ASSET_ROUTER = _assetRouter; _disableInitializers(); @@ -93,7 +93,7 @@ contract GatewayTransactionFilterer is ITransactionFilterer, Ownable2StepUpgrade return _checkCTMAssetId(decodedAssetId); } - if (IAssetRouterBase.finalizeDeposit.selector != l2TxSelector) { + if (AssetRouterBase.finalizeDeposit.selector != l2TxSelector) { revert InvalidSelector(l2TxSelector); } diff --git a/l1-contracts/contracts/upgrades/BaseZkSyncUpgrade.sol b/l1-contracts/contracts/upgrades/BaseZkSyncUpgrade.sol index 0c293a8bcd..439c496a5c 100644 --- a/l1-contracts/contracts/upgrades/BaseZkSyncUpgrade.sol +++ b/l1-contracts/contracts/upgrades/BaseZkSyncUpgrade.sol @@ -8,7 +8,7 @@ import {ZKChainBase} from "../state-transition/chain-deps/facets/ZKChainBase.sol import {IVerifier, VerifierParams} from "../state-transition/chain-interfaces/IVerifier.sol"; import {L2ContractHelper} from "../common/l2-helpers/L2ContractHelper.sol"; import {TransactionValidator} from "../state-transition/libraries/TransactionValidator.sol"; -import {MAX_ALLOWED_MINOR_VERSION_DELTA, MAX_NEW_FACTORY_DEPS, SYSTEM_UPGRADE_L2_TX_TYPE} from "../common/Config.sol"; +import {MAX_ALLOWED_MINOR_VERSION_DELTA, MAX_NEW_FACTORY_DEPS} from "../common/Config.sol"; import {L2CanonicalTransaction} from "../common/Messaging.sol"; import {InvalidTxType, L2UpgradeNonceNotEqualToNewProtocolVersion, NewProtocolMajorVersionNotZero, PatchCantSetUpgradeTxn, PatchUpgradeCantSetBootloader, PatchUpgradeCantSetDefaultAccount, PatchUpgradeCantSetEvmEmulator, PreviousProtocolMajorVersionNotZero, PreviousUpgradeNotCleaned, PreviousUpgradeNotFinalized, ProtocolVersionMinorDeltaTooBig, ProtocolVersionTooSmall} from "./ZkSyncUpgradeErrors.sol"; import {TimeNotReached, TooManyFactoryDeps} from "../common/L1ContractErrors.sol"; @@ -253,7 +253,7 @@ abstract contract BaseZkSyncUpgrade is ZKChainBase { return bytes32(0); } - if (_l2ProtocolUpgradeTx.txType != SYSTEM_UPGRADE_L2_TX_TYPE) { + if (_l2ProtocolUpgradeTx.txType != _getUpgradeTxType()) { revert InvalidTxType(_l2ProtocolUpgradeTx.txType); } if (_patchOnly) { @@ -262,11 +262,13 @@ abstract contract BaseZkSyncUpgrade is ZKChainBase { bytes memory encodedTransaction = abi.encode(_l2ProtocolUpgradeTx); + // solhint-disable-next-line func-named-parameters TransactionValidator.validateL1ToL2Transaction( _l2ProtocolUpgradeTx, encodedTransaction, s.priorityTxMaxGasLimit, - s.feeParams.priorityTxMaxPubdata + s.feeParams.priorityTxMaxPubdata, + s.zksyncOS ); TransactionValidator.validateUpgradeTransaction(_l2ProtocolUpgradeTx); diff --git a/l1-contracts/contracts/upgrades/L1FixedForceDeploymentsHelper.sol b/l1-contracts/contracts/upgrades/L1FixedForceDeploymentsHelper.sol index 5475c64021..d5cbb8989b 100644 --- a/l1-contracts/contracts/upgrades/L1FixedForceDeploymentsHelper.sol +++ b/l1-contracts/contracts/upgrades/L1FixedForceDeploymentsHelper.sol @@ -3,7 +3,7 @@ pragma solidity 0.8.28; import {IL1SharedBridgeLegacy} from "../bridge/interfaces/IL1SharedBridgeLegacy.sol"; -import {IBridgehub} from "../bridgehub/IBridgehub.sol"; +import {IL1Bridgehub} from "../bridgehub/IL1Bridgehub.sol"; import {ETH_TOKEN_ADDRESS} from "../common/Config.sol"; import {ZKChainSpecificForceDeploymentsData} from "../state-transition/l2-deps/IL2GenesisUpgrade.sol"; @@ -32,7 +32,7 @@ abstract contract L1FixedForceDeploymentsHelper { address _wrappedBaseTokenStore, address _baseTokenAddress ) internal view returns (bytes memory) { - address sharedBridge = IBridgehub(s.bridgehub).assetRouter(); + address sharedBridge = IL1Bridgehub(s.bridgehub).assetRouter(); address legacySharedBridge = IL1SharedBridgeLegacy(sharedBridge).l2BridgeAddress(s.chainId); address l2WBaseToken; diff --git a/l1-contracts/contracts/upgrades/L1GenesisUpgrade.sol b/l1-contracts/contracts/upgrades/L1GenesisUpgrade.sol index a9835d9c1d..73ff24f01d 100644 --- a/l1-contracts/contracts/upgrades/L1GenesisUpgrade.sol +++ b/l1-contracts/contracts/upgrades/L1GenesisUpgrade.sol @@ -12,13 +12,12 @@ import {IL2GenesisUpgrade} from "../state-transition/l2-deps/IL2GenesisUpgrade.s import {IL1GenesisUpgrade} from "./IL1GenesisUpgrade.sol"; import {IComplexUpgrader} from "../state-transition/l2-deps/IComplexUpgrader.sol"; import {L2_COMPLEX_UPGRADER_ADDR, L2_FORCE_DEPLOYER_ADDR, L2_GENESIS_UPGRADE_ADDR} from "../common/l2-helpers/L2ContractAddresses.sol"; -import {PRIORITY_TX_MAX_GAS_LIMIT, REQUIRED_L2_GAS_PRICE_PER_PUBDATA, SYSTEM_UPGRADE_L2_TX_TYPE} from "../common/Config.sol"; +import {PRIORITY_TX_MAX_GAS_LIMIT, REQUIRED_L2_GAS_PRICE_PER_PUBDATA} from "../common/Config.sol"; import {SemVer} from "../common/libraries/SemVer.sol"; -import {IBridgehub} from "../bridgehub/IBridgehub.sol"; +import {IL1Bridgehub} from "../bridgehub/IL1Bridgehub.sol"; import {VerifierParams} from "../state-transition/chain-interfaces/IVerifier.sol"; -import {L2ContractHelper} from "../common/l2-helpers/L2ContractHelper.sol"; import {L1FixedForceDeploymentsHelper} from "./L1FixedForceDeploymentsHelper.sol"; /// @author Matter Labs @@ -39,7 +38,7 @@ contract L1GenesisUpgrade is IL1GenesisUpgrade, BaseZkSyncUpgradeGenesis, L1Fixe bytes calldata _fixedForceDeploymentsData, bytes[] calldata _factoryDeps ) public override returns (bytes32) { - address baseTokenAddress = IBridgehub(s.bridgehub).baseToken(_chainId); + address baseTokenAddress = IL1Bridgehub(s.bridgehub).baseToken(_chainId); L2CanonicalTransaction memory l2ProtocolUpgradeTx; @@ -53,7 +52,13 @@ contract L1GenesisUpgrade is IL1GenesisUpgrade, BaseZkSyncUpgradeGenesis, L1Fixe ); bytes memory l2GenesisUpgradeCalldata = abi.encodeCall( IL2GenesisUpgrade.genesisUpgrade, - (_chainId, _l1CtmDeployerAddress, _fixedForceDeploymentsData, additionalForceDeploymentsData) + ( + s.zksyncOS, + _chainId, + _l1CtmDeployerAddress, + _fixedForceDeploymentsData, + additionalForceDeploymentsData + ) ); complexUpgraderCalldata = abi.encodeCall( IComplexUpgrader.upgrade, @@ -64,7 +69,7 @@ contract L1GenesisUpgrade is IL1GenesisUpgrade, BaseZkSyncUpgradeGenesis, L1Fixe // slither-disable-next-line unused-return (, uint32 minorVersion, ) = SemVer.unpackSemVer(SafeCast.toUint96(_protocolVersion)); l2ProtocolUpgradeTx = L2CanonicalTransaction({ - txType: SYSTEM_UPGRADE_L2_TX_TYPE, + txType: _getUpgradeTxType(), from: uint256(uint160(L2_FORCE_DEPLOYER_ADDR)), to: uint256(uint160(L2_COMPLEX_UPGRADER_ADDR)), gasLimit: PRIORITY_TX_MAX_GAS_LIMIT, @@ -78,7 +83,7 @@ contract L1GenesisUpgrade is IL1GenesisUpgrade, BaseZkSyncUpgradeGenesis, L1Fixe reserved: [uint256(0), 0, 0, 0], data: complexUpgraderCalldata, signature: new bytes(0), - factoryDeps: L2ContractHelper.hashFactoryDeps(_factoryDeps), + factoryDeps: new uint256[](0), paymasterInput: new bytes(0), reservedDynamic: new bytes(0) }); diff --git a/l1-contracts/contracts/upgrades/UpgradeStageValidator.sol b/l1-contracts/contracts/upgrades/UpgradeStageValidator.sol index 47c41b57ed..15d41cd25d 100644 --- a/l1-contracts/contracts/upgrades/UpgradeStageValidator.sol +++ b/l1-contracts/contracts/upgrades/UpgradeStageValidator.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.18; -import {IBridgehub} from "../bridgehub/IBridgehub.sol"; +import {IL1Bridgehub} from "../bridgehub/IL1Bridgehub.sol"; import {IChainTypeManager} from "../state-transition/IChainTypeManager.sol"; import {MigrationPaused, MigrationsNotPaused, ProtocolIdMismatch, ZeroAddress} from "../common/L1ContractErrors.sol"; @@ -12,7 +12,7 @@ import {MigrationPaused, MigrationsNotPaused, ProtocolIdMismatch, ZeroAddress} f /// next upgrade stage. contract UpgradeStageValidator { /// @notice Address of bridgehub. - IBridgehub public immutable BRIDGEHUB; + IL1Bridgehub public immutable BRIDGEHUB; /// @notice Address of chain type manager. IChainTypeManager public immutable CHAIN_TYPE_MANAGER; @@ -30,7 +30,7 @@ contract UpgradeStageValidator { } CHAIN_TYPE_MANAGER = IChainTypeManager(chainTypeManager); - BRIDGEHUB = IBridgehub(CHAIN_TYPE_MANAGER.BRIDGE_HUB()); + BRIDGEHUB = IL1Bridgehub(CHAIN_TYPE_MANAGER.BRIDGE_HUB()); NEW_PROTOCOL_VERSION = newProtocolVersion; } diff --git a/l1-contracts/deploy-script-config-template/config-deploy-l1.toml b/l1-contracts/deploy-script-config-template/config-deploy-l1.toml index 11c3456e71..9d8ccff407 100644 --- a/l1-contracts/deploy-script-config-template/config-deploy-l1.toml +++ b/l1-contracts/deploy-script-config-template/config-deploy-l1.toml @@ -2,6 +2,7 @@ era_chain_id = 9 owner_address = "0x70997970C51812dc3A010C7d01b50e0d17dc79C8" testnet_verifier = true support_l2_legacy_shared_bridge_test = false +is_zk_sync_os = false [gateway] chain_id = 123 diff --git a/l1-contracts/deploy-script-config-template/register-hyperchain.toml b/l1-contracts/deploy-script-config-template/register-hyperchain.toml index 5bada9afca..5f953b4e1e 100644 --- a/l1-contracts/deploy-script-config-template/register-hyperchain.toml +++ b/l1-contracts/deploy-script-config-template/register-hyperchain.toml @@ -4,8 +4,10 @@ chain_chain_id = 9 base_token_addr = "0x0000000000000000000000000000000000000001" bridgehub_create_new_chain_salt = 0 validium_mode = false -validator_sender_operator_commit_eth = "0x0000000000000000000000000000000000000000" +validator_sender_operator_eth = "0x0000000000000000000000000000000000000000" validator_sender_operator_blobs_eth = "0x0000000000000000000000000000000000000001" +validator_sender_operator_prove = "0x0000000000000000000000000000000000000002" +validator_sender_operator_execute = "0x0000000000000000000000000000000000000003" base_token_gas_price_multiplier_nominator = 1 base_token_gas_price_multiplier_denominator = 1 governance_min_delay = 0 diff --git a/l1-contracts/deploy-scripts/AdminFunctions.s.sol b/l1-contracts/deploy-scripts/AdminFunctions.s.sol index 31a5d63e29..564a084c45 100644 --- a/l1-contracts/deploy-scripts/AdminFunctions.s.sol +++ b/l1-contracts/deploy-scripts/AdminFunctions.s.sol @@ -8,13 +8,12 @@ import {IZKChain} from "contracts/state-transition/chain-interfaces/IZKChain.sol import {IAdmin} from "contracts/state-transition/chain-interfaces/IAdmin.sol"; import {ChainAdmin} from "contracts/governance/ChainAdmin.sol"; import {AccessControlRestriction} from "contracts/governance/AccessControlRestriction.sol"; -import {IChainAdmin} from "contracts/governance/IChainAdmin.sol"; import {IChainAdminOwnable} from "contracts/governance/IChainAdminOwnable.sol"; import {ChainTypeManager} from "contracts/state-transition/ChainTypeManager.sol"; import {IGetters} from "contracts/state-transition/chain-interfaces/IGetters.sol"; import {Call} from "contracts/governance/Common.sol"; import {ChainInfoFromBridgehub, Utils} from "./Utils.sol"; -import {IGovernance} from "contracts/governance/IGovernance.sol"; + import {stdToml} from "forge-std/StdToml.sol"; import {Diamond} from "contracts/state-transition/libraries/Diamond.sol"; import {ValidatorTimelock} from "contracts/state-transition/ValidatorTimelock.sol"; @@ -23,11 +22,13 @@ import {PubdataPricingMode} from "contracts/state-transition/chain-deps/ZKChainS import {GatewayTransactionFilterer} from "contracts/transactionFilterer/GatewayTransactionFilterer.sol"; import {ServerNotifier} from "contracts/governance/ServerNotifier.sol"; -import {Bridgehub} from "contracts/bridgehub/Bridgehub.sol"; -import {BridgehubBurnCTMAssetData, IBridgehub} from "contracts/bridgehub/IBridgehub.sol"; +import {L1Bridgehub} from "contracts/bridgehub/L1Bridgehub.sol"; +import {IL1Bridgehub} from "contracts/bridgehub/IL1Bridgehub.sol"; +import {BridgehubBurnCTMAssetData} from "contracts/bridgehub/IBridgehubBase.sol"; import {AddressAliasHelper} from "contracts/vendor/AddressAliasHelper.sol"; import {L2_ASSET_ROUTER_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; import {IL2AssetRouter} from "contracts/bridge/asset-router/IL2AssetRouter.sol"; +import {L2DACommitmentScheme} from "contracts/common/Config.sol"; bytes32 constant SET_TOKEN_MULTIPLIER_SETTER_ROLE = keccak256("SET_TOKEN_MULTIPLIER_SETTER_ROLE"); @@ -428,7 +429,7 @@ contract AdminFunctions is Script { address _bridgehub, uint256 _chainId, address _l1DaValidator, - address _l2DaValidator, + L2DACommitmentScheme _l2DaCommitmentScheme, bool _shouldSend ) public { ChainInfoFromBridgehub memory chainInfo = Utils.chainInfoFromBridgehubAndChainId(_bridgehub, _chainId); @@ -437,7 +438,7 @@ contract AdminFunctions is Script { calls[0] = Call({ target: chainInfo.diamondProxy, value: 0, - data: abi.encodeCall(IAdmin.setDAValidatorPair, (_l1DaValidator, _l2DaValidator)) + data: abi.encodeCall(IAdmin.setDAValidatorPair, (_l1DaValidator, _l2DaCommitmentScheme)) }); saveAndSendAdminTx(chainInfo.admin, calls, _shouldSend); @@ -469,9 +470,9 @@ contract AdminFunctions is Script { bytes memory secondBridgeData; { - bytes32 chainAssetId = Bridgehub(data.bridgehub).ctmAssetIdFromChainId(data.l2ChainId); + bytes32 chainAssetId = L1Bridgehub(data.bridgehub).ctmAssetIdFromChainId(data.l2ChainId); - uint256 currentSettlementLayer = Bridgehub(data.bridgehub).settlementLayer(data.l2ChainId); + uint256 currentSettlementLayer = L1Bridgehub(data.bridgehub).settlementLayer(data.l2ChainId); if (currentSettlementLayer == data.gatewayChainId) { console.log("Chain already using gateway as its settlement layer"); saveOutput(Output({admin: l2ChainInfo.admin, encodedData: hex""})); @@ -486,7 +487,7 @@ contract AdminFunctions is Script { data._gatewayDiamondCutData ), chainData: abi.encode( - IZKChain(Bridgehub(data.bridgehub).getZKChain(data.l2ChainId)).getProtocolVersion() + IZKChain(L1Bridgehub(data.bridgehub).getZKChain(data.l2ChainId)).getProtocolVersion() ) }) ); @@ -538,7 +539,7 @@ contract AdminFunctions is Script { uint256 l2ChainId; uint256 gatewayChainId; address l1DAValidator; - address l2DAValidator; + L2DACommitmentScheme l2DACommitmentScheme; address chainDiamondProxyOnGateway; address refundRecipient; bool _shouldSend; @@ -551,7 +552,10 @@ contract AdminFunctions is Script { data.bridgehub, data.l2ChainId ); - bytes memory callData = abi.encodeCall(IAdmin.setDAValidatorPair, (data.l1DAValidator, data.l2DAValidator)); + bytes memory callData = abi.encodeCall( + IAdmin.setDAValidatorPair, + (data.l1DAValidator, data.l2DACommitmentScheme) + ); Call[] memory calls = Utils.prepareAdminL1L2DirectTransaction( data.l1GasPrice, callData, @@ -574,7 +578,7 @@ contract AdminFunctions is Script { uint256 l2ChainId, uint256 gatewayChainId, address l1DAValidator, - address l2DAValidator, + L2DACommitmentScheme l2DACommitmentScheme, address chainDiamondProxyOnGateway, address refundRecipient, bool _shouldSend @@ -586,7 +590,7 @@ contract AdminFunctions is Script { l2ChainId: l2ChainId, gatewayChainId: gatewayChainId, l1DAValidator: l1DAValidator, - l2DAValidator: l2DAValidator, + l2DACommitmentScheme: l2DACommitmentScheme, chainDiamondProxyOnGateway: chainDiamondProxyOnGateway, refundRecipient: refundRecipient, _shouldSend: _shouldSend @@ -691,7 +695,7 @@ contract AdminFunctions is Script { ); { - uint256 currentSettlementLayer = Bridgehub(data.bridgehub).settlementLayer(data.l2ChainId); + uint256 currentSettlementLayer = L1Bridgehub(data.bridgehub).settlementLayer(data.l2ChainId); if (currentSettlementLayer != data.gatewayChainId) { console.log("Chain does not settle on Gateway"); saveOutput(Output({admin: l2ChainInfo.admin, encodedData: hex""})); @@ -707,7 +711,7 @@ contract AdminFunctions is Script { }) ); - bytes32 ctmAssetId = IBridgehub(data.bridgehub).ctmAssetIdFromChainId(data.l2ChainId); + bytes32 ctmAssetId = IL1Bridgehub(data.bridgehub).ctmAssetIdFromChainId(data.l2ChainId); bytes memory l2Calldata = abi.encodeCall(IL2AssetRouter.withdraw, (ctmAssetId, bridgehubBurnData)); Call[] memory calls = Utils.prepareAdminL1L2DirectTransaction( diff --git a/l1-contracts/deploy-scripts/BlakeContractHashing.s.sol b/l1-contracts/deploy-scripts/BlakeContractHashing.s.sol new file mode 100644 index 0000000000..b1d0a30815 --- /dev/null +++ b/l1-contracts/deploy-scripts/BlakeContractHashing.s.sol @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.21; + +import {Script, console2 as console} from "forge-std/Script.sol"; + +import {Utils} from "./Utils.sol"; + +contract BlakeContractHashing is Script { + function run(string calldata fileName, string calldata contractName) public { + bytes memory contractBytecode = Utils.readFoundryBytecodeL1(fileName, contractName); + + bytes32 result = Utils.blakeHashBytecode(contractBytecode); + + console.logBytes32(result); + } +} diff --git a/l1-contracts/deploy-scripts/BytecodeUtils.s.sol b/l1-contracts/deploy-scripts/BytecodeUtils.s.sol new file mode 100644 index 0000000000..7f16b4cd43 --- /dev/null +++ b/l1-contracts/deploy-scripts/BytecodeUtils.s.sol @@ -0,0 +1,94 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.24; + +import {Vm} from "forge-std/Vm.sol"; + +library BytecodeUtils { + // Cheatcodes address, 0x7109709ECfa91a80626fF3989D68f67F5b1DD12D. + address internal constant VM_ADDRESS = address(uint160(uint256(keccak256("hevm cheat code")))); + Vm internal constant vm = Vm(VM_ADDRESS); + + /** + * @dev Returns the bytecode of a given system contract. + */ + function readSystemContractsBytecode(string memory filename) internal view returns (bytes memory) { + return readZKFoundryBytecodeSystemContracts(string.concat(filename, ".sol"), filename); + } + + /** + * @dev Returns the bytecode of a given system contract in yul. + */ + function readSystemContractsYulBytecode(string memory filename) internal view returns (bytes memory) { + string memory path = string.concat("/../system-contracts/zkout/", filename, ".yul/", filename, ".json"); + + return readFoundryBytecode(path); + } + + /** + * @dev Returns the bytecode of a given precompile system contract. + */ + function readPrecompileBytecode(string memory filename) internal view returns (bytes memory) { + string memory path = string.concat("/../system-contracts/zkout/", filename, ".yul/", filename, ".json"); + + return readFoundryBytecode(path); + } + /** + * @dev Returns the bytecode of a given DA contract. + */ + function readDAContractBytecode(string memory contractIdentifier) internal view returns (bytes memory) { + return + readFoundryBytecode( + string.concat("/../da-contracts/out/", contractIdentifier, ".sol/", contractIdentifier, ".json") + ); + } + + /** + * @dev Read foundry bytecodes + */ + function readFoundryBytecode(string memory artifactPath) internal view returns (bytes memory) { + string memory root = vm.projectRoot(); + string memory path = string.concat(root, artifactPath); + string memory json = vm.readFile(path); + bytes memory bytecode = vm.parseJsonBytes(json, ".bytecode.object"); + return bytecode; + } + + function readFoundryBytecodeL1( + string memory fileName, + string memory contractName + ) internal view returns (bytes memory) { + string memory path = string.concat("/../l1-contracts/out/", fileName, "/", contractName, ".json"); + return readFoundryBytecode(path); + } + + function readZKFoundryBytecodeL1( + string memory fileName, + string memory contractName + ) internal view returns (bytes memory) { + string memory path = string.concat("/../l1-contracts/zkout/", fileName, "/", contractName, ".json"); + bytes memory bytecode = readFoundryBytecode(path); + return bytecode; + } + + function readZKFoundryBytecodeL2( + string memory fileName, + string memory contractName + ) internal view returns (bytes memory) { + string memory path = string.concat("/../l2-contracts/zkout/", fileName, "/", contractName, ".json"); + bytes memory bytecode = readFoundryBytecode(path); + return bytecode; + } + + function readZKFoundryBytecodeSystemContracts( + string memory fileName, + string memory contractName + ) internal view returns (bytes memory) { + string memory path = string.concat("/../system-contracts/zkout/", fileName, "/", contractName, ".json"); + bytes memory bytecode = readFoundryBytecode(path); + return bytecode; + } + + function compareStrings(string memory a, string memory b) public pure returns (bool) { + return keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b)); + } +} diff --git a/l1-contracts/deploy-scripts/ContractsBytecodesLib.sol b/l1-contracts/deploy-scripts/ContractsBytecodesLib.sol index 0db6d4d396..09a7a598ad 100644 --- a/l1-contracts/deploy-scripts/ContractsBytecodesLib.sol +++ b/l1-contracts/deploy-scripts/ContractsBytecodesLib.sol @@ -1,7 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; -import "./Utils.sol"; +import {Utils as Utils_old} from "./Utils.sol"; +import {BytecodeUtils as Utils} from "./BytecodeUtils.s.sol"; /// @title ContractsBytecodesLib /// @notice Library providing functions to read bytecodes of L2 contracts individually. @@ -24,6 +25,7 @@ library ContractsBytecodesLib { return getCreationCodeEVM(contractIdentifier); } } + function getCreationCodeEVM(string memory contractIdentifier) internal view returns (bytes memory) { string[3] memory DA_CONTRACT_IDENTIFIERS = ["RollupL1DAValidator", "AvailL1DAValidator", "DummyAvailBridge"]; @@ -43,23 +45,26 @@ library ContractsBytecodesLib { // Defines the contract identifiers for L1 contracts that follow the // pattern: ContractIdentifier.sol and contract class ContractIdentifier. // These are handled by the generic L1 case in getCreationCode. - string[38] memory L1_GENERIC_CONTRACT_IDENTIFIERS = [ + string[43] memory L1_GENERIC_CONTRACT_IDENTIFIERS = [ "AccessControlRestriction", /// ?? "BeaconProxy", "BridgedStandardERC20", "BridgedTokenBeacon", - "Bridgehub", + "L1Bridgehub", + "L2Bridgehub", "BytecodesSupplier", // ??? "ChainAdmin", "ChainAdminOwnable", - "ChainAssetHandler", + "L1ChainAssetHandler", + "L2ChainAssetHandler", "ChainRegistrar", "ChainTypeManager", "CTMDeploymentTracker", "DiamondInit", "DiamondProxy", "DefaultUpgrade", - "DualVerifier", + "EraDualVerifier", + "ZKsyncOSDualVerifier", "L1GenesisUpgrade", "L2AdminFactory", "L2AssetRouter", @@ -70,7 +75,8 @@ library ContractsBytecodesLib { "L2ProxyAdminDeployer", "L2WrappedBaseToken", "Multicall3", - "MessageRoot", + "L1MessageRoot", + "L2MessageRoot", "PermanentRestriction", "ProxyAdmin", // ?? "UpgradeableBeacon", @@ -81,7 +87,8 @@ library ContractsBytecodesLib { "ValidatorTimelock", "ValidiumL1DAValidator", // ??? "L2MessageVerification", - "L1V29Upgrade" + "L1V29Upgrade", + "UpgradeableBeaconDeployer" ]; string[6] memory L2_GENERIC_CONTRACT_IDENTIFIERS = [ @@ -123,10 +130,14 @@ library ContractsBytecodesLib { } else if (Utils.compareStrings(contractIdentifier, "GettersFacet")) { // Original: Getters.sol return Utils.readZKFoundryBytecodeL1("Getters.sol", "GettersFacet"); - } else if (Utils.compareStrings(contractIdentifier, "VerifierFflonk")) { - return Utils.readZKFoundryBytecodeL1("L1VerifierFflonk.sol", "L1VerifierFflonk"); - } else if (Utils.compareStrings(contractIdentifier, "VerifierPlonk")) { - return Utils.readZKFoundryBytecodeL1("L1VerifierPlonk.sol", "L1VerifierPlonk"); + } else if (Utils.compareStrings(contractIdentifier, "EraVerifierFflonk")) { + return Utils.readZKFoundryBytecodeL1("EraVerifierFflonk.sol", "EraVerifierFflonk"); + } else if (Utils.compareStrings(contractIdentifier, "EraVerifierPlonk")) { + return Utils.readZKFoundryBytecodeL1("EraVerifierPlonk.sol", "EraVerifierPlonk"); + } else if (Utils.compareStrings(contractIdentifier, "ZKsyncOSVerifierFflonk")) { + return Utils.readZKFoundryBytecodeL1("ZKsyncOSVerifierFflonk.sol", "ZKsyncOSVerifierFflonk"); + } else if (Utils.compareStrings(contractIdentifier, "ZKsyncOSVerifierPlonk")) { + return Utils.readZKFoundryBytecodeL1("ZKsyncOSVerifierPlonk.sol", "ZKsyncOSVerifierPlonk"); } // --- General Cases --- diff --git a/l1-contracts/deploy-scripts/DeployCTM.s.sol b/l1-contracts/deploy-scripts/DeployCTM.s.sol index b514487062..8c78e6b9ea 100644 --- a/l1-contracts/deploy-scripts/DeployCTM.s.sol +++ b/l1-contracts/deploy-scripts/DeployCTM.s.sol @@ -8,15 +8,18 @@ import {stdToml} from "forge-std/StdToml.sol"; import {StateTransitionDeployedAddresses, Utils} from "./Utils.sol"; import {Multicall3} from "contracts/dev-contracts/Multicall3.sol"; -import {IBridgehub} from "contracts/bridgehub/IBridgehub.sol"; +import {IL1Bridgehub} from "contracts/bridgehub/IL1Bridgehub.sol"; + +import {RollupDAManager} from "contracts/state-transition/data-availability/RollupDAManager.sol"; + +import {L2DACommitmentScheme, ROLLUP_L2_DA_COMMITMENT_SCHEME} from "contracts/common/Config.sol"; import {AddressAliasHelper} from "contracts/vendor/AddressAliasHelper.sol"; import {IChainTypeManager} from "contracts/state-transition/IChainTypeManager.sol"; -import {L1Nullifier} from "contracts/bridge/L1Nullifier.sol"; -import {L1NullifierDev} from "contracts/dev-contracts/L1NullifierDev.sol"; + import {Diamond} from "contracts/state-transition/libraries/Diamond.sol"; import {DiamondProxy} from "contracts/state-transition/chain-deps/DiamondProxy.sol"; import {IRollupDAManager} from "./interfaces/IRollupDAManager.sol"; -import {ChainRegistrar} from "contracts/chain-registrar/ChainRegistrar.sol"; + import {L2LegacySharedBridgeTestHelper} from "./L2LegacySharedBridgeTestHelper.sol"; import {IOwnable} from "contracts/common/interfaces/IOwnable.sol"; @@ -24,29 +27,22 @@ import {ProxyAdmin} from "@openzeppelin/contracts-v4/proxy/transparent/ProxyAdmi import {DefaultUpgrade} from "contracts/upgrades/DefaultUpgrade.sol"; import {Governance} from "contracts/governance/Governance.sol"; import {L1GenesisUpgrade} from "contracts/upgrades/L1GenesisUpgrade.sol"; -import {ChainAdmin} from "contracts/governance/ChainAdmin.sol"; import {ValidatorTimelock} from "contracts/state-transition/ValidatorTimelock.sol"; -import {Bridgehub} from "contracts/bridgehub/Bridgehub.sol"; -import {ChainAssetHandler} from "contracts/bridgehub/ChainAssetHandler.sol"; -import {MessageRoot} from "contracts/bridgehub/MessageRoot.sol"; -import {CTMDeploymentTracker} from "contracts/bridgehub/CTMDeploymentTracker.sol"; -import {L1NativeTokenVault} from "contracts/bridge/ntv/L1NativeTokenVault.sol"; + import {ExecutorFacet} from "contracts/state-transition/chain-deps/facets/Executor.sol"; import {AdminFacet} from "contracts/state-transition/chain-deps/facets/Admin.sol"; import {MailboxFacet} from "contracts/state-transition/chain-deps/facets/Mailbox.sol"; import {GettersFacet} from "contracts/state-transition/chain-deps/facets/Getters.sol"; -import {DiamondInit} from "contracts/state-transition/chain-deps/DiamondInit.sol"; + import {ChainTypeManager} from "contracts/state-transition/ChainTypeManager.sol"; import {L1AssetRouter} from "contracts/bridge/asset-router/L1AssetRouter.sol"; -import {L1ERC20Bridge} from "contracts/bridge/L1ERC20Bridge.sol"; -import {BridgedStandardERC20} from "contracts/bridge/BridgedStandardERC20.sol"; + import {ValidiumL1DAValidator} from "contracts/state-transition/data-availability/ValidiumL1DAValidator.sol"; -import {RollupDAManager} from "contracts/state-transition/data-availability/RollupDAManager.sol"; import {BytecodesSupplier} from "contracts/upgrades/BytecodesSupplier.sol"; import {ChainAdminOwnable} from "contracts/governance/ChainAdminOwnable.sol"; import {ServerNotifier} from "contracts/governance/ServerNotifier.sol"; -import {Config, DeployedAddresses, GeneratedData} from "./DeployUtils.s.sol"; +import {Config, DeployedAddresses} from "./DeployUtils.s.sol"; import {DeployL1HelperScript} from "./DeployL1HelperScript.s.sol"; import {FixedForceDeploymentsData} from "contracts/state-transition/l2-deps/IL2GenesisUpgrade.sol"; @@ -97,7 +93,7 @@ contract DeployCTMScript is Script, DeployL1HelperScript { instantiateCreate2Factory(); console.log("Initializing core contracts from BH"); - IBridgehub bridgehubProxy = IBridgehub(bridgehub); + IL1Bridgehub bridgehubProxy = IL1Bridgehub(bridgehub); L1AssetRouter assetRouter = L1AssetRouter(bridgehubProxy.assetRouter()); address messageRoot = address(bridgehubProxy.messageRoot()); address l1CtmDeployer = address(bridgehubProxy.l1CtmDeployer()); @@ -184,9 +180,18 @@ contract DeployCTMScript is Script, DeployL1HelperScript { } } + function getRollupL2DACommitmentScheme() internal returns (L2DACommitmentScheme) { + return ROLLUP_L2_DA_COMMITMENT_SCHEME; + } + function deployVerifiers() internal { - (addresses.stateTransition.verifierFflonk) = deploySimpleContract("VerifierFflonk", false); - (addresses.stateTransition.verifierPlonk) = deploySimpleContract("VerifierPlonk", false); + if (config.isZKsyncOS) { + (addresses.stateTransition.verifierFflonk) = deploySimpleContract("ZKsyncOSVerifierFflonk", false); + (addresses.stateTransition.verifierPlonk) = deploySimpleContract("ZKsyncOSVerifierPlonk", false); + } else { + (addresses.stateTransition.verifierFflonk) = deploySimpleContract("EraVerifierFflonk", false); + (addresses.stateTransition.verifierPlonk) = deploySimpleContract("EraVerifierPlonk", false); + } (addresses.stateTransition.verifier) = deploySimpleContract("Verifier", false); } @@ -214,11 +219,7 @@ contract DeployCTMScript is Script, DeployL1HelperScript { } vm.startBroadcast(msg.sender); IRollupDAManager rollupDAManager = IRollupDAManager(addresses.daAddresses.rollupDAManager); - rollupDAManager.updateDAPair( - addresses.daAddresses.l1RollupDAValidator, - calculateExpectedL2Address("RollupL2DAValidator"), - true - ); + rollupDAManager.updateDAPair(addresses.daAddresses.l1RollupDAValidator, getRollupL2DACommitmentScheme(), true); vm.stopBroadcast(); } @@ -266,6 +267,7 @@ contract DeployCTMScript is Script, DeployL1HelperScript { ctm.setPendingAdmin(addresses.chainAdmin); IOwnable(addresses.stateTransition.serverNotifierProxy).transferOwnership(addresses.chainAdmin); + IOwnable(addresses.daAddresses.rollupDAManager).transferOwnership(addresses.governance); IOwnable(addresses.daAddresses.rollupDAManager).transferOwnership(addresses.governance); @@ -453,27 +455,12 @@ contract DeployCTMScript is Script, DeployL1HelperScript { vm.serializeAddress("root", "deployer_addr", config.deployerAddress); vm.serializeString("root", "deployed_addresses", deployedAddresses); vm.serializeString("root", "contracts_config", contractsConfig); - vm.serializeAddress( - "root", - "expected_rollup_l2_da_validator_addr", - calculateExpectedL2Address("RollupL2DAValidator") - ); - vm.serializeAddress( - "root", - "expected_no_da_validium_l2_validator_addr", - calculateExpectedL2Address("ValidiumL2DAValidator") - ); - vm.serializeAddress( - "root", - "expected_avail_l2_da_validator_addr", - calculateExpectedL2Address("AvailL2DAValidator") - ); string memory toml = vm.serializeAddress("root", "owner_address", config.ownerAddress); vm.writeToml(toml, outputPath); } - function prepareForceDeploymentsData() internal view returns (bytes memory) { + function prepareForceDeploymentsData() internal returns (bytes memory) { require(addresses.governance != address(0), "Governance address is not set"); address dangerousTestOnlyForcedBeacon; @@ -492,11 +479,12 @@ contract DeployCTMScript is Script, DeployL1HelperScript { l2TokenProxyBytecodeHash: getL2BytecodeHash("BeaconProxy"), aliasedL1Governance: AddressAliasHelper.applyL1ToL2Alias(addresses.governance), maxNumberOfZKChains: config.contracts.maxNumberOfChains, - bridgehubBytecodeHash: getL2BytecodeHash("Bridgehub"), - l2AssetRouterBytecodeHash: getL2BytecodeHash("L2AssetRouter"), - l2NtvBytecodeHash: getL2BytecodeHash("L2NativeTokenVault"), - messageRootBytecodeHash: getL2BytecodeHash("MessageRoot"), - chainAssetHandlerBytecodeHash: getL2BytecodeHash("ChainAssetHandler"), + bridgehubBytecodeInfo: abi.encode(getL2BytecodeHash("L2Bridgehub")), + l2AssetRouterBytecodeInfo: abi.encode(getL2BytecodeHash("L2AssetRouter")), + l2NtvBytecodeInfo: abi.encode(getL2BytecodeHash("L2NativeTokenVault")), + messageRootBytecodeInfo: abi.encode(getL2BytecodeHash("L2MessageRoot")), + beaconDeployerInfo: abi.encode(getL2BytecodeHash("UpgradeableBeaconDeployer")), + chainAssetHandlerBytecodeInfo: abi.encode(getL2BytecodeHash("L2ChainAssetHandler")), // For newly created chains it it is expected that the following bridges are not present at the moment // of creation of the chain l2SharedBridgeLegacyImpl: address(0), diff --git a/l1-contracts/deploy-scripts/DeployCTMAdditional.s.sol b/l1-contracts/deploy-scripts/DeployCTMAdditional.s.sol new file mode 100644 index 0000000000..83c1e4b4c8 --- /dev/null +++ b/l1-contracts/deploy-scripts/DeployCTMAdditional.s.sol @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.24; + +import {DeployCTMScript} from "./DeployCTM.s.sol"; +import {L2ContractHelper} from "contracts/common/l2-helpers/L2ContractHelper.sol"; + +contract DeployCTMAdditional is DeployCTMScript { + function getL2BytecodeHash(string memory contractName) public view virtual override returns (bytes32) { + return L2ContractHelper.hashL2Bytecode(getCreationCode(contractName, true)); + } +} diff --git a/l1-contracts/deploy-scripts/DeployErc20.s.sol b/l1-contracts/deploy-scripts/DeployErc20.s.sol index a18135e96f..29916a6fd1 100644 --- a/l1-contracts/deploy-scripts/DeployErc20.s.sol +++ b/l1-contracts/deploy-scripts/DeployErc20.s.sol @@ -8,7 +8,7 @@ import {stdToml} from "forge-std/StdToml.sol"; // It's required to disable lints to force the compiler to compile the contracts // solhint-disable no-unused-import -import {TestnetERC20Token} from "contracts/dev-contracts/TestnetERC20Token.sol"; + // solhint-disable no-unused-import import {WETH9} from "contracts/dev-contracts/WETH9.sol"; diff --git a/l1-contracts/deploy-scripts/DeployL1CoreContracts.s.sol b/l1-contracts/deploy-scripts/DeployL1CoreContracts.s.sol index 4a4b3a0846..c7119f3b58 100644 --- a/l1-contracts/deploy-scripts/DeployL1CoreContracts.s.sol +++ b/l1-contracts/deploy-scripts/DeployL1CoreContracts.s.sol @@ -8,9 +8,10 @@ import {stdToml} from "forge-std/StdToml.sol"; import {Diamond} from "contracts/state-transition/libraries/Diamond.sol"; import {StateTransitionDeployedAddresses} from "./Utils.sol"; -import {IBridgehub} from "contracts/bridgehub/IBridgehub.sol"; +import {IL1Bridgehub} from "contracts/bridgehub/IL1Bridgehub.sol"; +import {BridgehubBase} from "contracts/bridgehub/BridgehubBase.sol"; import {IL1AssetRouter} from "contracts/bridge/asset-router/IL1AssetRouter.sol"; -import {INativeTokenVault} from "contracts/bridge/ntv/INativeTokenVault.sol"; +import {INativeTokenVaultBase} from "contracts/bridge/ntv/INativeTokenVaultBase.sol"; import {IL1Nullifier, L1Nullifier} from "contracts/bridge/L1Nullifier.sol"; import {IL1NativeTokenVault} from "contracts/bridge/ntv/IL1NativeTokenVault.sol"; import {IL1ERC20Bridge} from "contracts/bridge/interfaces/IL1ERC20Bridge.sol"; @@ -20,10 +21,9 @@ import {IOwnable} from "contracts/common/interfaces/IOwnable.sol"; import {ProxyAdmin} from "@openzeppelin/contracts-v4/proxy/transparent/ProxyAdmin.sol"; import {Governance} from "contracts/governance/Governance.sol"; -import {ChainAdmin} from "contracts/governance/ChainAdmin.sol"; -import {Bridgehub} from "contracts/bridgehub/Bridgehub.sol"; -import {ChainAssetHandler} from "contracts/bridgehub/ChainAssetHandler.sol"; -import {MessageRoot} from "contracts/bridgehub/MessageRoot.sol"; +import {L1Bridgehub} from "contracts/bridgehub/L1Bridgehub.sol"; +import {L1ChainAssetHandler} from "contracts/bridgehub/L1ChainAssetHandler.sol"; +import {L1MessageRoot} from "contracts/bridgehub/L1MessageRoot.sol"; import {CTMDeploymentTracker} from "contracts/bridgehub/CTMDeploymentTracker.sol"; import {L1NativeTokenVault} from "contracts/bridge/ntv/L1NativeTokenVault.sol"; import {L1AssetRouter} from "contracts/bridge/asset-router/L1AssetRouter.sol"; @@ -48,7 +48,7 @@ contract DeployL1CoreContractsScript is Script, DeployL1HelperScript { // In the production environment, there will be a separate script dedicated to accepting the adminship // but for testing purposes we'll have to do it here. - Bridgehub bridgehub = Bridgehub(addresses.bridgehub.bridgehubProxy); + L1Bridgehub bridgehub = L1Bridgehub(addresses.bridgehub.bridgehubProxy); vm.broadcast(addresses.chainAdmin); bridgehub.acceptAdmin(); } @@ -78,11 +78,11 @@ contract DeployL1CoreContractsScript is Script, DeployL1HelperScript { // We set to it to zero explicitly so that it is clear to the reader. addresses.accessControlRestrictionAddress = address(0); (addresses.bridgehub.bridgehubImplementation, addresses.bridgehub.bridgehubProxy) = deployTuppWithContract( - "Bridgehub", + "L1Bridgehub", false ); (addresses.bridgehub.messageRootImplementation, addresses.bridgehub.messageRootProxy) = deployTuppWithContract( - "MessageRoot", + "L1MessageRoot", false ); @@ -119,7 +119,7 @@ contract DeployL1CoreContractsScript is Script, DeployL1HelperScript { ( addresses.bridgehub.chainAssetHandlerImplementation, addresses.bridgehub.chainAssetHandlerProxy - ) = deployTuppWithContract("ChainAssetHandler", false); + ) = deployTuppWithContract("L1ChainAssetHandler", false); setBridgehubParams(); updateOwners(); @@ -128,10 +128,10 @@ contract DeployL1CoreContractsScript is Script, DeployL1HelperScript { } function setBridgehubParams() internal { - IBridgehub bridgehub = IBridgehub(addresses.bridgehub.bridgehubProxy); + IL1Bridgehub bridgehub = IL1Bridgehub(addresses.bridgehub.bridgehubProxy); vm.startBroadcast(msg.sender); bridgehub.addTokenAssetId(bridgehub.baseTokenAssetId(config.eraChainId)); - bridgehub.setAddresses( + BridgehubBase(address(bridgehub)).setAddresses( addresses.bridges.l1AssetRouterProxy, ICTMDeploymentTracker(addresses.bridgehub.ctmDeploymentTrackerProxy), IMessageRoot(addresses.bridgehub.messageRootProxy), @@ -153,7 +153,7 @@ contract DeployL1CoreContractsScript is Script, DeployL1HelperScript { IL1Nullifier l1Nullifier = IL1Nullifier(addresses.bridges.l1NullifierProxy); // Ownable ownable = Ownable(addresses.bridges.l1AssetRouterProxy); vm.broadcast(msg.sender); - sharedBridge.setNativeTokenVault(INativeTokenVault(addresses.vaults.l1NativeTokenVaultProxy)); + sharedBridge.setNativeTokenVault(INativeTokenVaultBase(addresses.vaults.l1NativeTokenVaultProxy)); vm.broadcast(msg.sender); l1Nullifier.setL1NativeTokenVault(IL1NativeTokenVault(addresses.vaults.l1NativeTokenVaultProxy)); vm.broadcast(msg.sender); @@ -166,7 +166,7 @@ contract DeployL1CoreContractsScript is Script, DeployL1HelperScript { function updateOwners() internal { vm.startBroadcast(msg.sender); - IBridgehub bridgehub = IBridgehub(addresses.bridgehub.bridgehubProxy); + IL1Bridgehub bridgehub = IL1Bridgehub(addresses.bridgehub.bridgehubProxy); IOwnable(address(bridgehub)).transferOwnership(addresses.governance); bridgehub.setPendingAdmin(addresses.chainAdmin); diff --git a/l1-contracts/deploy-scripts/DeployL1HelperScript.s.sol b/l1-contracts/deploy-scripts/DeployL1HelperScript.s.sol index 51b60b89ee..ff820f95db 100644 --- a/l1-contracts/deploy-scripts/DeployL1HelperScript.s.sol +++ b/l1-contracts/deploy-scripts/DeployL1HelperScript.s.sol @@ -5,30 +5,15 @@ pragma solidity ^0.8.24; import {Script, console2 as console} from "forge-std/Script.sol"; import {TransparentUpgradeableProxy} from "@openzeppelin/contracts-v4/proxy/transparent/TransparentUpgradeableProxy.sol"; import {UpgradeableBeacon} from "@openzeppelin/contracts-v4/proxy/beacon/UpgradeableBeacon.sol"; -import {StateTransitionDeployedAddresses} from "./Utils.sol"; -import {IBridgehub} from "contracts/bridgehub/IBridgehub.sol"; -import {IChainTypeManager} from "contracts/state-transition/IChainTypeManager.sol"; -import {IL1AssetRouter} from "contracts/bridge/asset-router/IL1AssetRouter.sol"; -import {INativeTokenVault} from "contracts/bridge/ntv/INativeTokenVault.sol"; -import {L2ContractHelper} from "contracts/common/l2-helpers/L2ContractHelper.sol"; -import {IL1Nullifier, L1Nullifier} from "contracts/bridge/L1Nullifier.sol"; -import {IL1NativeTokenVault} from "contracts/bridge/ntv/IL1NativeTokenVault.sol"; -import {IL1ERC20Bridge} from "contracts/bridge/interfaces/IL1ERC20Bridge.sol"; -import {ICTMDeploymentTracker} from "contracts/bridgehub/ICTMDeploymentTracker.sol"; -import {IMessageRoot} from "contracts/bridgehub/IMessageRoot.sol"; -import {IOwnable} from "contracts/common/interfaces/IOwnable.sol"; +import {L1Nullifier} from "contracts/bridge/L1Nullifier.sol"; -import {UpgradeableBeacon} from "@openzeppelin/contracts-v4/proxy/beacon/UpgradeableBeacon.sol"; -import {Multicall3} from "contracts/dev-contracts/Multicall3.sol"; - -import {TransparentUpgradeableProxy} from "@openzeppelin/contracts-v4/proxy/transparent/TransparentUpgradeableProxy.sol"; import {ProxyAdmin} from "@openzeppelin/contracts-v4/proxy/transparent/ProxyAdmin.sol"; import {Governance} from "contracts/governance/Governance.sol"; import {ChainAdmin} from "contracts/governance/ChainAdmin.sol"; -import {Bridgehub} from "contracts/bridgehub/Bridgehub.sol"; -import {ChainAssetHandler} from "contracts/bridgehub/ChainAssetHandler.sol"; -import {MessageRoot} from "contracts/bridgehub/MessageRoot.sol"; +import {L1Bridgehub} from "contracts/bridgehub/L1Bridgehub.sol"; +import {L1ChainAssetHandler} from "contracts/bridgehub/L1ChainAssetHandler.sol"; +import {L1MessageRoot} from "contracts/bridgehub/L1MessageRoot.sol"; import {CTMDeploymentTracker} from "contracts/bridgehub/CTMDeploymentTracker.sol"; import {L1NativeTokenVault} from "contracts/bridge/ntv/L1NativeTokenVault.sol"; import {L1AssetRouter} from "contracts/bridge/asset-router/L1AssetRouter.sol"; @@ -37,14 +22,15 @@ import {BridgedStandardERC20} from "contracts/bridge/BridgedStandardERC20.sol"; import {ChainAdminOwnable} from "contracts/governance/ChainAdminOwnable.sol"; import {L1NullifierDev} from "contracts/dev-contracts/L1NullifierDev.sol"; import {ContractsBytecodesLib} from "./ContractsBytecodesLib.sol"; -import {Diamond} from "contracts/state-transition/libraries/Diamond.sol"; -import {DiamondProxy} from "contracts/state-transition/chain-deps/DiamondProxy.sol"; -import {IRollupDAManager} from "./interfaces/IRollupDAManager.sol"; -import {DualVerifier} from "contracts/state-transition/verifiers/DualVerifier.sol"; -import {L1VerifierPlonk} from "contracts/state-transition/verifiers/L1VerifierPlonk.sol"; -import {L1VerifierFflonk} from "contracts/state-transition/verifiers/L1VerifierFflonk.sol"; + +import {EraDualVerifier} from "contracts/state-transition/verifiers/EraDualVerifier.sol"; +import {ZKsyncOSDualVerifier} from "contracts/state-transition/verifiers/ZKsyncOSDualVerifier.sol"; +import {EraVerifierFflonk} from "contracts/state-transition/verifiers/EraVerifierFflonk.sol"; +import {EraVerifierPlonk} from "contracts/state-transition/verifiers/EraVerifierPlonk.sol"; +import {ZKsyncOSVerifierFflonk} from "contracts/state-transition/verifiers/ZKsyncOSVerifierFflonk.sol"; +import {ZKsyncOSVerifierPlonk} from "contracts/state-transition/verifiers/ZKsyncOSVerifierPlonk.sol"; import {TestnetVerifier} from "contracts/state-transition/verifiers/TestnetVerifier.sol"; -import {IVerifier, VerifierParams} from "contracts/state-transition/chain-interfaces/IVerifier.sol"; + import {DefaultUpgrade} from "contracts/upgrades/DefaultUpgrade.sol"; import {L1GenesisUpgrade} from "contracts/upgrades/L1GenesisUpgrade.sol"; import {ValidatorTimelock} from "contracts/state-transition/ValidatorTimelock.sol"; @@ -60,8 +46,7 @@ import {BytecodesSupplier} from "contracts/upgrades/BytecodesSupplier.sol"; import {ServerNotifier} from "contracts/governance/ServerNotifier.sol"; import {UpgradeStageValidator} from "contracts/upgrades/UpgradeStageValidator.sol"; -import {Config, DeployUtils, DeployedAddresses, GeneratedData} from "./DeployUtils.s.sol"; -import {FixedForceDeploymentsData} from "contracts/state-transition/l2-deps/IL2GenesisUpgrade.sol"; +import {DeployUtils} from "./DeployUtils.s.sol"; abstract contract DeployL1HelperScript is Script, DeployUtils { function deployTuppWithContract( @@ -105,12 +90,12 @@ abstract contract DeployL1HelperScript is Script, DeployUtils { bool isZKBytecode ) internal view virtual override returns (bytes memory) { if (!isZKBytecode) { - if (compareStrings(contractName, "Bridgehub")) { - return type(Bridgehub).creationCode; - } else if (compareStrings(contractName, "ChainAssetHandler")) { - return type(ChainAssetHandler).creationCode; - } else if (compareStrings(contractName, "MessageRoot")) { - return type(MessageRoot).creationCode; + if (compareStrings(contractName, "L1Bridgehub")) { + return type(L1Bridgehub).creationCode; + } else if (compareStrings(contractName, "L1ChainAssetHandler")) { + return type(L1ChainAssetHandler).creationCode; + } else if (compareStrings(contractName, "L1MessageRoot")) { + return type(L1MessageRoot).creationCode; } else if (compareStrings(contractName, "CTMDeploymentTracker")) { return type(CTMDeploymentTracker).creationCode; } else if (compareStrings(contractName, "L1Nullifier")) { @@ -145,12 +130,20 @@ abstract contract DeployL1HelperScript is Script, DeployUtils { if (config.testnetVerifier) { return type(TestnetVerifier).creationCode; } else { - return type(DualVerifier).creationCode; + if (config.isZKsyncOS) { + return type(ZKsyncOSDualVerifier).creationCode; + } else { + return type(EraDualVerifier).creationCode; + } } - } else if (compareStrings(contractName, "VerifierFflonk")) { - return type(L1VerifierFflonk).creationCode; - } else if (compareStrings(contractName, "VerifierPlonk")) { - return type(L1VerifierPlonk).creationCode; + } else if (compareStrings(contractName, "EraVerifierFflonk")) { + return type(EraVerifierFflonk).creationCode; + } else if (compareStrings(contractName, "EraVerifierPlonk")) { + return type(EraVerifierPlonk).creationCode; + } else if (compareStrings(contractName, "ZKsyncOSVerifierFflonk")) { + return type(ZKsyncOSVerifierFflonk).creationCode; + } else if (compareStrings(contractName, "ZKsyncOSVerifierPlonk")) { + return type(ZKsyncOSVerifierPlonk).creationCode; } else if (compareStrings(contractName, "DefaultUpgrade")) { return type(DefaultUpgrade).creationCode; } else if (compareStrings(contractName, "L1GenesisUpgrade")) { @@ -193,12 +186,12 @@ abstract contract DeployL1HelperScript is Script, DeployUtils { bool isZKBytecode ) internal virtual override returns (bytes memory) { if (!isZKBytecode) { - if (compareStrings(contractName, "Bridgehub")) { - return abi.encodeCall(Bridgehub.initialize, (config.deployerAddress)); - } else if (compareStrings(contractName, "MessageRoot")) { - return abi.encodeCall(MessageRoot.initialize, ()); - } else if (compareStrings(contractName, "ChainAssetHandler")) { - return abi.encodeCall(ChainAssetHandler.initialize, (config.deployerAddress)); + if (compareStrings(contractName, "L1Bridgehub")) { + return abi.encodeCall(L1Bridgehub.initialize, (config.deployerAddress)); + } else if (compareStrings(contractName, "L1MessageRoot")) { + return abi.encodeCall(L1MessageRoot.initialize, ()); + } else if (compareStrings(contractName, "L1ChainAssetHandler")) { + return abi.encodeCall(L1ChainAssetHandler.initialize, (config.deployerAddress)); } else if (compareStrings(contractName, "CTMDeploymentTracker")) { return abi.encodeCall(CTMDeploymentTracker.initialize, (config.deployerAddress)); } else if (compareStrings(contractName, "L1Nullifier")) { diff --git a/l1-contracts/deploy-scripts/DeployL2Contracts.sol b/l1-contracts/deploy-scripts/DeployL2Contracts.sol index ef6e3e98fc..92f3715368 100644 --- a/l1-contracts/deploy-scripts/DeployL2Contracts.sol +++ b/l1-contracts/deploy-scripts/DeployL2Contracts.sol @@ -6,15 +6,14 @@ import {Script} from "forge-std/Script.sol"; import {stdToml} from "forge-std/StdToml.sol"; import {Utils} from "./Utils.sol"; -import {L2ContractHelper} from "contracts/common/l2-helpers/L2ContractHelper.sol"; + import {AddressAliasHelper} from "contracts/vendor/AddressAliasHelper.sol"; -import {ChainRegistrar} from "contracts/chain-registrar/ChainRegistrar.sol"; + import {ContractsBytecodesLib} from "./ContractsBytecodesLib.sol"; import {IGovernance} from "contracts/governance/IGovernance.sol"; import {Ownable2Step} from "@openzeppelin/contracts-v4/access/Ownable2Step.sol"; import {Call} from "contracts/governance/Common.sol"; -// import {L1AssetRouter} from "contracts/bridge/asset-router/L1AssetRouter.sol"; - +// contract DeployL2Script is Script { using stdToml for string; @@ -44,7 +43,6 @@ contract DeployL2Script is Script { } struct DeployedContrats { - address l2DaValidatorAddress; address forceDeployUpgraderAddress; address consensusRegistryImplementation; address consensusRegistryProxy; @@ -83,9 +81,6 @@ contract DeployL2Script is Script { } function deploy(bool legacyBridge) public { - // Note, that it is important that the first transaction is for setting the L2 DA validator - deployL2DaValidator(); - deployForceDeployer(); deployConsensusRegistry(); deployConsensusRegistryProxy(); @@ -128,14 +123,6 @@ contract DeployL2Script is Script { saveOutput(); } - function runDeployL2DAValidator() public { - initializeConfig(); - - deployL2DaValidator(); - - saveOutput(); - } - function initializeConfig() internal { string memory root = vm.projectRoot(); string memory path = string.concat(root, "/script-config/config-deploy-l2-contracts.toml"); @@ -156,7 +143,6 @@ contract DeployL2Script is Script { } function saveOutput() internal { - vm.serializeAddress("root", "l2_da_validator_address", deployed.l2DaValidatorAddress); vm.serializeAddress("root", "multicall3", deployed.multicall3); vm.serializeAddress("root", "consensus_registry_implementation", deployed.consensusRegistryImplementation); vm.serializeAddress("root", "consensus_registry_proxy", deployed.consensusRegistryProxy); @@ -168,30 +154,6 @@ contract DeployL2Script is Script { vm.writeToml(toml, path); } - function deployL2DaValidator() internal { - bytes memory bytecode; - if (config.validatorType == DAValidatorType.Rollup) { - bytecode = ContractsBytecodesLib.getCreationCode("RollupL2DAValidator"); - } else if (config.validatorType == DAValidatorType.NoDA) { - bytecode = ContractsBytecodesLib.getCreationCode("ValidiumL2DAValidator"); - } else if (config.validatorType == DAValidatorType.Avail) { - bytecode = ContractsBytecodesLib.getCreationCode("AvailL2DAValidator"); - } else { - revert("Invalid DA validator type"); - } - - deployed.l2DaValidatorAddress = Utils.deployThroughL1Deterministic({ - bytecode: bytecode, - constructorargs: bytes(""), - create2salt: "", - l2GasLimit: Utils.MAX_PRIORITY_TX_GAS, - factoryDeps: new bytes[](0), - chainId: config.chainId, - bridgehubAddress: config.bridgehubAddress, - l1SharedBridgeProxy: config.l1SharedBridgeProxy - }); - } - function deployForceDeployer() internal { bytes[] memory factoryDeps = new bytes[](0); deployed.forceDeployUpgraderAddress = Utils.deployThroughL1({ diff --git a/l1-contracts/deploy-scripts/DeployUtils.s.sol b/l1-contracts/deploy-scripts/DeployUtils.s.sol index 390af58f13..a1db09532e 100644 --- a/l1-contracts/deploy-scripts/DeployUtils.s.sol +++ b/l1-contracts/deploy-scripts/DeployUtils.s.sol @@ -3,18 +3,18 @@ pragma solidity ^0.8.24; // solhint-disable no-console, gas-custom-errors -import {Script, console2 as console} from "forge-std/Script.sol"; +import {console2 as console} from "forge-std/Script.sol"; import {stdToml} from "forge-std/StdToml.sol"; import {StateTransitionDeployedAddresses, Utils} from "./Utils.sol"; import {IVerifier, VerifierParams} from "contracts/state-transition/chain-interfaces/IVerifier.sol"; -import {ChainCreationParams, ChainTypeManagerInitializeData, IChainTypeManager} from "contracts/state-transition/IChainTypeManager.sol"; +import {ChainCreationParams, ChainTypeManagerInitializeData} from "contracts/state-transition/IChainTypeManager.sol"; import {Diamond} from "contracts/state-transition/libraries/Diamond.sol"; import {InitializeDataNewChain as DiamondInitializeDataNewChain} from "contracts/state-transition/chain-interfaces/IDiamondInit.sol"; import {FeeParams, PubdataPricingMode} from "contracts/state-transition/chain-deps/ZKChainStorage.sol"; -import {Create2AndTransfer} from "./Create2AndTransfer.sol"; -import {Create2FactoryUtils} from "./Create2FactoryUtils.s.sol"; import {L2ContractHelper} from "contracts/common/l2-helpers/L2ContractHelper.sol"; +import {Create2FactoryUtils} from "./Create2FactoryUtils.s.sol"; + // solhint-disable-next-line gas-struct-packing struct DeployedAddresses { BridgehubDeployedAddresses bridgehub; @@ -77,6 +77,7 @@ struct Config { address ownerAddress; bool testnetVerifier; bool supportL2LegacySharedBridgeTest; + bool isZKsyncOS; ContractsConfig contracts; TokensConfig tokens; } @@ -138,6 +139,7 @@ abstract contract DeployUtils is Create2FactoryUtils { config.ownerAddress = toml.readAddress("$.owner_address"); config.testnetVerifier = toml.readBool("$.testnet_verifier"); config.supportL2LegacySharedBridgeTest = toml.readBool("$.support_l2_legacy_shared_bridge_test"); + config.isZKsyncOS = toml.readBool("$.is_zk_sync_os"); config.contracts.governanceSecurityCouncilAddress = toml.readAddress( "$.contracts.governance_security_council_address" @@ -340,16 +342,15 @@ abstract contract DeployUtils is Create2FactoryUtils { ) internal view virtual returns (bytes memory) { if (compareStrings(contractName, "ChainRegistrar")) { return abi.encode(); - } else if (compareStrings(contractName, "Bridgehub")) { - return abi.encode(config.l1ChainId, config.ownerAddress, (config.contracts.maxNumberOfChains)); - } else if (compareStrings(contractName, "MessageRoot")) { - return abi.encode(addresses.bridgehub.bridgehubProxy, config.l1ChainId); + } else if (compareStrings(contractName, "L1Bridgehub")) { + return abi.encode(config.ownerAddress, config.contracts.maxNumberOfChains); + } else if (compareStrings(contractName, "L1MessageRoot")) { + return abi.encode(addresses.bridgehub.bridgehubProxy); } else if (compareStrings(contractName, "CTMDeploymentTracker")) { return abi.encode(addresses.bridgehub.bridgehubProxy, addresses.bridges.l1AssetRouterProxy); - } else if (compareStrings(contractName, "ChainAssetHandler")) { + } else if (compareStrings(contractName, "L1ChainAssetHandler")) { return abi.encode( - config.l1ChainId, config.ownerAddress, addresses.bridgehub.bridgehubProxy, addresses.bridges.l1AssetRouterProxy, @@ -401,10 +402,34 @@ abstract contract DeployUtils is Create2FactoryUtils { } else if (compareStrings(contractName, "DummyAvailBridge")) { return abi.encode(); } else if (compareStrings(contractName, "Verifier")) { - return abi.encode(addresses.stateTransition.verifierFflonk, addresses.stateTransition.verifierPlonk); - } else if (compareStrings(contractName, "VerifierFflonk")) { + if (config.testnetVerifier) { + return + abi.encode( + addresses.stateTransition.verifierFflonk, + addresses.stateTransition.verifierPlonk, + config.ownerAddress, + config.isZKsyncOS + ); + } else { + if (config.isZKsyncOS) { + return + abi.encode( + addresses.stateTransition.verifierFflonk, + addresses.stateTransition.verifierPlonk, + config.ownerAddress + ); + } else { + return + abi.encode(addresses.stateTransition.verifierFflonk, addresses.stateTransition.verifierPlonk); + } + } + } else if (compareStrings(contractName, "EraVerifierFflonk")) { return abi.encode(); - } else if (compareStrings(contractName, "VerifierPlonk")) { + } else if (compareStrings(contractName, "EraVerifierPlonk")) { + return abi.encode(); + } else if (compareStrings(contractName, "ZKsyncOSVerifierFflonk")) { + return abi.encode(); + } else if (compareStrings(contractName, "ZKsyncOSVerifierPlonk")) { return abi.encode(); } else if (compareStrings(contractName, "DefaultUpgrade")) { return abi.encode(); @@ -444,7 +469,7 @@ abstract contract DeployUtils is Create2FactoryUtils { } else if (compareStrings(contractName, "ServerNotifier")) { return abi.encode(); } else if (compareStrings(contractName, "DiamondInit")) { - return abi.encode(); + return abi.encode(config.isZKsyncOS); } else { revert(string.concat("Contract ", contractName, " creation calldata not set")); } diff --git a/l1-contracts/deploy-scripts/DeployZKAndBridgeToL1.s.sol b/l1-contracts/deploy-scripts/DeployZKAndBridgeToL1.s.sol index cda0059a16..95001af246 100644 --- a/l1-contracts/deploy-scripts/DeployZKAndBridgeToL1.s.sol +++ b/l1-contracts/deploy-scripts/DeployZKAndBridgeToL1.s.sol @@ -3,7 +3,6 @@ pragma solidity 0.8.28; // solhint-disable no-console -import {Vm} from "forge-std/Vm.sol"; import {Script, console2 as console} from "forge-std/Script.sol"; import {stdToml} from "forge-std/StdToml.sol"; @@ -11,7 +10,6 @@ import {stdToml} from "forge-std/StdToml.sol"; // solhint-disable no-unused-import import {TestnetERC20Token} from "contracts/dev-contracts/TestnetERC20Token.sol"; // solhint-disable no-unused-import -import {WETH9} from "contracts/dev-contracts/WETH9.sol"; import {L2_ASSET_ROUTER_ADDR, L2_NATIVE_TOKEN_VAULT_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; diff --git a/l1-contracts/deploy-scripts/GatewayPreparation.sol b/l1-contracts/deploy-scripts/GatewayPreparation.sol index 33cf228ead..ab1a40aa7b 100644 --- a/l1-contracts/deploy-scripts/GatewayPreparation.sol +++ b/l1-contracts/deploy-scripts/GatewayPreparation.sol @@ -4,40 +4,29 @@ pragma solidity 0.8.28; // solhint-disable no-console, gas-custom-errors, reason-string import {Script, console2 as console} from "forge-std/Script.sol"; -// import {Vm} from "forge-std/Vm.sol"; -import {stdToml} from "forge-std/StdToml.sol"; // It's required to disable lints to force the compiler to compile the contracts // solhint-disable no-unused-import import {TestnetERC20Token} from "contracts/dev-contracts/TestnetERC20Token.sol"; -import {Ownable} from "@openzeppelin/contracts-v4/access/Ownable.sol"; -import {IBridgehub, BridgehubBurnCTMAssetData} from "contracts/bridgehub/IBridgehub.sol"; +import {BridgehubBurnCTMAssetData, IL1Bridgehub} from "contracts/bridgehub/IL1Bridgehub.sol"; import {IZKChain} from "contracts/state-transition/chain-interfaces/IZKChain.sol"; -import {REQUIRED_L2_GAS_PRICE_PER_PUBDATA} from "contracts/common/Config.sol"; -import {L2TransactionRequestTwoBridgesOuter} from "contracts/bridgehub/IBridgehub.sol"; -import {L2_BRIDGEHUB_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; -import {IZKChain} from "contracts/state-transition/chain-interfaces/IZKChain.sol"; -import {StateTransitionDeployedAddresses, Utils, L2_BRIDGEHUB_ADDRESS} from "../Utils.sol"; -import {AddressAliasHelper} from "contracts/vendor/AddressAliasHelper.sol"; +import {ETH_TOKEN_ADDRESS, L2DACommitmentScheme} from "contracts/common/Config.sol"; +import {L2_ASSET_ROUTER_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; +import {L2_BRIDGEHUB_ADDRESS, Utils} from "../Utils.sol"; + import {ValidatorTimelock} from "contracts/state-transition/ValidatorTimelock.sol"; import {IAdmin} from "contracts/state-transition/chain-interfaces/IAdmin.sol"; import {GatewayTransactionFilterer} from "contracts/transactionFilterer/GatewayTransactionFilterer.sol"; import {TransparentUpgradeableProxy} from "@openzeppelin/contracts-v4/proxy/transparent/TransparentUpgradeableProxy.sol"; import {SET_ASSET_HANDLER_COUNTERPART_ENCODING_VERSION} from "contracts/bridge/asset-router/IAssetRouterBase.sol"; -import {CTM_DEPLOYMENT_TRACKER_ENCODING_VERSION} from "contracts/bridgehub/CTMDeploymentTracker.sol"; -import {L2AssetRouter, IL2AssetRouter} from "contracts/bridge/asset-router/L2AssetRouter.sol"; + +import {IL2AssetRouter, L2AssetRouter} from "contracts/bridge/asset-router/L2AssetRouter.sol"; import {L1Nullifier} from "contracts/bridge/L1Nullifier.sol"; import {L1AssetRouter} from "contracts/bridge/asset-router/L1AssetRouter.sol"; import {IL1NativeTokenVault} from "contracts/bridge/ntv/IL1NativeTokenVault.sol"; -import {BridgehubMintCTMAssetData} from "contracts/bridgehub/IBridgehub.sol"; -import {IAssetRouterBase} from "contracts/bridge/asset-router/IAssetRouterBase.sol"; -import {L2_ASSET_ROUTER_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; -import {ETH_TOKEN_ADDRESS} from "contracts/common/Config.sol"; import {DataEncoding} from "contracts/common/libraries/DataEncoding.sol"; -import {IAdmin} from "contracts/state-transition/chain-interfaces/IAdmin.sol"; import {FinalizeL1DepositParams} from "contracts/bridge/interfaces/IL1Nullifier.sol"; -import {AccessControlRestriction} from "contracts/governance/AccessControlRestriction.sol"; import {ContractsBytecodesLib} from "../ContractsBytecodesLib.sol"; import {ChainAdmin} from "contracts/governance/ChainAdmin.sol"; import {Call} from "contracts/governance/Common.sol"; @@ -220,7 +209,7 @@ contract GatewayPreparation is Script { function governanceRegisterGateway() public { initializeConfig(); - IBridgehub bridgehub = IBridgehub(config.bridgehub); + IL1Bridgehub bridgehub = IL1Bridgehub(config.bridgehub); if (bridgehub.whitelistedSettlementLayers(config.gatewayChainId)) { console.log("Chain already whitelisted as settlement layer"); @@ -244,7 +233,7 @@ contract GatewayPreparation is Script { function governanceWhitelistGatewayCTM(address gatewayCTMAddress, bytes32 governanoceOperationSalt) public { initializeConfig(); - bytes memory data = abi.encodeCall(IBridgehub.addChainTypeManager, (gatewayCTMAddress)); + bytes memory data = abi.encodeCall(IBridgehubBase.addChainTypeManager, (gatewayCTMAddress)); bytes32 l2TxHash = Utils.runGovernanceL1L2DirectTransaction( _getL1GasPrice(), @@ -290,11 +279,11 @@ contract GatewayPreparation is Script { _delay: 0 }); - bytes32 assetId = IBridgehub(config.bridgehub).ctmAssetIdFromAddress(config.chainTypeManagerProxy); + bytes32 assetId = IL1Bridgehub(config.bridgehub).ctmAssetIdFromAddress(config.chainTypeManagerProxy); // This should be equivalent to `config.chainTypeManagerProxy`, but we just double checking to ensure that // bridgehub was initialized correctly - address ctmAddress = IBridgehub(config.bridgehub).ctmAssetIdToAddress(assetId); + address ctmAddress = IL1Bridgehub(config.bridgehub).ctmAssetIdToAddress(assetId); require(ctmAddress == config.chainTypeManagerProxy, "CTM asset id does not match the expected CTM address"); bytes memory secondBridgeData = abi.encodePacked( @@ -369,7 +358,7 @@ contract GatewayPreparation is Script { ) public { initializeConfig(); - IBridgehub bridgehubContract = IBridgehub(config.bridgehub); + IL1Bridgehub bridgehubContract = IL1Bridgehub(config.bridgehub); bytes32 gatewayBaseTokenAssetId = bridgehubContract.baseTokenAssetId(config.gatewayChainId); bytes32 ethTokenAssetId = DataEncoding.encodeNTVAssetId(block.chainid, ETH_TOKEN_ADDRESS); @@ -396,9 +385,9 @@ contract GatewayPreparation is Script { console.log("Chain Admin address:", chainAdmin); - bytes32 chainAssetId = IBridgehub(config.bridgehub).ctmAssetIdFromChainId(chainId); + bytes32 chainAssetId = IL1Bridgehub(config.bridgehub).ctmAssetIdFromChainId(chainId); - uint256 currentSettlementLayer = IBridgehub(config.bridgehub).settlementLayer(chainId); + uint256 currentSettlementLayer = IL1Bridgehub(config.bridgehub).settlementLayer(chainId); if (currentSettlementLayer == config.gatewayChainId) { console.log("Chain already using gateway as its settlement layer"); saveOutput(bytes32(0)); @@ -409,7 +398,7 @@ contract GatewayPreparation is Script { BridgehubBurnCTMAssetData({ chainId: chainId, ctmData: abi.encode(l2ChainAdmin, config.gatewayDiamondCutData), - chainData: abi.encode(IZKChain(IBridgehub(config.bridgehub).getZKChain(chainId)).getProtocolVersion()) + chainData: abi.encode(IZKChain(IL1Bridgehub(config.bridgehub).getZKChain(chainId)).getProtocolVersion()) }) ); @@ -440,7 +429,7 @@ contract GatewayPreparation is Script { uint256 chainId ) public { initializeConfig(); - IBridgehub bridgehub = IBridgehub(config.bridgehub); + IL1Bridgehub bridgehub = IL1Bridgehub(config.bridgehub); uint256 currentSettlementLayer = bridgehub.settlementLayer(chainId); if (currentSettlementLayer != config.gatewayChainId) { @@ -499,7 +488,7 @@ contract GatewayPreparation is Script { initializeConfig(); L1Nullifier l1Nullifier = L1Nullifier(config.l1NullifierProxy); - IBridgehub bridgehub = IBridgehub(config.bridgehub); + IL1Bridgehub bridgehub = IL1Bridgehub(config.bridgehub); bytes32 assetId = bridgehub.ctmAssetIdFromChainId(migratingChainId); vm.broadcast(); l1Nullifier.finalizeDeposit( @@ -521,13 +510,13 @@ contract GatewayPreparation is Script { address accessControlRestriction, uint256 chainId, address l1DAValidator, - address l2DAValidator, + L2DACommitmentScheme l2DACommitmentScheme, address chainDiamondProxyOnGateway, address chainAdminOnGateway ) public { initializeConfig(); - bytes memory data = abi.encodeCall(IAdmin.setDAValidatorPair, (l1DAValidator, l2DAValidator)); + bytes memory data = abi.encodeCall(IAdmin.setDAValidatorPair, (l1DAValidator, l2DACommitmentScheme)); bytes32 l2TxHash = Utils.runAdminL1L2DirectTransaction( _getL1GasPrice(), @@ -604,7 +593,7 @@ contract GatewayPreparation is Script { vm.broadcast(); GatewayTransactionFilterer impl = new GatewayTransactionFilterer( - IBridgehub(config.bridgehub), + IL1Bridgehub(config.bridgehub), config.sharedBridgeProxy ); @@ -617,7 +606,7 @@ contract GatewayPreparation is Script { GatewayTransactionFilterer proxyAsFilterer = GatewayTransactionFilterer(address(proxy)); - IZKChain chain = IZKChain(IBridgehub(config.bridgehub).getZKChain(config.gatewayChainId)); + IZKChain chain = IZKChain(IL1Bridgehub(config.bridgehub).getZKChain(config.gatewayChainId)); // Firstly, we set the filterer Utils.adminExecute({ diff --git a/l1-contracts/deploy-scripts/InitializeL2WethToken.s.sol b/l1-contracts/deploy-scripts/InitializeL2WethToken.s.sol index 57a63a1766..d3575453f1 100644 --- a/l1-contracts/deploy-scripts/InitializeL2WethToken.s.sol +++ b/l1-contracts/deploy-scripts/InitializeL2WethToken.s.sol @@ -8,8 +8,7 @@ import {stdToml} from "forge-std/StdToml.sol"; import {ITransparentUpgradeableProxy} from "@openzeppelin/contracts-v4/proxy/transparent/TransparentUpgradeableProxy.sol"; import {Utils} from "./Utils.sol"; -import {L2TransactionRequestDirect} from "contracts/bridgehub/IBridgehub.sol"; -import {Bridgehub} from "contracts/bridgehub/Bridgehub.sol"; +import {IL1Bridgehub, L2TransactionRequestDirect} from "contracts/bridgehub/IL1Bridgehub.sol"; contract InitializeL2WethTokenScript is Script { using stdToml for string; @@ -74,7 +73,7 @@ contract InitializeL2WethTokenScript is Script { } function initializeL2WethToken() internal { - Bridgehub bridgehub = Bridgehub(config.bridgehubProxyAddr); + IL1Bridgehub bridgehub = IL1Bridgehub(config.bridgehubProxyAddr); uint256 gasPrice = Utils.bytesToUint256(vm.rpc("eth_gasPrice", "[]")) * config.gasMultiplier; uint256 requiredValueToInitializeBridge = bridgehub.l2TransactionBaseCost( diff --git a/l1-contracts/deploy-scripts/PrepareZKChainRegistrationCalldata.s.sol b/l1-contracts/deploy-scripts/PrepareZKChainRegistrationCalldata.s.sol index ddb10bf73f..ea9fd56e10 100644 --- a/l1-contracts/deploy-scripts/PrepareZKChainRegistrationCalldata.s.sol +++ b/l1-contracts/deploy-scripts/PrepareZKChainRegistrationCalldata.s.sol @@ -6,9 +6,9 @@ pragma solidity 0.8.28; import {Script, console2 as console} from "forge-std/Script.sol"; import {stdToml} from "forge-std/StdToml.sol"; -import {IBridgehub} from "contracts/bridgehub/IBridgehub.sol"; -import {Bridgehub} from "contracts/bridgehub/Bridgehub.sol"; -import {L2ContractHelper} from "contracts/common/l2-helpers/L2ContractHelper.sol"; +import {IL1Bridgehub} from "contracts/bridgehub/IL1Bridgehub.sol"; +import {L1Bridgehub} from "contracts/bridgehub/L1Bridgehub.sol"; +import {L2ContractHelper} from "contracts/common/libraries/L2ContractHelper.sol"; import {AddressAliasHelper} from "contracts/vendor/AddressAliasHelper.sol"; import {L1AssetRouter} from "contracts/bridge/L1AssetRouter.sol"; import {IChainTypeManager} from "contracts/state-transition/IChainTypeManager.sol"; @@ -109,7 +109,7 @@ contract PrepareZKChainRegistrationCalldataScript is Script { IGovernance.Call[] memory calls; uint256 cnt = 0; - if (!IBridgehub(ecosystem.bridgehub).tokenIsRegistered(config.baseToken)) { + if (!IL1Bridgehub(ecosystem.bridgehub).tokenIsRegistered(config.baseToken)) { calls = new IGovernance.Call[](2); console.log("Adding a call to register base token on the bridgehub"); IGovernance.Call memory baseTokenRegistrationCall = prepareRegisterBaseTokenCall(); @@ -143,8 +143,8 @@ contract PrepareZKChainRegistrationCalldataScript is Script { config.erc20BridgeProxy = toml.readAddress("$.deployed_addresses.erc20_bridge_proxy_addr"); ecosystem.bridgehub = IChainTypeManager(config.stateTransitionProxy).BRIDGE_HUB(); - ecosystem.l1SharedBridgeProxy = address(Bridgehub(ecosystem.bridgehub).sharedBridge()); - ecosystem.governance = Bridgehub(ecosystem.bridgehub).owner(); + ecosystem.l1SharedBridgeProxy = address(L1Bridgehub(ecosystem.bridgehub).sharedBridge()); + ecosystem.governance = L1Bridgehub(ecosystem.bridgehub).owner(); config.chainId = toml.readUint("$.chain.chain_id"); config.eraChainId = toml.readUint("$.chain.era_chain_id"); @@ -181,7 +181,7 @@ contract PrepareZKChainRegistrationCalldataScript is Script { } function prepareRegisterBaseTokenCall() internal view returns (Call memory) { - Bridgehub bridgehub = Bridgehub(ecosystem.bridgehub); + L1Bridgehub bridgehub = L1Bridgehub(ecosystem.bridgehub); bytes memory data = abi.encodeCall( bridgehub.addTokenAssetId, @@ -273,7 +273,7 @@ contract PrepareZKChainRegistrationCalldataScript is Script { } function prepareRegisterZKChainCall() internal view returns (IGovernance.Call memory) { - Bridgehub bridgehub = Bridgehub(ecosystem.bridgehub); + L1Bridgehub bridgehub = L1Bridgehub(ecosystem.bridgehub); bytes memory data = abi.encodeCall( bridgehub.createNewChain, diff --git a/l1-contracts/deploy-scripts/ProposeChainRegistration.s.sol b/l1-contracts/deploy-scripts/ProposeChainRegistration.s.sol index 880fc5c658..7a1204b2fd 100644 --- a/l1-contracts/deploy-scripts/ProposeChainRegistration.s.sol +++ b/l1-contracts/deploy-scripts/ProposeChainRegistration.s.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.0; -import {Script, console2 as console} from "forge-std/Script.sol"; +import {Script} from "forge-std/Script.sol"; import {stdToml} from "forge-std/StdToml.sol"; import {IERC20} from "@openzeppelin/contracts-v4/token/ERC20/IERC20.sol"; import {ChainRegistrar} from "contracts/chain-registrar/ChainRegistrar.sol"; diff --git a/l1-contracts/deploy-scripts/RegisterCTM.s.sol b/l1-contracts/deploy-scripts/RegisterCTM.s.sol index 35f31d4611..5c7f2ef6e5 100644 --- a/l1-contracts/deploy-scripts/RegisterCTM.s.sol +++ b/l1-contracts/deploy-scripts/RegisterCTM.s.sol @@ -10,7 +10,7 @@ import {Call} from "contracts/governance/Common.sol"; import {IGovernance} from "contracts/governance/IGovernance.sol"; import {IOwnable} from "contracts/common/interfaces/IOwnable.sol"; -import {IBridgehub} from "contracts/bridgehub/IBridgehub.sol"; +import {IL1Bridgehub} from "contracts/bridgehub/IL1Bridgehub.sol"; import {ICTMDeploymentTracker} from "contracts/bridgehub/ICTMDeploymentTracker.sol"; import {IL1AssetRouter} from "contracts/bridge/asset-router/IL1AssetRouter.sol"; @@ -49,7 +49,7 @@ contract RegisterCTM is Script { address chainTypeManagerProxy, bool shouldSend ) internal { - IBridgehub bridgehub = IBridgehub(bridgehubProxy); + IL1Bridgehub bridgehub = IL1Bridgehub(bridgehubProxy); address ctmDeploymentTrackerProxy = address(bridgehub.l1CtmDeployer()); address l1AssetRouterProxy = bridgehub.assetRouter(); @@ -102,7 +102,7 @@ contract RegisterCTM is Script { } function registerChainTypeManagerForTest(address bridgehubProxy, address chainTypeManagerProxy) internal { - IBridgehub bridgehub = IBridgehub(bridgehubProxy); + IL1Bridgehub bridgehub = IL1Bridgehub(bridgehubProxy); vm.startBroadcast(msg.sender); bridgehub.addChainTypeManager(chainTypeManagerProxy); console.log("ChainTypeManager registered"); diff --git a/l1-contracts/deploy-scripts/RegisterZKChain.s.sol b/l1-contracts/deploy-scripts/RegisterZKChain.s.sol index f29b7b9a23..2c0d60d387 100644 --- a/l1-contracts/deploy-scripts/RegisterZKChain.s.sol +++ b/l1-contracts/deploy-scripts/RegisterZKChain.s.sol @@ -4,14 +4,14 @@ pragma solidity 0.8.28; // solhint-disable no-console, gas-custom-errors, reason-string import {Script, console2 as console} from "forge-std/Script.sol"; -import {Vm} from "forge-std/Vm.sol"; + import {stdToml} from "forge-std/StdToml.sol"; import {ProxyAdmin} from "@openzeppelin/contracts-v4/proxy/transparent/ProxyAdmin.sol"; -import {Ownable} from "@openzeppelin/contracts-v4/access/Ownable.sol"; -import {IBridgehub} from "contracts/bridgehub/IBridgehub.sol"; +import {IL1Bridgehub} from "contracts/bridgehub/IL1Bridgehub.sol"; import {IZKChain} from "contracts/state-transition/chain-interfaces/IZKChain.sol"; import {ValidatorTimelock} from "contracts/state-transition/ValidatorTimelock.sol"; +import {IValidatorTimelock} from "contracts/state-transition/IValidatorTimelock.sol"; import {Governance} from "contracts/governance/Governance.sol"; import {ChainAdmin} from "contracts/governance/ChainAdmin.sol"; import {ChainAdminOwnable} from "contracts/governance/ChainAdminOwnable.sol"; @@ -20,18 +20,17 @@ import {AccessControlRestriction} from "contracts/governance/AccessControlRestri import {ADDRESS_ONE, Utils} from "./Utils.sol"; import {ContractsBytecodesLib} from "./ContractsBytecodesLib.sol"; import {PubdataPricingMode} from "contracts/state-transition/chain-deps/ZKChainStorage.sol"; -import {IL1NativeTokenVault} from "contracts/bridge/ntv/IL1NativeTokenVault.sol"; -import {INativeTokenVault} from "contracts/bridge/ntv/INativeTokenVault.sol"; + +import {INativeTokenVaultBase} from "contracts/bridge/ntv/INativeTokenVaultBase.sol"; import {DataEncoding} from "contracts/common/libraries/DataEncoding.sol"; -import {L2ContractHelper} from "contracts/common/l2-helpers/L2ContractHelper.sol"; + import {L1NullifierDev} from "contracts/dev-contracts/L1NullifierDev.sol"; -import {L2SharedBridgeLegacy} from "contracts/bridge/L2SharedBridgeLegacy.sol"; -import {AddressAliasHelper} from "contracts/vendor/AddressAliasHelper.sol"; + import {L2LegacySharedBridgeTestHelper} from "./L2LegacySharedBridgeTestHelper.sol"; import {IGovernance} from "contracts/governance/IGovernance.sol"; import {Ownable2Step} from "@openzeppelin/contracts-v4/access/Ownable2Step.sol"; import {Call} from "contracts/governance/Common.sol"; -import {ServerNotifier} from "contracts/governance/ServerNotifier.sol"; + import {ETH_TOKEN_ADDRESS} from "contracts/common/Config.sol"; import {Create2AndTransfer} from "./Create2AndTransfer.sol"; @@ -42,8 +41,12 @@ struct Config { uint256 chainChainId; bool validiumMode; uint256 bridgehubCreateNewChainSalt; - address validatorSenderOperatorCommitEth; + address validatorSenderOperatorEth; address validatorSenderOperatorBlobsEth; + // optional - if not set, then equal to 0 + address validatorSenderOperatorProve; + // optional - if not set, then equal to 0 + address validatorSenderOperatorExecute; address baseToken; bytes32 baseTokenAssetId; uint128 baseTokenGasPriceMultiplierNominator; @@ -176,8 +179,22 @@ contract RegisterZKChainScript is Script { config.governanceMinDelay = uint256(toml.readUint("$.chain.governance_min_delay")); config.bridgehubCreateNewChainSalt = toml.readUint("$.chain.bridgehub_create_new_chain_salt"); config.validiumMode = toml.readBool("$.chain.validium_mode"); - config.validatorSenderOperatorCommitEth = toml.readAddress("$.chain.validator_sender_operator_commit_eth"); + config.validatorSenderOperatorEth = toml.readAddress("$.chain.validator_sender_operator_eth"); config.validatorSenderOperatorBlobsEth = toml.readAddress("$.chain.validator_sender_operator_blobs_eth"); + + // These were added to zkstack tool recently (9th Sept 2025). + // So doing this for backwards compatibility. + if (vm.keyExistsToml(toml, "$.chain.validator_sender_operator_prove")) { + config.validatorSenderOperatorProve = toml.readAddress("$.chain.validator_sender_operator_prove"); + } else { + config.validatorSenderOperatorProve = address(0); + } + if (vm.keyExistsToml(toml, "$.chain.validator_sender_operator_execute")) { + config.validatorSenderOperatorExecute = toml.readAddress("$.chain.validator_sender_operator_execute"); + } else { + config.validatorSenderOperatorExecute = address(0); + } + config.initializeLegacyBridge = toml.readBool("$.initialize_legacy_bridge"); config.governance = toml.readAddress("$.governance"); @@ -229,8 +246,12 @@ contract RegisterZKChainScript is Script { config.bridgehubCreateNewChainSalt = toml.readUint("$.chain.bridgehub_create_new_chain_salt"); config.baseToken = toml.readAddress("$.chain.base_token_addr"); config.validiumMode = toml.readBool("$.chain.validium_mode"); - config.validatorSenderOperatorCommitEth = toml.readAddress("$.chain.validator_sender_operator_commit_eth"); + config.validatorSenderOperatorEth = toml.readAddress("$.chain.validator_sender_operator_eth"); config.validatorSenderOperatorBlobsEth = toml.readAddress("$.chain.validator_sender_operator_blobs_eth"); + // These were added to zkstack tool recently (9th Sept 2025). + config.validatorSenderOperatorProve = toml.readAddress("$.chain.validator_sender_operator_prove"); + config.validatorSenderOperatorExecute = toml.readAddress("$.chain.validator_sender_operator_execute"); + config.baseTokenGasPriceMultiplierNominator = uint128( toml.readUint("$.chain.base_token_gas_price_multiplier_nominator") ); @@ -276,9 +297,9 @@ contract RegisterZKChainScript is Script { } function registerAssetIdOnBridgehub() internal { - IBridgehub bridgehub = IBridgehub(config.bridgehub); + IL1Bridgehub bridgehub = IL1Bridgehub(config.bridgehub); ChainAdminOwnable admin = ChainAdminOwnable(payable(bridgehub.admin())); - INativeTokenVault ntv = INativeTokenVault(config.nativeTokenVault); + INativeTokenVaultBase ntv = INativeTokenVaultBase(config.nativeTokenVault); bytes32 baseTokenAssetId = ntv.assetId(config.baseToken); uint256 baseTokenOriginChain = ntv.originChainId(baseTokenAssetId); @@ -303,7 +324,7 @@ contract RegisterZKChainScript is Script { } function registerTokenOnNTV() internal { - INativeTokenVault ntv = INativeTokenVault(config.nativeTokenVault); + INativeTokenVaultBase ntv = INativeTokenVaultBase(config.nativeTokenVault); bytes32 baseTokenAssetId = ntv.assetId(config.baseToken); uint256 baseTokenOriginChain = ntv.originChainId(baseTokenAssetId); @@ -381,7 +402,7 @@ contract RegisterZKChainScript is Script { } function registerZKChain() internal { - IBridgehub bridgehub = IBridgehub(config.bridgehub); + IL1Bridgehub bridgehub = IL1Bridgehub(config.bridgehub); ChainAdminOwnable admin = ChainAdminOwnable(payable(bridgehub.admin())); IChainAdminOwnable.Call[] memory calls = new IChainAdminOwnable.Call[](1); @@ -416,13 +437,71 @@ contract RegisterZKChainScript is Script { function addValidators() internal { ValidatorTimelock validatorTimelock = ValidatorTimelock(config.validatorTimelock); + address chainAddress = validatorTimelock.BRIDGE_HUB().getZKChain(config.chainChainId); vm.startBroadcast(msg.sender); - validatorTimelock.addValidatorForChainId(config.chainChainId, config.validatorSenderOperatorCommitEth); - validatorTimelock.addValidatorForChainId(config.chainChainId, config.validatorSenderOperatorBlobsEth); + + // Add committer role to the first two addresses (commit operators) + + // We give all roles to the committer, the reason is because the separate prover/executer roles + // are only provided in ZKsync OS, while on Era all of them are filled by committer. + validatorTimelock.addValidatorRoles( + chainAddress, + config.validatorSenderOperatorEth, + IValidatorTimelock.ValidatorRotationParams({ + rotatePrecommitterRole: true, + rotateCommitterRole: false, + rotateReverterRole: true, + rotateProverRole: true, + rotateExecutorRole: true + }) + ); + + validatorTimelock.addValidatorRoles( + chainAddress, + config.validatorSenderOperatorBlobsEth, + IValidatorTimelock.ValidatorRotationParams({ + rotatePrecommitterRole: false, + rotateCommitterRole: true, + rotateReverterRole: false, + rotateProverRole: false, + rotateExecutorRole: false + }) + ); + + // Add prover role to the third address, only if set + if (config.validatorSenderOperatorProve != address(0)) { + validatorTimelock.addValidatorRoles( + chainAddress, + config.validatorSenderOperatorProve, + IValidatorTimelock.ValidatorRotationParams({ + rotatePrecommitterRole: false, + rotateCommitterRole: false, + rotateReverterRole: false, + rotateProverRole: true, + rotateExecutorRole: false + }) + ); + } + + // Add executor role to the fourth address, only if set + if (config.validatorSenderOperatorExecute != address(0)) { + validatorTimelock.addValidatorRoles( + chainAddress, + config.validatorSenderOperatorExecute, + IValidatorTimelock.ValidatorRotationParams({ + rotatePrecommitterRole: false, + rotateCommitterRole: false, + rotateReverterRole: false, + rotateProverRole: false, + rotateExecutorRole: true + }) + ); + } + vm.stopBroadcast(); - console.log("Validators added"); + console.log("Validators added with specific roles"); } function configureZkSyncStateTransition() internal { @@ -494,11 +573,7 @@ contract RegisterZKChainScript is Script { } function getFactoryDeps() internal view returns (bytes[] memory) { - bytes[] memory factoryDeps = new bytes[](4); - factoryDeps[0] = ContractsBytecodesLib.getCreationCode("BeaconProxy"); - factoryDeps[1] = ContractsBytecodesLib.getCreationCode("BridgedStandardERC20"); - factoryDeps[2] = ContractsBytecodesLib.getCreationCode("UpgradeableBeacon"); - factoryDeps[3] = ContractsBytecodesLib.getCreationCode("SystemTransparentUpgradeableProxy"); + bytes[] memory factoryDeps = new bytes[](0); return factoryDeps; } diff --git a/l1-contracts/deploy-scripts/SecurityCouncilApproveStageUpgrade.s.sol b/l1-contracts/deploy-scripts/SecurityCouncilApproveStageUpgrade.s.sol index e654cec591..9078dda832 100644 --- a/l1-contracts/deploy-scripts/SecurityCouncilApproveStageUpgrade.s.sol +++ b/l1-contracts/deploy-scripts/SecurityCouncilApproveStageUpgrade.s.sol @@ -2,7 +2,7 @@ pragma solidity ^0.8.21; import {Utils} from "./Utils.sol"; -import {IGovernance} from "contracts/governance/IGovernance.sol"; + import {stdToml} from "forge-std/StdToml.sol"; import {IProtocolUpgradeHandler} from "./interfaces/IProtocolUpgradeHandler.sol"; import {Script} from "forge-std/Script.sol"; diff --git a/l1-contracts/deploy-scripts/SecurityCouncilEmergencyStageUpgrade.s.sol b/l1-contracts/deploy-scripts/SecurityCouncilEmergencyStageUpgrade.s.sol index 91395733b9..82147bff2c 100644 --- a/l1-contracts/deploy-scripts/SecurityCouncilEmergencyStageUpgrade.s.sol +++ b/l1-contracts/deploy-scripts/SecurityCouncilEmergencyStageUpgrade.s.sol @@ -2,7 +2,7 @@ pragma solidity ^0.8.21; import {Utils} from "./Utils.sol"; -import {IGovernance} from "contracts/governance/IGovernance.sol"; + import {stdToml} from "forge-std/StdToml.sol"; import {IProtocolUpgradeHandler} from "./interfaces/IProtocolUpgradeHandler.sol"; import {Script} from "forge-std/Script.sol"; diff --git a/l1-contracts/deploy-scripts/Utils.sol b/l1-contracts/deploy-scripts/Utils.sol index 205e8847b9..231373c6de 100644 --- a/l1-contracts/deploy-scripts/Utils.sol +++ b/l1-contracts/deploy-scripts/Utils.sol @@ -8,7 +8,7 @@ import {console2 as console} from "forge-std/Script.sol"; import {IAccessControlDefaultAdminRules} from "@openzeppelin/contracts-v4/access/IAccessControlDefaultAdminRules.sol"; -import {IBridgehub, L2TransactionRequestDirect, L2TransactionRequestTwoBridgesOuter} from "contracts/bridgehub/IBridgehub.sol"; +import {IL1Bridgehub, L2TransactionRequestDirect, L2TransactionRequestTwoBridgesOuter} from "contracts/bridgehub/IL1Bridgehub.sol"; import {IGovernance} from "contracts/governance/IGovernance.sol"; import {IERC20} from "@openzeppelin/contracts-v4/token/ERC20/IERC20.sol"; import {IOwnable} from "contracts/common/interfaces/IOwnable.sol"; @@ -23,8 +23,8 @@ import {IEmergencyUpgrageBoard} from "./interfaces/IEmergencyUpgrageBoard.sol"; import {ISecurityCouncil} from "./interfaces/ISecurityCouncil.sol"; import {IMultisig} from "./interfaces/IMultisig.sol"; import {ISafe} from "./interfaces/ISafe.sol"; -import {ChainAdminOwnable} from "contracts/governance/ChainAdminOwnable.sol"; -import {Bridgehub} from "contracts/bridgehub/Bridgehub.sol"; + +import {L1Bridgehub} from "contracts/bridgehub/L1Bridgehub.sol"; import {ChainTypeManager} from "contracts/state-transition/ChainTypeManager.sol"; import {IGetters} from "contracts/state-transition/chain-interfaces/IGetters.sol"; @@ -394,7 +394,7 @@ library Utils { view returns (L2TransactionRequestDirect memory l2TransactionRequestDirect, uint256 requiredValueToDeploy) { - IBridgehub bridgehub = IBridgehub(params.bridgehubAddress); + IL1Bridgehub bridgehub = IL1Bridgehub(params.bridgehubAddress); requiredValueToDeploy = bridgehub.l2TransactionBaseCost( @@ -433,7 +433,7 @@ library Utils { view returns (L2TransactionRequestTwoBridgesOuter memory l2TransactionRequest, uint256 requiredValueToDeploy) { - IBridgehub bridgehub = IBridgehub(bridgehubAddress); + IL1Bridgehub bridgehub = IL1Bridgehub(bridgehubAddress); requiredValueToDeploy = bridgehub.l2TransactionBaseCost(chainId, l1GasPrice, l2GasLimit, REQUIRED_L2_GAS_PRICE_PER_PUBDATA) * @@ -466,7 +466,7 @@ library Utils { address l1SharedBridgeProxy, address refundRecipient ) internal returns (bytes32 txHash) { - IBridgehub bridgehub = IBridgehub(bridgehubAddress); + IL1Bridgehub bridgehub = IL1Bridgehub(bridgehubAddress); ( L2TransactionRequestDirect memory l2TransactionRequestDirect, uint256 requiredValueToDeploy @@ -499,7 +499,7 @@ library Utils { Vm.Log[] memory logs = vm.getRecordedLogs(); console.log("Transaction executed succeassfully! Extracting logs..."); - address expectedDiamondProxyAddress = IBridgehub(bridgehubAddress).getZKChain(chainId); + address expectedDiamondProxyAddress = IL1Bridgehub(bridgehubAddress).getZKChain(chainId); txHash = extractPriorityOpFromLogs(expectedDiamondProxyAddress, logs); @@ -537,7 +537,7 @@ library Utils { ); (uint256 ethAmountToPass, Call[] memory newCalls) = prepareApproveBaseTokenGovernanceCalls( - IBridgehub(bridgehubAddress), + IL1Bridgehub(bridgehubAddress), l1SharedBridgeProxy, chainId, requiredValueToDeploy @@ -546,7 +546,7 @@ library Utils { calls = mergeCalls(calls, newCalls); bytes memory l2TransactionRequestDirectCalldata = abi.encodeCall( - IBridgehub.requestL2TransactionDirect, + IL1Bridgehub.requestL2TransactionDirect, (l2TransactionRequestDirect) ); @@ -582,7 +582,7 @@ library Utils { ); (uint256 ethAmountToPass, Call[] memory newCalls) = prepareApproveBaseTokenGovernanceCalls( - IBridgehub(bridgehubAddress), + IL1Bridgehub(bridgehubAddress), l1SharedBridgeProxy, chainId, requiredValueToDeploy @@ -591,7 +591,7 @@ library Utils { calls = mergeCalls(calls, newCalls); bytes memory l2TransactionRequestCalldata = abi.encodeCall( - IBridgehub.requestL2TransactionTwoBridges, + IL1Bridgehub.requestL2TransactionTwoBridges, (l2TransactionRequest) ); @@ -602,7 +602,7 @@ library Utils { } function prepareApproveBaseTokenGovernanceCalls( - IBridgehub bridgehub, + IL1Bridgehub bridgehub, address l1SharedBridgeProxy, uint256 chainId, uint256 amountToApprove @@ -657,7 +657,7 @@ library Utils { // 2) Prepare approval calls if base token != ETH (uint256 ethAmountToPass, Call[] memory approvalCalls) = prepareApproveBaseTokenAdminCalls( - IBridgehub(bridgehubAddress), + IL1Bridgehub(bridgehubAddress), l1SharedBridgeProxy, chainId, requiredValueToDeploy @@ -668,7 +668,7 @@ library Utils { // 4) Add the actual requestL2TransactionDirect call to the Bridgehub bytes memory l2TransactionRequestDirectCalldata = abi.encodeCall( - IBridgehub.requestL2TransactionDirect, + IL1Bridgehub.requestL2TransactionDirect, (l2TransactionRequestDirect) ); @@ -708,7 +708,7 @@ library Utils { // 2) Prepare approval calls if base token != ETH (uint256 ethAmountToPass, Call[] memory approvalCalls) = prepareApproveBaseTokenAdminCalls( - IBridgehub(bridgehubAddress), + IL1Bridgehub(bridgehubAddress), l1SharedBridgeProxy, chainId, requiredValueToDeploy @@ -719,7 +719,7 @@ library Utils { // 4) Add the actual requestL2TransactionTwoBridges call to the Bridgehub bytes memory l2TransactionRequestCalldata = abi.encodeCall( - IBridgehub.requestL2TransactionTwoBridges, + IL1Bridgehub.requestL2TransactionTwoBridges, (l2TransactionRequest) ); @@ -769,7 +769,7 @@ library Utils { Vm.Log[] memory logs = vm.getRecordedLogs(); console.log("Transaction executed successfully! Extracting logs..."); - address expectedDiamondProxyAddress = IBridgehub(bridgehubAddress).getZKChain(chainId); + address expectedDiamondProxyAddress = IL1Bridgehub(bridgehubAddress).getZKChain(chainId); txHash = extractPriorityOpFromLogs(expectedDiamondProxyAddress, logs); console.log("L2 Transaction hash is "); @@ -813,7 +813,7 @@ library Utils { Vm.Log[] memory logs = vm.getRecordedLogs(); console.log("Transaction executed successfully! Extracting logs..."); - address expectedDiamondProxyAddress = IBridgehub(bridgehubAddress).getZKChain(chainId); + address expectedDiamondProxyAddress = IL1Bridgehub(bridgehubAddress).getZKChain(chainId); txHash = extractPriorityOpFromLogs(expectedDiamondProxyAddress, logs); console.log("L2 Transaction hash is "); @@ -821,7 +821,7 @@ library Utils { } function prepareApproveBaseTokenAdminCalls( - IBridgehub bridgehub, + IL1Bridgehub bridgehub, address l1SharedBridgeProxy, uint256 chainId, uint256 amountToApprove @@ -975,6 +975,15 @@ library Utils { return bytecode; } + function readFoundryDeployedBytecodeL1( + string memory fileName, + string memory contractName + ) internal view returns (bytes memory) { + string memory path = string.concat("/../l1-contracts/out/", fileName, "/", contractName, ".json"); + bytes memory bytecode = readFoundryDeployedBytecode(path); + return bytecode; + } + function readZKFoundryBytecodeL2( string memory fileName, string memory contractName @@ -1004,6 +1013,16 @@ library Utils { return bytecode; } + function blakeHashBytecode(bytes memory bytecode) internal returns (bytes32 hashedBytecode) { + string[] memory input = new string[](5); + input[0] = "yarn"; + input[1] = "--silent"; + input[2] = "ts-node"; + input[3] = "./scripts/blake2s256.ts"; + input[4] = vm.toString(bytecode); + hashedBytecode = bytes32(vm.ffi(input)); + } + function executeUpgrade( address _governor, bytes32 _salt, @@ -1275,10 +1294,10 @@ library Utils { address _bridgehub, uint256 _chainId ) internal view returns (ChainInfoFromBridgehub memory info) { - info.l1AssetRouterProxy = Bridgehub(_bridgehub).assetRouter(); - info.diamondProxy = Bridgehub(_bridgehub).getZKChain(_chainId); + info.l1AssetRouterProxy = L1Bridgehub(_bridgehub).assetRouter(); + info.diamondProxy = L1Bridgehub(_bridgehub).getZKChain(_chainId); info.admin = IGetters(info.diamondProxy).getAdmin(); - info.ctm = Bridgehub(_bridgehub).chainTypeManager(_chainId); + info.ctm = L1Bridgehub(_bridgehub).chainTypeManager(_chainId); info.serverNotifier = ChainTypeManager(info.ctm).serverNotifierAddress(); } diff --git a/l1-contracts/deploy-scripts/dev/SetupLegacyBridge.s.sol b/l1-contracts/deploy-scripts/dev/SetupLegacyBridge.s.sol index 3c5352b379..999504f223 100644 --- a/l1-contracts/deploy-scripts/dev/SetupLegacyBridge.s.sol +++ b/l1-contracts/deploy-scripts/dev/SetupLegacyBridge.s.sol @@ -4,7 +4,7 @@ pragma solidity ^0.8.0; import {Script} from "forge-std/Script.sol"; import {stdToml} from "forge-std/StdToml.sol"; import {Utils} from "./../Utils.sol"; -import {ContractsBytecodesLib} from "../ContractsBytecodesLib.sol"; + import {L1AssetRouter} from "contracts/bridge/asset-router/L1AssetRouter.sol"; import {DummyL1ERC20Bridge} from "contracts/dev-contracts/DummyL1ERC20Bridge.sol"; import {ProxyAdmin} from "@openzeppelin/contracts-v4/proxy/transparent/ProxyAdmin.sol"; diff --git a/l1-contracts/deploy-scripts/gateway/DeployGatewayTransactionFilterer.s.sol b/l1-contracts/deploy-scripts/gateway/DeployGatewayTransactionFilterer.s.sol index 9593a4cfaa..599bcc33ae 100644 --- a/l1-contracts/deploy-scripts/gateway/DeployGatewayTransactionFilterer.s.sol +++ b/l1-contracts/deploy-scripts/gateway/DeployGatewayTransactionFilterer.s.sol @@ -1,11 +1,11 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.28; -import {Script, console2 as console} from "forge-std/Script.sol"; +import {Script} from "forge-std/Script.sol"; import {Create2FactoryUtils} from "../Create2FactoryUtils.s.sol"; import {GatewayTransactionFilterer} from "contracts/transactionFilterer/GatewayTransactionFilterer.sol"; import {TransparentUpgradeableProxy} from "@openzeppelin/contracts-v4/proxy/transparent/TransparentUpgradeableProxy.sol"; -import {IBridgehub} from "contracts/bridgehub/IBridgehub.sol"; +import {IL1Bridgehub} from "contracts/bridgehub/IL1Bridgehub.sol"; import {stdToml} from "forge-std/StdToml.sol"; /// @title DeployGatewayTransactionFilterer @@ -31,7 +31,7 @@ contract DeployGatewayTransactionFilterer is Script, Create2FactoryUtils { instantiateCreate2Factory(); // Query the L1 asset router from the Bridgehub. - address l1AssetRouter = IBridgehub(bridgehub).assetRouter(); + address l1AssetRouter = IL1Bridgehub(bridgehub).assetRouter(); // Deploy the GatewayTransactionFilterer implementation via Create2 with notify. // The constructor of GatewayTransactionFilterer expects (bridgehub, l1AssetRouter). diff --git a/l1-contracts/deploy-scripts/gateway/GatewayCTMDeployerHelper.sol b/l1-contracts/deploy-scripts/gateway/GatewayCTMDeployerHelper.sol index 8d5a4916f4..6e159aa1eb 100644 --- a/l1-contracts/deploy-scripts/gateway/GatewayCTMDeployerHelper.sol +++ b/l1-contracts/deploy-scripts/gateway/GatewayCTMDeployerHelper.sol @@ -9,11 +9,11 @@ import {ServerNotifier} from "contracts/governance/ServerNotifier.sol"; import {L2_BRIDGEHUB_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; -import {IVerifier, VerifierParams} from "contracts/state-transition/chain-interfaces/IVerifier.sol"; +import {IVerifier} from "contracts/state-transition/chain-interfaces/IVerifier.sol"; import {ProxyAdmin} from "@openzeppelin/contracts-v4/proxy/transparent/ProxyAdmin.sol"; import {TransparentUpgradeableProxy} from "@openzeppelin/contracts-v4/proxy/transparent/TransparentUpgradeableProxy.sol"; import {InitializeDataNewChain as DiamondInitializeDataNewChain} from "contracts/state-transition/chain-interfaces/IDiamondInit.sol"; -import {ChainCreationParams, ChainTypeManagerInitializeData, IChainTypeManager} from "contracts/state-transition/IChainTypeManager.sol"; +import {ChainCreationParams, ChainTypeManagerInitializeData} from "contracts/state-transition/IChainTypeManager.sol"; import {Utils} from "../Utils.sol"; @@ -57,12 +57,17 @@ library GatewayCTMDeployerHelper { salt, eraChainId, l1ChainId, - config.rollupL2DAValidatorAddress, config.aliasedGovernanceAddress, contracts, innerConfig ); - contracts = _deployVerifier(config.testnetVerifier, contracts, innerConfig); + contracts = _deployVerifier( + config.testnetVerifier, + config.isZKsyncOS, + contracts, + innerConfig, + config.aliasedGovernanceAddress + ); contracts.stateTransition.validatorTimelockImplementation = _deployInternal( "ValidatorTimelock", @@ -129,7 +134,6 @@ library GatewayCTMDeployerHelper { bytes32 _salt, uint256 _eraChainId, uint256 _l1ChainId, - address _rollupL2DAValidatorAddress, address _governanceAddress, DeployedContracts memory _deployedContracts, InnerDeployConfig memory innerConfig @@ -158,7 +162,6 @@ library GatewayCTMDeployerHelper { address rollupDAManager; (_deployedContracts, rollupDAManager) = _deployRollupDAManager( _salt, - _rollupL2DAValidatorAddress, _governanceAddress, _deployedContracts, innerConfig @@ -173,7 +176,7 @@ library GatewayCTMDeployerHelper { _deployedContracts.stateTransition.diamondInit = _deployInternal( "DiamondInit", "DiamondInit.sol", - hex"", + abi.encode(false), innerConfig ); _deployedContracts.stateTransition.genesisUpgrade = _deployInternal( @@ -188,38 +191,59 @@ library GatewayCTMDeployerHelper { function _deployVerifier( bool _testnetVerifier, + bool _isZKsyncOS, DeployedContracts memory _deployedContracts, - InnerDeployConfig memory innerConfig + InnerDeployConfig memory innerConfig, + address _verifierOwner ) internal returns (DeployedContracts memory) { - address verifierFflonk = _deployInternal("L1VerifierFflonk", "L1VerifierFflonk.sol", hex"", innerConfig); - address verifierPlonk = _deployInternal("L1VerifierPlonk", "L1VerifierPlonk.sol", hex"", innerConfig); + address verifierFflonk; + address verifierPlonk; + + if (_isZKsyncOS) { + verifierFflonk = _deployInternal( + "ZKsyncOSVerifierFflonk", + "ZKsyncOSVerifierFflonk.sol", + hex"", + innerConfig + ); + verifierPlonk = _deployInternal("ZKsyncOSVerifierPlonk", "ZKsyncOSVerifierPlonk.sol", hex"", innerConfig); + } else { + verifierFflonk = _deployInternal("EraVerifierFflonk", "EraVerifierFflonk.sol", hex"", innerConfig); + verifierPlonk = _deployInternal("EraVerifierPlonk", "EraVerifierPlonk.sol", hex"", innerConfig); + } _deployedContracts.stateTransition.verifierFflonk = verifierFflonk; _deployedContracts.stateTransition.verifierPlonk = verifierPlonk; - bytes memory constructorParams = abi.encode(verifierFflonk, verifierPlonk); - if (_testnetVerifier) { _deployedContracts.stateTransition.verifier = _deployInternal( "TestnetVerifier", "TestnetVerifier.sol", - constructorParams, + abi.encode(verifierFflonk, verifierPlonk, _verifierOwner, _isZKsyncOS), innerConfig ); } else { - _deployedContracts.stateTransition.verifier = _deployInternal( - "DualVerifier", - "DualVerifier.sol", - constructorParams, - innerConfig - ); + if (_isZKsyncOS) { + _deployedContracts.stateTransition.verifier = _deployInternal( + "ZKsyncOSDualVerifier", + "ZKsyncOSDualVerifier.sol", + abi.encode(verifierFflonk, verifierPlonk, _verifierOwner), + innerConfig + ); + } else { + _deployedContracts.stateTransition.verifier = _deployInternal( + "EraDualVerifier", + "EraDualVerifier.sol", + abi.encode(verifierFflonk, verifierPlonk), + innerConfig + ); + } } return _deployedContracts; } function _deployRollupDAManager( bytes32 _salt, - address _rollupL2DAValidatorAddress, address _governanceAddress, DeployedContracts memory _deployedContracts, InnerDeployConfig memory innerConfig @@ -355,7 +379,7 @@ library GatewayCTMDeployerHelper { /// @notice List of factory dependencies needed for the correct execution of /// CTMDeployer and healthy functionaling of the system overall function getListOfFactoryDeps() external returns (bytes[] memory dependencies) { - uint256 totalDependencies = 21; + uint256 totalDependencies = 24; dependencies = new bytes[](totalDependencies); uint256 index = 0; @@ -370,11 +394,14 @@ library GatewayCTMDeployerHelper { dependencies[index++] = Utils.readZKFoundryBytecodeL1("Admin.sol", "AdminFacet"); dependencies[index++] = Utils.readZKFoundryBytecodeL1("DiamondInit.sol", "DiamondInit"); dependencies[index++] = Utils.readZKFoundryBytecodeL1("L1GenesisUpgrade.sol", "L1GenesisUpgrade"); - dependencies[index++] = Utils.readZKFoundryBytecodeL1("L1VerifierFflonk.sol", "L1VerifierFflonk"); - dependencies[index++] = Utils.readZKFoundryBytecodeL1("L1VerifierPlonk.sol", "L1VerifierPlonk"); - // Include both verifiers since we cannot determine which one will be used + // Include all verifiers since we cannot determine which one will be used + dependencies[index++] = Utils.readZKFoundryBytecodeL1("EraVerifierFflonk.sol", "EraVerifierFflonk"); + dependencies[index++] = Utils.readZKFoundryBytecodeL1("EraVerifierPlonk.sol", "EraVerifierPlonk"); + dependencies[index++] = Utils.readZKFoundryBytecodeL1("ZKsyncOSVerifierFflonk.sol", "ZKsyncOSVerifierFflonk"); + dependencies[index++] = Utils.readZKFoundryBytecodeL1("ZKsyncOSVerifierPlonk.sol", "ZKsyncOSVerifierPlonk"); dependencies[index++] = Utils.readZKFoundryBytecodeL1("TestnetVerifier.sol", "TestnetVerifier"); - dependencies[index++] = Utils.readZKFoundryBytecodeL1("DualVerifier.sol", "DualVerifier"); + dependencies[index++] = Utils.readZKFoundryBytecodeL1("EraDualVerifier.sol", "EraDualVerifier"); + dependencies[index++] = Utils.readZKFoundryBytecodeL1("ZKsyncOSDualVerifier.sol", "ZKsyncOSDualVerifier"); dependencies[index++] = Utils.readZKFoundryBytecodeL1("ValidatorTimelock.sol", "ValidatorTimelock"); dependencies[index++] = Utils.readZKFoundryBytecodeL1("ChainTypeManager.sol", "ChainTypeManager"); dependencies[index++] = Utils.readZKFoundryBytecodeL1("ProxyAdmin.sol", "ProxyAdmin"); diff --git a/l1-contracts/deploy-scripts/gateway/GatewayCTMFromL1.s.sol b/l1-contracts/deploy-scripts/gateway/GatewayCTMFromL1.s.sol index a3292e5b27..0676d2782b 100644 --- a/l1-contracts/deploy-scripts/gateway/GatewayCTMFromL1.s.sol +++ b/l1-contracts/deploy-scripts/gateway/GatewayCTMFromL1.s.sol @@ -5,17 +5,10 @@ pragma solidity 0.8.28; import {Script, console2 as console} from "forge-std/Script.sol"; -// import {Vm} from "forge-std/Vm.sol"; -import {stdToml} from "forge-std/StdToml.sol"; - // It's required to disable lints to force the compiler to compile the contracts // solhint-disable no-unused-import import {TestnetERC20Token} from "contracts/dev-contracts/TestnetERC20Token.sol"; -import {Ownable} from "@openzeppelin/contracts-v4/access/Ownable.sol"; -import {IBridgehub, L2TransactionRequestTwoBridgesOuter} from "contracts/bridgehub/IBridgehub.sol"; -import {IZKChain} from "contracts/state-transition/chain-interfaces/IZKChain.sol"; -import {REQUIRED_L2_GAS_PRICE_PER_PUBDATA} from "contracts/common/Config.sol"; import {ADDRESS_ONE, StateTransitionDeployedAddresses, Utils} from "../Utils.sol"; import {L2_BRIDGEHUB_ADDR, L2_CREATE2_FACTORY_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; import {AddressAliasHelper} from "contracts/vendor/AddressAliasHelper.sol"; @@ -28,12 +21,9 @@ import {ExecutorFacet} from "contracts/state-transition/chain-deps/facets/Execut import {GettersFacet} from "contracts/state-transition/chain-deps/facets/Getters.sol"; import {MailboxFacet} from "contracts/state-transition/chain-deps/facets/Mailbox.sol"; import {DiamondProxy} from "contracts/state-transition/chain-deps/DiamondProxy.sol"; -import {DiamondInit} from "contracts/state-transition/chain-deps/DiamondInit.sol"; import {IVerifier, VerifierParams} from "contracts/state-transition/chain-interfaces/IVerifier.sol"; import {ValidatorTimelock} from "contracts/state-transition/ValidatorTimelock.sol"; -import {L1GenesisUpgrade} from "contracts/upgrades/L1GenesisUpgrade.sol"; -import {DefaultUpgrade} from "contracts/upgrades/DefaultUpgrade.sol"; import {ChainTypeManager} from "contracts/state-transition/ChainTypeManager.sol"; import {TransparentUpgradeableProxy} from "@openzeppelin/contracts-v4/proxy/transparent/TransparentUpgradeableProxy.sol"; @@ -85,8 +75,8 @@ contract GatewayCTMFromL1 is Script { uint256 genesisRollupLeafIndex; bytes32 genesisBatchCommitment; uint256 latestProtocolVersion; - address expectedRollupL2DAValidator; bytes forceDeploymentsData; + bool isZKsyncOS; } struct Output { @@ -229,8 +219,8 @@ contract GatewayCTMFromL1 is Script { genesisRollupLeafIndex: toml.readUint("$.genesis_rollup_leaf_index"), genesisBatchCommitment: toml.readBytes32("$.genesis_batch_commitment"), latestProtocolVersion: toml.readUint("$.latest_protocol_version"), - expectedRollupL2DAValidator: toml.readAddress("$.expected_rollup_l2_da_validator"), - forceDeploymentsData: toml.readBytes("$.force_deployments_data") + forceDeploymentsData: toml.readBytes("$.force_deployments_data"), + isZKsyncOS: toml.readBool("$.is_zk_sync_os") }); address aliasedGovernor = AddressAliasHelper.applyL1ToL2Alias(config.governanceAddr); @@ -239,8 +229,8 @@ contract GatewayCTMFromL1 is Script { salt: bytes32(0), eraChainId: config.eraChainId, l1ChainId: config.l1ChainId, - rollupL2DAValidatorAddress: config.expectedRollupL2DAValidator, testnetVerifier: config.testnetVerifier, + isZKsyncOS: config.isZKsyncOS, adminSelectors: Utils.getAllSelectorsForFacet("Admin"), executorSelectors: Utils.getAllSelectorsForFacet("Executor"), mailboxSelectors: Utils.getAllSelectorsForFacet("Mailbox"), @@ -391,24 +381,50 @@ contract GatewayCTMFromL1 is Script { } function deployGatewayVerifier() internal returns (address verifier) { - address verifierFflonk = address( - _deployInternal(ContractsBytecodesLib.getCreationCode("VerifierFflonk"), hex"") - ); - console.log("VerifierFflonk deployed at", verifierFflonk); - address verifierPlonk = address(_deployInternal(ContractsBytecodesLib.getCreationCode("VerifierPlonk"), hex"")); - console.log("VerifierPlonk deployed at", verifierPlonk); + address verifierFflonk; + address verifierPlonk; - if (config.testnetVerifier) { - verifier = address( - _deployInternal(ContractsBytecodesLib.getCreationCode("TestnetVerifier"), abi.encode(config.l1ChainId)) + if (config.isZKsyncOS) { + verifierFflonk = address( + _deployInternal(ContractsBytecodesLib.getCreationCode("ZKsyncOSVerifierFflonk"), hex"") + ); + console.log("ZKsyncOSVerifierFflonk deployed at", verifierFflonk); + verifierPlonk = address( + _deployInternal(ContractsBytecodesLib.getCreationCode("ZKsyncOSVerifierPlonk"), hex"") ); + console.log("ZKsyncOSVerifierPlonk deployed at", verifierPlonk); } else { + verifierFflonk = address( + _deployInternal(ContractsBytecodesLib.getCreationCode("EraVerifierFflonk"), hex"") + ); + console.log("EraVerifierFflonk deployed at", verifierFflonk); + verifierPlonk = address(_deployInternal(ContractsBytecodesLib.getCreationCode("EraVerifierPlonk"), hex"")); + console.log("EraVerifierPlonk deployed at", verifierPlonk); + } + + if (config.testnetVerifier) { verifier = address( _deployInternal( - ContractsBytecodesLib.getCreationCode("DualVerifier"), - abi.encode(verifierFflonk, verifierPlonk) + ContractsBytecodesLib.getCreationCode("TestnetVerifier"), + abi.encode(verifierFflonk, verifierPlonk, config.governanceAddr, config.isZKsyncOS) ) ); + } else { + if (config.isZKsyncOS) { + verifier = address( + _deployInternal( + ContractsBytecodesLib.getCreationCode("ZKsyncOSDualVerifier"), + abi.encode(verifierFflonk, verifierPlonk, config.governanceAddr) + ) + ); + } else { + verifier = address( + _deployInternal( + ContractsBytecodesLib.getCreationCode("EraDualVerifier"), + abi.encode(verifierFflonk, verifierPlonk) + ) + ); + } } console.log("Verifier deployed at", verifier); @@ -443,7 +459,7 @@ contract GatewayCTMFromL1 is Script { output.gatewayStateTransition.chainTypeManagerImplementation ); - // TODO(EVM-745): eventually a proxy admin or something should be deplyoed here + // TODO(EVM-745): eventually a proxy admin or something should be deployed here Diamond.FacetCut[] memory facetCuts = new Diamond.FacetCut[](4); facetCuts[0] = Diamond.FacetCut({ facet: output.gatewayStateTransition.adminFacet, diff --git a/l1-contracts/deploy-scripts/gateway/GatewayGovernanceUtils.s.sol b/l1-contracts/deploy-scripts/gateway/GatewayGovernanceUtils.s.sol index dbcfbf42b2..8477ab4c9c 100644 --- a/l1-contracts/deploy-scripts/gateway/GatewayGovernanceUtils.s.sol +++ b/l1-contracts/deploy-scripts/gateway/GatewayGovernanceUtils.s.sol @@ -4,58 +4,29 @@ pragma solidity ^0.8.0; // solhint-disable no-console, gas-custom-errors, reason-string import {Script, console2 as console} from "forge-std/Script.sol"; -// import {Vm} from "forge-std/Vm.sol"; -import {stdToml} from "forge-std/StdToml.sol"; - +// // It's required to disable lints to force the compiler to compile the contracts // solhint-disable no-unused-import -import {TestnetERC20Token} from "contracts/dev-contracts/TestnetERC20Token.sol"; - -import {Ownable} from "@openzeppelin/contracts-v4/access/Ownable.sol"; -import {BridgehubBurnCTMAssetData, BridgehubMintCTMAssetData, IBridgehub, L2TransactionRequestTwoBridgesOuter} from "contracts/bridgehub/IBridgehub.sol"; -import {IZKChain} from "contracts/state-transition/chain-interfaces/IZKChain.sol"; -import {ETH_TOKEN_ADDRESS, REQUIRED_L2_GAS_PRICE_PER_PUBDATA} from "contracts/common/Config.sol"; -import {L2_ASSET_ROUTER_ADDR, L2_BRIDGEHUB_ADDR, L2_CHAIN_ASSET_HANDLER_ADDR, L2_CREATE2_FACTORY_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; -import {StateTransitionDeployedAddresses, Utils} from "../Utils.sol"; -import {AddressAliasHelper} from "contracts/vendor/AddressAliasHelper.sol"; -import {ValidatorTimelock} from "contracts/state-transition/ValidatorTimelock.sol"; -import {IAdmin} from "contracts/state-transition/chain-interfaces/IAdmin.sol"; -import {GatewayTransactionFilterer} from "contracts/transactionFilterer/GatewayTransactionFilterer.sol"; -import {TransparentUpgradeableProxy} from "@openzeppelin/contracts-v4/proxy/transparent/TransparentUpgradeableProxy.sol"; -import {IAssetRouterBase, SET_ASSET_HANDLER_COUNTERPART_ENCODING_VERSION} from "contracts/bridge/asset-router/IAssetRouterBase.sol"; -import {CTM_DEPLOYMENT_TRACKER_ENCODING_VERSION} from "contracts/bridgehub/CTMDeploymentTracker.sol"; -import {IL2AssetRouter, L2AssetRouter} from "contracts/bridge/asset-router/L2AssetRouter.sol"; -import {L1Nullifier} from "contracts/bridge/L1Nullifier.sol"; + +import {IL1Bridgehub} from "contracts/bridgehub/IL1Bridgehub.sol"; +import {IBridgehubBase} from "contracts/bridgehub/IBridgehubBase.sol"; + +import {L2_BRIDGEHUB_ADDR, L2_CHAIN_ASSET_HANDLER_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; +import {Utils} from "../Utils.sol"; + +import {SET_ASSET_HANDLER_COUNTERPART_ENCODING_VERSION} from "contracts/bridge/asset-router/IAssetRouterBase.sol"; + import {L1AssetRouter} from "contracts/bridge/asset-router/L1AssetRouter.sol"; -import {IL1NativeTokenVault} from "contracts/bridge/ntv/IL1NativeTokenVault.sol"; + import {DataEncoding} from "contracts/common/libraries/DataEncoding.sol"; -import {FinalizeL1DepositParams} from "contracts/bridge/interfaces/IL1Nullifier.sol"; -import {AccessControlRestriction} from "contracts/governance/AccessControlRestriction.sol"; -import {ContractsBytecodesLib} from "../ContractsBytecodesLib.sol"; -import {ChainAdmin} from "contracts/governance/ChainAdmin.sol"; + import {Call} from "contracts/governance/Common.sol"; -import {IGovernance} from "contracts/governance/IGovernance.sol"; + import {Ownable2Step} from "@openzeppelin/contracts-v4/access/Ownable2Step.sol"; import {ICTMDeploymentTracker} from "contracts/bridgehub/ICTMDeploymentTracker.sol"; -import {ServerNotifier} from "contracts/governance/ServerNotifier.sol"; -import {RollupDAManager} from "contracts/state-transition/data-availability/RollupDAManager.sol"; -import {ProxyAdmin} from "@openzeppelin/contracts-v4/proxy/transparent/ProxyAdmin.sol"; -import {IChainTypeManager} from "contracts/state-transition/IChainTypeManager.sol"; import {ChainTypeManager} from "contracts/state-transition/ChainTypeManager.sol"; -import {Create2AndTransfer} from "../Create2AndTransfer.sol"; -import {IChainAdmin} from "contracts/governance/IChainAdmin.sol"; - -import {DeployCTMScript} from "../DeployCTM.s.sol"; - -import {GatewayCTMDeployerHelper} from "./GatewayCTMDeployerHelper.sol"; -import {DeployedContracts, GatewayCTMDeployerConfig} from "contracts/state-transition/chain-deps/GatewayCTMDeployer.sol"; -import {IVerifier, VerifierParams} from "contracts/state-transition/chain-interfaces/IVerifier.sol"; -import {FeeParams, PubdataPricingMode} from "contracts/state-transition/chain-deps/ZKChainStorage.sol"; -import {Bridgehub} from "contracts/bridgehub/Bridgehub.sol"; -import {GettersFacet} from "contracts/state-transition/chain-deps/facets/Getters.sol"; - abstract contract GatewayGovernanceUtils is Script { struct GatewayGovernanceConfig { address bridgehubProxy; @@ -72,7 +43,7 @@ abstract contract GatewayGovernanceUtils is Script { address _gatewayValidatorTimelock; address _gatewayServerNotifier; address _refundRecipient; - uint256 _ctmChainId; + uint256 _ctmRepresentativeChainId; } GatewayGovernanceConfig internal _gatewayGovernanceConfig; @@ -86,39 +57,42 @@ abstract contract GatewayGovernanceUtils is Script { calls[0] = Call({ target: _gatewayGovernanceConfig.bridgehubProxy, value: 0, - data: abi.encodeCall(IBridgehub.registerSettlementLayer, (_gatewayGovernanceConfig.gatewayChainId, true)) + data: abi.encodeCall(IL1Bridgehub.registerSettlementLayer, (_gatewayGovernanceConfig.gatewayChainId, true)) }); } function _prepareGatewayGovernanceCalls( PrepareGatewayGovernanceCalls memory prepareGWGovCallsStruct ) internal returns (Call[] memory calls) { + { + if (prepareGWGovCallsStruct._ctmRepresentativeChainId == _gatewayGovernanceConfig.gatewayChainId) { + calls = _getRegisterSettlementLayerCalls(); + } + } + // Registration of the new chain type manager inside the ZK Gateway chain { bytes memory data = abi.encodeCall( - IBridgehub.addChainTypeManager, + IBridgehubBase.addChainTypeManager, (prepareGWGovCallsStruct._gatewayCTMAddress) ); - calls = Utils.prepareGovernanceL1L2DirectTransaction( - prepareGWGovCallsStruct._l1GasPrice, - data, - Utils.MAX_PRIORITY_TX_GAS, - new bytes[](0), - L2_BRIDGEHUB_ADDR, - _gatewayGovernanceConfig.gatewayChainId, - _gatewayGovernanceConfig.bridgehubProxy, - _gatewayGovernanceConfig.l1AssetRouterProxy, - prepareGWGovCallsStruct._refundRecipient + calls = Utils.mergeCalls( + calls, + Utils.prepareGovernanceL1L2DirectTransaction( + prepareGWGovCallsStruct._l1GasPrice, + data, + Utils.MAX_PRIORITY_TX_GAS, + new bytes[](0), + L2_BRIDGEHUB_ADDR, + _gatewayGovernanceConfig.gatewayChainId, + _gatewayGovernanceConfig.bridgehubProxy, + _gatewayGovernanceConfig.l1AssetRouterProxy, + prepareGWGovCallsStruct._refundRecipient + ) ); } - { - if (prepareGWGovCallsStruct._ctmChainId == _gatewayGovernanceConfig.gatewayChainId) { - calls = Utils.mergeCalls(calls, _getRegisterSettlementLayerCalls()); - } - } - // Registering an asset that corresponds to chains inside L1AssetRouter // as well as inside the CTMDeploymentTracker { diff --git a/l1-contracts/deploy-scripts/gateway/GatewayUtils.s.sol b/l1-contracts/deploy-scripts/gateway/GatewayUtils.s.sol index a9a56ca7ff..ed2ac30d39 100644 --- a/l1-contracts/deploy-scripts/gateway/GatewayUtils.s.sol +++ b/l1-contracts/deploy-scripts/gateway/GatewayUtils.s.sol @@ -4,44 +4,17 @@ pragma solidity 0.8.28; // solhint-disable no-console, gas-custom-errors, reason-string import {Script, console2 as console} from "forge-std/Script.sol"; -import {Vm} from "forge-std/Vm.sol"; -import {stdToml} from "forge-std/StdToml.sol"; // It's required to disable lints to force the compiler to compile the contracts // solhint-disable no-unused-import -import {TestnetERC20Token} from "contracts/dev-contracts/TestnetERC20Token.sol"; -import {Ownable} from "@openzeppelin/contracts-v4/access/Ownable.sol"; -import {BridgehubBurnCTMAssetData, BridgehubMintCTMAssetData, IBridgehub, L2TransactionRequestTwoBridgesOuter} from "contracts/bridgehub/IBridgehub.sol"; -import {IZKChain} from "contracts/state-transition/chain-interfaces/IZKChain.sol"; -import {ETH_TOKEN_ADDRESS, REQUIRED_L2_GAS_PRICE_PER_PUBDATA} from "contracts/common/Config.sol"; -import {L2_ASSET_ROUTER_ADDR, L2_BRIDGEHUB_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; -import {StateTransitionDeployedAddresses, Utils} from "../Utils.sol"; -import {AddressAliasHelper} from "contracts/vendor/AddressAliasHelper.sol"; -import {ValidatorTimelock} from "contracts/state-transition/ValidatorTimelock.sol"; -import {IAdmin} from "contracts/state-transition/chain-interfaces/IAdmin.sol"; -import {GatewayTransactionFilterer} from "contracts/transactionFilterer/GatewayTransactionFilterer.sol"; -import {TransparentUpgradeableProxy} from "@openzeppelin/contracts-v4/proxy/transparent/TransparentUpgradeableProxy.sol"; -import {IAssetRouterBase, SET_ASSET_HANDLER_COUNTERPART_ENCODING_VERSION} from "contracts/bridge/asset-router/IAssetRouterBase.sol"; -import {CTM_DEPLOYMENT_TRACKER_ENCODING_VERSION} from "contracts/bridgehub/CTMDeploymentTracker.sol"; -import {IL2AssetRouter, L2AssetRouter} from "contracts/bridge/asset-router/L2AssetRouter.sol"; -import {L1Nullifier} from "contracts/bridge/L1Nullifier.sol"; -import {L1AssetRouter} from "contracts/bridge/asset-router/L1AssetRouter.sol"; -import {IL1NativeTokenVault} from "contracts/bridge/ntv/IL1NativeTokenVault.sol"; -import {DataEncoding} from "contracts/common/libraries/DataEncoding.sol"; -import {FinalizeL1DepositParams, IL1Nullifier} from "contracts/bridge/interfaces/IL1Nullifier.sol"; -import {AccessControlRestriction} from "contracts/governance/AccessControlRestriction.sol"; -import {ContractsBytecodesLib} from "../ContractsBytecodesLib.sol"; -import {ChainAdmin} from "contracts/governance/ChainAdmin.sol"; -import {Call} from "contracts/governance/Common.sol"; -import {IGovernance} from "contracts/governance/IGovernance.sol"; -import {Ownable2Step} from "@openzeppelin/contracts-v4/access/Ownable2Step.sol"; -import {ICTMDeploymentTracker} from "contracts/bridgehub/ICTMDeploymentTracker.sol"; -import {ServerNotifier} from "contracts/governance/ServerNotifier.sol"; +import {IL1Bridgehub} from "contracts/bridgehub/IL1Bridgehub.sol"; -import {IChainTypeManager} from "contracts/state-transition/IChainTypeManager.sol"; +import {L2_ASSET_ROUTER_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; -import {IGetters} from "contracts/state-transition/chain-interfaces/IGetters.sol"; +import {L1AssetRouter} from "contracts/bridge/asset-router/L1AssetRouter.sol"; + +import {FinalizeL1DepositParams, IL1Nullifier} from "contracts/bridge/interfaces/IL1Nullifier.sol"; /// @notice Scripts that is responsible for preparing the chain to become a gateway contract GatewayUtils is Script { @@ -55,7 +28,7 @@ contract GatewayUtils is Script { bytes memory message, bytes32[] memory merkleProof ) public { - IBridgehub bridgehub = IBridgehub(bridgehubAddr); + IL1Bridgehub bridgehub = IL1Bridgehub(bridgehubAddr); address assetRouter = bridgehub.assetRouter(); IL1Nullifier l1Nullifier = L1AssetRouter(assetRouter).L1_NULLIFIER(); diff --git a/l1-contracts/deploy-scripts/gateway/GatewayVotePreparation.s.sol b/l1-contracts/deploy-scripts/gateway/GatewayVotePreparation.s.sol index 175d096574..4fe070d540 100644 --- a/l1-contracts/deploy-scripts/gateway/GatewayVotePreparation.s.sol +++ b/l1-contracts/deploy-scripts/gateway/GatewayVotePreparation.s.sol @@ -3,58 +3,35 @@ pragma solidity 0.8.28; // solhint-disable no-console, gas-custom-errors, reason-string -import {Script, console2 as console} from "forge-std/Script.sol"; -// import {Vm} from "forge-std/Vm.sol"; -import {stdToml} from "forge-std/StdToml.sol"; +import {console2 as console} from "forge-std/Script.sol"; // It's required to disable lints to force the compiler to compile the contracts // solhint-disable no-unused-import -import {TestnetERC20Token} from "contracts/dev-contracts/TestnetERC20Token.sol"; -import {Ownable} from "@openzeppelin/contracts-v4/access/Ownable.sol"; -import {BridgehubBurnCTMAssetData, BridgehubMintCTMAssetData, IBridgehub, L2TransactionRequestTwoBridgesOuter} from "contracts/bridgehub/IBridgehub.sol"; -import {IZKChain} from "contracts/state-transition/chain-interfaces/IZKChain.sol"; -import {REQUIRED_L2_GAS_PRICE_PER_PUBDATA} from "contracts/common/Config.sol"; +import {IL1Bridgehub} from "contracts/bridgehub/IL1Bridgehub.sol"; + import {L2_CREATE2_FACTORY_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; import {StateTransitionDeployedAddresses, Utils} from "../Utils.sol"; import {AddressAliasHelper} from "contracts/vendor/AddressAliasHelper.sol"; -import {ValidatorTimelock} from "contracts/state-transition/ValidatorTimelock.sol"; -import {IAdmin} from "contracts/state-transition/chain-interfaces/IAdmin.sol"; -import {GatewayTransactionFilterer} from "contracts/transactionFilterer/GatewayTransactionFilterer.sol"; -import {TransparentUpgradeableProxy} from "@openzeppelin/contracts-v4/proxy/transparent/TransparentUpgradeableProxy.sol"; -import {IAssetRouterBase, SET_ASSET_HANDLER_COUNTERPART_ENCODING_VERSION} from "contracts/bridge/asset-router/IAssetRouterBase.sol"; -import {CTM_DEPLOYMENT_TRACKER_ENCODING_VERSION} from "contracts/bridgehub/CTMDeploymentTracker.sol"; -import {IL2AssetRouter, L2AssetRouter} from "contracts/bridge/asset-router/L2AssetRouter.sol"; -import {L1Nullifier} from "contracts/bridge/L1Nullifier.sol"; + import {L1AssetRouter} from "contracts/bridge/asset-router/L1AssetRouter.sol"; -import {IL1NativeTokenVault} from "contracts/bridge/ntv/IL1NativeTokenVault.sol"; -import {DataEncoding} from "contracts/common/libraries/DataEncoding.sol"; -import {FinalizeL1DepositParams} from "contracts/bridge/interfaces/IL1Nullifier.sol"; -import {AccessControlRestriction} from "contracts/governance/AccessControlRestriction.sol"; -import {ContractsBytecodesLib} from "../ContractsBytecodesLib.sol"; -import {ChainAdmin} from "contracts/governance/ChainAdmin.sol"; + import {Call} from "contracts/governance/Common.sol"; -import {IGovernance} from "contracts/governance/IGovernance.sol"; + import {Ownable2Step} from "@openzeppelin/contracts-v4/access/Ownable2Step.sol"; -import {ICTMDeploymentTracker} from "contracts/bridgehub/ICTMDeploymentTracker.sol"; + import {ServerNotifier} from "contracts/governance/ServerNotifier.sol"; -import {RollupDAManager} from "contracts/state-transition/data-availability/RollupDAManager.sol"; -import {ProxyAdmin} from "@openzeppelin/contracts-v4/proxy/transparent/ProxyAdmin.sol"; import {IChainTypeManager} from "contracts/state-transition/IChainTypeManager.sol"; import {ChainTypeManager} from "contracts/state-transition/ChainTypeManager.sol"; -import {Create2AndTransfer} from "../Create2AndTransfer.sol"; -import {IChainAdmin} from "contracts/governance/IChainAdmin.sol"; - import {DeployCTMScript} from "../DeployCTM.s.sol"; import {GatewayCTMDeployerHelper} from "./GatewayCTMDeployerHelper.sol"; import {DeployedContracts, GatewayCTMDeployerConfig} from "contracts/state-transition/chain-deps/GatewayCTMDeployer.sol"; -import {IVerifier, VerifierParams} from "contracts/state-transition/chain-interfaces/IVerifier.sol"; -import {FeeParams, PubdataPricingMode} from "contracts/state-transition/chain-deps/ZKChainStorage.sol"; -import {Bridgehub} from "contracts/bridgehub/Bridgehub.sol"; -import {GettersFacet} from "contracts/state-transition/chain-deps/facets/Getters.sol"; +import {VerifierParams} from "contracts/state-transition/chain-interfaces/IVerifier.sol"; +import {FeeParams} from "contracts/state-transition/chain-deps/ZKChainStorage.sol"; +import {L1Bridgehub} from "contracts/bridgehub/L1Bridgehub.sol"; import {GatewayGovernanceUtils} from "./GatewayGovernanceUtils.s.sol"; @@ -75,10 +52,8 @@ contract GatewayVotePreparation is DeployCTMScript, GatewayGovernanceUtils { uint256 constant EXPECTED_MAX_L1_GAS_PRICE = 50 gwei; - address internal rollupL2DAValidator; - address internal oldRollupL2DAValidator; - uint256 internal eraChainId; + uint256 internal gatewayChainId; bytes internal forceDeploymentsData; @@ -87,22 +62,19 @@ contract GatewayVotePreparation is DeployCTMScript, GatewayGovernanceUtils { GatewayCTMDeployerConfig internal gatewayCTMDeployerConfig; - function initializeConfig(string memory configPath, uint256 ctmChainId) internal virtual { + function initializeConfig(string memory configPath, uint256 ctmRepresentativeChainId) internal virtual { super.initializeConfig(configPath); string memory toml = vm.readFile(configPath); addresses.bridgehub.bridgehubProxy = toml.readAddress("$.contracts.bridgehub_proxy_address"); refundRecipient = toml.readAddress("$.refund_recipient"); - // The "new" and "old" rollup L2 DA validators are those that were set in v27 and v26 respectively - rollupL2DAValidator = toml.readAddress("$.rollup_l2_da_validator"); - oldRollupL2DAValidator = toml.readAddress("$.old_rollup_l2_da_validator"); - eraChainId = toml.readUint("$.era_chain_id"); + gatewayChainId = toml.readUint("$.gateway_chain_id"); forceDeploymentsData = toml.readBytes(".force_deployments_data"); - setAddressesBasedOnBridgehub(ctmChainId); + setAddressesBasedOnBridgehub(ctmRepresentativeChainId); address aliasedGovernor = AddressAliasHelper.applyL1ToL2Alias(config.ownerAddress); gatewayCTMDeployerConfig = GatewayCTMDeployerConfig({ @@ -110,8 +82,8 @@ contract GatewayVotePreparation is DeployCTMScript, GatewayGovernanceUtils { salt: bytes32(0), eraChainId: config.eraChainId, l1ChainId: config.l1ChainId, - rollupL2DAValidatorAddress: rollupL2DAValidator, testnetVerifier: config.testnetVerifier, + isZKsyncOS: config.isZKsyncOS, adminSelectors: Utils.getAllSelectorsForFacet("Admin"), executorSelectors: Utils.getAllSelectorsForFacet("Executor"), mailboxSelectors: Utils.getAllSelectorsForFacet("Mailbox"), @@ -141,9 +113,14 @@ contract GatewayVotePreparation is DeployCTMScript, GatewayGovernanceUtils { }); } - function setAddressesBasedOnBridgehub(uint256 ctmChainId) internal { - config.ownerAddress = Bridgehub(addresses.bridgehub.bridgehubProxy).owner(); - address ctm = IBridgehub(addresses.bridgehub.bridgehubProxy).chainTypeManager(ctmChainId); + function setAddressesBasedOnBridgehub(uint256 ctmRepresentativeChainId) internal { + config.ownerAddress = L1Bridgehub(addresses.bridgehub.bridgehubProxy).owner(); + address ctm; + if (ctmRepresentativeChainId != 0) { + ctm = IL1Bridgehub(addresses.bridgehub.bridgehubProxy).chainTypeManager(ctmRepresentativeChainId); + } else { + ctm = IL1Bridgehub(addresses.bridgehub.bridgehubProxy).chainTypeManager(gatewayChainId); + } addresses.stateTransition.chainTypeManagerProxy = ctm; uint256 ctmProtocolVersion = IChainTypeManager(ctm).protocolVersion(); require( @@ -151,7 +128,7 @@ contract GatewayVotePreparation is DeployCTMScript, GatewayGovernanceUtils { "The latest protocol version is not correct" ); serverNotifier = ChainTypeManager(ctm).serverNotifierAddress(); - addresses.bridges.l1AssetRouterProxy = Bridgehub(addresses.bridgehub.bridgehubProxy).assetRouter(); + addresses.bridges.l1AssetRouterProxy = L1Bridgehub(addresses.bridgehub.bridgehubProxy).assetRouter(); addresses.vaults.l1NativeTokenVaultProxy = address( L1AssetRouter(addresses.bridges.l1AssetRouterProxy).nativeTokenVault() @@ -161,16 +138,16 @@ contract GatewayVotePreparation is DeployCTMScript, GatewayGovernanceUtils { ); addresses.bridgehub.ctmDeploymentTrackerProxy = address( - Bridgehub(addresses.bridgehub.bridgehubProxy).l1CtmDeployer() + L1Bridgehub(addresses.bridgehub.bridgehubProxy).l1CtmDeployer() ); - addresses.bridgehub.messageRootProxy = address(Bridgehub(addresses.bridgehub.bridgehubProxy).messageRoot()); + addresses.bridgehub.messageRootProxy = address(L1Bridgehub(addresses.bridgehub.bridgehubProxy).messageRoot()); addresses.bridges.erc20BridgeProxy = address( L1AssetRouter(addresses.bridges.l1AssetRouterProxy).legacyBridge() ); - // It is used as the ecosystem admin inside the `DeployCTM` contract - addresses.chainAdmin = Bridgehub(addresses.bridgehub.bridgehubProxy).admin(); + // It is used as the ecosystem admin inside the `DeployL1` contract + addresses.chainAdmin = L1Bridgehub(addresses.bridgehub.bridgehubProxy).admin(); } function deployGatewayCTM() internal { @@ -251,13 +228,13 @@ contract GatewayVotePreparation is DeployCTMScript, GatewayGovernanceUtils { prepareForGWVoting(0); } - function prepareForGWVoting(uint256 ctmChainId) public { + function prepareForGWVoting(uint256 ctmRepresentativeChainId) public { console.log("Setting up the Gateway script"); string memory root = vm.projectRoot(); string memory configPath = string.concat(root, vm.envString("GATEWAY_VOTE_PREPARATION_INPUT")); - initializeConfig(configPath, ctmChainId); + initializeConfig(configPath, ctmRepresentativeChainId); _initializeGatewayGovernanceConfig( GatewayGovernanceConfig({ bridgehubProxy: addresses.bridgehub.bridgehubProxy, @@ -304,31 +281,10 @@ contract GatewayVotePreparation is DeployCTMScript, GatewayGovernanceUtils { _gatewayValidatorTimelock: output.gatewayStateTransition.validatorTimelock, _gatewayServerNotifier: output.gatewayStateTransition.serverNotifierProxy, _refundRecipient: refundRecipient, - _ctmChainId: ctmChainId + _ctmRepresentativeChainId: ctmRepresentativeChainId }) ); - // We need to also whitelist the old L2 rollup address - if (oldRollupL2DAValidator != address(0)) { - governanceCalls = Utils.mergeCalls( - governanceCalls, - Utils.prepareGovernanceL1L2DirectTransaction( - EXPECTED_MAX_L1_GAS_PRICE, - abi.encodeCall( - RollupDAManager.updateDAPair, - (output.relayedSLDAValidator, oldRollupL2DAValidator, true) - ), - Utils.MAX_PRIORITY_TX_GAS, - new bytes[](0), - output.rollupDAManager, - gatewayChainId, - addresses.bridgehub.bridgehubProxy, - addresses.bridges.l1AssetRouterProxy, - refundRecipient - ) - ); - } - saveOutput(governanceCalls, ecosystemAdminCalls); } diff --git a/l1-contracts/deploy-scripts/interfaces/IRollupDAManager.sol b/l1-contracts/deploy-scripts/interfaces/IRollupDAManager.sol index 2986d182a9..15f27e7e5e 100644 --- a/l1-contracts/deploy-scripts/interfaces/IRollupDAManager.sol +++ b/l1-contracts/deploy-scripts/interfaces/IRollupDAManager.sol @@ -2,10 +2,15 @@ pragma solidity ^0.8.24; +import {L2DACommitmentScheme} from "contracts/common/Config.sol"; + /// @author Matter Labs /// @custom:security-contact security@matterlabs.dev interface IRollupDAManager { - function allowedDAPairs(address l1DAValidator, address l2DAValidator) external view returns (bool); - function updateDAPair(address l1DAValidator, address l2DAValidator, bool status) external; + function isAllowedDAConfiguration( + address l1DAValidator, + L2DACommitmentScheme l2DAValidator + ) external view returns (bool); + function updateDAPair(address l1DAValidator, L2DACommitmentScheme l2DACommitmentScheme, bool status) external; function transferOwnership(address newOwner) external; } diff --git a/l1-contracts/deploy-scripts/upgrade/AppendProtocolUpgradeHandlerUpgrade.s.sol b/l1-contracts/deploy-scripts/upgrade/AppendProtocolUpgradeHandlerUpgrade.s.sol index ca082977b6..4a1d590019 100644 --- a/l1-contracts/deploy-scripts/upgrade/AppendProtocolUpgradeHandlerUpgrade.s.sol +++ b/l1-contracts/deploy-scripts/upgrade/AppendProtocolUpgradeHandlerUpgrade.s.sol @@ -6,8 +6,6 @@ pragma solidity 0.8.28; import {Script, console2 as console} from "forge-std/Script.sol"; import {stdToml} from "forge-std/StdToml.sol"; import {Call} from "contracts/governance/Common.sol"; -import {ProxyAdmin} from "@openzeppelin/contracts-v4/proxy/transparent/ProxyAdmin.sol"; -import {ITransparentUpgradeableProxy} from "@openzeppelin/contracts-v4/proxy/transparent/TransparentUpgradeableProxy.sol"; // Note that the `ProtocolUpgradeHandler` uses `OpenZeppeling v5`. interface ProxyAdminV5 { diff --git a/l1-contracts/deploy-scripts/upgrade/ChainUpgrade.s.sol b/l1-contracts/deploy-scripts/upgrade/ChainUpgrade.s.sol index 43cbbac582..b1382b05bb 100644 --- a/l1-contracts/deploy-scripts/upgrade/ChainUpgrade.s.sol +++ b/l1-contracts/deploy-scripts/upgrade/ChainUpgrade.s.sol @@ -6,16 +6,13 @@ pragma solidity 0.8.28; import {Script, console2 as console} from "forge-std/Script.sol"; import {stdToml} from "forge-std/StdToml.sol"; import {Utils} from "../Utils.sol"; -import {L2ContractHelper} from "contracts/common/l2-helpers/L2ContractHelper.sol"; -import {ContractsBytecodesLib} from "../ContractsBytecodesLib.sol"; + import {IZKChain} from "contracts/state-transition/chain-interfaces/IZKChain.sol"; import {IAdmin} from "contracts/state-transition/chain-interfaces/IAdmin.sol"; -import {ChainAdmin} from "contracts/governance/ChainAdmin.sol"; -import {AccessControlRestriction} from "contracts/governance/AccessControlRestriction.sol"; + import {IChainAdminOwnable} from "contracts/governance/IChainAdminOwnable.sol"; -import {Call} from "contracts/governance/Common.sol"; -import {ChainTypeManager} from "contracts/state-transition/ChainTypeManager.sol"; -import {Bridgehub} from "contracts/bridgehub/Bridgehub.sol"; + +import {L1Bridgehub} from "contracts/bridgehub/L1Bridgehub.sol"; import {Diamond} from "contracts/state-transition/libraries/Diamond.sol"; import {Ownable} from "@openzeppelin/contracts-v4/access/Ownable.sol"; @@ -99,6 +96,6 @@ contract ChainUpgrade is Script { toml = vm.readFile(ecosystemInputPath); config.bridgehubProxyAddress = toml.readAddress("$.contracts.bridgehub_proxy_address"); - config.chainDiamondProxyAddress = Bridgehub(config.bridgehubProxyAddress).getZKChain(config.chainChainId); + config.chainDiamondProxyAddress = L1Bridgehub(config.bridgehubProxyAddress).getZKChain(config.chainChainId); } } diff --git a/l1-contracts/deploy-scripts/upgrade/ChainUpgrade_v29.s.sol b/l1-contracts/deploy-scripts/upgrade/ChainUpgrade_v29.s.sol index bda3f1be3b..900c931329 100644 --- a/l1-contracts/deploy-scripts/upgrade/ChainUpgrade_v29.s.sol +++ b/l1-contracts/deploy-scripts/upgrade/ChainUpgrade_v29.s.sol @@ -3,20 +3,8 @@ pragma solidity 0.8.28; // solhint-disable no-console, gas-custom-errors -import {Script, console2 as console} from "forge-std/Script.sol"; +import {console2 as console} from "forge-std/Script.sol"; import {stdToml} from "forge-std/StdToml.sol"; -import {L2ContractHelper} from "contracts/common/l2-helpers/L2ContractHelper.sol"; -import {ContractsBytecodesLib} from "../ContractsBytecodesLib.sol"; -import {IZKChain} from "contracts/state-transition/chain-interfaces/IZKChain.sol"; -import {IAdmin} from "contracts/state-transition/chain-interfaces/IAdmin.sol"; -import {ChainAdmin} from "contracts/governance/ChainAdmin.sol"; -import {AccessControlRestriction} from "contracts/governance/AccessControlRestriction.sol"; -import {IChainAdminOwnable} from "contracts/governance/IChainAdminOwnable.sol"; -import {Call} from "contracts/governance/Common.sol"; -import {ChainTypeManager} from "contracts/state-transition/ChainTypeManager.sol"; -import {Bridgehub} from "contracts/bridgehub/Bridgehub.sol"; -import {Diamond} from "contracts/state-transition/libraries/Diamond.sol"; -import {Ownable} from "@openzeppelin/contracts-v4/access/Ownable.sol"; import {DefaultChainUpgrade} from "./DefaultChainUpgrade.s.sol"; diff --git a/l1-contracts/deploy-scripts/upgrade/DefaultChainUpgrade.s.sol b/l1-contracts/deploy-scripts/upgrade/DefaultChainUpgrade.s.sol index ad1dddb806..91b6309553 100644 --- a/l1-contracts/deploy-scripts/upgrade/DefaultChainUpgrade.s.sol +++ b/l1-contracts/deploy-scripts/upgrade/DefaultChainUpgrade.s.sol @@ -6,15 +6,12 @@ pragma solidity 0.8.28; import {Script, console2 as console} from "forge-std/Script.sol"; import {stdToml} from "forge-std/StdToml.sol"; import {Utils} from "../Utils.sol"; -import {L2ContractHelper} from "contracts/common/l2-helpers/L2ContractHelper.sol"; -import {ContractsBytecodesLib} from "../ContractsBytecodesLib.sol"; + import {IZKChain} from "contracts/state-transition/chain-interfaces/IZKChain.sol"; import {IAdmin} from "contracts/state-transition/chain-interfaces/IAdmin.sol"; -import {ChainAdmin} from "contracts/governance/ChainAdmin.sol"; -import {AccessControlRestriction} from "contracts/governance/AccessControlRestriction.sol"; + import {IChainAdminOwnable} from "contracts/governance/IChainAdminOwnable.sol"; -import {Call} from "contracts/governance/Common.sol"; -import {ChainTypeManager} from "contracts/state-transition/ChainTypeManager.sol"; + import {Bridgehub} from "contracts/bridgehub/Bridgehub.sol"; import {Diamond} from "contracts/state-transition/libraries/Diamond.sol"; import {Ownable} from "@openzeppelin/contracts-v4/access/Ownable.sol"; diff --git a/l1-contracts/deploy-scripts/upgrade/DefaultEcosystemUpgrade.s.sol b/l1-contracts/deploy-scripts/upgrade/DefaultEcosystemUpgrade.s.sol index b9b8acd7a0..889059e668 100644 --- a/l1-contracts/deploy-scripts/upgrade/DefaultEcosystemUpgrade.s.sol +++ b/l1-contracts/deploy-scripts/upgrade/DefaultEcosystemUpgrade.s.sol @@ -4,28 +4,30 @@ pragma solidity 0.8.28; // solhint-disable no-console, gas-custom-errors import {Script, console2 as console} from "forge-std/Script.sol"; + import {stdToml} from "forge-std/StdToml.sol"; import {ProxyAdmin} from "@openzeppelin/contracts-v4/proxy/transparent/ProxyAdmin.sol"; +import {SafeCast} from "@openzeppelin/contracts-v4/utils/math/SafeCast.sol"; + import {ITransparentUpgradeableProxy, TransparentUpgradeableProxy} from "@openzeppelin/contracts-v4/proxy/transparent/TransparentUpgradeableProxy.sol"; import {IERC20} from "@openzeppelin/contracts-v4/token/ERC20/IERC20.sol"; import {UpgradeableBeacon} from "@openzeppelin/contracts-v4/proxy/beacon/UpgradeableBeacon.sol"; -import {PrepareL1L2TransactionParams, StateTransitionDeployedAddresses, Utils} from "../Utils.sol"; -import {L2_BRIDGEHUB_ADDR, L2_COMPLEX_UPGRADER_ADDR, L2_DEPLOYER_SYSTEM_CONTRACT_ADDR, L2_FORCE_DEPLOYER_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; -import {IBridgehub, L2TransactionRequestDirect} from "contracts/bridgehub/IBridgehub.sol"; -import {Multicall3} from "contracts/dev-contracts/Multicall3.sol"; -import {DualVerifier} from "contracts/state-transition/verifiers/DualVerifier.sol"; -import {TestnetVerifier} from "contracts/state-transition/verifiers/TestnetVerifier.sol"; -import {L1VerifierFflonk} from "contracts/state-transition/verifiers/L1VerifierFflonk.sol"; -import {L1VerifierPlonk} from "contracts/state-transition/verifiers/L1VerifierPlonk.sol"; -import {IVerifier, VerifierParams} from "contracts/state-transition/chain-interfaces/IVerifier.sol"; +import {StateTransitionDeployedAddresses, Utils} from "../Utils.sol"; +import {L2_BRIDGEHUB_ADDR, L2_DEPLOYER_SYSTEM_CONTRACT_ADDR, L2_FORCE_DEPLOYER_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; +import {IL1Bridgehub} from "contracts/bridgehub/IL1Bridgehub.sol"; +import {IBridgehubBase} from "contracts/bridgehub/IBridgehubBase.sol"; + +import {EraVerifierFflonk} from "contracts/state-transition/verifiers/EraVerifierFflonk.sol"; +import {EraVerifierPlonk} from "contracts/state-transition/verifiers/EraVerifierPlonk.sol"; +import {ZKsyncOSVerifierFflonk} from "contracts/state-transition/verifiers/ZKsyncOSVerifierFflonk.sol"; +import {ZKsyncOSVerifierPlonk} from "contracts/state-transition/verifiers/ZKsyncOSVerifierPlonk.sol"; +import {VerifierParams} from "contracts/state-transition/chain-interfaces/IVerifier.sol"; import {DefaultUpgrade} from "contracts/upgrades/DefaultUpgrade.sol"; -import {Governance} from "contracts/governance/Governance.sol"; import {L1GenesisUpgrade} from "contracts/upgrades/L1GenesisUpgrade.sol"; -import {GatewayUpgrade, GatewayUpgradeEncodedInput} from "contracts/upgrades/GatewayUpgrade.sol"; -import {ChainAdmin} from "contracts/governance/ChainAdmin.sol"; +import {GatewayUpgrade} from "contracts/upgrades/GatewayUpgrade.sol"; import {ValidatorTimelock} from "contracts/state-transition/ValidatorTimelock.sol"; -import {Bridgehub} from "contracts/bridgehub/Bridgehub.sol"; -import {MessageRoot} from "contracts/bridgehub/MessageRoot.sol"; +import {L1Bridgehub} from "contracts/bridgehub/L1Bridgehub.sol"; +import {L1MessageRoot} from "contracts/bridgehub/L1MessageRoot.sol"; import {CTMDeploymentTracker} from "contracts/bridgehub/CTMDeploymentTracker.sol"; import {L1NativeTokenVault} from "contracts/bridge/ntv/L1NativeTokenVault.sol"; import {IAdmin} from "contracts/state-transition/chain-interfaces/IAdmin.sol"; @@ -35,49 +37,38 @@ import {MailboxFacet} from "contracts/state-transition/chain-deps/facets/Mailbox import {GettersFacet} from "contracts/state-transition/chain-deps/facets/Getters.sol"; import {DiamondInit} from "contracts/state-transition/chain-deps/DiamondInit.sol"; import {ChainTypeManager} from "contracts/state-transition/ChainTypeManager.sol"; -import {ChainCreationParams, ChainTypeManagerInitializeData, IChainTypeManager} from "contracts/state-transition/IChainTypeManager.sol"; +import {IChainTypeManager} from "contracts/state-transition/IChainTypeManager.sol"; import {Diamond} from "contracts/state-transition/libraries/Diamond.sol"; -import {InitializeDataNewChain as DiamondInitializeDataNewChain} from "contracts/state-transition/chain-interfaces/IDiamondInit.sol"; -import {FeeParams, PubdataPricingMode} from "contracts/state-transition/chain-deps/ZKChainStorage.sol"; import {L1AssetRouter} from "contracts/bridge/asset-router/L1AssetRouter.sol"; import {L1ERC20Bridge} from "contracts/bridge/L1ERC20Bridge.sol"; -import {IL1Nullifier, L1Nullifier} from "contracts/bridge/L1Nullifier.sol"; +import {L1Nullifier} from "contracts/bridge/L1Nullifier.sol"; import {DiamondProxy} from "contracts/state-transition/chain-deps/DiamondProxy.sol"; -import {IL1AssetRouter} from "contracts/bridge/asset-router/IL1AssetRouter.sol"; -import {INativeTokenVault} from "contracts/bridge/ntv/INativeTokenVault.sol"; + import {BridgedStandardERC20} from "contracts/bridge/BridgedStandardERC20.sol"; -import {AddressHasNoCode} from "../ZkSyncScriptErrors.sol"; -import {ICTMDeploymentTracker} from "contracts/bridgehub/ICTMDeploymentTracker.sol"; -import {IMessageRoot} from "contracts/bridgehub/IMessageRoot.sol"; -import {SYSTEM_UPGRADE_L2_TX_TYPE} from "contracts/common/Config.sol"; + +import {SYSTEM_UPGRADE_L2_TX_TYPE, ZKSYNC_OS_SYSTEM_UPGRADE_L2_TX_TYPE} from "contracts/common/Config.sol"; import {IL2ContractDeployer} from "contracts/common/interfaces/IL2ContractDeployer.sol"; import {L2ContractHelper} from "contracts/common/l2-helpers/L2ContractHelper.sol"; import {AddressAliasHelper} from "contracts/vendor/AddressAliasHelper.sol"; -import {IL1NativeTokenVault} from "contracts/bridge/ntv/IL1NativeTokenVault.sol"; -import {L1NullifierDev} from "contracts/dev-contracts/L1NullifierDev.sol"; -import {AccessControlRestriction} from "contracts/governance/AccessControlRestriction.sol"; -import {PermanentRestriction} from "contracts/governance/PermanentRestriction.sol"; -import {IAssetRouterBase} from "contracts/bridge/asset-router/IAssetRouterBase.sol"; + import {ContractsBytecodesLib} from "../ContractsBytecodesLib.sol"; -import {ValidiumL1DAValidator} from "contracts/state-transition/data-availability/ValidiumL1DAValidator.sol"; import {Call} from "contracts/governance/Common.sol"; import {Ownable2StepUpgradeable} from "@openzeppelin/contracts-upgradeable-v4/access/Ownable2StepUpgradeable.sol"; import {IZKChain} from "contracts/state-transition/chain-interfaces/IZKChain.sol"; import {ProposedUpgrade} from "contracts/upgrades/BaseZkSyncUpgrade.sol"; import {UpgradeStageValidator} from "contracts/upgrades/UpgradeStageValidator.sol"; +import {SemVer} from "contracts/common/libraries/SemVer.sol"; import {L2CanonicalTransaction} from "contracts/common/Messaging.sol"; -import {IComplexUpgrader} from "contracts/state-transition/l2-deps/IComplexUpgrader.sol"; + import {TransitionaryOwner} from "contracts/governance/TransitionaryOwner.sol"; import {SystemContractsProcessing} from "./SystemContractsProcessing.s.sol"; import {BytecodePublisher} from "./BytecodePublisher.s.sol"; import {BytecodesSupplier} from "contracts/upgrades/BytecodesSupplier.sol"; import {GovernanceUpgradeTimer} from "contracts/upgrades/GovernanceUpgradeTimer.sol"; -import {L2WrappedBaseTokenStore} from "contracts/bridge/L2WrappedBaseTokenStore.sol"; + import {RollupDAManager} from "contracts/state-transition/data-availability/RollupDAManager.sol"; -import {Create2AndTransfer} from "../Create2AndTransfer.sol"; -import {ContractsConfig, DeployedAddresses, TokensConfig} from "../DeployUtils.s.sol"; import {FixedForceDeploymentsData} from "contracts/state-transition/l2-deps/IL2GenesisUpgrade.sol"; import {DeployCTMScript} from "../DeployCTM.s.sol"; @@ -172,6 +163,7 @@ contract DefaultEcosystemUpgrade is Script, DeployCTMScript { initializeConfig(newConfigPath); + console.log("Initialized config from %s", newConfigPath); upgradeConfig.outputPath = string.concat(root, _outputPath); upgradeConfig.initialized = true; } @@ -203,12 +195,10 @@ contract DefaultEcosystemUpgrade is Script, DeployCTMScript { // Note, that this is the upgrade that will be used, despite the naming of the variable here. // To use the custom upgrade simply override the `deployUsedUpgradeContract` function. - - // TODO(refactor): rename to "upgrade contract", it is not a default upgrade. (addresses.stateTransition.defaultUpgrade) = deployUsedUpgradeContract(); (addresses.stateTransition.genesisUpgrade) = deploySimpleContract("L1GenesisUpgrade", false); - addresses.bridgehub.bridgehubImplementation = deploySimpleContract("Bridgehub", false); + addresses.bridgehub.bridgehubImplementation = deploySimpleContract("L1Bridgehub", false); addresses.bridges.l1NullifierImplementation = deploySimpleContract("L1Nullifier", false); addresses.bridges.l1AssetRouterImplementation = deploySimpleContract("L1AssetRouter", false); @@ -217,7 +207,7 @@ contract DefaultEcosystemUpgrade is Script, DeployCTMScript { addresses.bridges.bridgedStandardERC20Implementation = deploySimpleContract("BridgedStandardERC20", false); upgradeAddresses.upgradeTimer = deploySimpleContract("GovernanceUpgradeTimer", false); - addresses.bridgehub.messageRootImplementation = deploySimpleContract("MessageRoot", false); + addresses.bridgehub.messageRootImplementation = deploySimpleContract("L1MessageRoot", false); addresses.bridgehub.ctmDeploymentTrackerImplementation = deploySimpleContract("CTMDeploymentTracker", false); deployStateTransitionDiamondFacets(); @@ -354,6 +344,29 @@ contract DefaultEcosystemUpgrade is Script, DeployCTMScript { } } + function _emptyUpgradeTx() internal virtual returns (L2CanonicalTransaction memory transaction) { + uint256[4] memory reserved; + uint256[] memory factoryDeps = new uint256[](1); + transaction = L2CanonicalTransaction({ + txType: 0, + from: 0, + to: 0, + gasLimit: 0, + gasPerPubdataByteLimit: 0, + maxFeePerGas: 0, + maxPriorityFeePerGas: 0, + paymaster: 0, + nonce: 0, + value: 0, + reserved: reserved, + data: "", + signature: "", + factoryDeps: factoryDeps, + paymasterInput: "", + reservedDynamic: "" + }); + } + /// @notice Build L1 -> L2 upgrade tx function _composeUpgradeTx( IL2ContractDeployer.ForceDeployment[] memory forceDeployments @@ -365,8 +378,9 @@ contract DefaultEcosystemUpgrade is Script, DeployCTMScript { (address target, bytes memory data) = _getL2UpgradeTargetAndData(forceDeployments); + uint256 txType = config.isZKsyncOS ? ZKSYNC_OS_SYSTEM_UPGRADE_L2_TX_TYPE : SYSTEM_UPGRADE_L2_TX_TYPE; transaction = L2CanonicalTransaction({ - txType: SYSTEM_UPGRADE_L2_TX_TYPE, + txType: txType, from: uint256(uint160(L2_FORCE_DEPLOYER_ADDR)), to: uint256(uint160(target)), // TODO: dont use hardcoded values @@ -441,6 +455,11 @@ contract DefaultEcosystemUpgrade is Script, DeployCTMScript { return newConfig.oldProtocolVersion; } + function isPatchUpgrade() public virtual returns (bool) { + (uint32 _major, uint32 _minor, uint32 patch) = SemVer.unpackSemVer(SafeCast.toUint96(getNewProtocolVersion())); + return patch != 0; + } + /// @notice Generate upgrade cut data function generateUpgradeCutData( StateTransitionDeployedAddresses memory stateTransition @@ -468,6 +487,24 @@ contract DefaultEcosystemUpgrade is Script, DeployCTMScript { } } + function getProposedPatchUpgrade( + StateTransitionDeployedAddresses memory stateTransition + ) public virtual returns (ProposedUpgrade memory proposedUpgrade) { + VerifierParams memory verifierParams = getVerifierParams(); + proposedUpgrade = ProposedUpgrade({ + l2ProtocolUpgradeTx: _emptyUpgradeTx(), + bootloaderHash: bytes32(0), + defaultAccountHash: bytes32(0), + evmEmulatorHash: bytes32(0), + verifier: stateTransition.verifier, + verifierParams: verifierParams, + l1ContractsUpgradeCalldata: new bytes(0), + postUpgradeCalldata: new bytes(0), + upgradeTimestamp: 0, + newProtocolVersion: getNewProtocolVersion() + }); + } + function getProposedUpgrade( StateTransitionDeployedAddresses memory stateTransition ) public virtual returns (ProposedUpgrade memory proposedUpgrade) { @@ -548,6 +585,7 @@ contract DefaultEcosystemUpgrade is Script, DeployCTMScript { addresses.transparentProxyAdmin = address( uint160(uint256(vm.load(addresses.bridgehub.bridgehubProxy, ADMIN_SLOT))) ); + require( Ownable2StepUpgradeable(addresses.bridgehub.bridgehubProxy).owner() == config.ownerAddress, "Incorrect owner" @@ -586,20 +624,22 @@ contract DefaultEcosystemUpgrade is Script, DeployCTMScript { } function getBridgehubAdmin() public virtual returns (address admin) { - admin = Bridgehub(addresses.bridgehub.bridgehubProxy).admin(); + admin = L1Bridgehub(addresses.bridgehub.bridgehubProxy).admin(); } /// @notice This function is meant to only be used in tests function prepareCreateNewChainCall(uint256 chainId) public view virtual returns (Call[] memory result) { require(addresses.bridgehub.bridgehubProxy != address(0), "bridgehubProxyAddress is zero in newConfig"); - bytes32 newChainAssetId = Bridgehub(addresses.bridgehub.bridgehubProxy).baseTokenAssetId(gatewayConfig.chainId); + bytes32 newChainAssetId = L1Bridgehub(addresses.bridgehub.bridgehubProxy).baseTokenAssetId( + gatewayConfig.chainId + ); result = new Call[](1); result[0] = Call({ target: addresses.bridgehub.bridgehubProxy, value: 0, data: abi.encodeCall( - IBridgehub.createNewChain, + IL1Bridgehub.createNewChain, ( chainId, addresses.stateTransition.chainTypeManagerProxy, @@ -614,11 +654,11 @@ contract DefaultEcosystemUpgrade is Script, DeployCTMScript { } function setAddressesBasedOnBridgehub() internal virtual { - config.ownerAddress = Bridgehub(addresses.bridgehub.bridgehubProxy).owner(); - address ctm = IBridgehub(addresses.bridgehub.bridgehubProxy).chainTypeManager(config.eraChainId); + config.ownerAddress = L1Bridgehub(addresses.bridgehub.bridgehubProxy).owner(); + address ctm = IL1Bridgehub(addresses.bridgehub.bridgehubProxy).chainTypeManager(config.eraChainId); addresses.stateTransition.chainTypeManagerProxy = ctm; // We have to set the diamondProxy address here - as it is used by multiple constructors (for example L1Nullifier etc) - addresses.stateTransition.diamondProxy = IBridgehub(addresses.bridgehub.bridgehubProxy).getZKChain( + addresses.stateTransition.diamondProxy = IL1Bridgehub(addresses.bridgehub.bridgehubProxy).getZKChain( config.eraChainId ); uint256 ctmProtocolVersion = IChainTypeManager(ctm).protocolVersion(); @@ -626,7 +666,8 @@ contract DefaultEcosystemUpgrade is Script, DeployCTMScript { ctmProtocolVersion != getNewProtocolVersion(), "The new protocol version is already present on the ChainTypeManager" ); - addresses.bridges.l1AssetRouterProxy = Bridgehub(addresses.bridgehub.bridgehubProxy).assetRouter(); + addresses.bridges.l1AssetRouterProxy = L1Bridgehub(addresses.bridgehub.bridgehubProxy).assetRouter(); + addresses.stateTransition.genesisUpgrade = address(ChainTypeManager(ctm).l1GenesisUpgrade()); addresses.vaults.l1NativeTokenVaultProxy = address( L1AssetRouter(addresses.bridges.l1AssetRouterProxy).nativeTokenVault() @@ -639,13 +680,13 @@ contract DefaultEcosystemUpgrade is Script, DeployCTMScript { ); addresses.bridgehub.ctmDeploymentTrackerProxy = address( - Bridgehub(addresses.bridgehub.bridgehubProxy).l1CtmDeployer() + L1Bridgehub(addresses.bridgehub.bridgehubProxy).l1CtmDeployer() ); - addresses.bridgehub.messageRootProxy = address(Bridgehub(addresses.bridgehub.bridgehubProxy).messageRoot()); + addresses.bridgehub.messageRootProxy = address(L1Bridgehub(addresses.bridgehub.bridgehubProxy).messageRoot()); addresses.bridgehub.chainAssetHandlerProxy = address( - Bridgehub(addresses.bridgehub.bridgehubProxy).chainAssetHandler() + L1Bridgehub(addresses.bridgehub.bridgehubProxy).chainAssetHandler() ); addresses.bridges.erc20BridgeProxy = address( @@ -657,9 +698,9 @@ contract DefaultEcosystemUpgrade is Script, DeployCTMScript { addresses.stateTransition.chainTypeManagerProxy ).serverNotifierAddress(); - newConfig.ecosystemAdminAddress = Bridgehub(addresses.bridgehub.bridgehubProxy).admin(); + newConfig.ecosystemAdminAddress = L1Bridgehub(addresses.bridgehub.bridgehubProxy).admin(); - address eraDiamondProxy = Bridgehub(addresses.bridgehub.bridgehubProxy).getZKChain(config.eraChainId); + address eraDiamondProxy = L1Bridgehub(addresses.bridgehub.bridgehubProxy).getZKChain(config.eraChainId); (addresses.daAddresses.l1RollupDAValidator, ) = GettersFacet(eraDiamondProxy).getDAValidatorPair(); } @@ -720,11 +761,12 @@ contract DefaultEcosystemUpgrade is Script, DeployCTMScript { l2TokenProxyBytecodeHash: getL2BytecodeHash("BeaconProxy"), aliasedL1Governance: AddressAliasHelper.applyL1ToL2Alias(config.ownerAddress), maxNumberOfZKChains: config.contracts.maxNumberOfChains, - bridgehubBytecodeHash: getL2BytecodeHash("Bridgehub"), - l2AssetRouterBytecodeHash: getL2BytecodeHash("L2AssetRouter"), - l2NtvBytecodeHash: getL2BytecodeHash("L2NativeTokenVault"), - messageRootBytecodeHash: getL2BytecodeHash("MessageRoot"), - chainAssetHandlerBytecodeHash: getL2BytecodeHash("ChainAssetHandler"), + bridgehubBytecodeInfo: abi.encode(getL2BytecodeHash("L2Bridgehub")), + l2AssetRouterBytecodeInfo: abi.encode(getL2BytecodeHash("L2AssetRouter")), + l2NtvBytecodeInfo: abi.encode(getL2BytecodeHash("L2NativeTokenVault")), + messageRootBytecodeInfo: abi.encode(getL2BytecodeHash("L2MessageRoot")), + chainAssetHandlerBytecodeInfo: abi.encode(getL2BytecodeHash("L2ChainAssetHandler")), + beaconDeployerInfo: abi.encode(getL2BytecodeHash("UpgradeableBeaconDeployer")), l2SharedBridgeLegacyImpl: address(0), l2BridgedStandardERC20Impl: address(0), dangerousTestOnlyForcedBeacon: address(0) @@ -1190,10 +1232,15 @@ contract DefaultEcosystemUpgrade is Script, DeployCTMScript { allCalls[0] = prepareGovernanceUpgradeTimerCheckCall(); allCalls[1] = prepareCheckMigrationsPausedCalls(); + console.log("prepareStage1GovernanceCalls: prepareUpgradeProxiesCalls"); allCalls[2] = prepareUpgradeProxiesCalls(); + console.log("prepareStage1GovernanceCalls: prepareNewChainCreationParamsCall"); allCalls[3] = prepareNewChainCreationParamsCall(); + console.log("prepareStage1GovernanceCalls: provideSetNewVersionUpgradeCall"); allCalls[4] = provideSetNewVersionUpgradeCall(); + console.log("prepareStage1GovernanceCalls: prepareDAValidatorCall"); allCalls[5] = prepareDAValidatorCall(); + console.log("prepareStage1GovernanceCalls: prepareGatewaySpecificStage1GovernanceCalls"); allCalls[6] = prepareVersionSpecificStage1GovernanceCallsL1(); allCalls[7] = prepareGatewaySpecificStage1GovernanceCalls(); @@ -1286,7 +1333,7 @@ contract DefaultEcosystemUpgrade is Script, DeployCTMScript { result[0] = Call({ target: addresses.bridgehub.bridgehubProxy, value: 0, - data: abi.encodeCall(IBridgehub.pauseMigration, ()) + data: abi.encodeCall(IBridgehubBase.pauseMigration, ()) }); } @@ -1297,7 +1344,7 @@ contract DefaultEcosystemUpgrade is Script, DeployCTMScript { result[0] = Call({ target: addresses.bridgehub.bridgehubProxy, value: 0, - data: abi.encodeCall(IBridgehub.unpauseMigration, ()) + data: abi.encodeCall(IBridgehubBase.unpauseMigration, ()) }); } @@ -1323,8 +1370,8 @@ contract DefaultEcosystemUpgrade is Script, DeployCTMScript { function deployNewEcosystemContractsGW() public virtual { require(upgradeConfig.initialized, "Not initialized"); - gatewayConfig.gatewayStateTransition.verifierFflonk = deployGWContract("VerifierFflonk"); - gatewayConfig.gatewayStateTransition.verifierPlonk = deployGWContract("VerifierPlonk"); + gatewayConfig.gatewayStateTransition.verifierFflonk = deployGWContract("EraVerifierFflonk"); + gatewayConfig.gatewayStateTransition.verifierPlonk = deployGWContract("EraVerifierPlonk"); gatewayConfig.gatewayStateTransition.verifier = deployGWContract("Verifier"); gatewayConfig.gatewayStateTransition.executorFacet = deployGWContract("ExecutorFacet"); @@ -1408,7 +1455,7 @@ contract DefaultEcosystemUpgrade is Script, DeployCTMScript { uint256 l2GasLimit, uint256 l1GasPrice ) public virtual returns (Call[] memory calls) { - bytes memory l2Calldata = abi.encodeCall(IBridgehub.pauseMigration, ()); + bytes memory l2Calldata = abi.encodeCall(IBridgehubBase.pauseMigration, ()); calls = _prepareL1ToGatewayCall(l2Calldata, l2GasLimit, l1GasPrice, L2_BRIDGEHUB_ADDR); } @@ -1417,7 +1464,7 @@ contract DefaultEcosystemUpgrade is Script, DeployCTMScript { uint256 l2GasLimit, uint256 l1GasPrice ) public virtual returns (Call[] memory calls) { - bytes memory l2Calldata = abi.encodeCall(IBridgehub.unpauseMigration, ()); + bytes memory l2Calldata = abi.encodeCall(IBridgehubBase.unpauseMigration, ()); calls = _prepareL1ToGatewayCall(l2Calldata, l2GasLimit, l1GasPrice, L2_BRIDGEHUB_ADDR); } @@ -1497,7 +1544,7 @@ contract DefaultEcosystemUpgrade is Script, DeployCTMScript { address spender, uint256 amount ) public virtual returns (Call[] memory calls) { - address token = IBridgehub(addresses.bridgehub.bridgehubProxy).baseToken(gatewayConfig.chainId); + address token = IL1Bridgehub(addresses.bridgehub.bridgehubProxy).baseToken(gatewayConfig.chainId); require(token != address(0), "Base token for Gateway is zero"); calls = new Call[](1); calls[0] = Call({target: token, data: abi.encodeCall(IERC20.approve, (spender, amount)), value: 0}); @@ -1665,7 +1712,7 @@ contract DefaultEcosystemUpgrade is Script, DeployCTMScript { target: addresses.daAddresses.rollupDAManager, data: abi.encodeCall( RollupDAManager.updateDAPair, - (addresses.daAddresses.l1RollupDAValidator, getExpectedL2Address("RollupL2DAValidator"), true) + (addresses.daAddresses.l1RollupDAValidator, getRollupL2DACommitmentScheme(), true) // ), value: 0 }); @@ -1677,11 +1724,7 @@ contract DefaultEcosystemUpgrade is Script, DeployCTMScript { ) public virtual returns (Call[] memory calls) { bytes memory l2Calldata = abi.encodeCall( RollupDAManager.updateDAPair, - ( - gatewayConfig.gatewayStateTransition.rollupSLDAValidator, - getExpectedL2Address("RollupL2DAValidator"), - true - ) + (gatewayConfig.gatewayStateTransition.rollupSLDAValidator, getRollupL2DACommitmentScheme(), true) ); calls = _prepareL1ToGatewayCall( @@ -1694,7 +1737,7 @@ contract DefaultEcosystemUpgrade is Script, DeployCTMScript { /// @notice Tests that it is possible to upgrade a chain to the new version function TESTONLY_prepareTestUpgradeChainCall() private returns (Call[] memory calls, address admin) { - address chainDiamondProxyAddress = Bridgehub(addresses.bridgehub.bridgehubProxy).getZKChain( + address chainDiamondProxyAddress = L1Bridgehub(addresses.bridgehub.bridgehubProxy).getZKChain( config.gatewayChainId ); uint256 oldProtocolVersion = getOldProtocolVersion(); @@ -1796,9 +1839,13 @@ contract DefaultEcosystemUpgrade is Script, DeployCTMScript { } else { return abi.encode(L2_BRIDGEHUB_ADDR); } - } else if (compareStrings(contractName, "VerifierFflonk")) { + } else if (compareStrings(contractName, "EraVerifierFflonk")) { + return abi.encode(); + } else if (compareStrings(contractName, "EraVerifierPlonk")) { + return abi.encode(); + } else if (compareStrings(contractName, "ZKsyncOSVerifierFflonk")) { return abi.encode(); - } else if (compareStrings(contractName, "VerifierPlonk")) { + } else if (compareStrings(contractName, "ZKsyncOSVerifierPlonk")) { return abi.encode(); } else if (compareStrings(contractName, "Verifier")) { if (!isZKBytecode) { diff --git a/l1-contracts/deploy-scripts/upgrade/EcosystemUpgrade_v26_1.s.sol b/l1-contracts/deploy-scripts/upgrade/EcosystemUpgrade_v26_1.s.sol deleted file mode 100644 index ceb222e1d0..0000000000 --- a/l1-contracts/deploy-scripts/upgrade/EcosystemUpgrade_v26_1.s.sol +++ /dev/null @@ -1,602 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.28; - -// solhint-disable no-console, gas-custom-errors - -import {Script, console2 as console} from "forge-std/Script.sol"; -import {stdToml} from "forge-std/StdToml.sol"; -import {ProxyAdmin} from "@openzeppelin/contracts-v4/proxy/transparent/ProxyAdmin.sol"; -import {ITransparentUpgradeableProxy, TransparentUpgradeableProxy} from "@openzeppelin/contracts-v4/proxy/transparent/TransparentUpgradeableProxy.sol"; -import {UpgradeableBeacon} from "@openzeppelin/contracts-v4/proxy/beacon/UpgradeableBeacon.sol"; -import {Utils} from "../Utils.sol"; -import {Multicall3} from "contracts/dev-contracts/Multicall3.sol"; -import {Verifier} from "contracts/state-transition/Verifier.sol"; -import {TestnetVerifier} from "contracts/state-transition/TestnetVerifier.sol"; -import {IVerifier, VerifierParams} from "contracts/state-transition/chain-interfaces/IVerifier.sol"; -import {DefaultUpgrade} from "contracts/upgrades/DefaultUpgrade.sol"; -import {Governance} from "contracts/governance/Governance.sol"; -import {L1GenesisUpgrade} from "contracts/upgrades/L1GenesisUpgrade.sol"; -import {GatewayUpgrade, GatewayUpgradeEncodedInput} from "contracts/upgrades/GatewayUpgrade.sol"; -import {ChainAdmin} from "contracts/governance/ChainAdmin.sol"; -import {ValidatorTimelock} from "contracts/state-transition/ValidatorTimelock.sol"; -import {Bridgehub} from "contracts/bridgehub/Bridgehub.sol"; -import {MessageRoot} from "contracts/bridgehub/MessageRoot.sol"; -import {CTMDeploymentTracker} from "contracts/bridgehub/CTMDeploymentTracker.sol"; -import {L1NativeTokenVault} from "contracts/bridge/ntv/L1NativeTokenVault.sol"; -import {ExecutorFacet} from "contracts/state-transition/chain-deps/facets/Executor.sol"; -import {AdminFacet} from "contracts/state-transition/chain-deps/facets/Admin.sol"; -import {MailboxFacet} from "contracts/state-transition/chain-deps/facets/Mailbox.sol"; -import {GettersFacet} from "contracts/state-transition/chain-deps/facets/Getters.sol"; -import {DiamondInit} from "contracts/state-transition/chain-deps/DiamondInit.sol"; -import {ChainTypeManager} from "contracts/state-transition/ChainTypeManager.sol"; -import {ChainCreationParams, ChainTypeManagerInitializeData, IChainTypeManager} from "contracts/state-transition/IChainTypeManager.sol"; -import {Diamond} from "contracts/state-transition/libraries/Diamond.sol"; -import {InitializeDataNewChain as DiamondInitializeDataNewChain} from "contracts/state-transition/chain-interfaces/IDiamondInit.sol"; -import {FeeParams, PubdataPricingMode} from "contracts/state-transition/chain-deps/ZKChainStorage.sol"; -import {L1AssetRouter} from "contracts/bridge/asset-router/L1AssetRouter.sol"; -import {L1ERC20Bridge} from "contracts/bridge/L1ERC20Bridge.sol"; -import {IL1Nullifier, L1Nullifier} from "contracts/bridge/L1Nullifier.sol"; -import {DiamondProxy} from "contracts/state-transition/chain-deps/DiamondProxy.sol"; -import {IL1AssetRouter} from "contracts/bridge/asset-router/IL1AssetRouter.sol"; -import {INativeTokenVault} from "contracts/bridge/ntv/INativeTokenVault.sol"; -import {BridgedStandardERC20} from "contracts/bridge/BridgedStandardERC20.sol"; -import {AddressHasNoCode} from "../ZkSyncScriptErrors.sol"; -import {ICTMDeploymentTracker} from "contracts/bridgehub/ICTMDeploymentTracker.sol"; -import {IMessageRoot} from "contracts/bridgehub/IMessageRoot.sol"; -import {IL2ContractDeployer} from "contracts/common/interfaces/IL2ContractDeployer.sol"; -import {L2ContractHelper} from "contracts/common/l2-helpers/L2ContractHelper.sol"; -import {AddressAliasHelper} from "contracts/vendor/AddressAliasHelper.sol"; -import {IL1NativeTokenVault} from "contracts/bridge/ntv/IL1NativeTokenVault.sol"; -import {L1NullifierDev} from "contracts/dev-contracts/L1NullifierDev.sol"; -import {AccessControlRestriction} from "contracts/governance/AccessControlRestriction.sol"; -import {PermanentRestriction} from "contracts/governance/PermanentRestriction.sol"; -import {IAssetRouterBase} from "contracts/bridge/asset-router/IAssetRouterBase.sol"; -import {ContractsBytecodesLib} from "../ContractsBytecodesLib.sol"; -import {ValidiumL1DAValidator} from "contracts/state-transition/data-availability/ValidiumL1DAValidator.sol"; -import {Call} from "contracts/governance/Common.sol"; -import {Ownable2StepUpgradeable} from "@openzeppelin/contracts-upgradeable-v4/access/Ownable2StepUpgradeable.sol"; -import {IZKChain} from "contracts/state-transition/chain-interfaces/IZKChain.sol"; -import {ProposedUpgrade} from "contracts/upgrades/BaseZkSyncUpgrade.sol"; - -import {L2CanonicalTransaction} from "contracts/common/Messaging.sol"; -import {L2_COMPLEX_UPGRADER_ADDR, L2_DEPLOYER_SYSTEM_CONTRACT_ADDR, L2_FORCE_DEPLOYER_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; -import {IComplexUpgrader} from "contracts/state-transition/l2-deps/IComplexUpgrader.sol"; -import {TransitionaryOwner} from "contracts/governance/TransitionaryOwner.sol"; -import {SystemContractsProcessing} from "./SystemContractsProcessing.s.sol"; -import {BytecodePublisher} from "./BytecodePublisher.s.sol"; -import {BytecodesSupplier} from "contracts/upgrades/BytecodesSupplier.sol"; -import {GovernanceUpgradeTimer} from "contracts/upgrades/GovernanceUpgradeTimer.sol"; -import {L2WrappedBaseTokenStore} from "contracts/bridge/L2WrappedBaseTokenStore.sol"; -import {RollupDAManager} from "contracts/state-transition/data-availability/RollupDAManager.sol"; -import {Create2AndTransfer} from "../Create2AndTransfer.sol"; - -interface IBridgehubLegacy { - function stateTransitionManager(uint256 chainId) external returns (address); -} - -interface StateTransitionManagerLegacy { - // Unlike the creation params for the new `ChainTypeManager`, it does not contain force deployments - // fata. - struct ChainCreationParams { - address genesisUpgrade; - bytes32 genesisBatchHash; - uint64 genesisIndexRepeatedStorageChanges; - bytes32 genesisBatchCommitment; - Diamond.DiamondCutData diamondCut; - } - function setChainCreationParams(ChainCreationParams calldata _chainCreationParams) external; -} - -// A subset of the ones used for tests -struct StateTransitionDeployedAddresses { - address chainTypeManagerImplementation; - address verifier; - address adminFacet; - address mailboxFacet; - address executorFacet; - address gettersFacet; - address diamondInit; - address genesisUpgrade; - address defaultUpgrade; - address validatorTimelock; -} - -contract EcosystemUpgrade_v26_1 is Script { - using stdToml for string; - - address internal constant ADDRESS_ONE = 0x0000000000000000000000000000000000000001; - address internal constant DETERMINISTIC_CREATE2_ADDR = 0x4e59b44847b379578588920cA78FbF26c0B4956C; - - // solhint-disable-next-line gas-struct-packing - struct DeployedAddresses { - BridgehubDeployedAddresses bridgehub; - StateTransitionDeployedAddresses stateTransition; - BridgesDeployedAddresses bridges; - L1NativeTokenVaultAddresses vaults; - DataAvailabilityDeployedAddresses daAddresses; - ExpectedL2Addresses expectedL2Addresses; - address chainAdmin; - address accessControlRestrictionAddress; - address validatorTimelock; - address gatewayUpgrade; - address create2Factory; - address transitionaryOwner; - address upgradeTimer; - address bytecodesSupplier; - address l2WrappedBaseTokenStore; - } - - struct ExpectedL2Addresses { - address expectedRollupL2DAValidator; - address expectedValidiumL2DAValidator; - address l2SharedBridgeLegacyImpl; - address l2BridgedStandardERC20Impl; - } - - // solhint-disable-next-line gas-struct-packing - struct L1NativeTokenVaultAddresses { - address l1NativeTokenVaultImplementation; - address l1NativeTokenVaultProxy; - } - - struct DataAvailabilityDeployedAddresses { - address rollupDAManager; - address l1RollupDAValidator; - address l1ValidiumDAValidator; - } - - // solhint-disable-next-line gas-struct-packing - struct BridgehubDeployedAddresses { - address bridgehubImplementation; - address ctmDeploymentTrackerImplementation; - address ctmDeploymentTrackerProxy; - address messageRootImplementation; - address messageRootProxy; - } - - // solhint-disable-next-line gas-struct-packing - struct BridgesDeployedAddresses { - address erc20BridgeImplementation; - address sharedBridgeProxy; - address sharedBridgeImplementation; - address l1NullifierImplementation; - address bridgedStandardERC20Implementation; - address bridgedTokenBeacon; - } - - // solhint-disable-next-line gas-struct-packing - struct Config { - uint256 l1ChainId; - address deployerAddress; - uint256 eraChainId; - address protocolUpgradeHandlerProxyAddress; - // This is the address of the ecosystem admin. - // Note, that it is not the owner, but rather the address that is responsible - // for facilitating partially trusted, but not critical tasks. - address ecosystemAdminAddress; - bool testnetVerifier; - uint256 governanceUpgradeTimerInitialDelay; - bytes v26ChainCreationParams; - ContractsConfig contracts; - TokensConfig tokens; - } - - // solhint-disable-next-line gas-struct-packing - struct GeneratedData { - bytes forceDeploymentsData; - bytes diamondCutData; - } - - // solhint-disable-next-line gas-struct-packing - struct ContractsConfig { - bytes32 create2FactorySalt; - address create2FactoryAddr; - uint256 validatorTimelockExecutionDelay; - bytes32 genesisRoot; - uint256 genesisRollupLeafIndex; - bytes32 genesisBatchCommitment; - bytes32 recursionNodeLevelVkHash; - bytes32 recursionLeafLevelVkHash; - bytes32 recursionCircuitsSetVksHash; - uint256 priorityTxMaxGasLimit; - PubdataPricingMode diamondInitPubdataPricingMode; - uint256 diamondInitBatchOverheadL1Gas; - uint256 diamondInitMaxPubdataPerBatch; - uint256 diamondInitMaxL2GasPerBatch; - uint256 diamondInitPriorityTxMaxPubdata; - uint256 diamondInitMinimalL2GasPrice; - uint256 maxNumberOfChains; - bytes32 bootloaderHash; - bytes32 defaultAAHash; - address oldValidatorTimelock; - address legacyErc20BridgeAddress; - address bridgehubProxyAddress; - address oldSharedBridgeProxyAddress; - address stateTransitionManagerAddress; - address transparentProxyAdmin; - address eraDiamondProxy; - uint256 newProtocolVersion; - uint256 oldProtocolVersion; - address l1LegacySharedBridge; - } - - struct TokensConfig { - address tokenWethAddress; - } - - Config internal config; - GeneratedData internal generatedData; - DeployedAddresses internal addresses; - - uint256[] factoryDepsHashes; - - struct CachedBytecodeHashes { - bytes32 sharedL2LegacyBridgeBytecodeHash; - bytes32 erc20StandardImplBytecodeHash; - bytes32 rollupL2DAValidatorBytecodeHash; - bytes32 validiumL2DAValidatorBytecodeHash; - bytes32 transparentUpgradableProxyBytecodeHash; - } - - CachedBytecodeHashes internal cachedBytecodeHashes; - - // Just reads the input data for the script. - function testInitialize(string memory configPath, string memory outputPath) public { - string memory root = vm.projectRoot(); - configPath = string.concat(root, configPath); - outputPath = string.concat(root, outputPath); - initializeConfig(configPath); - } - - function prepareEcosystemContracts(string memory configPath, string memory outputPath) public { - string memory root = vm.projectRoot(); - configPath = string.concat(root, configPath); - outputPath = string.concat(root, outputPath); - - initializeConfig(configPath); - instantiateCreate2Factory(); - - deployGenesisUpgrade(); - - saveOutput(outputPath); - } - - function run() public { - prepareEcosystemContracts( - vm.envString("GATEWAY_UPGRADE_ECOSYSTEM_INPUT"), - vm.envString("GATEWAY_UPGRADE_ECOSYSTEM_OUTPUT") - ); - } - - function getProtocolUpgradeHandlerAddress() public view returns (address) { - return config.protocolUpgradeHandlerProxyAddress; - } - - function getTransparentProxyAdmin() public view returns (address) { - return config.contracts.transparentProxyAdmin; - } - - function getNewProtocolVersion() public pure returns (uint256) { - return 0x1a00000001; - } - - function getProtocolUpgradeNonce() public pure returns (uint256) { - return (getNewProtocolVersion() >> 32); - } - - function getOldProtocolDeadline() public pure returns (uint256) { - // It is by design - return type(uint256).max; - } - - function getOldProtocolVersion() public pure returns (uint256) { - return 0x1a00000000; - } - - function getUpgradeCalls() public returns (Call[] memory calls) { - // Note, that we will also need to turn off the ability to create new chains - // in the interim of the upgrade. - Call memory setCreationParamsCall = Call({ - target: config.contracts.stateTransitionManagerAddress, - data: abi.encodeCall(ChainTypeManager.setChainCreationParams, (prepareNewChainCreationParams())), - value: 0 - }); - - calls = new Call[](1); - calls[0] = setCreationParamsCall; - } - - function getEcosystemAdmin() external view returns (address) { - return config.ecosystemAdminAddress; - } - - function getBridgehub() external view returns (address) { - return config.contracts.bridgehubProxyAddress; - } - - function getChainTypeManager() external view returns (address) { - return config.contracts.stateTransitionManagerAddress; - } - - function getL1LegacySharedBridge() external view returns (address) { - return config.contracts.l1LegacySharedBridge; - } - - function getDiamondCutData() external view returns (bytes memory) { - return generatedData.diamondCutData; - } - - function initializeConfig(string memory configPath) internal { - string memory toml = vm.readFile(configPath); - - config.l1ChainId = block.chainid; - config.deployerAddress = msg.sender; - - // Config file must be parsed key by key, otherwise values returned - // are parsed alfabetically and not by key. - // https://book.getfoundry.sh/cheatcodes/parse-toml - config.eraChainId = toml.readUint("$.era_chain_id"); - config.testnetVerifier = toml.readBool("$.testnet_verifier"); - config.v26ChainCreationParams = toml.readBytes("$.v26_chain_creation_params"); - - config.contracts.maxNumberOfChains = toml.readUint("$.contracts.max_number_of_chains"); - config.contracts.create2FactorySalt = toml.readBytes32("$.contracts.create2_factory_salt"); - if (vm.keyExistsToml(toml, "$.contracts.create2_factory_addr")) { - config.contracts.create2FactoryAddr = toml.readAddress("$.contracts.create2_factory_addr"); - } - config.contracts.validatorTimelockExecutionDelay = toml.readUint( - "$.contracts.validator_timelock_execution_delay" - ); - config.contracts.genesisRoot = toml.readBytes32("$.contracts.genesis_root"); - config.contracts.genesisRollupLeafIndex = toml.readUint("$.contracts.genesis_rollup_leaf_index"); - config.contracts.genesisBatchCommitment = toml.readBytes32("$.contracts.genesis_batch_commitment"); - config.contracts.recursionNodeLevelVkHash = toml.readBytes32("$.contracts.recursion_node_level_vk_hash"); - config.contracts.recursionLeafLevelVkHash = toml.readBytes32("$.contracts.recursion_leaf_level_vk_hash"); - config.contracts.recursionCircuitsSetVksHash = toml.readBytes32("$.contracts.recursion_circuits_set_vks_hash"); - config.contracts.priorityTxMaxGasLimit = toml.readUint("$.contracts.priority_tx_max_gas_limit"); - config.contracts.diamondInitPubdataPricingMode = PubdataPricingMode( - toml.readUint("$.contracts.diamond_init_pubdata_pricing_mode") - ); - config.contracts.diamondInitBatchOverheadL1Gas = toml.readUint( - "$.contracts.diamond_init_batch_overhead_l1_gas" - ); - config.contracts.diamondInitMaxPubdataPerBatch = toml.readUint( - "$.contracts.diamond_init_max_pubdata_per_batch" - ); - config.contracts.diamondInitMaxL2GasPerBatch = toml.readUint("$.contracts.diamond_init_max_l2_gas_per_batch"); - config.contracts.diamondInitPriorityTxMaxPubdata = toml.readUint( - "$.contracts.diamond_init_priority_tx_max_pubdata" - ); - config.contracts.diamondInitMinimalL2GasPrice = toml.readUint("$.contracts.diamond_init_minimal_l2_gas_price"); - config.contracts.defaultAAHash = toml.readBytes32("$.contracts.default_aa_hash"); - config.contracts.bootloaderHash = toml.readBytes32("$.contracts.bootloader_hash"); - - config.contracts.bridgehubProxyAddress = toml.readAddress("$.contracts.bridgehub_proxy_address"); - - config.protocolUpgradeHandlerProxyAddress = toml.readAddress( - "$.contracts.protocol_upgrade_handler_proxy_address" - ); - - address ctmAddress; - - try IBridgehubLegacy(config.contracts.bridgehubProxyAddress).stateTransitionManager(config.eraChainId) returns ( - address addr - ) { - ctmAddress = addr; - } catch { - ctmAddress = Bridgehub(config.contracts.bridgehubProxyAddress).chainTypeManager(config.eraChainId); - } - config.contracts.stateTransitionManagerAddress = ctmAddress; - config.contracts.eraDiamondProxy = ChainTypeManager(config.contracts.stateTransitionManagerAddress) - .getHyperchain(config.eraChainId); - - config.contracts.transparentProxyAdmin = toml.readAddress("$.contracts.transparent_proxy_admin"); - - config.ecosystemAdminAddress = Bridgehub(config.contracts.bridgehubProxyAddress).admin(); - } - - function instantiateCreate2Factory() internal { - address contractAddress; - - bool isDeterministicDeployed = DETERMINISTIC_CREATE2_ADDR.code.length > 0; - bool isConfigured = config.contracts.create2FactoryAddr != address(0); - - if (isConfigured) { - if (config.contracts.create2FactoryAddr.code.length == 0) { - revert AddressHasNoCode(config.contracts.create2FactoryAddr); - } - contractAddress = config.contracts.create2FactoryAddr; - console.log("Using configured Create2Factory address:", contractAddress); - } else if (isDeterministicDeployed) { - contractAddress = DETERMINISTIC_CREATE2_ADDR; - console.log("Using deterministic Create2Factory address:", contractAddress); - } else { - contractAddress = Utils.deployCreate2Factory(); - console.log("Create2Factory deployed at:", contractAddress); - } - - addresses.create2Factory = contractAddress; - } - - function deployGenesisUpgrade() internal { - bytes memory bytecode = abi.encodePacked(type(L1GenesisUpgrade).creationCode); - address contractAddress = deployViaCreate2(bytecode); - notifyAboutDeployment(contractAddress, "L1GenesisUpgrade", hex""); - addresses.stateTransition.genesisUpgrade = contractAddress; - } - - function prepareForceDeploymentsData() public view returns (bytes memory) { - ChainCreationParams memory v26ChainCreationParams = abi.decode( - config.v26ChainCreationParams, - (ChainCreationParams) - ); - - return v26ChainCreationParams.forceDeploymentsData; - } - - function prepareNewChainCreationParams() internal returns (ChainCreationParams memory chainCreationParams) { - ChainCreationParams memory v26ChainCreationParams = abi.decode( - config.v26ChainCreationParams, - (ChainCreationParams) - ); - - // Diamond cut does not change. - generatedData.diamondCutData = abi.encode(v26ChainCreationParams.diamondCut); - generatedData.forceDeploymentsData = v26ChainCreationParams.forceDeploymentsData; - - chainCreationParams = ChainCreationParams({ - genesisUpgrade: addresses.stateTransition.genesisUpgrade, - genesisBatchHash: config.contracts.genesisRoot, - genesisIndexRepeatedStorageChanges: uint64(config.contracts.genesisRollupLeafIndex), - genesisBatchCommitment: config.contracts.genesisBatchCommitment, - // DiamondCut and forceDeploymentsData dont change. - diamondCut: v26ChainCreationParams.diamondCut, - forceDeploymentsData: v26ChainCreationParams.forceDeploymentsData - }); - } - - function notifyAboutDeployment( - address contractAddr, - string memory contractName, - bytes memory constructorParams - ) internal { - notifyAboutDeployment(contractAddr, contractName, constructorParams, contractName); - } - - function notifyAboutDeployment( - address contractAddr, - string memory contractName, - bytes memory constructorParams, - string memory displayName - ) internal { - string memory basicMessage = string.concat(displayName, " has been deployed at ", vm.toString(contractAddr)); - console.log(basicMessage); - - string memory forgeMessage; - if (constructorParams.length == 0) { - forgeMessage = string.concat("forge verify-contract ", vm.toString(contractAddr), " ", contractName); - } else { - forgeMessage = string.concat( - "forge verify-contract ", - vm.toString(contractAddr), - " ", - contractName, - " --constructor-args ", - vm.toString(constructorParams) - ); - } - - console.log(forgeMessage); - } - - function saveOutput(string memory outputPath) internal { - prepareNewChainCreationParams(); - - vm.serializeAddress("state_transition", "admin_facet_addr", addresses.stateTransition.adminFacet); - vm.serializeAddress("state_transition", "mailbox_facet_addr", addresses.stateTransition.mailboxFacet); - vm.serializeAddress("state_transition", "executor_facet_addr", addresses.stateTransition.executorFacet); - vm.serializeAddress("state_transition", "getters_facet_addr", addresses.stateTransition.gettersFacet); - vm.serializeAddress("state_transition", "genesis_upgrade_addr", addresses.stateTransition.genesisUpgrade); - string memory stateTransition = vm.serializeAddress( - "state_transition", - "default_upgrade_addr", - addresses.stateTransition.defaultUpgrade - ); - - vm.serializeUint( - "contracts_config", - "diamond_init_max_l2_gas_per_batch", - config.contracts.diamondInitMaxL2GasPerBatch - ); - vm.serializeUint( - "contracts_config", - "diamond_init_batch_overhead_l1_gas", - config.contracts.diamondInitBatchOverheadL1Gas - ); - vm.serializeUint( - "contracts_config", - "diamond_init_max_pubdata_per_batch", - config.contracts.diamondInitMaxPubdataPerBatch - ); - vm.serializeUint( - "contracts_config", - "diamond_init_minimal_l2_gas_price", - config.contracts.diamondInitMinimalL2GasPrice - ); - vm.serializeUint( - "contracts_config", - "diamond_init_priority_tx_max_pubdata", - config.contracts.diamondInitPriorityTxMaxPubdata - ); - vm.serializeUint( - "contracts_config", - "diamond_init_pubdata_pricing_mode", - uint256(config.contracts.diamondInitPubdataPricingMode) - ); - vm.serializeUint("contracts_config", "priority_tx_max_gas_limit", config.contracts.priorityTxMaxGasLimit); - vm.serializeBytes32( - "contracts_config", - "recursion_circuits_set_vks_hash", - config.contracts.recursionCircuitsSetVksHash - ); - vm.serializeBytes32( - "contracts_config", - "recursion_leaf_level_vk_hash", - config.contracts.recursionLeafLevelVkHash - ); - vm.serializeBytes32( - "contracts_config", - "recursion_node_level_vk_hash", - config.contracts.recursionNodeLevelVkHash - ); - - vm.serializeBytes("contracts_config", "diamond_cut_data", generatedData.diamondCutData); - - vm.serializeBytes("contracts_config", "force_deployments_data", generatedData.forceDeploymentsData); - - vm.serializeUint("contracts_config", "new_protocol_version", config.contracts.newProtocolVersion); - - string memory contractsConfig = vm.serializeUint( - "contracts_config", - "old_protocol_version", - config.contracts.oldProtocolVersion - ); - - string memory deployedAddresses = vm.serializeString("deployed_addresses", "state_transition", stateTransition); - - vm.serializeAddress("root", "create2_factory_addr", addresses.create2Factory); - vm.serializeBytes32("root", "create2_factory_salt", config.contracts.create2FactorySalt); - vm.serializeUint("root", "l1_chain_id", config.l1ChainId); - vm.serializeUint("root", "era_chain_id", config.eraChainId); - vm.serializeAddress("root", "deployer_addr", config.deployerAddress); - vm.serializeString("root", "deployed_addresses", deployedAddresses); - vm.serializeString("root", "contracts_config", contractsConfig); - - vm.serializeBytes("root", "governance_upgrade_calls", abi.encode(getUpgradeCalls())); - - string memory toml = vm.serializeAddress( - "root", - "protocol_upgrade_handler_proxy_address", - config.protocolUpgradeHandlerProxyAddress - ); - - vm.writeToml(toml, outputPath); - } - - function deployViaCreate2(bytes memory _bytecode) internal returns (address) { - return Utils.deployViaCreate2(_bytecode, config.contracts.create2FactorySalt, addresses.create2Factory); - } - - function mergeCalls(Call[] memory a, Call[] memory b) internal pure returns (Call[] memory result) { - result = new Call[](a.length + b.length); - for (uint256 i = 0; i < a.length; i++) { - result[i] = a[i]; - } - for (uint256 i = 0; i < b.length; i++) { - result[a.length + i] = b[i]; - } - } - - // add this to be excluded from coverage report - function test() internal {} -} diff --git a/l1-contracts/deploy-scripts/upgrade/EcosystemUpgrade_v27_1.s.sol b/l1-contracts/deploy-scripts/upgrade/EcosystemUpgrade_v27_1.s.sol deleted file mode 100644 index 21351cc996..0000000000 --- a/l1-contracts/deploy-scripts/upgrade/EcosystemUpgrade_v27_1.s.sol +++ /dev/null @@ -1,185 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.24; - -// solhint-disable no-console, gas-custom-errors - -import {Script, console2 as console} from "forge-std/Script.sol"; -import {stdToml} from "forge-std/StdToml.sol"; -import {ProxyAdmin} from "@openzeppelin/contracts-v4/proxy/transparent/ProxyAdmin.sol"; -import {ITransparentUpgradeableProxy, TransparentUpgradeableProxy} from "@openzeppelin/contracts-v4/proxy/transparent/TransparentUpgradeableProxy.sol"; -import {UpgradeableBeacon} from "@openzeppelin/contracts-v4/proxy/beacon/UpgradeableBeacon.sol"; -import {Utils} from "../Utils.sol"; -import {Multicall3} from "contracts/dev-contracts/Multicall3.sol"; -import {DefaultUpgrade} from "contracts/upgrades/DefaultUpgrade.sol"; -import {Governance} from "contracts/governance/Governance.sol"; -import {L1GenesisUpgrade} from "contracts/upgrades/L1GenesisUpgrade.sol"; -import {GatewayUpgrade, GatewayUpgradeEncodedInput} from "contracts/upgrades/GatewayUpgrade.sol"; -import {ChainAdmin} from "contracts/governance/ChainAdmin.sol"; -import {ValidatorTimelock} from "contracts/state-transition/ValidatorTimelock.sol"; -import {Bridgehub} from "contracts/bridgehub/Bridgehub.sol"; -import {MessageRoot} from "contracts/bridgehub/MessageRoot.sol"; -import {CTMDeploymentTracker} from "contracts/bridgehub/CTMDeploymentTracker.sol"; -import {L1NativeTokenVault} from "contracts/bridge/ntv/L1NativeTokenVault.sol"; -import {ExecutorFacet} from "contracts/state-transition/chain-deps/facets/Executor.sol"; -import {AdminFacet} from "contracts/state-transition/chain-deps/facets/Admin.sol"; -import {MailboxFacet} from "contracts/state-transition/chain-deps/facets/Mailbox.sol"; -import {GettersFacet} from "contracts/state-transition/chain-deps/facets/Getters.sol"; -import {DiamondInit} from "contracts/state-transition/chain-deps/DiamondInit.sol"; -import {ChainTypeManager} from "contracts/state-transition/ChainTypeManager.sol"; -import {ChainCreationParams, ChainTypeManagerInitializeData, IChainTypeManager} from "contracts/state-transition/IChainTypeManager.sol"; -import {Diamond} from "contracts/state-transition/libraries/Diamond.sol"; -import {InitializeDataNewChain as DiamondInitializeDataNewChain} from "contracts/state-transition/chain-interfaces/IDiamondInit.sol"; -import {FeeParams, PubdataPricingMode} from "contracts/state-transition/chain-deps/ZKChainStorage.sol"; -import {L1AssetRouter} from "contracts/bridge/asset-router/L1AssetRouter.sol"; -import {L1ERC20Bridge} from "contracts/bridge/L1ERC20Bridge.sol"; -import {IL1Nullifier, L1Nullifier} from "contracts/bridge/L1Nullifier.sol"; -import {DiamondProxy} from "contracts/state-transition/chain-deps/DiamondProxy.sol"; -import {IL1AssetRouter} from "contracts/bridge/asset-router/IL1AssetRouter.sol"; -import {INativeTokenVault} from "contracts/bridge/ntv/INativeTokenVault.sol"; -import {BridgedStandardERC20} from "contracts/bridge/BridgedStandardERC20.sol"; -import {AddressHasNoCode} from "../ZkSyncScriptErrors.sol"; -import {ICTMDeploymentTracker} from "contracts/bridgehub/ICTMDeploymentTracker.sol"; -import {IMessageRoot} from "contracts/bridgehub/IMessageRoot.sol"; -import {IL2ContractDeployer} from "contracts/common/interfaces/IL2ContractDeployer.sol"; -import {L2ContractHelper} from "contracts/common/libraries/L2ContractHelper.sol"; -import {AddressAliasHelper} from "contracts/vendor/AddressAliasHelper.sol"; -import {IL1NativeTokenVault} from "contracts/bridge/ntv/IL1NativeTokenVault.sol"; -import {L1NullifierDev} from "contracts/dev-contracts/L1NullifierDev.sol"; -import {AccessControlRestriction} from "contracts/governance/AccessControlRestriction.sol"; -import {PermanentRestriction} from "contracts/governance/PermanentRestriction.sol"; -import {IAssetRouterBase} from "contracts/bridge/asset-router/IAssetRouterBase.sol"; -import {ContractsBytecodesLib} from "../ContractsBytecodesLib.sol"; -import {ValidiumL1DAValidator} from "contracts/state-transition/data-availability/ValidiumL1DAValidator.sol"; -import {Call} from "contracts/governance/Common.sol"; -import {Ownable2StepUpgradeable} from "@openzeppelin/contracts-upgradeable-v4/access/Ownable2StepUpgradeable.sol"; -import {IZKChain} from "contracts/state-transition/chain-interfaces/IZKChain.sol"; -import {ProposedUpgrade} from "contracts/upgrades/BaseZkSyncUpgrade.sol"; - -import {L2CanonicalTransaction} from "contracts/common/Messaging.sol"; -import {L2_COMPLEX_UPGRADER_ADDR, L2_DEPLOYER_SYSTEM_CONTRACT_ADDR, L2_FORCE_DEPLOYER_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; -import {IComplexUpgrader} from "contracts/state-transition/l2-deps/IComplexUpgrader.sol"; -import {TransitionaryOwner} from "contracts/governance/TransitionaryOwner.sol"; -import {SystemContractsProcessing} from "./SystemContractsProcessing.s.sol"; -import {BytecodePublisher} from "./BytecodePublisher.s.sol"; -import {BytecodesSupplier} from "contracts/upgrades/BytecodesSupplier.sol"; -import {GovernanceUpgradeTimer} from "contracts/upgrades/GovernanceUpgradeTimer.sol"; -import {L2WrappedBaseTokenStore} from "contracts/bridge/L2WrappedBaseTokenStore.sol"; -import {RollupDAManager} from "contracts/state-transition/data-availability/RollupDAManager.sol"; -import {Create2AndTransfer} from "../Create2AndTransfer.sol"; - -import {DeployCTMScript} from "../DeployCTM.s.sol"; - -contract EcosystemUpgrade_v27_1 is Script, DeployCTMScript { - using stdToml for string; - - bytes internal oldEncodedChainCreationParams; - - function run() public override { - string memory root = vm.projectRoot(); - - initializeConfig(string.concat(root, vm.envString("UPGRADE_ECOSYSTEM_INPUT"))); - instantiateCreate2Factory(); - deployBlobVersionedHashRetriever(); - - ChainCreationParams memory oldChainCreationParams = abi.decode( - oldEncodedChainCreationParams, - (ChainCreationParams) - ); - Diamond.DiamondCutData memory oldDiamondCut = oldChainCreationParams.diamondCut; - DiamondInitializeDataNewChain memory oldInitializeData = abi.decode( - oldDiamondCut.initCalldata, - (DiamondInitializeDataNewChain) - ); - - // We only change blobVersionedHashRetriever - oldInitializeData.blobVersionedHashRetriever = addresses.blobVersionedHashRetriever; - Diamond.DiamondCutData memory newDiamondCut = Diamond.DiamondCutData({ - facetCuts: oldDiamondCut.facetCuts, - initAddress: oldDiamondCut.initAddress, - initCalldata: abi.encode(oldInitializeData) - }); - ChainCreationParams memory newChainCreationParams = ChainCreationParams({ - genesisUpgrade: oldChainCreationParams.genesisUpgrade, - genesisBatchHash: oldChainCreationParams.genesisBatchHash, - genesisIndexRepeatedStorageChanges: oldChainCreationParams.genesisIndexRepeatedStorageChanges, - genesisBatchCommitment: oldChainCreationParams.genesisBatchCommitment, - diamondCut: newDiamondCut, - forceDeploymentsData: oldChainCreationParams.forceDeploymentsData - }); - - Call[] memory calls = new Call[](1); - calls[0] = Call({ - target: addresses.stateTransition.chainTypeManagerProxy, - data: abi.encodeCall(ChainTypeManager.setChainCreationParams, (newChainCreationParams)), - value: 0 - }); - - saveOutput( - string.concat(root, vm.envString("UPGRADE_ECOSYSTEM_OUTPUT")), - abi.encode(calls), - abi.encode(newDiamondCut) - ); - } - - function initializeConfig(string memory newConfigPath) internal virtual override { - super.initializeConfig(newConfigPath); - string memory toml = vm.readFile(newConfigPath); - - addresses.stateTransition.bytecodesSupplier = toml.readAddress("$.contracts.l1_bytecodes_supplier_addr"); - - addresses.bridgehub.bridgehubProxy = toml.readAddress("$.contracts.bridgehub_proxy_address"); - - setAddressesBasedOnBridgehub(); - - addresses.transparentProxyAdmin = toml.readAddress("$.contracts.transparent_proxy_admin"); - addresses.protocolUpgradeHandlerProxy = toml.readAddress("$.contracts.protocol_upgrade_handler_proxy_address"); - - config.tokens.tokenWethAddress = toml.readAddress("$.tokens.token_weth_address"); - - addresses.daAddresses.rollupDAManager = toml.readAddress("$.contracts.rollup_da_manager"); - - oldEncodedChainCreationParams = toml.readBytes("$.v27_chain_creation_params"); - } - - function setAddressesBasedOnBridgehub() internal virtual { - config.ownerAddress = Bridgehub(addresses.bridgehub.bridgehubProxy).owner(); - address ctm = Bridgehub(addresses.bridgehub.bridgehubProxy).chainTypeManager(config.eraChainId); - addresses.stateTransition.chainTypeManagerProxy = ctm; - // We have to set the diamondProxy address here - as it is used by multiple constructors (for example L1Nullifier etc) - addresses.stateTransition.diamondProxy = Bridgehub(addresses.bridgehub.bridgehubProxy).getZKChain( - config.eraChainId - ); - addresses.bridges.l1AssetRouterProxy = Bridgehub(addresses.bridgehub.bridgehubProxy).assetRouter(); - - addresses.vaults.l1NativeTokenVaultProxy = address( - L1AssetRouter(addresses.bridges.l1AssetRouterProxy).nativeTokenVault() - ); - addresses.bridges.l1NullifierProxy = address( - L1AssetRouter(addresses.bridges.l1AssetRouterProxy).L1_NULLIFIER() - ); - - addresses.bridgehub.ctmDeploymentTrackerProxy = address( - Bridgehub(addresses.bridgehub.bridgehubProxy).l1CtmDeployer() - ); - - addresses.bridgehub.messageRootProxy = address(Bridgehub(addresses.bridgehub.bridgehubProxy).messageRoot()); - - addresses.bridges.erc20BridgeProxy = address( - L1AssetRouter(addresses.bridges.l1AssetRouterProxy).legacyBridge() - ); - - address eraDiamondProxy = Bridgehub(addresses.bridgehub.bridgehubProxy).getZKChain(config.eraChainId); - (addresses.daAddresses.l1RollupDAValidator, ) = GettersFacet(eraDiamondProxy).getDAValidatorPair(); - } - - function saveOutput(string memory outputPath, bytes memory encodedCalls, bytes memory newDiamondCut) internal { - vm.serializeBytes("root", "governance_upgrade_calls", encodedCalls); - - string memory toml = vm.serializeBytes("root", "new_diamond_cut", newDiamondCut); - - vm.writeToml(toml, outputPath); - } - - // add this to be excluded from coverage report - function test() internal override {} -} diff --git a/l1-contracts/deploy-scripts/upgrade/EcosystemUpgrade_v28.s.sol b/l1-contracts/deploy-scripts/upgrade/EcosystemUpgrade_v28.s.sol deleted file mode 100644 index efb37b59a9..0000000000 --- a/l1-contracts/deploy-scripts/upgrade/EcosystemUpgrade_v28.s.sol +++ /dev/null @@ -1,1520 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.28; - -// solhint-disable no-console, gas-custom-errors - -import {Script, console2 as console} from "forge-std/Script.sol"; -import {stdToml} from "forge-std/StdToml.sol"; -import {ProxyAdmin} from "@openzeppelin/contracts-v4/proxy/transparent/ProxyAdmin.sol"; -import {ITransparentUpgradeableProxy, TransparentUpgradeableProxy} from "@openzeppelin/contracts-v4/proxy/transparent/TransparentUpgradeableProxy.sol"; -import {IERC20} from "@openzeppelin/contracts-v4/token/ERC20/IERC20.sol"; -import {UpgradeableBeacon} from "@openzeppelin/contracts-v4/proxy/beacon/UpgradeableBeacon.sol"; -import {PrepareL1L2TransactionParams, StateTransitionDeployedAddresses, Utils} from "../Utils.sol"; -import {L2_ASSET_ROUTER_ADDR, L2_BRIDGEHUB_ADDR, L2_COMPLEX_UPGRADER_ADDR, L2_DEPLOYER_SYSTEM_CONTRACT_ADDR, L2_FORCE_DEPLOYER_ADDR, L2_MESSAGE_ROOT_ADDR, L2_NATIVE_TOKEN_VAULT_ADDR, L2_WETH_IMPL_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; -import {IBridgehub, L2TransactionRequestDirect} from "contracts/bridgehub/IBridgehub.sol"; -import {Multicall3} from "contracts/dev-contracts/Multicall3.sol"; -import {DualVerifier} from "contracts/state-transition/verifiers/DualVerifier.sol"; -import {TestnetVerifier} from "contracts/state-transition/verifiers/TestnetVerifier.sol"; -import {L1VerifierFflonk} from "contracts/state-transition/verifiers/L1VerifierFflonk.sol"; -import {L1VerifierPlonk} from "contracts/state-transition/verifiers/L1VerifierPlonk.sol"; -import {IVerifier, VerifierParams} from "contracts/state-transition/chain-interfaces/IVerifier.sol"; -import {DefaultUpgrade} from "contracts/upgrades/DefaultUpgrade.sol"; -import {Governance} from "contracts/governance/Governance.sol"; -import {L1GenesisUpgrade} from "contracts/upgrades/L1GenesisUpgrade.sol"; -import {GatewayUpgrade, GatewayUpgradeEncodedInput} from "contracts/upgrades/GatewayUpgrade.sol"; -import {ChainAdmin} from "contracts/governance/ChainAdmin.sol"; -import {ValidatorTimelock} from "contracts/state-transition/ValidatorTimelock.sol"; -import {Bridgehub} from "contracts/bridgehub/Bridgehub.sol"; -import {MessageRoot} from "contracts/bridgehub/MessageRoot.sol"; -import {CTMDeploymentTracker} from "contracts/bridgehub/CTMDeploymentTracker.sol"; -import {L1NativeTokenVault} from "contracts/bridge/ntv/L1NativeTokenVault.sol"; -import {ExecutorFacet} from "contracts/state-transition/chain-deps/facets/Executor.sol"; -import {AdminFacet} from "contracts/state-transition/chain-deps/facets/Admin.sol"; -import {MailboxFacet} from "contracts/state-transition/chain-deps/facets/Mailbox.sol"; -import {GettersFacet} from "contracts/state-transition/chain-deps/facets/Getters.sol"; -import {DiamondInit} from "contracts/state-transition/chain-deps/DiamondInit.sol"; -import {ChainTypeManager} from "contracts/state-transition/ChainTypeManager.sol"; -import {ChainCreationParams, ChainTypeManagerInitializeData, IChainTypeManager} from "contracts/state-transition/IChainTypeManager.sol"; -import {Diamond} from "contracts/state-transition/libraries/Diamond.sol"; -import {InitializeDataNewChain as DiamondInitializeDataNewChain} from "contracts/state-transition/chain-interfaces/IDiamondInit.sol"; -import {FeeParams, PubdataPricingMode} from "contracts/state-transition/chain-deps/ZKChainStorage.sol"; -import {L1AssetRouter} from "contracts/bridge/asset-router/L1AssetRouter.sol"; -import {L1ERC20Bridge} from "contracts/bridge/L1ERC20Bridge.sol"; -import {IL1Nullifier, L1Nullifier} from "contracts/bridge/L1Nullifier.sol"; -import {DiamondProxy} from "contracts/state-transition/chain-deps/DiamondProxy.sol"; -import {IL1AssetRouter} from "contracts/bridge/asset-router/IL1AssetRouter.sol"; -import {INativeTokenVault} from "contracts/bridge/ntv/INativeTokenVault.sol"; -import {BridgedStandardERC20} from "contracts/bridge/BridgedStandardERC20.sol"; -import {AddressHasNoCode} from "../ZkSyncScriptErrors.sol"; -import {ICTMDeploymentTracker} from "contracts/bridgehub/ICTMDeploymentTracker.sol"; -import {IMessageRoot} from "contracts/bridgehub/IMessageRoot.sol"; -import {SYSTEM_UPGRADE_L2_TX_TYPE} from "contracts/common/Config.sol"; -import {IL2ContractDeployer} from "contracts/common/interfaces/IL2ContractDeployer.sol"; -import {L2ContractHelper} from "contracts/common/l2-helpers/L2ContractHelper.sol"; -import {AddressAliasHelper} from "contracts/vendor/AddressAliasHelper.sol"; -import {IL1NativeTokenVault} from "contracts/bridge/ntv/IL1NativeTokenVault.sol"; -import {L1NullifierDev} from "contracts/dev-contracts/L1NullifierDev.sol"; -import {AccessControlRestriction} from "contracts/governance/AccessControlRestriction.sol"; -import {PermanentRestriction} from "contracts/governance/PermanentRestriction.sol"; -import {IAssetRouterBase} from "contracts/bridge/asset-router/IAssetRouterBase.sol"; -import {ContractsBytecodesLib} from "../ContractsBytecodesLib.sol"; -import {ValidiumL1DAValidator} from "contracts/state-transition/data-availability/ValidiumL1DAValidator.sol"; -import {Call} from "contracts/governance/Common.sol"; -import {Ownable2StepUpgradeable} from "@openzeppelin/contracts-upgradeable-v4/access/Ownable2StepUpgradeable.sol"; -import {IZKChain} from "contracts/state-transition/chain-interfaces/IZKChain.sol"; -import {ProposedUpgrade} from "contracts/upgrades/BaseZkSyncUpgrade.sol"; -import {UpgradeStageValidator} from "contracts/upgrades/UpgradeStageValidator.sol"; - -import {L2CanonicalTransaction} from "contracts/common/Messaging.sol"; -import {IComplexUpgrader} from "contracts/state-transition/l2-deps/IComplexUpgrader.sol"; -import {TransitionaryOwner} from "contracts/governance/TransitionaryOwner.sol"; -import {SystemContractsProcessing} from "./SystemContractsProcessing.s.sol"; -import {BytecodePublisher} from "./BytecodePublisher.s.sol"; -import {BytecodesSupplier} from "contracts/upgrades/BytecodesSupplier.sol"; -import {GovernanceUpgradeTimer} from "contracts/upgrades/GovernanceUpgradeTimer.sol"; -import {L2WrappedBaseTokenStore} from "contracts/bridge/L2WrappedBaseTokenStore.sol"; -import {RollupDAManager} from "contracts/state-transition/data-availability/RollupDAManager.sol"; -import {Create2AndTransfer} from "../Create2AndTransfer.sol"; - -import {ContractsConfig, DeployedAddresses, TokensConfig} from "../DeployUtils.s.sol"; -import {FixedForceDeploymentsData} from "contracts/state-transition/l2-deps/IL2GenesisUpgrade.sol"; - -import {DeployCTMScript} from "../DeployCTM.s.sol"; - -/// @notice Script used for default upgrade flow -/// @dev For more complex upgrades, this script can be inherited and its functionality overridden if needed. -contract EcosystemUpgrade_v28 is Script, DeployCTMScript { - using stdToml for string; - - /** - * @dev Storage slot with the admin of the contract. - * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is - * validated in the constructor. - */ - bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; - - // solhint-disable-next-line gas-struct-packing - struct UpgradeDeployedAddresses { - ExpectedL2Addresses expectedL2Addresses; - address gatewayUpgrade; - address transitionaryOwner; - address upgradeTimer; - address bytecodesSupplier; - address l2WrappedBaseTokenStore; - address upgradeStageValidator; - } - - struct ExpectedL2Addresses { - address expectedRollupL2DAValidator; - address expectedValidiumL2DAValidator; - address l2SharedBridgeLegacyImpl; - address l2BridgedStandardERC20Impl; - } - - // solhint-disable-next-line gas-struct-packing - struct AdditionalConfig { - // This is the address of the ecosystem admin. - // Note, that it is not the owner, but rather the address that is responsible - // for facilitating partially trusted, but not critical tasks. - address ecosystemAdminAddress; - uint256 governanceUpgradeTimerInitialDelay; - uint256 oldProtocolVersion; - address oldValidatorTimelock; - uint256 priorityTxsL2GasLimit; - uint256 maxExpectedL1GasPrice; - } - - // solhint-disable-next-line gas-struct-packing - struct Gateway { - StateTransitionDeployedAddresses gatewayStateTransition; - bytes facetCutsData; - bytes additionalForceDeployments; - uint256 chainId; - address baseToken; - bytes upgradeCutData; - } - - // solhint-disable-next-line gas-struct-packing - struct NewlyGeneratedData { - bytes fixedForceDeploymentsData; - bytes diamondCutData; - bytes upgradeCutData; - } - - /// @notice Internal state of the upgrade script - struct EcosystemUpgradeConfig { - bool initialized; - bool expectedL2AddressesInitialized; - bool fixedForceDeploymentsDataGenerated; - bool diamondCutPrepared; - bool upgradeCutPrepared; - bool factoryDepsPublished; - bool ecosystemContractsDeployed; - string outputPath; - } - - AdditionalConfig internal newConfig; - Gateway internal gatewayConfig; - NewlyGeneratedData internal newlyGeneratedData; - UpgradeDeployedAddresses internal upgradeAddresses; - - uint256[] internal factoryDepsHashes; - mapping(bytes32 => bool) internal isHashInFactoryDeps; - - EcosystemUpgradeConfig internal upgradeConfig; - - function initialize(string memory newConfigPath, string memory _outputPath) public virtual { - string memory root = vm.projectRoot(); - newConfigPath = string.concat(root, newConfigPath); - - initializeConfig(newConfigPath); - - upgradeConfig.outputPath = string.concat(root, _outputPath); - upgradeConfig.initialized = true; - } - - /// @notice Full default upgrade preparation flow - function prepareEcosystemUpgrade() public virtual { - deployNewEcosystemContracts(); - console.log("Ecosystem contracts are deployed!"); - deployNewEcosystemContractsGW(); - console.log("Ecosystem contracts for GW are deployed!"); - publishBytecodes(); - console.log("Bytecodes published!"); - generateUpgradeData(); - console.log("Upgrade data generated!"); - } - - /// @notice Deploy everything that should be deployed - function deployNewEcosystemContracts() public virtual { - require(upgradeConfig.initialized, "Not initialized"); - - instantiateCreate2Factory(); - - deployVerifiers(); - deployUpgradeStageValidator(); - // add custom upgrade deployment here instead of DefaultUpgrade if needed. - (addresses.stateTransition.defaultUpgrade) = deploySimpleContract("DefaultUpgrade", false); - (addresses.stateTransition.genesisUpgrade) = deploySimpleContract("L1GenesisUpgrade", false); - - addresses.bridgehub.bridgehubImplementation = deploySimpleContract("Bridgehub", false); - - addresses.bridges.l1NullifierImplementation = deploySimpleContract("L1Nullifier", false); - addresses.bridges.l1AssetRouterImplementation = deploySimpleContract("L1AssetRouter", false); - addresses.vaults.l1NativeTokenVaultImplementation = deploySimpleContract("L1NativeTokenVault", false); - - upgradeAddresses.upgradeTimer = deploySimpleContract("GovernanceUpgradeTimer", false); - addresses.bridgehub.messageRootImplementation = deploySimpleContract("MessageRoot", false); - - deployStateTransitionDiamondFacets(); - - addresses.stateTransition.chainTypeManagerImplementation = deploySimpleContract("ChainTypeManager", false); - - upgradeConfig.ecosystemContractsDeployed = true; - } - - function deployGWContract(string memory contractName) internal returns (address contractAddress) { - bytes memory creationCalldata = getCreationCalldata(contractName, true); - contractAddress = Utils.deployThroughL1Deterministic( - getCreationCode(contractName, true), - creationCalldata, - 0, - newConfig.priorityTxsL2GasLimit, - new bytes[](0), - gatewayConfig.chainId, - addresses.bridgehub.bridgehubProxy, - addresses.bridges.l1AssetRouterProxy - ); - notifyAboutDeployment(contractAddress, contractName, creationCalldata, contractName, true); - } - - /// @notice Generate data required for the upgrade - function generateUpgradeData() public virtual { - require(upgradeConfig.initialized, "Not initialized"); - require(upgradeConfig.ecosystemContractsDeployed, "Ecosystem contracts not deployed"); - - // Important, this must come after the initializeExpectedL2Addresses - generateFixedForceDeploymentsData(); - console.log("Generated fixed force deployments data"); - getChainCreationDiamondCutData(addresses.stateTransition); - newlyGeneratedData.diamondCutData = config.contracts.diamondCutData; - gatewayConfig.facetCutsData = abi.encode(getChainCreationDiamondCutData(gatewayConfig.gatewayStateTransition)); - console.log("Prepared diamond cut data"); - generateUpgradeCutData(addresses.stateTransition); - generateUpgradeCutData(gatewayConfig.gatewayStateTransition); - console.log("UpgradeCutGenerated"); - saveOutput(upgradeConfig.outputPath); - } - - /// @notice E2e upgrade generation - function run() public virtual override { - initialize(vm.envString("UPGRADE_ECOSYSTEM_INPUT"), vm.envString("UPGRADE_ECOSYSTEM_OUTPUT")); - prepareEcosystemUpgrade(); - - prepareDefaultGovernanceCalls(); - } - - function getOwnerAddress() public virtual returns (address) { - return config.ownerAddress; - } - - /// @notice Get facet cuts that should be removed - function getFacetCutsForDeletion() internal virtual returns (Diamond.FacetCut[] memory facetCuts) { - address diamondProxy = ChainTypeManager(addresses.stateTransition.chainTypeManagerProxy).getHyperchain( - config.gatewayChainId - ); - IZKChain.Facet[] memory facets = IZKChain(diamondProxy).facets(); - - // Freezability does not matter when deleting, so we just put false everywhere - facetCuts = new Diamond.FacetCut[](facets.length); - for (uint i = 0; i < facets.length; i++) { - facetCuts[i] = Diamond.FacetCut({ - facet: address(0), - action: Diamond.Action.Remove, - isFreezable: false, - selectors: facets[i].selectors - }); - } - } - - /// @notice Build L1 -> L2 upgrade tx - function _composeUpgradeTx( - IL2ContractDeployer.ForceDeployment[] memory forceDeployments - ) internal virtual returns (L2CanonicalTransaction memory transaction) { - // Sanity check - for (uint256 i; i < forceDeployments.length; i++) { - require(isHashInFactoryDeps[forceDeployments[i].bytecodeHash], "Bytecode hash not in factory deps"); - } - - bytes memory data = abi.encodeCall(IL2ContractDeployer.forceDeployOnAddresses, (forceDeployments)); - - transaction = L2CanonicalTransaction({ - txType: SYSTEM_UPGRADE_L2_TX_TYPE, - from: uint256(uint160(L2_FORCE_DEPLOYER_ADDR)), - to: uint256(uint160(address(L2_DEPLOYER_SYSTEM_CONTRACT_ADDR))), - // TODO: dont use hardcoded values - gasLimit: 72_000_000, - gasPerPubdataByteLimit: 800, - maxFeePerGas: 0, - maxPriorityFeePerGas: 0, - paymaster: uint256(uint160(address(0))), - nonce: getProtocolUpgradeNonce(), - value: 0, - reserved: [uint256(0), uint256(0), uint256(0), uint256(0)], - data: data, - signature: new bytes(0), - // All factory deps should've been published before - factoryDeps: factoryDepsHashes, - paymasterInput: new bytes(0), - // Reserved dynamic type for the future use-case. Using it should be avoided, - // But it is still here, just in case we want to enable some additional functionality - reservedDynamic: new bytes(0) - }); - } - - function getNewProtocolVersion() public virtual returns (uint256) { - return config.contracts.latestProtocolVersion; - } - - function getProtocolUpgradeNonce() public virtual returns (uint256) { - return (getNewProtocolVersion() >> 32); - } - - function getOldProtocolDeadline() public virtual returns (uint256) { - // Note, that it is this way by design, on stage2 it - // will be set to 0 - return type(uint256).max; - } - - function getOldProtocolVersion() public virtual returns (uint256) { - return newConfig.oldProtocolVersion; - } - - /// @notice Generate upgrade cut data - function generateUpgradeCutData( - StateTransitionDeployedAddresses memory stateTransition - ) public virtual returns (Diamond.DiamondCutData memory upgradeCutData) { - require(upgradeConfig.factoryDepsPublished, "Factory deps not published"); - - Diamond.FacetCut[] memory facetCutsForDeletion = getFacetCutsForDeletion(); - - Diamond.FacetCut[] memory facetCuts; - facetCuts = getUpgradeAddedFacetCuts(stateTransition); - facetCuts = mergeFacets(facetCutsForDeletion, facetCuts); - - VerifierParams memory verifierParams = getVerifierParams(); - - IL2ContractDeployer.ForceDeployment[] memory baseForceDeployments = SystemContractsProcessing - .getBaseForceDeployments(); - - // Additional force deployments after Gateway - IL2ContractDeployer.ForceDeployment[] - memory additionalForceDeployments = new IL2ContractDeployer.ForceDeployment[](0); - // add additional force deployments here - - // TODO: do we update *all* fixed force deployments? - - IL2ContractDeployer.ForceDeployment[] memory forceDeployments = SystemContractsProcessing.mergeForceDeployments( - baseForceDeployments, - additionalForceDeployments - ); - - ProposedUpgrade memory proposedUpgrade = ProposedUpgrade({ - l2ProtocolUpgradeTx: _composeUpgradeTx(forceDeployments), - bootloaderHash: config.contracts.bootloaderHash, - defaultAccountHash: config.contracts.defaultAAHash, - evmEmulatorHash: config.contracts.evmEmulatorHash, - verifier: stateTransition.verifier, - verifierParams: verifierParams, - l1ContractsUpgradeCalldata: new bytes(0), - postUpgradeCalldata: new bytes(0), - upgradeTimestamp: 0, - newProtocolVersion: getNewProtocolVersion() - }); - - upgradeCutData = Diamond.DiamondCutData({ - facetCuts: facetCuts, - initAddress: stateTransition.defaultUpgrade, - initCalldata: abi.encodeCall(DefaultUpgrade.upgrade, (proposedUpgrade)) - }); - - if (!stateTransition.isOnGateway) { - newlyGeneratedData.upgradeCutData = abi.encode(upgradeCutData); - upgradeConfig.upgradeCutPrepared = true; - } else { - gatewayConfig.upgradeCutData = abi.encode(upgradeCutData); - } - } - - function getForceDeployment( - string memory contractName - ) public virtual returns (IL2ContractDeployer.ForceDeployment memory forceDeployment) { - return - IL2ContractDeployer.ForceDeployment({ - bytecodeHash: getL2BytecodeHash(contractName), - newAddress: getExpectedL2Address(contractName), - callConstructor: true, - value: 0, - input: "" // todo add constructor args here? - }); - } - - function getEcosystemAdmin() external virtual returns (address) { - return newConfig.ecosystemAdminAddress; - } - - function initializeConfig(string memory newConfigPath) internal virtual override { - super.initializeConfig(newConfigPath); - string memory toml = vm.readFile(newConfigPath); - - addresses.stateTransition.bytecodesSupplier = toml.readAddress("$.contracts.l1_bytecodes_supplier_addr"); - - addresses.bridgehub.bridgehubProxy = toml.readAddress("$.contracts.bridgehub_proxy_address"); - - setAddressesBasedOnBridgehub(); - - addresses.transparentProxyAdmin = address( - uint160(uint256(vm.load(addresses.bridgehub.bridgehubProxy, ADMIN_SLOT))) - ); - require( - Ownable2StepUpgradeable(addresses.bridgehub.bridgehubProxy).owner() == config.ownerAddress, - "Incorrect owner" - ); - - config.tokens.tokenWethAddress = toml.readAddress("$.tokens.token_weth_address"); - newConfig.governanceUpgradeTimerInitialDelay = toml.readUint("$.governance_upgrade_timer_initial_delay"); - - newConfig.oldProtocolVersion = toml.readUint("$.old_protocol_version"); - - newConfig.priorityTxsL2GasLimit = toml.readUint("$.priority_txs_l2_gas_limit"); - newConfig.maxExpectedL1GasPrice = toml.readUint("$.max_expected_l1_gas_price"); - - addresses.daAddresses.rollupDAManager = toml.readAddress("$.contracts.rollup_da_manager"); - - gatewayConfig.gatewayStateTransition.chainTypeManagerProxy = toml.readAddress( - "$.gateway.gateway_state_transition.chain_type_manager_proxy_addr" - ); - - gatewayConfig.gatewayStateTransition.chainTypeManagerProxyAdmin = toml.readAddress( - "$.gateway.gateway_state_transition.chain_type_manager_proxy_admin" - ); - - gatewayConfig.gatewayStateTransition.rollupDAManager = toml.readAddress( - "$.gateway.gateway_state_transition.rollup_da_manager" - ); - - gatewayConfig.gatewayStateTransition.rollupSLDAValidator = toml.readAddress( - "$.gateway.gateway_state_transition.rollup_sl_da_validator" - ); - - gatewayConfig.gatewayStateTransition.isOnGateway = true; - - gatewayConfig.chainId = toml.readUint("$.gateway.chain_id"); - config.gatewayChainId = gatewayConfig.chainId; - } - - function getBridgehubAdmin() public virtual returns (address admin) { - admin = Bridgehub(addresses.bridgehub.bridgehubProxy).admin(); - } - - /// @notice This function is meant to only be used in tests - function prepareCreateNewChainCall(uint256 chainId) public view virtual returns (Call[] memory result) { - require(addresses.bridgehub.bridgehubProxy != address(0), "bridgehubProxyAddress is zero in newConfig"); - - bytes32 newChainAssetId = Bridgehub(addresses.bridgehub.bridgehubProxy).baseTokenAssetId(gatewayConfig.chainId); - result = new Call[](1); - result[0] = Call({ - target: addresses.bridgehub.bridgehubProxy, - value: 0, - data: abi.encodeCall( - IBridgehub.createNewChain, - ( - chainId, - addresses.stateTransition.chainTypeManagerProxy, - newChainAssetId, - 5, - msg.sender, - abi.encode(newlyGeneratedData.diamondCutData, newlyGeneratedData.fixedForceDeploymentsData), - new bytes[](0) - ) - ) - }); - } - - function setAddressesBasedOnBridgehub() internal virtual { - config.ownerAddress = Bridgehub(addresses.bridgehub.bridgehubProxy).owner(); - address ctm = IBridgehub(addresses.bridgehub.bridgehubProxy).chainTypeManager(config.eraChainId); - addresses.stateTransition.chainTypeManagerProxy = ctm; - // We have to set the diamondProxy address here - as it is used by multiple constructors (for example L1Nullifier etc) - addresses.stateTransition.diamondProxy = IBridgehub(addresses.bridgehub.bridgehubProxy).getZKChain( - config.eraChainId - ); - uint256 ctmProtocolVersion = IChainTypeManager(ctm).protocolVersion(); - require( - ctmProtocolVersion != getNewProtocolVersion(), - "The new protocol version is already present on the ChainTypeManager" - ); - addresses.bridges.l1AssetRouterProxy = Bridgehub(addresses.bridgehub.bridgehubProxy).assetRouter(); - - addresses.vaults.l1NativeTokenVaultProxy = address( - L1AssetRouter(addresses.bridges.l1AssetRouterProxy).nativeTokenVault() - ); - addresses.bridges.l1NullifierProxy = address( - L1AssetRouter(addresses.bridges.l1AssetRouterProxy).L1_NULLIFIER() - ); - - addresses.bridgehub.ctmDeploymentTrackerProxy = address( - Bridgehub(addresses.bridgehub.bridgehubProxy).l1CtmDeployer() - ); - - addresses.bridgehub.messageRootProxy = address(Bridgehub(addresses.bridgehub.bridgehubProxy).messageRoot()); - - addresses.bridges.erc20BridgeProxy = address( - L1AssetRouter(addresses.bridges.l1AssetRouterProxy).legacyBridge() - ); - newConfig.oldValidatorTimelock = ChainTypeManager(addresses.stateTransition.chainTypeManagerProxy) - .validatorTimelock(); - - newConfig.ecosystemAdminAddress = Bridgehub(addresses.bridgehub.bridgehubProxy).admin(); - - address eraDiamondProxy = Bridgehub(addresses.bridgehub.bridgehubProxy).getZKChain(config.eraChainId); - (addresses.daAddresses.l1RollupDAValidator, ) = GettersFacet(eraDiamondProxy).getDAValidatorPair(); - } - - function generateFixedForceDeploymentsData() internal virtual { - FixedForceDeploymentsData memory forceDeploymentsData = prepareFixedForceDeploymentsData(); - - newlyGeneratedData.fixedForceDeploymentsData = abi.encode(forceDeploymentsData); - generatedData.forceDeploymentsData = abi.encode(forceDeploymentsData); - upgradeConfig.fixedForceDeploymentsDataGenerated = true; - } - - function getExpectedL2Address(string memory contractName) public virtual returns (address) { - return - Utils.getL2AddressViaCreate2Factory( - bytes32(0), // the same as it is currently in the DeployCTM.s.sol. Todo unify. - getL2BytecodeHash(contractName), - hex"" // the same as it is currently in DeployCTM.s.sol - ); - } - - function getGovernanceUpgradeInitialDelay() external view virtual returns (uint256) { - return newConfig.governanceUpgradeTimerInitialDelay; - } - - function getFullListOfFactoryDependencies() internal virtual returns (bytes[] memory factoryDeps) { - bytes[] memory basicDependencies = SystemContractsProcessing.getBaseListOfDependencies(); - - bytes[] memory additionalDependencies = new bytes[](5); // Deps after Gateway upgrade - additionalDependencies[0] = ContractsBytecodesLib.getCreationCode("L2SharedBridgeLegacy"); - additionalDependencies[1] = ContractsBytecodesLib.getCreationCode("BridgedStandardERC20"); - additionalDependencies[2] = ContractsBytecodesLib.getCreationCode("RollupL2DAValidator"); - additionalDependencies[3] = ContractsBytecodesLib.getCreationCode("ValidiumL2DAValidator"); - additionalDependencies[3] = ContractsBytecodesLib.getCreationCode("DiamondProxy"); - - factoryDeps = SystemContractsProcessing.mergeBytesArrays(basicDependencies, additionalDependencies); - factoryDeps = SystemContractsProcessing.deduplicateBytecodes(factoryDeps); - } - - function prepareFixedForceDeploymentsData() public view virtual returns (FixedForceDeploymentsData memory data) { - require(config.ownerAddress != address(0), "owner not set"); - - data = FixedForceDeploymentsData({ - l1ChainId: config.l1ChainId, - eraChainId: config.eraChainId, - l1AssetRouter: addresses.bridges.l1AssetRouterProxy, - l2TokenProxyBytecodeHash: getL2BytecodeHash("BeaconProxy"), - aliasedL1Governance: AddressAliasHelper.applyL1ToL2Alias(config.ownerAddress), - maxNumberOfZKChains: config.contracts.maxNumberOfChains, - bridgehubBytecodeHash: getL2BytecodeHash("Bridgehub"), - l2AssetRouterBytecodeHash: getL2BytecodeHash("L2AssetRouter"), - l2NtvBytecodeHash: getL2BytecodeHash("L2NativeTokenVault"), - messageRootBytecodeHash: getL2BytecodeHash("MessageRoot"), - chainAssetHandlerBytecodeHash: getL2BytecodeHash("ChainAssetHandler"), - l2SharedBridgeLegacyImpl: address(0), - // upgradeAddresses.expectedL2Addresses.l2SharedBridgeLegacyImpl, - l2BridgedStandardERC20Impl: address(0), - // upgradeAddresses.expectedL2Addresses.l2BridgedStandardERC20Impl, - dangerousTestOnlyForcedBeacon: address(0) - }); - } - - function saveOutput(string memory outputPath) internal virtual override { - vm.serializeAddress("bridgehub", "bridgehub_implementation_addr", addresses.bridgehub.bridgehubImplementation); - vm.serializeAddress( - "bridgehub", - "ctm_deployment_tracker_implementation_addr", - addresses.bridgehub.ctmDeploymentTrackerImplementation - ); - vm.serializeAddress( - "bridgehub", - "ctm_deployment_tracker_proxy_addr", - addresses.bridgehub.ctmDeploymentTrackerProxy - ); - vm.serializeAddress("bridgehub", "message_root_proxy_addr", addresses.bridgehub.messageRootProxy); - string memory bridgehub = vm.serializeAddress( - "bridgehub", - "message_root_implementation_addr", - addresses.bridgehub.messageRootImplementation - ); - - // TODO(EVM-744): this has to be renamed to chain type manager - vm.serializeAddress( - "state_transition", - "state_transition_implementation_addr", - addresses.stateTransition.chainTypeManagerImplementation - ); - vm.serializeAddress( - "state_transition", - "chain_type_manager_implementation_addr", - addresses.stateTransition.chainTypeManagerImplementation - ); - vm.serializeAddress("state_transition", "verifier_addr", addresses.stateTransition.verifier); - vm.serializeAddress("state_transition", "admin_facet_addr", addresses.stateTransition.adminFacet); - vm.serializeAddress("state_transition", "mailbox_facet_addr", addresses.stateTransition.mailboxFacet); - vm.serializeAddress("state_transition", "executor_facet_addr", addresses.stateTransition.executorFacet); - vm.serializeAddress("state_transition", "getters_facet_addr", addresses.stateTransition.gettersFacet); - vm.serializeAddress("state_transition", "diamond_init_addr", addresses.stateTransition.diamondInit); - vm.serializeAddress("state_transition", "genesis_upgrade_addr", addresses.stateTransition.genesisUpgrade); - vm.serializeAddress("state_transition", "verifier_fflonk_addr", addresses.stateTransition.verifierFflonk); - vm.serializeAddress("state_transition", "verifier_plonk_addr", addresses.stateTransition.verifierPlonk); - string memory stateTransition = vm.serializeAddress( - "state_transition", - "default_upgrade_addr", - addresses.stateTransition.defaultUpgrade - ); - - vm.serializeAddress( - "gateway_state_transition", - "chain_type_manager_implementation_addr", - gatewayConfig.gatewayStateTransition.chainTypeManagerImplementation - ); - vm.serializeAddress( - "gateway_state_transition", - "chain_type_manager_proxy", - gatewayConfig.gatewayStateTransition.chainTypeManagerProxy - ); - vm.serializeAddress( - "gateway_state_transition", - "chain_type_manager_proxy_admin", - gatewayConfig.gatewayStateTransition.chainTypeManagerProxyAdmin - ); - vm.serializeAddress( - "gateway_state_transition", - "rollup_da_manager", - gatewayConfig.gatewayStateTransition.rollupDAManager - ); - vm.serializeAddress( - "gateway_state_transition", - "rollup_l2_da_validator", - gatewayConfig.gatewayStateTransition.rollupSLDAValidator - ); - vm.serializeAddress( - "gateway_state_transition", - "admin_facet_addr", - gatewayConfig.gatewayStateTransition.adminFacet - ); - vm.serializeAddress( - "gateway_state_transition", - "mailbox_facet_addr", - gatewayConfig.gatewayStateTransition.mailboxFacet - ); - vm.serializeAddress( - "gateway_state_transition", - "executor_facet_addr", - gatewayConfig.gatewayStateTransition.executorFacet - ); - vm.serializeAddress( - "gateway_state_transition", - "getters_facet_addr", - gatewayConfig.gatewayStateTransition.gettersFacet - ); - vm.serializeAddress( - "gateway_state_transition", - "diamond_init_addr", - gatewayConfig.gatewayStateTransition.diamondInit - ); - vm.serializeAddress( - "gateway_state_transition", - "default_upgrade_addr", - gatewayConfig.gatewayStateTransition.defaultUpgrade - ); - vm.serializeAddress( - "gateway_state_transition", - "genesis_upgrade_addr", - gatewayConfig.gatewayStateTransition.genesisUpgrade - ); - vm.serializeAddress("gateway_state_transition", "verifier_addr", gatewayConfig.gatewayStateTransition.verifier); - vm.serializeAddress( - "gateway_state_transition", - "verifier_fflonk_addr", - gatewayConfig.gatewayStateTransition.verifierFflonk - ); - string memory gateway_state_transition = vm.serializeAddress( - "gateway_state_transition", - "verifier_plonk_addr", - gatewayConfig.gatewayStateTransition.verifierPlonk - ); - - vm.serializeBytes("gateway", "diamond_cut_data", gatewayConfig.facetCutsData); - vm.serializeBytes("gateway", "upgrade_cut_data", gatewayConfig.upgradeCutData); - string memory gateway = vm.serializeString("gateway", "gateway_state_transition", gateway_state_transition); - - vm.serializeUint("root", "gateway_chain_id", gatewayConfig.chainId); - vm.serializeUint("root", "priority_txs_l2_gas_limit", newConfig.priorityTxsL2GasLimit); - vm.serializeUint("root", "max_expected_l1_gas_price", newConfig.maxExpectedL1GasPrice); - - vm.serializeAddress("bridges", "erc20_bridge_implementation_addr", addresses.bridges.erc20BridgeImplementation); - vm.serializeAddress("bridges", "l1_nullifier_proxy_addr", addresses.bridges.l1NullifierProxy); - vm.serializeAddress("bridges", "l1_nullifier_implementation_addr", addresses.bridges.l1NullifierImplementation); - vm.serializeAddress( - "bridges", - "l1_asset_router_implementation_addr", - addresses.bridges.l1AssetRouterImplementation - ); - vm.serializeAddress("bridges", "l1_asset_router_proxy_addr", addresses.bridges.l1AssetRouterProxy); - // TODO: legacy name - vm.serializeAddress( - "bridges", - "shared_bridge_implementation_addr", - addresses.bridges.l1AssetRouterImplementation - ); - vm.serializeAddress( - "bridges", - "bridged_standard_erc20_impl", - addresses.bridges.bridgedStandardERC20Implementation - ); - - string memory bridges = vm.serializeAddress( - "bridges", - "bridged_token_beacon", - addresses.bridges.bridgedTokenBeacon - ); - - vm.serializeUint( - "contracts_newConfig", - "diamond_init_max_l2_gas_per_batch", - config.contracts.diamondInitMaxL2GasPerBatch - ); - vm.serializeUint( - "contracts_newConfig", - "diamond_init_batch_overhead_l1_gas", - config.contracts.diamondInitBatchOverheadL1Gas - ); - vm.serializeUint( - "contracts_newConfig", - "diamond_init_max_pubdata_per_batch", - config.contracts.diamondInitMaxPubdataPerBatch - ); - vm.serializeUint( - "contracts_newConfig", - "diamond_init_minimal_l2_gas_price", - config.contracts.diamondInitMinimalL2GasPrice - ); - vm.serializeUint( - "contracts_newConfig", - "diamond_init_priority_tx_max_pubdata", - config.contracts.diamondInitPriorityTxMaxPubdata - ); - vm.serializeUint( - "contracts_newConfig", - "diamond_init_pubdata_pricing_mode", - uint256(config.contracts.diamondInitPubdataPricingMode) - ); - vm.serializeUint("contracts_newConfig", "priority_tx_max_gas_limit", config.contracts.priorityTxMaxGasLimit); - vm.serializeBytes32( - "contracts_newConfig", - "recursion_circuits_set_vks_hash", - config.contracts.recursionCircuitsSetVksHash - ); - vm.serializeBytes32( - "contracts_newConfig", - "recursion_leaf_level_vk_hash", - config.contracts.recursionLeafLevelVkHash - ); - vm.serializeBytes32( - "contracts_newConfig", - "recursion_node_level_vk_hash", - config.contracts.recursionNodeLevelVkHash - ); - - vm.serializeAddress( - "contracts_newConfig", - "expected_rollup_l2_da_validator", - getExpectedL2Address("RollupL2DAValidator") - ); - vm.serializeAddress( - "contracts_newConfig", - "expected_validium_l2_da_validator", - getExpectedL2Address("NoDAL2DAValidator") - ); - vm.serializeBytes("contracts_newConfig", "diamond_cut_data", newlyGeneratedData.diamondCutData); - - vm.serializeBytes( - "contracts_newConfig", - "force_deployments_data", - newlyGeneratedData.fixedForceDeploymentsData - ); - - vm.serializeUint("contracts_newConfig", "new_protocol_version", getNewProtocolVersion()); - - vm.serializeUint("contracts_newConfig", "old_protocol_version", newConfig.oldProtocolVersion); - - vm.serializeAddress("contracts_newConfig", "old_validator_timelock", newConfig.oldValidatorTimelock); - - string memory contractsConfig = vm.serializeAddress( - "contracts_newConfig", - "l1_legacy_shared_bridge", - addresses.bridges.l1AssetRouterProxy - ); - - vm.serializeAddress( - "deployed_addresses", - "validator_timelock_addr", - addresses.stateTransition.validatorTimelock - ); - vm.serializeAddress("deployed_addresses", "chain_admin", addresses.chainAdmin); - vm.serializeAddress( - "deployed_addresses", - "access_control_restriction_addr", - addresses.accessControlRestrictionAddress - ); - vm.serializeString("deployed_addresses", "bridgehub", bridgehub); - vm.serializeString("deployed_addresses", "bridges", bridges); - vm.serializeString("deployed_addresses", "state_transition", stateTransition); - vm.serializeAddress( - "deployed_addresses", - "l1_bytecodes_supplier_addr", - addresses.stateTransition.bytecodesSupplier - ); - vm.serializeAddress("deployed_addresses", "native_token_vault_addr", addresses.vaults.l1NativeTokenVaultProxy); - vm.serializeAddress( - "deployed_addresses", - "native_token_vault_implementation_addr", - addresses.vaults.l1NativeTokenVaultImplementation - ); - - vm.serializeAddress( - "deployed_addresses", - "rollup_l1_da_validator_addr", - addresses.daAddresses.l1RollupDAValidator - ); - vm.serializeAddress( - "deployed_addresses", - "validium_l1_da_validator_addr", - addresses.daAddresses.noDAValidiumL1DAValidator - ); - vm.serializeAddress("deployed_addresses", "l1_gateway_upgrade", upgradeAddresses.gatewayUpgrade); - vm.serializeAddress("deployed_addresses", "l1_transitionary_owner", upgradeAddresses.transitionaryOwner); - vm.serializeAddress("deployed_addresses", "upgrade_stage_validator", upgradeAddresses.upgradeStageValidator); - vm.serializeAddress("deployed_addresses", "l1_rollup_da_manager", addresses.daAddresses.rollupDAManager); - - string memory deployedAddresses = vm.serializeAddress( - "deployed_addresses", - "l1_governance_upgrade_timer", - upgradeAddresses.upgradeTimer - ); - - vm.serializeAddress("root", "create2_factory_addr", create2FactoryState.create2FactoryAddress); - vm.serializeBytes32("root", "create2_factory_salt", create2FactoryParams.factorySalt); - vm.serializeUint("root", "l1_chain_id", config.l1ChainId); - vm.serializeUint("root", "era_chain_id", config.eraChainId); - vm.serializeAddress("root", "deployer_addr", config.deployerAddress); - vm.serializeString("root", "deployed_addresses", deployedAddresses); - vm.serializeString("root", "contracts_newConfig", contractsConfig); - vm.serializeString("root", "gateway", gateway); - - vm.serializeBytes("root", "governance_calls", new bytes(0)); // Will be populated later - vm.serializeUint( - "root", - "governance_upgrade_timer_initial_delay", - newConfig.governanceUpgradeTimerInitialDelay - ); - - string memory toml = vm.serializeBytes("root", "chain_upgrade_diamond_cut", newlyGeneratedData.upgradeCutData); - - vm.writeToml(toml, outputPath); - } - - /////////////////////////// Blockchain interactions //////////////////////////// - - function publishBytecodes() public virtual { - bytes[] memory allDeps = getFullListOfFactoryDependencies(); - uint256[] memory factoryDeps = new uint256[](allDeps.length); - require(factoryDeps.length <= 64, "Too many deps"); - - BytecodePublisher.publishBytecodesInBatches( - BytecodesSupplier(addresses.stateTransition.bytecodesSupplier), - allDeps - ); - - for (uint256 i = 0; i < allDeps.length; i++) { - bytes32 bytecodeHash = L2ContractHelper.hashL2Bytecode(allDeps[i]); - factoryDeps[i] = uint256(bytecodeHash); - isHashInFactoryDeps[bytecodeHash] = true; - } - - // Double check for consistency: - require(bytes32(factoryDeps[0]) == config.contracts.bootloaderHash, "bootloader hash factory dep mismatch"); - require(bytes32(factoryDeps[1]) == config.contracts.defaultAAHash, "default aa hash factory dep mismatch"); - require(bytes32(factoryDeps[2]) == config.contracts.evmEmulatorHash, "EVM emulator hash factory dep mismatch"); - - factoryDepsHashes = factoryDeps; - - upgradeConfig.factoryDepsPublished = true; - } - - ////////////////////////////// Preparing calls ///////////////////////////////// - - function prepareDefaultGovernanceCalls() - public - virtual - returns (Call[] memory stage0Calls, Call[] memory stage1Calls, Call[] memory stage2Calls) - { - // Default upgrade is done it 3 stages: - // 0. Pause migration to/from Gateway - // 1. Perform upgrade - // 2. Unpause migration to/from Gateway - stage0Calls = prepareStage0GovernanceCalls(); - vm.serializeBytes("governance_calls", "governance_stage0_calls", abi.encode(stage0Calls)); - stage1Calls = prepareStage1GovernanceCalls(); - vm.serializeBytes("governance_calls", "governance_stage1_calls", abi.encode(stage1Calls)); - stage2Calls = prepareStage2GovernanceCalls(); - - string memory governanceCallsSerialized = vm.serializeBytes( - "governance_calls", - "governance_stage2_calls", - abi.encode(stage2Calls) - ); - - vm.writeToml(governanceCallsSerialized, upgradeConfig.outputPath, ".governance_calls"); - } - - /// @notice The zeroth step of upgrade. By default it just stops gateway migrations - function prepareStage0GovernanceCalls() public virtual returns (Call[] memory calls) { - Call[][] memory allCalls = new Call[][](3); - allCalls[0] = preparePauseGatewayMigrationsCall(); - allCalls[1] = prepareGatewaySpecificStage0GovernanceCalls(); - allCalls[2] = prepareGovernanceUpgradeTimerStartCall(); - calls = mergeCallsArray(allCalls); - } - - /// @notice The first step of upgrade. It upgrades the proxies and sets the new version upgrade - function prepareStage1GovernanceCalls() public virtual returns (Call[] memory calls) { - Call[][] memory allCalls = new Call[][](7); - allCalls[0] = prepareGovernanceUpgradeTimerCheckCall(); - allCalls[1] = prepareCheckMigrationsPausedCalls(); - allCalls[2] = prepareUpgradeProxiesCalls(); - allCalls[3] = prepareNewChainCreationParamsCall(); - allCalls[4] = provideSetNewVersionUpgradeCall(); - allCalls[5] = prepareDAValidatorCall(); - allCalls[6] = prepareGatewaySpecificStage1GovernanceCalls(); - calls = mergeCallsArray(allCalls); - } - - /// @notice The second step of upgrade. By default it unpauses migrations. - function prepareStage2GovernanceCalls() public virtual returns (Call[] memory calls) { - Call[][] memory allCalls = new Call[][](4); - allCalls[0] = prepareCheckUpgradeIsPresent(); - allCalls[1] = prepareUnpauseGatewayMigrationsCall(); - allCalls[2] = prepareGatewaySpecificStage2GovernanceCalls(); - allCalls[3] = prepareCheckMigrationsUnpausedCalls(); - calls = mergeCallsArray(allCalls); - } - - function provideSetNewVersionUpgradeCall() public virtual returns (Call[] memory calls) { - require( - addresses.stateTransition.chainTypeManagerProxy != address(0), - "stateTransitionManagerAddress is zero in newConfig" - ); - - // Just retrieved it from the contract - uint256 previousProtocolVersion = getOldProtocolVersion(); - uint256 deadline = getOldProtocolDeadline(); - uint256 newProtocolVersion = getNewProtocolVersion(); - Diamond.DiamondCutData memory upgradeCut = abi.decode( - newlyGeneratedData.upgradeCutData, - (Diamond.DiamondCutData) - ); - Call memory ctmCall = Call({ - target: addresses.stateTransition.chainTypeManagerProxy, - data: abi.encodeCall( - ChainTypeManager.setNewVersionUpgrade, - (upgradeCut, previousProtocolVersion, deadline, newProtocolVersion) - ), - value: 0 - }); - - calls = new Call[](1); - calls[0] = ctmCall; - } - - function preparePauseGatewayMigrationsCall() public view virtual returns (Call[] memory result) { - require(addresses.bridgehub.bridgehubProxy != address(0), "bridgehubProxyAddress is zero in newConfig"); - - result = new Call[](1); - result[0] = Call({ - target: addresses.bridgehub.bridgehubProxy, - value: 0, - data: abi.encodeCall(IBridgehub.pauseMigration, ()) - }); - } - - function prepareUnpauseGatewayMigrationsCall() public view virtual returns (Call[] memory result) { - require(addresses.bridgehub.bridgehubProxy != address(0), "bridgehubProxyAddress is zero in newConfig"); - - result = new Call[](1); - result[0] = Call({ - target: addresses.bridgehub.bridgehubProxy, - value: 0, - data: abi.encodeCall(IBridgehub.unpauseMigration, ()) - }); - } - - function prepareGatewaySpecificStage0GovernanceCalls() public virtual returns (Call[] memory calls) { - if (gatewayConfig.chainId == 0) return calls; // Gateway is unknown - - // Note: gas price can fluctuate, so we need to be sure that upgrade won't be broken because of that - uint256 priorityTxsL2GasLimit = newConfig.priorityTxsL2GasLimit; - uint256 maxExpectedL1GasPrice = newConfig.maxExpectedL1GasPrice; - - calls = preparePauseMigrationCallForGateway(priorityTxsL2GasLimit, maxExpectedL1GasPrice); - } - - /// @notice Deploy everything that should be deployed for GW - function deployNewEcosystemContractsGW() public virtual { - require(upgradeConfig.initialized, "Not initialized"); - - gatewayConfig.gatewayStateTransition.verifierFflonk = deployGWContract("VerifierFflonk"); - gatewayConfig.gatewayStateTransition.verifierPlonk = deployGWContract("VerifierPlonk"); - gatewayConfig.gatewayStateTransition.verifier = deployGWContract("Verifier"); - - gatewayConfig.gatewayStateTransition.executorFacet = deployGWContract("ExecutorFacet"); - gatewayConfig.gatewayStateTransition.adminFacet = deployGWContract("AdminFacet"); - gatewayConfig.gatewayStateTransition.mailboxFacet = deployGWContract("MailboxFacet"); - gatewayConfig.gatewayStateTransition.gettersFacet = deployGWContract("GettersFacet"); - gatewayConfig.gatewayStateTransition.diamondInit = deployGWContract("DiamondInit"); - gatewayConfig.gatewayStateTransition.defaultUpgrade = deployGWContract("DefaultUpgrade"); - gatewayConfig.gatewayStateTransition.genesisUpgrade = deployGWContract("L1GenesisUpgrade"); - - gatewayConfig.gatewayStateTransition.chainTypeManagerImplementation = deployGWContract("ChainTypeManager"); - } - - function prepareGatewaySpecificStage1GovernanceCalls() public virtual returns (Call[] memory calls) { - if (gatewayConfig.chainId == 0) return calls; // Gateway is unknown - - Call[][] memory allCalls = new Call[][](4); - - // Note: gas price can fluctuate, so we need to be sure that upgrade won't be broken because of that - uint256 priorityTxsL2GasLimit = newConfig.priorityTxsL2GasLimit; - uint256 maxExpectedL1GasPrice = newConfig.maxExpectedL1GasPrice; - - allCalls[0] = provideSetNewVersionUpgradeCallForGateway(priorityTxsL2GasLimit, maxExpectedL1GasPrice); - allCalls[1] = prepareNewChainCreationParamsCallForGateway(priorityTxsL2GasLimit, maxExpectedL1GasPrice); - allCalls[2] = prepareCTMImplementationUpgrade(priorityTxsL2GasLimit, maxExpectedL1GasPrice); - allCalls[3] = prepareDAValidatorCallGW(priorityTxsL2GasLimit, maxExpectedL1GasPrice); - - calls = mergeCallsArray(allCalls); - } - - function prepareGatewaySpecificStage2GovernanceCalls() public virtual returns (Call[] memory calls) { - if (gatewayConfig.chainId == 0) return calls; // Gateway is unknown - - Call[][] memory allCalls = new Call[][](1); - - // Note: gas price can fluctuate, so we need to be sure that upgrade won't be broken because of that - uint256 priorityTxsL2GasLimit = newConfig.priorityTxsL2GasLimit; - uint256 maxExpectedL1GasPrice = newConfig.maxExpectedL1GasPrice; - - allCalls[0] = prepareUnpauseMigrationCallForGateway(priorityTxsL2GasLimit, maxExpectedL1GasPrice); - - calls = mergeCallsArray(allCalls); - } - - function provideSetNewVersionUpgradeCallForGateway( - uint256 l2GasLimit, - uint256 l1GasPrice - ) public virtual returns (Call[] memory calls) { - require( - gatewayConfig.gatewayStateTransition.chainTypeManagerProxy != address(0), - "chainTypeManager on gateway is zero in newConfig" - ); - - uint256 previousProtocolVersion = getOldProtocolVersion(); - uint256 deadline = getOldProtocolDeadline(); - uint256 newProtocolVersion = getNewProtocolVersion(); - Diamond.DiamondCutData memory upgradeCut = generateUpgradeCutData(gatewayConfig.gatewayStateTransition); - gatewayConfig.upgradeCutData = abi.encode(upgradeCut); - - bytes memory l2Calldata = abi.encodeCall( - ChainTypeManager.setNewVersionUpgrade, - (upgradeCut, previousProtocolVersion, deadline, newProtocolVersion) - ); - - calls = _prepareL1ToGatewayCall( - l2Calldata, - l2GasLimit, - l1GasPrice, - gatewayConfig.gatewayStateTransition.chainTypeManagerProxy - ); - } - - function preparePauseMigrationCallForGateway( - uint256 l2GasLimit, - uint256 l1GasPrice - ) public virtual returns (Call[] memory calls) { - bytes memory l2Calldata = abi.encodeCall(IBridgehub.pauseMigration, ()); - - calls = _prepareL1ToGatewayCall(l2Calldata, l2GasLimit, l1GasPrice, L2_BRIDGEHUB_ADDR); - } - - function prepareUnpauseMigrationCallForGateway( - uint256 l2GasLimit, - uint256 l1GasPrice - ) public virtual returns (Call[] memory calls) { - bytes memory l2Calldata = abi.encodeCall(IBridgehub.unpauseMigration, ()); - - calls = _prepareL1ToGatewayCall(l2Calldata, l2GasLimit, l1GasPrice, L2_BRIDGEHUB_ADDR); - } - - function prepareNewChainCreationParamsCallForGateway( - uint256 l2GasLimit, - uint256 l1GasPrice - ) public virtual returns (Call[] memory calls) { - require( - gatewayConfig.gatewayStateTransition.chainTypeManagerProxy != address(0), - "chainTypeManager on gateway is zero in newConfig" - ); - - bytes memory l2Calldata = abi.encodeCall( - ChainTypeManager.setChainCreationParams, - (getChainCreationParams(gatewayConfig.gatewayStateTransition)) - ); - - calls = _prepareL1ToGatewayCall( - l2Calldata, - l2GasLimit, - l1GasPrice, - gatewayConfig.gatewayStateTransition.chainTypeManagerProxy - ); - } - - function prepareCTMImplementationUpgrade( - uint256 l2GasLimit, - uint256 l1GasPrice - ) public virtual returns (Call[] memory calls) { - require( - gatewayConfig.gatewayStateTransition.chainTypeManagerProxy != address(0), - "chainTypeManager on gateway is zero in newConfig" - ); - - bytes memory l2Calldata = abi.encodeCall( - ProxyAdmin.upgrade, - ( - ITransparentUpgradeableProxy(payable(gatewayConfig.gatewayStateTransition.chainTypeManagerProxy)), - gatewayConfig.gatewayStateTransition.chainTypeManagerImplementation - ) - ); - - calls = _prepareL1ToGatewayCall( - l2Calldata, - l2GasLimit, - l1GasPrice, - gatewayConfig.gatewayStateTransition.chainTypeManagerProxyAdmin - ); - } - - function _prepareL1ToGatewayCall( - bytes memory l2Calldata, - uint256 l2GasLimit, - uint256 l1GasPrice, - address dstAddress - ) internal view returns (Call[] memory calls) { - require(gatewayConfig.chainId != 0, "Chain id of gateway is zero in newConfig"); - - require(addresses.bridgehub.bridgehubProxy != address(0), "bridgehubProxyAddress is zero in newConfig"); - require(addresses.bridges.l1AssetRouterProxy != address(0), "l1AssetRouterProxyAddress is zero in newConfig"); - - calls = Utils.prepareGovernanceL1L2DirectTransaction( - l1GasPrice, - l2Calldata, - l2GasLimit, - new bytes[](0), - dstAddress, - gatewayConfig.chainId, - addresses.bridgehub.bridgehubProxy, - addresses.bridges.l1AssetRouterProxy, - msg.sender - ); - } - - function prepareApproveGatewayBaseTokenCall( - address spender, - uint256 amount - ) public virtual returns (Call[] memory calls) { - address token = IBridgehub(addresses.bridgehub.bridgehubProxy).baseToken(gatewayConfig.chainId); - require(token != address(0), "Base token for Gateway is zero"); - calls = new Call[](1); - calls[0] = Call({target: token, data: abi.encodeCall(IERC20.approve, (spender, amount)), value: 0}); - } - - /// @notice Start the upgrade timer. - function prepareGovernanceUpgradeTimerStartCall() public virtual returns (Call[] memory calls) { - require(upgradeAddresses.upgradeTimer != address(0), "upgradeTimer is zero"); - calls = new Call[](1); - - calls[0] = Call({ - target: upgradeAddresses.upgradeTimer, - data: abi.encodeCall(GovernanceUpgradeTimer.startTimer, ()), - value: 0 - }); - } - - /// @notice Double checking that the deadline has passed. - function prepareGovernanceUpgradeTimerCheckCall() public virtual returns (Call[] memory calls) { - require(upgradeAddresses.upgradeTimer != address(0), "upgradeTimer is zero"); - calls = new Call[](1); - - calls[0] = Call({ - target: upgradeAddresses.upgradeTimer, - // Double checking that the deadline has passed. - data: abi.encodeCall(GovernanceUpgradeTimer.checkDeadline, ()), - value: 0 - }); - } - - function prepareNewChainCreationParamsCall() public virtual returns (Call[] memory calls) { - require( - addresses.stateTransition.chainTypeManagerProxy != address(0), - "stateTransitionManagerAddress is zero in newConfig" - ); - calls = new Call[](1); - - calls[0] = Call({ - target: addresses.stateTransition.chainTypeManagerProxy, - data: abi.encodeCall( - ChainTypeManager.setChainCreationParams, - (getChainCreationParams(addresses.stateTransition)) - ), - value: 0 - }); - } - - /// @notice Checks to make sure that migrations are paused - function prepareCheckMigrationsPausedCalls() public virtual returns (Call[] memory calls) { - require(upgradeAddresses.upgradeStageValidator != address(0), "upgradeStageValidator is zero"); - calls = new Call[](1); - - calls[0] = Call({ - target: upgradeAddresses.upgradeStageValidator, - // Double checking migrations are paused - data: abi.encodeCall(UpgradeStageValidator.checkMigrationsPaused, ()), - value: 0 - }); - } - - /// @notice Checks to make sure that migrations are paused - function prepareCheckMigrationsUnpausedCalls() public virtual returns (Call[] memory calls) { - require(upgradeAddresses.upgradeStageValidator != address(0), "upgradeStageValidator is zero"); - calls = new Call[](1); - - calls[0] = Call({ - target: upgradeAddresses.upgradeStageValidator, - // Double checking migrations are unpaused - data: abi.encodeCall(UpgradeStageValidator.checkMigrationsUnpaused, ()), - value: 0 - }); - } - - /// @notice Checks to make sure that the upgrade has happened. - function prepareCheckUpgradeIsPresent() public virtual returns (Call[] memory calls) { - require(upgradeAddresses.upgradeStageValidator != address(0), "upgradeStageValidator is zero"); - calls = new Call[](1); - - calls[0] = Call({ - target: upgradeAddresses.upgradeStageValidator, - // Double checking the presence of the upgrade - data: abi.encodeCall(UpgradeStageValidator.checkProtocolUpgradePresence, ()), - value: 0 - }); - } - - /// @notice Update implementations in proxies - function prepareUpgradeProxiesCalls() public virtual returns (Call[] memory calls) { - calls = new Call[](6); - - calls[0] = _buildCallProxyUpgrade( - addresses.stateTransition.chainTypeManagerProxy, - addresses.stateTransition.chainTypeManagerImplementation - ); - - calls[1] = _buildCallProxyUpgrade( - addresses.bridgehub.bridgehubProxy, - addresses.bridgehub.bridgehubImplementation - ); - - // Note, that we do not need to run the initializer - calls[2] = _buildCallProxyUpgrade( - addresses.bridges.l1NullifierProxy, - addresses.bridges.l1NullifierImplementation - ); - - calls[3] = _buildCallProxyUpgrade( - addresses.bridges.l1AssetRouterProxy, - addresses.bridges.l1AssetRouterImplementation - ); - - calls[4] = _buildCallProxyUpgrade( - addresses.vaults.l1NativeTokenVaultProxy, - addresses.vaults.l1NativeTokenVaultImplementation - ); - - calls[5] = _buildCallProxyUpgrade( - addresses.bridgehub.messageRootProxy, - addresses.bridgehub.messageRootImplementation - ); - } - - function _buildCallProxyUpgrade( - address proxyAddress, - address newImplementationAddress - ) internal virtual returns (Call memory call) { - require(addresses.transparentProxyAdmin != address(0), "transparentProxyAdmin not newConfigured"); - - call = Call({ - target: addresses.transparentProxyAdmin, - data: abi.encodeCall( - ProxyAdmin.upgrade, - (ITransparentUpgradeableProxy(payable(proxyAddress)), newImplementationAddress) - ), - value: 0 - }); - } - - /// @notice Additional calls to newConfigure contracts - function prepareDAValidatorCall() public virtual returns (Call[] memory calls) { - calls = new Call[](1); - - calls[0] = Call({ - target: addresses.daAddresses.rollupDAManager, - data: abi.encodeCall( - RollupDAManager.updateDAPair, - (addresses.daAddresses.l1RollupDAValidator, getExpectedL2Address("RollupL2DAValidator"), true) - ), - value: 0 - }); - } - - function prepareDAValidatorCallGW( - uint256 l2GasLimit, - uint256 l1GasPrice - ) public virtual returns (Call[] memory calls) { - bytes memory l2Calldata = abi.encodeCall( - RollupDAManager.updateDAPair, - ( - gatewayConfig.gatewayStateTransition.rollupSLDAValidator, - getExpectedL2Address("RollupL2DAValidator"), - true - ) - ); - - calls = _prepareL1ToGatewayCall( - l2Calldata, - l2GasLimit, - l1GasPrice, - gatewayConfig.gatewayStateTransition.rollupDAManager - ); - } - - function getCreationCode( - string memory contractName, - bool isZKBytecode - ) internal view virtual override returns (bytes memory) { - if (!isZKBytecode) { - if (compareStrings(contractName, "GatewayUpgrade")) { - return type(GatewayUpgrade).creationCode; - } else if (compareStrings(contractName, "DefaultUpgrade")) { - return type(DefaultUpgrade).creationCode; - } else if (compareStrings(contractName, "BytecodesSupplier")) { - return type(BytecodesSupplier).creationCode; - } else if (compareStrings(contractName, "TransitionaryOwner")) { - return type(TransitionaryOwner).creationCode; - } else if (compareStrings(contractName, "GovernanceUpgradeTimer")) { - return type(GovernanceUpgradeTimer).creationCode; - } else if (compareStrings(contractName, "L2StandardERC20")) { - return ContractsBytecodesLib.getCreationCode("BridgedStandardERC20"); - } else if (compareStrings(contractName, "RollupL2DAValidator")) { - return ContractsBytecodesLib.getCreationCode("RollupL2DAValidator"); - } else if (compareStrings(contractName, "NoDAL2DAValidator")) { - return ContractsBytecodesLib.getCreationCode("ValidiumL2DAValidator"); - } else { - return super.getCreationCode(contractName, isZKBytecode); - } - } else { - if (compareStrings(contractName, "GatewayUpgrade")) { - return Utils.readZKFoundryBytecodeL1("GatewayUpgrade.sol", "GatewayUpgrade"); - } else if (compareStrings(contractName, "DefaultUpgrade")) { - return Utils.readZKFoundryBytecodeL1("DefaultUpgrade.sol", "DefaultUpgrade"); - } else if (compareStrings(contractName, "BytecodesSupplier")) { - return Utils.readZKFoundryBytecodeL1("BytecodesSupplier.sol", "BytecodesSupplier"); - } else if (compareStrings(contractName, "TransitionaryOwner")) { - return Utils.readZKFoundryBytecodeL1("TransitionaryOwner.sol", "TransitionaryOwner"); - } else if (compareStrings(contractName, "GovernanceUpgradeTimer")) { - return Utils.readZKFoundryBytecodeL1("GovernanceUpgradeTimer.sol", "GovernanceUpgradeTimer"); - } else if (compareStrings(contractName, "L2LegacySharedBridge")) { - return ContractsBytecodesLib.getCreationCode("L2SharedBridgeLegacy"); - } else if (compareStrings(contractName, "L2StandardERC20")) { - return ContractsBytecodesLib.getCreationCode("BridgedStandardERC20"); - } else if (compareStrings(contractName, "RollupL2DAValidator")) { - return ContractsBytecodesLib.getCreationCode("RollupL2DAValidator"); - } else if (compareStrings(contractName, "NoDAL2DAValidator")) { - return ContractsBytecodesLib.getCreationCode("ValidiumL2DAValidator"); - } else { - return super.getCreationCode(contractName, isZKBytecode); - } - } - } - - function getCreationCalldata( - string memory contractName, - bool isZKBytecode - ) internal view virtual override returns (bytes memory) { - if (compareStrings(contractName, "GatewayUpgrade")) { - return abi.encode(); - } else if (compareStrings(contractName, "DefaultUpgrade")) { - return abi.encode(); - } else if (compareStrings(contractName, "BytecodesSupplier")) { - return abi.encode(); - } else if (compareStrings(contractName, "TransitionaryOwner")) { - return abi.encode(config.ownerAddress); - } else if (compareStrings(contractName, "GovernanceUpgradeTimer")) { - uint256 initialDelay = newConfig.governanceUpgradeTimerInitialDelay; - uint256 maxAdditionalDelay = 2 weeks; - return abi.encode(initialDelay, maxAdditionalDelay, config.ownerAddress, newConfig.ecosystemAdminAddress); - } else if (compareStrings(contractName, "L2LegacySharedBridge")) { - return abi.encode(); - } else if (compareStrings(contractName, "L2StandardERC20")) { - return abi.encode(); - } else if (compareStrings(contractName, "RollupL2DAValidator")) { - return abi.encode(); - } else if (compareStrings(contractName, "NoDAL2DAValidator")) { - return abi.encode(); - } else if (compareStrings(contractName, "ChainTypeManager")) { - if (!isZKBytecode) { - return abi.encode(addresses.bridgehub.bridgehubProxy); - } else { - return abi.encode(L2_BRIDGEHUB_ADDR); - } - } else if (compareStrings(contractName, "Verifier")) { - if (!isZKBytecode) { - return abi.encode(addresses.stateTransition.verifierFflonk, addresses.stateTransition.verifierPlonk); - } else { - return - abi.encode( - gatewayConfig.gatewayStateTransition.verifierFflonk, - gatewayConfig.gatewayStateTransition.verifierPlonk - ); - } - } else if (compareStrings(contractName, "AdminFacet")) { - if (!isZKBytecode) { - return abi.encode(config.l1ChainId, addresses.daAddresses.rollupDAManager); - } else { - return abi.encode(config.l1ChainId, gatewayConfig.gatewayStateTransition.rollupDAManager); - } - } else if (compareStrings(contractName, "UpgradeStageValidator")) { - return abi.encode(addresses.stateTransition.chainTypeManagerProxy, config.contracts.latestProtocolVersion); - } else { - return super.getCreationCalldata(contractName, isZKBytecode); - } - } - - function deployUpgradeStageValidator() internal { - upgradeAddresses.upgradeStageValidator = deploySimpleContract("UpgradeStageValidator", false); - } - - ////////////////////////////// Misc utils ///////////////////////////////// - - function mergeCalls(Call[] memory a, Call[] memory b) public pure returns (Call[] memory result) { - result = new Call[](a.length + b.length); - for (uint256 i = 0; i < a.length; i++) { - result[i] = a[i]; - } - for (uint256 i = 0; i < b.length; i++) { - result[a.length + i] = b[i]; - } - } - - function mergeCallsArray(Call[][] memory a) public pure returns (Call[] memory result) { - uint256 resultLength; - - for (uint256 i; i < a.length; i++) { - resultLength += a[i].length; - } - - result = new Call[](resultLength); - - uint256 counter; - for (uint256 i; i < a.length; i++) { - for (uint256 j; j < a[i].length; j++) { - result[counter] = a[i][j]; - counter++; - } - } - } - - function mergeFacets( - Diamond.FacetCut[] memory a, - Diamond.FacetCut[] memory b - ) public pure returns (Diamond.FacetCut[] memory result) { - result = new Diamond.FacetCut[](a.length + b.length); - for (uint256 i = 0; i < a.length; i++) { - result[i] = a[i]; - } - for (uint256 i = 0; i < b.length; i++) { - result[a.length + i] = b[i]; - } - } - - // add this to be excluded from coverage report - function test() internal override {} -} diff --git a/l1-contracts/deploy-scripts/upgrade/EcosystemUpgrade_v28_1_zk_os.s.sol b/l1-contracts/deploy-scripts/upgrade/EcosystemUpgrade_v28_1_zk_os.s.sol deleted file mode 100644 index b0fd187539..0000000000 --- a/l1-contracts/deploy-scripts/upgrade/EcosystemUpgrade_v28_1_zk_os.s.sol +++ /dev/null @@ -1,166 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.28; - -// solhint-disable no-console, gas-custom-errors - -import {Script, console2 as console} from "forge-std/Script.sol"; -import {stdToml} from "forge-std/StdToml.sol"; -import {ProxyAdmin} from "@openzeppelin/contracts-v4/proxy/transparent/ProxyAdmin.sol"; -import {ITransparentUpgradeableProxy, TransparentUpgradeableProxy} from "@openzeppelin/contracts-v4/proxy/transparent/TransparentUpgradeableProxy.sol"; -import {IERC20} from "@openzeppelin/contracts-v4/token/ERC20/IERC20.sol"; -import {UpgradeableBeacon} from "@openzeppelin/contracts-v4/proxy/beacon/UpgradeableBeacon.sol"; -import {PrepareL1L2TransactionParams, StateTransitionDeployedAddresses, Utils} from "../Utils.sol"; -import {IBridgehub, L2TransactionRequestDirect} from "contracts/bridgehub/IBridgehub.sol"; -import {Multicall3} from "contracts/dev-contracts/Multicall3.sol"; -import {DualVerifier} from "contracts/state-transition/verifiers/DualVerifier.sol"; -import {TestnetVerifier} from "contracts/state-transition/verifiers/TestnetVerifier.sol"; -import {L1VerifierFflonk} from "contracts/state-transition/verifiers/L1VerifierFflonk.sol"; -import {L1VerifierPlonk} from "contracts/state-transition/verifiers/L1VerifierPlonk.sol"; -import {IVerifier, VerifierParams} from "contracts/state-transition/chain-interfaces/IVerifier.sol"; -import {DefaultUpgrade} from "contracts/upgrades/DefaultUpgrade.sol"; -import {Governance} from "contracts/governance/Governance.sol"; -import {L1GenesisUpgrade} from "contracts/upgrades/L1GenesisUpgrade.sol"; -import {GatewayUpgrade, GatewayUpgradeEncodedInput} from "contracts/upgrades/GatewayUpgrade.sol"; -import {ChainAdmin} from "contracts/governance/ChainAdmin.sol"; -import {ValidatorTimelock} from "contracts/state-transition/ValidatorTimelock.sol"; -import {Bridgehub} from "contracts/bridgehub/Bridgehub.sol"; -import {MessageRoot} from "contracts/bridgehub/MessageRoot.sol"; -import {CTMDeploymentTracker} from "contracts/bridgehub/CTMDeploymentTracker.sol"; -import {L1NativeTokenVault} from "contracts/bridge/ntv/L1NativeTokenVault.sol"; -import {ExecutorFacet} from "contracts/state-transition/chain-deps/facets/Executor.sol"; -import {AdminFacet} from "contracts/state-transition/chain-deps/facets/Admin.sol"; -import {MailboxFacet} from "contracts/state-transition/chain-deps/facets/Mailbox.sol"; -import {GettersFacet} from "contracts/state-transition/chain-deps/facets/Getters.sol"; -import {DiamondInit} from "contracts/state-transition/chain-deps/DiamondInit.sol"; -import {ChainTypeManager} from "contracts/state-transition/ChainTypeManager.sol"; -import {ChainCreationParams, ChainTypeManagerInitializeData, IChainTypeManager} from "contracts/state-transition/IChainTypeManager.sol"; -import {Diamond} from "contracts/state-transition/libraries/Diamond.sol"; -import {InitializeDataNewChain as DiamondInitializeDataNewChain} from "contracts/state-transition/chain-interfaces/IDiamondInit.sol"; -import {FeeParams, PubdataPricingMode} from "contracts/state-transition/chain-deps/ZKChainStorage.sol"; -import {L1AssetRouter} from "contracts/bridge/asset-router/L1AssetRouter.sol"; -import {L1ERC20Bridge} from "contracts/bridge/L1ERC20Bridge.sol"; -import {IL1Nullifier, L1Nullifier} from "contracts/bridge/L1Nullifier.sol"; -import {DiamondProxy} from "contracts/state-transition/chain-deps/DiamondProxy.sol"; -import {IL1AssetRouter} from "contracts/bridge/asset-router/IL1AssetRouter.sol"; -import {INativeTokenVault} from "contracts/bridge/ntv/INativeTokenVault.sol"; -import {BridgedStandardERC20} from "contracts/bridge/BridgedStandardERC20.sol"; -import {AddressHasNoCode} from "../ZkSyncScriptErrors.sol"; -import {ICTMDeploymentTracker} from "contracts/bridgehub/ICTMDeploymentTracker.sol"; -import {IMessageRoot} from "contracts/bridgehub/IMessageRoot.sol"; -import {SYSTEM_UPGRADE_L2_TX_TYPE} from "contracts/common/Config.sol"; -import {IL2ContractDeployer} from "contracts/common/interfaces/IL2ContractDeployer.sol"; -import {L2ContractHelper} from "contracts/common/l2-helpers/L2ContractHelper.sol"; -import {AddressAliasHelper} from "contracts/vendor/AddressAliasHelper.sol"; -import {IL1NativeTokenVault} from "contracts/bridge/ntv/IL1NativeTokenVault.sol"; -import {L1NullifierDev} from "contracts/dev-contracts/L1NullifierDev.sol"; -import {AccessControlRestriction} from "contracts/governance/AccessControlRestriction.sol"; -import {PermanentRestriction} from "contracts/governance/PermanentRestriction.sol"; -import {IAssetRouterBase} from "contracts/bridge/asset-router/IAssetRouterBase.sol"; -import {ContractsBytecodesLib} from "../ContractsBytecodesLib.sol"; -import {ValidiumL1DAValidator} from "contracts/state-transition/data-availability/ValidiumL1DAValidator.sol"; -import {Call} from "contracts/governance/Common.sol"; -import {Ownable2StepUpgradeable} from "@openzeppelin/contracts-upgradeable-v4/access/Ownable2StepUpgradeable.sol"; -import {IZKChain} from "contracts/state-transition/chain-interfaces/IZKChain.sol"; -import {ProposedUpgrade} from "contracts/upgrades/BaseZkSyncUpgrade.sol"; -import {UpgradeStageValidator} from "contracts/upgrades/UpgradeStageValidator.sol"; - -import {L2CanonicalTransaction} from "contracts/common/Messaging.sol"; -import {L2_COMPLEX_UPGRADER_ADDR, L2_DEPLOYER_SYSTEM_CONTRACT_ADDR, L2_FORCE_DEPLOYER_ADDR, L2_VERSION_SPECIFIC_UPGRADER_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; -import {IComplexUpgrader} from "contracts/state-transition/l2-deps/IComplexUpgrader.sol"; -import {TransitionaryOwner} from "contracts/governance/TransitionaryOwner.sol"; -import {SystemContractsProcessing} from "./SystemContractsProcessing.s.sol"; -import {BytecodePublisher} from "./BytecodePublisher.s.sol"; -import {BytecodesSupplier} from "contracts/upgrades/BytecodesSupplier.sol"; -import {GovernanceUpgradeTimer} from "contracts/upgrades/GovernanceUpgradeTimer.sol"; -import {L2WrappedBaseTokenStore} from "contracts/bridge/L2WrappedBaseTokenStore.sol"; -import {RollupDAManager} from "contracts/state-transition/data-availability/RollupDAManager.sol"; -import {Create2AndTransfer} from "../Create2AndTransfer.sol"; - -import {ContractsConfig, DeployedAddresses, TokensConfig} from "../DeployUtils.s.sol"; -import {FixedForceDeploymentsData} from "contracts/state-transition/l2-deps/IL2GenesisUpgrade.sol"; - -import {DefaultEcosystemUpgrade} from "../upgrade/DefaultEcosystemUpgrade.s.sol"; - -import {SemVer} from "../../contracts/common/libraries/SemVer.sol"; - -/// @notice Script used for v29 upgrade flow -contract EcosystemUpgrade_v28_1_zk_os is Script, DefaultEcosystemUpgrade { - using stdToml for string; - - /// @notice E2e upgrade generation - function run() public virtual override { - initialize( - vm.envString("ZK_OS_V28_1_UPGRADE_ECOSYSTEM_INPUT"), - vm.envString("ZK_OS_V28_1_UPGRADE_ECOSYSTEM_OUTPUT") - ); - prepareEcosystemUpgrade(); - - prepareDefaultGovernanceCalls(); - } - - function deployNewEcosystemContracts() public override { - require(upgradeConfig.initialized, "Not initialized"); - - instantiateCreate2Factory(); - - deployVerifiers(); - deployUpgradeStageValidator(); - - (addresses.stateTransition.defaultUpgrade) = deployUsedUpgradeContract(); - upgradeAddresses.upgradeTimer = deploySimpleContract("GovernanceUpgradeTimer", false); - } - - function getProposedUpgrade( - StateTransitionDeployedAddresses memory stateTransition - ) public override returns (ProposedUpgrade memory proposedUpgrade) { - Bridgehub bridgehub = Bridgehub(addresses.bridgehub.bridgehubProxy); - IZKChain diamondProxy = IZKChain(bridgehub.getZKChain(config.eraChainId)); - - console.log("Diamond proxy address: %s", address(diamondProxy)); - (uint32 major, uint32 minor, uint32 patch) = diamondProxy.getSemverProtocolVersion(); - console.log("Current protocol version: %s.%s.%s", major, minor, patch); - uint256 oldVersion = SemVer.packSemVer(major, minor, patch); - uint256 newVersion = SemVer.packSemVer(major, minor, patch + 1); - - proposedUpgrade = ProposedUpgrade({ - l2ProtocolUpgradeTx: _composeEmptyUpgradeTx(), - bootloaderHash: bytes32(0), - defaultAccountHash: bytes32(0), - evmEmulatorHash: bytes32(0), - verifier: stateTransition.verifier, - verifierParams: VerifierParams({ - recursionNodeLevelVkHash: bytes32(0), - recursionLeafLevelVkHash: bytes32(0), - recursionCircuitsSetVksHash: bytes32(0) - }), - l1ContractsUpgradeCalldata: new bytes(0), - postUpgradeCalldata: new bytes(0), - upgradeTimestamp: 0, - newProtocolVersion: newVersion - }); - } - - /// @notice Build empty L1 -> L2 upgrade tx - function _composeEmptyUpgradeTx() internal virtual returns (L2CanonicalTransaction memory transaction) { - transaction = L2CanonicalTransaction({ - txType: 0, - from: uint256(0), - to: uint256(0), - gasLimit: 0, - gasPerPubdataByteLimit: 0, - maxFeePerGas: 0, - maxPriorityFeePerGas: 0, - paymaster: uint256(uint160(address(0))), - nonce: 0, - value: 0, - reserved: [uint256(0), uint256(0), uint256(0), uint256(0)], - data: new bytes(0), - signature: new bytes(0), - factoryDeps: new uint256[](0), - paymasterInput: new bytes(0), - // Reserved dynamic type for the future use-case. Using it should be avoided, - // But it is still here, just in case we want to enable some additional functionality - reservedDynamic: new bytes(0) - }); - } -} diff --git a/l1-contracts/deploy-scripts/upgrade/EcosystemUpgrade_v29.s.sol b/l1-contracts/deploy-scripts/upgrade/EcosystemUpgrade_v29.s.sol index 5c83c12407..46aadd39a7 100644 --- a/l1-contracts/deploy-scripts/upgrade/EcosystemUpgrade_v29.s.sol +++ b/l1-contracts/deploy-scripts/upgrade/EcosystemUpgrade_v29.s.sol @@ -5,87 +5,38 @@ pragma solidity 0.8.28; import {Script, console2 as console} from "forge-std/Script.sol"; import {stdToml} from "forge-std/StdToml.sol"; -import {ProxyAdmin} from "@openzeppelin/contracts-v4/proxy/transparent/ProxyAdmin.sol"; -import {ITransparentUpgradeableProxy, TransparentUpgradeableProxy} from "@openzeppelin/contracts-v4/proxy/transparent/TransparentUpgradeableProxy.sol"; -import {IERC20} from "@openzeppelin/contracts-v4/token/ERC20/IERC20.sol"; -import {UpgradeableBeacon} from "@openzeppelin/contracts-v4/proxy/beacon/UpgradeableBeacon.sol"; -import {PrepareL1L2TransactionParams, StateTransitionDeployedAddresses, Utils} from "../Utils.sol"; -import {IBridgehub, L2TransactionRequestDirect} from "contracts/bridgehub/IBridgehub.sol"; -import {Multicall3} from "contracts/dev-contracts/Multicall3.sol"; -import {DualVerifier} from "contracts/state-transition/verifiers/DualVerifier.sol"; -import {TestnetVerifier} from "contracts/state-transition/verifiers/TestnetVerifier.sol"; -import {L1VerifierFflonk} from "contracts/state-transition/verifiers/L1VerifierFflonk.sol"; -import {L1VerifierPlonk} from "contracts/state-transition/verifiers/L1VerifierPlonk.sol"; -import {IVerifier, VerifierParams} from "contracts/state-transition/chain-interfaces/IVerifier.sol"; -import {DefaultUpgrade} from "contracts/upgrades/DefaultUpgrade.sol"; -import {Governance} from "contracts/governance/Governance.sol"; -import {L1GenesisUpgrade} from "contracts/upgrades/L1GenesisUpgrade.sol"; -import {GatewayUpgrade, GatewayUpgradeEncodedInput} from "contracts/upgrades/GatewayUpgrade.sol"; -import {ChainAdmin} from "contracts/governance/ChainAdmin.sol"; + +import {StateTransitionDeployedAddresses, Utils} from "../Utils.sol"; +import {IBridgehubBase} from "contracts/bridgehub/IBridgehubBase.sol"; + import {ValidatorTimelock} from "contracts/state-transition/ValidatorTimelock.sol"; -import {Bridgehub} from "contracts/bridgehub/Bridgehub.sol"; -import {MessageRoot} from "contracts/bridgehub/MessageRoot.sol"; + import {CTMDeploymentTracker} from "contracts/bridgehub/CTMDeploymentTracker.sol"; -import {L1NativeTokenVault} from "contracts/bridge/ntv/L1NativeTokenVault.sol"; -import {ExecutorFacet} from "contracts/state-transition/chain-deps/facets/Executor.sol"; -import {AdminFacet} from "contracts/state-transition/chain-deps/facets/Admin.sol"; -import {MailboxFacet} from "contracts/state-transition/chain-deps/facets/Mailbox.sol"; -import {GettersFacet} from "contracts/state-transition/chain-deps/facets/Getters.sol"; -import {DiamondInit} from "contracts/state-transition/chain-deps/DiamondInit.sol"; + import {ChainTypeManager} from "contracts/state-transition/ChainTypeManager.sol"; -import {ChainAssetHandler} from "contracts/bridgehub/ChainAssetHandler.sol"; -import {ChainCreationParams, ChainTypeManagerInitializeData, IChainTypeManager} from "contracts/state-transition/IChainTypeManager.sol"; +import {L1ChainAssetHandler} from "contracts/bridgehub/L1ChainAssetHandler.sol"; +import {IChainTypeManager} from "contracts/state-transition/IChainTypeManager.sol"; import {Diamond} from "contracts/state-transition/libraries/Diamond.sol"; -import {InitializeDataNewChain as DiamondInitializeDataNewChain} from "contracts/state-transition/chain-interfaces/IDiamondInit.sol"; -import {FeeParams, PubdataPricingMode} from "contracts/state-transition/chain-deps/ZKChainStorage.sol"; -import {L1AssetRouter} from "contracts/bridge/asset-router/L1AssetRouter.sol"; -import {L1ERC20Bridge} from "contracts/bridge/L1ERC20Bridge.sol"; -import {IL1Nullifier, L1Nullifier} from "contracts/bridge/L1Nullifier.sol"; -import {DiamondProxy} from "contracts/state-transition/chain-deps/DiamondProxy.sol"; + import {IL1AssetRouter} from "contracts/bridge/asset-router/IL1AssetRouter.sol"; -import {INativeTokenVault} from "contracts/bridge/ntv/INativeTokenVault.sol"; -import {BridgedStandardERC20} from "contracts/bridge/BridgedStandardERC20.sol"; -import {AddressHasNoCode} from "../ZkSyncScriptErrors.sol"; -import {ICTMDeploymentTracker} from "contracts/bridgehub/ICTMDeploymentTracker.sol"; -import {IMessageRoot} from "contracts/bridgehub/IMessageRoot.sol"; -import {SYSTEM_UPGRADE_L2_TX_TYPE} from "contracts/common/Config.sol"; + import {IL2ContractDeployer} from "contracts/common/interfaces/IL2ContractDeployer.sol"; -import {L2ContractHelper} from "contracts/common/l2-helpers/L2ContractHelper.sol"; + import {AddressAliasHelper} from "contracts/vendor/AddressAliasHelper.sol"; -import {IL1NativeTokenVault} from "contracts/bridge/ntv/IL1NativeTokenVault.sol"; -import {L1NullifierDev} from "contracts/dev-contracts/L1NullifierDev.sol"; -import {AccessControlRestriction} from "contracts/governance/AccessControlRestriction.sol"; -import {PermanentRestriction} from "contracts/governance/PermanentRestriction.sol"; -import {IAssetRouterBase} from "contracts/bridge/asset-router/IAssetRouterBase.sol"; + +import {SET_ASSET_HANDLER_COUNTERPART_ENCODING_VERSION} from "contracts/bridge/asset-router/IAssetRouterBase.sol"; import {ContractsBytecodesLib} from "../ContractsBytecodesLib.sol"; -import {ValidiumL1DAValidator} from "contracts/state-transition/data-availability/ValidiumL1DAValidator.sol"; + import {Call} from "contracts/governance/Common.sol"; -import {Ownable2StepUpgradeable} from "@openzeppelin/contracts-upgradeable-v4/access/Ownable2StepUpgradeable.sol"; -import {IZKChain} from "contracts/state-transition/chain-interfaces/IZKChain.sol"; -import {ProposedUpgrade} from "contracts/upgrades/BaseZkSyncUpgrade.sol"; -import {UpgradeStageValidator} from "contracts/upgrades/UpgradeStageValidator.sol"; -import {L2CanonicalTransaction} from "contracts/common/Messaging.sol"; -import {L2_CHAIN_ASSET_HANDLER_ADDR, L2_COMPLEX_UPGRADER_ADDR, L2_DEPLOYER_SYSTEM_CONTRACT_ADDR, L2_FORCE_DEPLOYER_ADDR, L2_VERSION_SPECIFIC_UPGRADER_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; +import {L2_CHAIN_ASSET_HANDLER_ADDR, L2_COMPLEX_UPGRADER_ADDR, L2_VERSION_SPECIFIC_UPGRADER_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; import {IComplexUpgrader} from "contracts/state-transition/l2-deps/IComplexUpgrader.sol"; -import {TransitionaryOwner} from "contracts/governance/TransitionaryOwner.sol"; -import {SystemContractsProcessing} from "./SystemContractsProcessing.s.sol"; -import {BytecodePublisher} from "./BytecodePublisher.s.sol"; -import {BytecodesSupplier} from "contracts/upgrades/BytecodesSupplier.sol"; -import {GovernanceUpgradeTimer} from "contracts/upgrades/GovernanceUpgradeTimer.sol"; -import {L2WrappedBaseTokenStore} from "contracts/bridge/L2WrappedBaseTokenStore.sol"; -import {RollupDAManager} from "contracts/state-transition/data-availability/RollupDAManager.sol"; -import {Create2AndTransfer} from "../Create2AndTransfer.sol"; - -import {ContractsConfig, DeployedAddresses, TokensConfig} from "../DeployUtils.s.sol"; -import {FixedForceDeploymentsData} from "contracts/state-transition/l2-deps/IL2GenesisUpgrade.sol"; import {DefaultEcosystemUpgrade} from "../upgrade/DefaultEcosystemUpgrade.s.sol"; import {IL2V29Upgrade} from "contracts/upgrades/IL2V29Upgrade.sol"; import {L1V29Upgrade} from "contracts/upgrades/L1V29Upgrade.sol"; import {DataEncoding} from "contracts/common/libraries/DataEncoding.sol"; -import {SET_ASSET_HANDLER_COUNTERPART_ENCODING_VERSION} from "contracts/bridge/asset-router/IAssetRouterBase.sol"; // Note that the `ProtocolUpgradeHandler` uses `OpenZeppeling v5`. interface ProxyAdminV5 { @@ -219,7 +170,7 @@ contract EcosystemUpgrade_v29 is Script, DefaultEcosystemUpgrade { ( addresses.bridgehub.chainAssetHandlerImplementation, addresses.bridgehub.chainAssetHandlerProxy - ) = deployTuppWithContract("ChainAssetHandler", false); + ) = deployTuppWithContract("L1ChainAssetHandler", false); ( addresses.stateTransition.validatorTimelockImplementation, @@ -336,7 +287,7 @@ contract EcosystemUpgrade_v29 is Script, DefaultEcosystemUpgrade { calls = new Call[](1); calls[0] = Call({ target: addresses.bridgehub.bridgehubProxy, - data: abi.encodeCall(Bridgehub.setChainAssetHandler, (addresses.bridgehub.chainAssetHandlerProxy)), + data: abi.encodeCall(IBridgehubBase.setChainAssetHandler, (addresses.bridgehub.chainAssetHandlerProxy)), value: 0 }); } @@ -426,38 +377,4 @@ contract EcosystemUpgrade_v29 is Script, DefaultEcosystemUpgrade { function deployUsedUpgradeContractGW() internal override returns (address) { return deployGWContract("L1V29Upgrade"); } - - function getInitializeCalldata( - string memory contractName, - bool isZKBytecode - ) internal virtual override returns (bytes memory) { - if (compareStrings(contractName, "ValidatorTimelock")) { - if (!isZKBytecode) { - return - abi.encodeCall( - ValidatorTimelock.initialize, - (config.ownerAddress, uint32(config.contracts.validatorTimelockExecutionDelay)) - ); - } else { - // On Gateway, the delay is always 0. - return - abi.encodeCall( - ValidatorTimelock.initialize, - (AddressAliasHelper.applyL1ToL2Alias(config.ownerAddress), uint32(0)) - ); - } - } else if (compareStrings(contractName, "ChainAssetHandler")) { - if (!isZKBytecode) { - return abi.encodeCall(ChainAssetHandler.initialize, (config.ownerAddress)); - } else { - return - abi.encodeCall( - ChainAssetHandler.initialize, - AddressAliasHelper.applyL1ToL2Alias(config.ownerAddress) - ); - } - } else { - return super.getInitializeCalldata(contractName, isZKBytecode); - } - } } diff --git a/l1-contracts/deploy-scripts/upgrade/EcosystemUpgrade_v29_2.s.sol b/l1-contracts/deploy-scripts/upgrade/EcosystemUpgrade_v29_2.s.sol index a5d0b061c7..f3096870a8 100644 --- a/l1-contracts/deploy-scripts/upgrade/EcosystemUpgrade_v29_2.s.sol +++ b/l1-contracts/deploy-scripts/upgrade/EcosystemUpgrade_v29_2.s.sol @@ -6,21 +6,13 @@ pragma solidity 0.8.28; import {Script, console2 as console} from "forge-std/Script.sol"; import {stdToml} from "forge-std/StdToml.sol"; import {StateTransitionDeployedAddresses, Utils} from "../Utils.sol"; -import {BytecodePublisher} from "./BytecodePublisher.s.sol"; -import {MessageRoot} from "contracts/bridgehub/MessageRoot.sol"; -import {IAdmin} from "contracts/state-transition/chain-interfaces/IAdmin.sol"; -import {IZKChain} from "contracts/state-transition/chain-interfaces/IZKChain.sol"; -import {Bridgehub} from "contracts/bridgehub/Bridgehub.sol"; + import {ChainAssetHandler} from "contracts/bridgehub/ChainAssetHandler.sol"; import {Diamond} from "contracts/state-transition/libraries/Diamond.sol"; import {Call} from "contracts/governance/Common.sol"; import {VerifierParams} from "contracts/state-transition/chain-interfaces/IVerifier.sol"; import {ProposedUpgrade} from "contracts/upgrades/BaseZkSyncUpgrade.sol"; -import {L2ContractHelper} from "contracts/common/l2-helpers/L2ContractHelper.sol"; -import {BytecodesSupplier} from "contracts/upgrades/BytecodesSupplier.sol"; -import {AddressAliasHelper} from "contracts/vendor/AddressAliasHelper.sol"; -import {L2CanonicalTransaction} from "contracts/common/Messaging.sol"; import {DefaultEcosystemUpgrade} from "../upgrade/DefaultEcosystemUpgrade.s.sol"; diff --git a/l1-contracts/deploy-scripts/upgrade/FinalizeUpgrade.s.sol b/l1-contracts/deploy-scripts/upgrade/FinalizeUpgrade.s.sol new file mode 100644 index 0000000000..140345d9c6 --- /dev/null +++ b/l1-contracts/deploy-scripts/upgrade/FinalizeUpgrade.s.sol @@ -0,0 +1,298 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.28; + +import {Script, console2 as console} from "forge-std/Script.sol"; +import {stdToml} from "forge-std/StdToml.sol"; + +import {Call as GovernanceCall} from "contracts/governance/Common.sol"; + +import {L1Bridgehub} from "contracts/bridgehub/L1Bridgehub.sol"; +import {L1NativeTokenVault} from "contracts/bridge/ntv/L1NativeTokenVault.sol"; +import {ETH_TOKEN_ADDRESS} from "contracts/common/Config.sol"; +import {IERC20} from "@openzeppelin/contracts-v4/token/ERC20/IERC20.sol"; + +import {L1Nullifier} from "contracts/bridge/L1Nullifier.sol"; +import {MulticallWithGas} from "./MulticallWithGas.sol"; + +/// @notice Script intended to help us finalize the governance upgrade +contract FinalizeUpgrade is Script { + using stdToml for string; + + function initChains(address bridgehub, uint256[] calldata chains) external { + // We do not change this method + for (uint256 i = 0; i < chains.length; ++i) { + L1Bridgehub bh = L1Bridgehub(bridgehub); + + if (bh.baseTokenAssetId(chains[i]) == bytes32(0)) { + vm.broadcast(); + L1Bridgehub(bridgehub).registerLegacyChain(chains[i]); + } + } + } + + function initTokens( + address payable l1NativeTokenVault, + address[] calldata tokens, + uint256[] calldata chains + ) external { + // We do not change this method + L1NativeTokenVault vault = L1NativeTokenVault(l1NativeTokenVault); + address nullifier = address(vault.L1_NULLIFIER()); + + for (uint256 i = 0; i < tokens.length; i++) { + if (vault.assetId(tokens[i]) == bytes32(0)) { + if (tokens[i] != ETH_TOKEN_ADDRESS) { + uint256 balance = IERC20(tokens[i]).balanceOf(nullifier); + if (balance != 0) { + vm.broadcast(); + vault.transferFundsFromSharedBridge(tokens[i]); + } else { + vm.broadcast(); + vault.registerToken(tokens[i]); + } + } else { + vm.broadcast(); + vault.registerEthToken(); + + uint256 balance = address(nullifier).balance; + if (balance != 0) { + vm.broadcast(); + vault.transferFundsFromSharedBridge(tokens[i]); + } + } + } + + for (uint256 j = 0; j < chains.length; j++) { + vm.broadcast(); + vault.updateChainBalancesFromSharedBridge(tokens[i], chains[j]); + } + } + } + + uint256 constant GAS_PER_TX = 500_000; // Adjust as needed + uint256 constant MAX_CALLS_PER_BATCH = 15; // Adjust as needed + + // Helper function to flush calls to aggregator + function flushBatch(MulticallWithGas _aggregator, MulticallWithGas.Call[] memory _calls, uint256 _count) internal { + if (_count == 0) { + return; // nothing to flush + } + // Create a smaller array of exactly _count size + MulticallWithGas.Call[] memory batch = new MulticallWithGas.Call[](_count); + for (uint256 k = 0; k < _count; k++) { + batch[k] = _calls[k]; + } + + // We can do a single broadcast for the entire batch + vm.broadcast(); + _aggregator.aggregate{gas: _count * GAS_PER_TX + 1_000_000}(batch, false); + } + + // Helper function to add a call to our current calls buffer + function addCall( + MulticallWithGas.Call[] memory _calls, + uint256 _callIndex, + address _to, + bytes memory _data + ) internal returns (uint256) { + _calls[_callIndex] = MulticallWithGas.Call({to: _to, gasLimit: GAS_PER_TX, data: _data}); + + return _callIndex + 1; // increment the pointer + } + + function saturatingSub(uint256 x, uint256 y) internal pure returns (uint256) { + if (x < y) { + return 0; + } else { + return x - y; + } + } + + struct FinalizeInitParams { + MulticallWithGas aggregator; + address bridgehub; + address payable l1NativeTokenVault; + address[] tokens; + uint256[] chains; + address[] pairToken; + uint256[] pairChainId; + } + + function finalizeInitInner(FinalizeInitParams memory params) internal { + // We'll build up an array of aggregator calls in memory. + // Because memory arrays in Solidity are fixed-length once created, + // we'll do an approach that increments a pointer until we hit the max, + // then flushes to the aggregator. + + MulticallWithGas.Call[] memory calls = new MulticallWithGas.Call[](MAX_CALLS_PER_BATCH); + uint256 callIndex = 0; + + // Preventing stack too deep error + { + console.log( + "Total number of items to process: ", + params.tokens.length + params.chains.length + params.pairToken.length + ); + console.log("Tokens: ", params.tokens.length); + console.log("Chains: ", params.chains.length); + console.log("Pairs: ", params.pairToken.length); + uint256 currentPosition = vm.envUint("START_SEGMENT"); + uint256 currentEnd = vm.envUint("END_SEGMENT"); + + console.log("Processing the following segment :"); + console.log("Start: ", currentPosition); + console.log("End: ", currentEnd); + + // --------------------------------------------------- + // 1. Combine logic of initChains + // --------------------------------------------------- + for (uint256 i = currentPosition; i < params.chains.length && i < currentEnd; i++) { + L1Bridgehub bh = L1Bridgehub(params.bridgehub); + console.log("Processing chain: ", params.chains[i]); + if (bh.baseTokenAssetId(params.chains[i]) == bytes32(0)) { + // Register legacy chain if needed + bytes memory data = abi.encodeWithSelector( + L1Bridgehub.registerLegacyChain.selector, + params.chains[i] + ); + + // Add call to aggregator calls array + callIndex = addCall(calls, callIndex, params.bridgehub, data); + + // If we've hit max calls, flush + if (callIndex == MAX_CALLS_PER_BATCH) { + flushBatch(params.aggregator, calls, callIndex); + callIndex = 0; + } + } + } + + currentPosition = saturatingSub(currentPosition, params.chains.length); + currentEnd = saturatingSub(currentEnd, params.chains.length); + + // --------------------------------------------------- + // 2. Combine logic of initTokens + // --------------------------------------------------- + L1NativeTokenVault vault = L1NativeTokenVault(params.l1NativeTokenVault); + address nullifier = address(vault.L1_NULLIFIER()); + + for (uint256 i = currentPosition; i < params.tokens.length && i < currentEnd; i++) { + console.log("Processing token: ", params.tokens[i]); + + // Check if token is already registered + if (vault.assetId(params.tokens[i]) == bytes32(0)) { + // If not, we either register or transfer funds + if (params.tokens[i] != ETH_TOKEN_ADDRESS) { + uint256 balance = IERC20(params.tokens[i]).balanceOf(nullifier); + if (balance != 0) { + // aggregator call: vault.transferFundsFromSharedBridge(tokens[i]) + bytes memory data = abi.encodeWithSelector( + vault.transferFundsFromSharedBridge.selector, + params.tokens[i] + ); + callIndex = addCall(calls, callIndex, params.l1NativeTokenVault, data); + } else { + // aggregator call: vault.registerToken(tokens[i]) + bytes memory data = abi.encodeWithSelector(vault.registerToken.selector, params.tokens[i]); + callIndex = addCall(calls, callIndex, params.l1NativeTokenVault, data); + } + } else { + // aggregator call: vault.registerEthToken() + { + bytes memory data = abi.encodeWithSelector(vault.registerEthToken.selector); + callIndex = addCall(calls, callIndex, params.l1NativeTokenVault, data); + } + + if (callIndex == MAX_CALLS_PER_BATCH) { + flushBatch(params.aggregator, calls, callIndex); + callIndex = 0; + } + + uint256 balance = address(nullifier).balance; + if (balance != 0) { + // aggregator call: vault.transferFundsFromSharedBridge(ETH_TOKEN_ADDRESS) + bytes memory data = abi.encodeWithSelector( + vault.transferFundsFromSharedBridge.selector, + params.tokens[i] + ); + callIndex = addCall(calls, callIndex, params.l1NativeTokenVault, data); + } + } + + // Flush if needed + if (callIndex == MAX_CALLS_PER_BATCH) { + flushBatch(params.aggregator, calls, callIndex); + callIndex = 0; + } + } + } + + currentPosition = saturatingSub(currentPosition, params.tokens.length); + currentEnd = saturatingSub(currentEnd, params.tokens.length); + + for (uint256 i = currentPosition; i < params.pairToken.length && i < currentEnd; i++) { + uint256 chain = params.pairChainId[i]; + address token = params.pairToken[i]; + + console.log("Processing pair: "); + console.log("\tChain: ", chain); + console.log("\tToken: ", token); + + if (L1Nullifier(nullifier).chainBalance(chain, token) == 0) { + continue; + } + + bytes memory data = abi.encodeWithSelector( + vault.updateChainBalancesFromSharedBridge.selector, + token, + chain + ); + callIndex = addCall(calls, callIndex, params.l1NativeTokenVault, data); + + if (callIndex == MAX_CALLS_PER_BATCH) { + flushBatch(params.aggregator, calls, callIndex); + callIndex = 0; + } + } + } + + // --------------------------------------------------- + // 3. Final flush if there's anything left in the buffer + // --------------------------------------------------- + flushBatch(params.aggregator, calls, callIndex); + + console.log("Batched calls successfully sent via MulticallWithGas."); + } + + /// @notice Combines the logic of `initChains` and `initTokens`, but + /// uses MulticallWithGas to batch these calls in chunks. + /// + /// @param bridgehub Address of the Bridgehub contract + /// @param l1NativeTokenVault Address of the L1NativeTokenVault contract + /// @param tokens Array of token addresses to initialize + /// @param chains Array of chain IDs to register & update balances + function finalizeInit( + MulticallWithGas aggregator, + address bridgehub, + address payable l1NativeTokenVault, + address[] calldata tokens, + uint256[] calldata chains, + address[] calldata pairToken, + uint256[] calldata pairChainId + ) external { + // Using an inner function to prevent "stack too deep" error. + // I do not use struct rightaway as it makes it harder to encode the input + // via rust-rs. + finalizeInitInner( + FinalizeInitParams({ + aggregator: aggregator, + bridgehub: bridgehub, + l1NativeTokenVault: l1NativeTokenVault, + tokens: tokens, + chains: chains, + pairToken: pairToken, + pairChainId: pairChainId + }) + ); + } +} diff --git a/l1-contracts/deploy-scripts/upgrade/SystemContractsProcessing.s.sol b/l1-contracts/deploy-scripts/upgrade/SystemContractsProcessing.s.sol index a35365e0ba..df954f8ba9 100644 --- a/l1-contracts/deploy-scripts/upgrade/SystemContractsProcessing.s.sol +++ b/l1-contracts/deploy-scripts/upgrade/SystemContractsProcessing.s.sol @@ -1,9 +1,9 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.28; -import {Script, console2 as console} from "forge-std/Script.sol"; +import {console2 as console} from "forge-std/Script.sol"; import {Utils} from "../Utils.sol"; -import {L2_ASSET_ROUTER_ADDR, L2_BRIDGEHUB_ADDR, L2_MESSAGE_ROOT_ADDR, L2_NATIVE_TOKEN_VAULT_ADDR, L2_WETH_IMPL_ADDR, L2_MESSAGE_VERIFICATION, L2_CHAIN_ASSET_HANDLER_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; +import {L2_ASSET_ROUTER_ADDR, L2_BRIDGEHUB_ADDR, L2_CHAIN_ASSET_HANDLER_ADDR, L2_MESSAGE_ROOT_ADDR, L2_MESSAGE_VERIFICATION, L2_NATIVE_TOKEN_VAULT_ADDR, L2_WETH_IMPL_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; import {L2ContractHelper} from "contracts/common/l2-helpers/L2ContractHelper.sol"; import {ContractsBytecodesLib} from "../ContractsBytecodesLib.sol"; import {IL2ContractDeployer} from "contracts/common/interfaces/IL2ContractDeployer.sol"; @@ -349,13 +349,13 @@ library SystemContractsProcessing { function getOtherContractsBytecodes() internal view returns (bytes[] memory result) { result = new bytes[](OTHER_BUILT_IN_CONTRACTS_COUNT); - result[0] = ContractsBytecodesLib.getCreationCode("Bridgehub"); + result[0] = ContractsBytecodesLib.getCreationCode("L2Bridgehub"); result[1] = ContractsBytecodesLib.getCreationCode("L2AssetRouter"); result[2] = ContractsBytecodesLib.getCreationCode("L2NativeTokenVault"); - result[3] = ContractsBytecodesLib.getCreationCode("MessageRoot"); + result[3] = ContractsBytecodesLib.getCreationCode("L2MessageRoot"); result[4] = ContractsBytecodesLib.getCreationCode("L2WrappedBaseToken"); result[5] = ContractsBytecodesLib.getCreationCode("L2MessageVerification"); - result[6] = ContractsBytecodesLib.getCreationCode("ChainAssetHandler"); + result[6] = ContractsBytecodesLib.getCreationCode("L2ChainAssetHandler"); } /// Note, that while proper initialization may require multiple steps, diff --git a/l1-contracts/deploy-scripts/upgrade/UpgradeLocalDevnet.s.sol b/l1-contracts/deploy-scripts/upgrade/UpgradeLocalDevnet.s.sol index c52f50c59f..b7f0fd9c3d 100644 --- a/l1-contracts/deploy-scripts/upgrade/UpgradeLocalDevnet.s.sol +++ b/l1-contracts/deploy-scripts/upgrade/UpgradeLocalDevnet.s.sol @@ -8,7 +8,7 @@ import {Script, console2 as console} from "forge-std/Script.sol"; import {EcosystemUpgrade} from "./EcosystemUpgrade.s.sol"; import {ChainUpgrade} from "./ChainUpgrade.s.sol"; import {Call} from "../../contracts/governance/Common.sol"; -import {Utils} from "../Utils.sol"; + import {IGovernance} from "../../contracts/governance/IGovernance.sol"; import {Ownable} from "@openzeppelin/contracts-v4/access/Ownable.sol"; import {Diamond} from "../../contracts/state-transition/libraries/Diamond.sol"; diff --git a/l1-contracts/package.json b/l1-contracts/package.json index 73bdf03fbb..0daa712b76 100644 --- a/l1-contracts/package.json +++ b/l1-contracts/package.json @@ -18,6 +18,7 @@ "@types/mocha": "^8.2.3", "argparse": "^1.0.10", "axios": "^0.21.1", + "blakejs": "^1.2.1", "chai": "^4.3.10", "chai-as-promised": "^7.1.1", "chalk": "^4.1.0", @@ -67,7 +68,7 @@ "test:fork": "TEST_CONTRACTS_FORK=1 yarn run hardhat test test/unit_tests/*.fork.ts --network hardhat", "test:invariant:l1-context": "WHERE=L1 scripts/run-invariant-tests", "test:invariant:l2-context": "WHERE=L2 scripts/run-invariant-tests", - "coverage:foundry": "forge coverage --ffi --match-path 'test/foundry/l1/*' --no-match-coverage 'contracts/(bridge/.*L2.*\\.sol|governance/L2AdminFactory\\.sol|state-transition/L2TestnetVerifier\\.sol|state-transition/L2Verifier\\.sol|state-transition/verifiers/.*\\.sol)' --no-match-test 'test_StageProofsForkScriptBased|test_StageProofsForkFileBased|test_MainnetFork'", + "coverage:foundry": "forge coverage --ffi --match-path 'test/foundry/l1/*' --no-match-coverage 'contracts/(bridge/.*L2.*\\.sol|governance/L2AdminFactory\\.sol|state-transition/verifiers/.*\\.sol)' --no-match-test 'test_StageProofsForkScriptBased|test_StageProofsForkFileBased|test_MainnetFork'", "deploy-no-build": "ts-node scripts/deploy.ts", "register-zk-chain": "ts-node scripts/register-zk-chain.ts", "deploy-weth-bridges": "ts-node scripts/deploy-weth-bridges.ts", diff --git a/l1-contracts/scripts/base-verification-request-v26.json b/l1-contracts/scripts/base-verification-request-v26.json index 2ddfd9c6fb..c625cd8445 100644 --- a/l1-contracts/scripts/base-verification-request-v26.json +++ b/l1-contracts/scripts/base-verification-request-v26.json @@ -8,7 +8,7 @@ "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.24;\n\nimport {IERC20Metadata} from \"@openzeppelin/contracts-v4/token/ERC20/extensions/IERC20Metadata.sol\";\nimport {ETH_TOKEN_ADDRESS} from \"../common/Config.sol\";\nimport {DataEncoding} from \"../common/libraries/DataEncoding.sol\";\n\n/**\n * @author Matter Labs\n * @custom:security-contact security@matterlabs.dev\n * @notice Helper library for working with native tokens on both L1 and L2.\n */\nlibrary BridgeHelper {\n /// @dev Receives and parses (name, symbol, decimals) from the token contract\n function getERC20Getters(address _token, uint256 _originChainId) internal view returns (bytes memory) {\n bytes memory name;\n bytes memory symbol;\n bytes memory decimals;\n if (_token == ETH_TOKEN_ADDRESS) {\n // when depositing eth to a non-eth based chain it is an ERC20\n name = abi.encode(\"Ether\");\n symbol = abi.encode(\"ETH\");\n decimals = abi.encode(uint8(18));\n } else {\n bool success;\n /// note this also works on the L2 for the base token.\n (success, name) = _token.staticcall(abi.encodeCall(IERC20Metadata.name, ()));\n if (!success) {\n // We ignore the revert data\n name = hex\"\";\n }\n (success, symbol) = _token.staticcall(abi.encodeCall(IERC20Metadata.symbol, ()));\n if (!success) {\n // We ignore the revert data\n symbol = hex\"\";\n }\n (success, decimals) = _token.staticcall(abi.encodeCall(IERC20Metadata.decimals, ()));\n if (!success) {\n // We ignore the revert data\n decimals = hex\"\";\n }\n }\n return\n DataEncoding.encodeTokenData({_chainId: _originChainId, _name: name, _symbol: symbol, _decimals: decimals});\n }\n}\n" }, "contracts/bridge/BridgedStandardERC20.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.24;\n\nimport {ERC20PermitUpgradeable} from \"@openzeppelin/contracts-upgradeable-v4/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol\";\nimport {UpgradeableBeacon} from \"@openzeppelin/contracts-v4/proxy/beacon/UpgradeableBeacon.sol\";\nimport {ERC1967Upgrade} from \"@openzeppelin/contracts-v4/proxy/ERC1967/ERC1967Upgrade.sol\";\n\nimport {IBridgedStandardToken} from \"./interfaces/IBridgedStandardToken.sol\";\nimport {Unauthorized, NonSequentialVersion, ZeroAddress} from \"../common/L1ContractErrors.sol\";\nimport {L2_NATIVE_TOKEN_VAULT_ADDR} from \"../common/L2ContractAddresses.sol\";\nimport {DataEncoding} from \"../common/libraries/DataEncoding.sol\";\nimport {INativeTokenVault} from \"../bridge/ntv/INativeTokenVault.sol\";\n\n/// @author Matter Labs\n/// @custom:security-contact security@matterlabs.dev\n/// @notice The ERC20 token implementation, that is used in the \"default\" ERC20 bridge. Note, that it does not\n/// support any custom token logic, i.e. rebase tokens' functionality is not supported.\ncontract BridgedStandardERC20 is ERC20PermitUpgradeable, IBridgedStandardToken, ERC1967Upgrade {\n /// @dev Describes whether there is a specific getter in the token.\n /// @notice Used to explicitly separate which getters the token has and which it does not.\n /// @notice Different tokens in L1 can implement or not implement getter function as `name`/`symbol`/`decimals`,\n /// @notice Our goal is to store all the getters that L1 token implements, and for others, we keep it as an unimplemented method.\n struct ERC20Getters {\n bool ignoreName;\n bool ignoreSymbol;\n bool ignoreDecimals;\n }\n\n ERC20Getters private availableGetters;\n\n /// @dev The decimals of the token, that are used as a value for `decimals` getter function.\n /// @notice A private variable is used only for decimals, but not for `name` and `symbol`, because standard\n /// @notice OpenZeppelin token represents `name` and `symbol` as storage variables and `decimals` as constant.\n uint8 private decimals_;\n\n /// @notice The l2Bridge now is deprecated, use the L2AssetRouter and L2NativeTokenVault instead.\n /// @dev Address of the L2 bridge that is used as trustee who can mint/burn tokens\n address public override l2Bridge;\n\n /// @dev Address of the token on its origin chain that can be deposited to mint this bridged token\n address public override originToken;\n\n /// @dev Address of the native token vault that is used as trustee who can mint/burn tokens\n address public nativeTokenVault;\n\n /// @dev The assetId of the token.\n bytes32 public assetId;\n\n /// @dev This also sets the native token vault to the default value if it is not set.\n /// It is not set only on the L2s for legacy tokens.\n modifier onlyNTV() {\n address ntv = nativeTokenVault;\n if (ntv == address(0)) {\n ntv = L2_NATIVE_TOKEN_VAULT_ADDR;\n nativeTokenVault = L2_NATIVE_TOKEN_VAULT_ADDR;\n assetId = DataEncoding.encodeNTVAssetId(\n INativeTokenVault(L2_NATIVE_TOKEN_VAULT_ADDR).L1_CHAIN_ID(),\n originToken\n );\n }\n if (msg.sender != ntv) {\n revert Unauthorized(msg.sender);\n }\n _;\n }\n\n modifier onlyNextVersion(uint8 _version) {\n // The version should be incremented by 1. Otherwise, the governor risks disabling\n // future reinitialization of the token by providing too large a version.\n if (_version != _getInitializedVersion() + 1) {\n revert NonSequentialVersion();\n }\n _;\n }\n\n /// @dev Contract is expected to be used as proxy implementation.\n constructor() {\n // Disable initialization to prevent Parity hack.\n _disableInitializers();\n }\n\n /// @notice Initializes a contract token for later use. Expected to be used in the proxy.\n /// @dev Stores the L1 address of the bridge and set `name`/`symbol`/`decimals` getters that L1 token has.\n /// @param _assetId The assetId of the token.\n /// @param _originToken Address of the origin token that can be deposited to mint this bridged token\n /// @param _data The additional data that the L1 bridge provide for initialization.\n /// In this case, it is packed `name`/`symbol`/`decimals` of the L1 token.\n function bridgeInitialize(bytes32 _assetId, address _originToken, bytes calldata _data) external initializer {\n if (_originToken == address(0)) {\n revert ZeroAddress();\n }\n originToken = _originToken;\n assetId = _assetId;\n\n nativeTokenVault = msg.sender;\n\n bytes memory nameBytes;\n bytes memory symbolBytes;\n bytes memory decimalsBytes;\n // We parse the data exactly as they were created on the L1 bridge\n // slither-disable-next-line unused-return\n (, nameBytes, symbolBytes, decimalsBytes) = DataEncoding.decodeTokenData(_data);\n\n ERC20Getters memory getters;\n string memory decodedName;\n string memory decodedSymbol;\n\n // L1 bridge didn't check if the L1 token return values with proper types for `name`/`symbol`/`decimals`\n // That's why we need to try to decode them, and if it works out, set the values as getters.\n\n // NOTE: Solidity doesn't have a convenient way to try to decode a value:\n // - Decode them manually, i.e. write a function that will validate that data in the correct format\n // and return decoded value and a boolean value - whether it was possible to decode.\n // - Use the standard abi.decode method, but wrap it into an external call in which error can be handled.\n // We use the second option here.\n\n try this.decodeString(nameBytes) returns (string memory nameString) {\n decodedName = nameString;\n } catch {\n getters.ignoreName = true;\n }\n\n try this.decodeString(symbolBytes) returns (string memory symbolString) {\n decodedSymbol = symbolString;\n } catch {\n getters.ignoreSymbol = true;\n }\n\n // Set decoded values for name and symbol.\n __ERC20_init_unchained(decodedName, decodedSymbol);\n\n // Set the name for EIP-712 signature.\n __ERC20Permit_init(decodedName);\n\n try this.decodeUint8(decimalsBytes) returns (uint8 decimalsUint8) {\n // Set decoded value for decimals.\n decimals_ = decimalsUint8;\n } catch {\n getters.ignoreDecimals = true;\n }\n\n availableGetters = getters;\n emit BridgeInitialize(_originToken, decodedName, decodedSymbol, decimals_);\n }\n\n /// @notice A method to be called by the governor to update the token's metadata.\n /// @param _availableGetters The getters that the token has.\n /// @param _newName The new name of the token.\n /// @param _newSymbol The new symbol of the token.\n /// @param _version The version of the token that will be initialized.\n /// @dev The _version must be exactly the version higher by 1 than the current version. This is needed\n /// to ensure that the governor can not accidentally disable future reinitialization of the token.\n function reinitializeToken(\n ERC20Getters calldata _availableGetters,\n string calldata _newName,\n string calldata _newSymbol,\n uint8 _version\n ) external onlyNextVersion(_version) reinitializer(_version) {\n // It is expected that this token is deployed as a beacon proxy, so we'll\n // allow the governor of the beacon to reinitialize the token.\n address beaconAddress = _getBeacon();\n if (msg.sender != UpgradeableBeacon(beaconAddress).owner()) {\n revert Unauthorized(msg.sender);\n }\n\n __ERC20_init_unchained(_newName, _newSymbol);\n __ERC20Permit_init(_newName);\n availableGetters = _availableGetters;\n\n emit BridgeInitialize(originToken, _newName, _newSymbol, decimals_);\n }\n\n /// @dev Mint tokens to a given account.\n /// @param _to The account that will receive the created tokens.\n /// @param _amount The amount that will be created.\n /// @notice Should be called by bridge after depositing tokens from L1.\n function bridgeMint(address _to, uint256 _amount) external override onlyNTV {\n _mint(_to, _amount);\n emit BridgeMint(_to, _amount);\n }\n\n /// @dev Burn tokens from a given account.\n /// @param _from The account from which tokens will be burned.\n /// @param _amount The amount that will be burned.\n /// @notice Should be called by bridge before withdrawing tokens to L1.\n function bridgeBurn(address _from, uint256 _amount) external override onlyNTV {\n _burn(_from, _amount);\n emit BridgeBurn(_from, _amount);\n }\n\n /// @dev External function to decode a string from bytes.\n function decodeString(bytes calldata _input) external pure returns (string memory result) {\n (result) = abi.decode(_input, (string));\n }\n\n /// @dev External function to decode a uint8 from bytes.\n function decodeUint8(bytes calldata _input) external pure returns (uint8 result) {\n (result) = abi.decode(_input, (uint8));\n }\n\n function name() public view override returns (string memory) {\n // If method is not available, behave like a token that does not implement this method - revert on call.\n // solhint-disable-next-line reason-string, gas-custom-errors\n if (availableGetters.ignoreName) revert();\n return super.name();\n }\n\n function symbol() public view override returns (string memory) {\n // If method is not available, behave like a token that does not implement this method - revert on call.\n // solhint-disable-next-line reason-string, gas-custom-errors\n if (availableGetters.ignoreSymbol) revert();\n return super.symbol();\n }\n\n function decimals() public view override returns (uint8) {\n // If method is not available, behave like a token that does not implement this method - revert on call.\n // solhint-disable-next-line reason-string, gas-custom-errors\n if (availableGetters.ignoreDecimals) revert();\n return decimals_;\n }\n\n /*//////////////////////////////////////////////////////////////\n LEGACY FUNCTIONS\n //////////////////////////////////////////////////////////////*/\n\n /// @notice Returns the address of the token on its native chain.\n /// Legacy for the l2 bridge.\n function l1Address() public view override returns (address) {\n return originToken;\n }\n}\n" + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.24;\n\nimport {ERC20PermitUpgradeable} from \"@openzeppelin/contracts-upgradeable-v4/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol\";\nimport {UpgradeableBeacon} from \"@openzeppelin/contracts-v4/proxy/beacon/UpgradeableBeacon.sol\";\nimport {ERC1967Upgrade} from \"@openzeppelin/contracts-v4/proxy/ERC1967/ERC1967Upgrade.sol\";\n\nimport {IBridgedStandardToken} from \"./interfaces/IBridgedStandardToken.sol\";\nimport {Unauthorized, NonSequentialVersion, ZeroAddress} from \"../common/L1ContractErrors.sol\";\nimport {L2_NATIVE_TOKEN_VAULT_ADDR} from \"../common/L2ContractAddresses.sol\";\nimport {DataEncoding} from \"../common/libraries/DataEncoding.sol\";\nimport {INativeTokenVault} from \"../bridge/ntv/INativeTokenVault.sol\";\n\n/// @author Matter Labs\n/// @custom:security-contact security@matterlabs.dev\n/// @notice The ERC20 token implementation, that is used in the \"default\" ERC20 bridge. Note, that it does not\n/// support any custom token logic, i.e. rebase tokens' functionality is not supported.\ncontract BridgedStandardERC20 is ERC20PermitUpgradeable, IBridgedStandardToken, ERC1967Upgrade {\n /// @dev Describes whether there is a specific getter in the token.\n /// @notice Used to explicitly separate which getters the token has and which it does not.\n /// @notice Different tokens in L1 can implement or not implement getter function as `name`/`symbol`/`decimals`,\n /// @notice Our goal is to store all the getters that L1 token implements, and for others, we keep it as an unimplemented method.\n struct ERC20Getters {\n bool ignoreName;\n bool ignoreSymbol;\n bool ignoreDecimals;\n }\n\n ERC20Getters private availableGetters;\n\n /// @dev The decimals of the token, that are used as a value for `decimals` getter function.\n /// @notice A private variable is used only for decimals, but not for `name` and `symbol`, because standard\n /// @notice OpenZeppelin token represents `name` and `symbol` as storage variables and `decimals` as constant.\n uint8 private decimals_;\n\n /// @notice The l2Bridge now is deprecated, use the L2AssetRouter and L2NativeTokenVault instead.\n /// @dev Address of the L2 bridge that is used as trustee who can mint/burn tokens\n address public override l2Bridge;\n\n /// @dev Address of the token on its origin chain that can be deposited to mint this bridged token\n address public override originToken;\n\n /// @dev Address of the native token vault that is used as trustee who can mint/burn tokens\n address public nativeTokenVault;\n\n /// @dev The assetId of the token.\n bytes32 public assetId;\n\n /// @dev This also sets the native token vault to the default value if it is not set.\n /// It is not set only on the L2s for legacy tokens.\n modifier onlyNTV() {\n address ntv = nativeTokenVault;\n if (ntv == address(0)) {\n ntv = L2_NATIVE_TOKEN_VAULT_ADDR;\n nativeTokenVault = L2_NATIVE_TOKEN_VAULT_ADDR;\n assetId = DataEncoding.encodeNTVAssetId(\n INativeTokenVaultBase(L2_NATIVE_TOKEN_VAULT_ADDR).L1_CHAIN_ID(),\n originToken\n );\n }\n if (msg.sender != ntv) {\n revert Unauthorized(msg.sender);\n }\n _;\n }\n\n modifier onlyNextVersion(uint8 _version) {\n // The version should be incremented by 1. Otherwise, the governor risks disabling\n // future reinitialization of the token by providing too large a version.\n if (_version != _getInitializedVersion() + 1) {\n revert NonSequentialVersion();\n }\n _;\n }\n\n /// @dev Contract is expected to be used as proxy implementation.\n constructor() {\n // Disable initialization to prevent Parity hack.\n _disableInitializers();\n }\n\n /// @notice Initializes a contract token for later use. Expected to be used in the proxy.\n /// @dev Stores the L1 address of the bridge and set `name`/`symbol`/`decimals` getters that L1 token has.\n /// @param _assetId The assetId of the token.\n /// @param _originToken Address of the origin token that can be deposited to mint this bridged token\n /// @param _data The additional data that the L1 bridge provide for initialization.\n /// In this case, it is packed `name`/`symbol`/`decimals` of the L1 token.\n function bridgeInitialize(bytes32 _assetId, address _originToken, bytes calldata _data) external initializer {\n if (_originToken == address(0)) {\n revert ZeroAddress();\n }\n originToken = _originToken;\n assetId = _assetId;\n\n nativeTokenVault = msg.sender;\n\n bytes memory nameBytes;\n bytes memory symbolBytes;\n bytes memory decimalsBytes;\n // We parse the data exactly as they were created on the L1 bridge\n // slither-disable-next-line unused-return\n (, nameBytes, symbolBytes, decimalsBytes) = DataEncoding.decodeTokenData(_data);\n\n ERC20Getters memory getters;\n string memory decodedName;\n string memory decodedSymbol;\n\n // L1 bridge didn't check if the L1 token return values with proper types for `name`/`symbol`/`decimals`\n // That's why we need to try to decode them, and if it works out, set the values as getters.\n\n // NOTE: Solidity doesn't have a convenient way to try to decode a value:\n // - Decode them manually, i.e. write a function that will validate that data in the correct format\n // and return decoded value and a boolean value - whether it was possible to decode.\n // - Use the standard abi.decode method, but wrap it into an external call in which error can be handled.\n // We use the second option here.\n\n try this.decodeString(nameBytes) returns (string memory nameString) {\n decodedName = nameString;\n } catch {\n getters.ignoreName = true;\n }\n\n try this.decodeString(symbolBytes) returns (string memory symbolString) {\n decodedSymbol = symbolString;\n } catch {\n getters.ignoreSymbol = true;\n }\n\n // Set decoded values for name and symbol.\n __ERC20_init_unchained(decodedName, decodedSymbol);\n\n // Set the name for EIP-712 signature.\n __ERC20Permit_init(decodedName);\n\n try this.decodeUint8(decimalsBytes) returns (uint8 decimalsUint8) {\n // Set decoded value for decimals.\n decimals_ = decimalsUint8;\n } catch {\n getters.ignoreDecimals = true;\n }\n\n availableGetters = getters;\n emit BridgeInitialize(_originToken, decodedName, decodedSymbol, decimals_);\n }\n\n /// @notice A method to be called by the governor to update the token's metadata.\n /// @param _availableGetters The getters that the token has.\n /// @param _newName The new name of the token.\n /// @param _newSymbol The new symbol of the token.\n /// @param _version The version of the token that will be initialized.\n /// @dev The _version must be exactly the version higher by 1 than the current version. This is needed\n /// to ensure that the governor can not accidentally disable future reinitialization of the token.\n function reinitializeToken(\n ERC20Getters calldata _availableGetters,\n string calldata _newName,\n string calldata _newSymbol,\n uint8 _version\n ) external onlyNextVersion(_version) reinitializer(_version) {\n // It is expected that this token is deployed as a beacon proxy, so we'll\n // allow the governor of the beacon to reinitialize the token.\n address beaconAddress = _getBeacon();\n if (msg.sender != UpgradeableBeacon(beaconAddress).owner()) {\n revert Unauthorized(msg.sender);\n }\n\n __ERC20_init_unchained(_newName, _newSymbol);\n __ERC20Permit_init(_newName);\n availableGetters = _availableGetters;\n\n emit BridgeInitialize(originToken, _newName, _newSymbol, decimals_);\n }\n\n /// @dev Mint tokens to a given account.\n /// @param _to The account that will receive the created tokens.\n /// @param _amount The amount that will be created.\n /// @notice Should be called by bridge after depositing tokens from L1.\n function bridgeMint(address _to, uint256 _amount) external override onlyNTV {\n _mint(_to, _amount);\n emit BridgeMint(_to, _amount);\n }\n\n /// @dev Burn tokens from a given account.\n /// @param _from The account from which tokens will be burned.\n /// @param _amount The amount that will be burned.\n /// @notice Should be called by bridge before withdrawing tokens to L1.\n function bridgeBurn(address _from, uint256 _amount) external override onlyNTV {\n _burn(_from, _amount);\n emit BridgeBurn(_from, _amount);\n }\n\n /// @dev External function to decode a string from bytes.\n function decodeString(bytes calldata _input) external pure returns (string memory result) {\n (result) = abi.decode(_input, (string));\n }\n\n /// @dev External function to decode a uint8 from bytes.\n function decodeUint8(bytes calldata _input) external pure returns (uint8 result) {\n (result) = abi.decode(_input, (uint8));\n }\n\n function name() public view override returns (string memory) {\n // If method is not available, behave like a token that does not implement this method - revert on call.\n // solhint-disable-next-line reason-string, gas-custom-errors\n if (availableGetters.ignoreName) revert();\n return super.name();\n }\n\n function symbol() public view override returns (string memory) {\n // If method is not available, behave like a token that does not implement this method - revert on call.\n // solhint-disable-next-line reason-string, gas-custom-errors\n if (availableGetters.ignoreSymbol) revert();\n return super.symbol();\n }\n\n function decimals() public view override returns (uint8) {\n // If method is not available, behave like a token that does not implement this method - revert on call.\n // solhint-disable-next-line reason-string, gas-custom-errors\n if (availableGetters.ignoreDecimals) revert();\n return decimals_;\n }\n\n /*//////////////////////////////////////////////////////////////\n LEGACY FUNCTIONS\n //////////////////////////////////////////////////////////////*/\n\n /// @notice Returns the address of the token on its native chain.\n /// Legacy for the l2 bridge.\n function l1Address() public view override returns (address) {\n return originToken;\n }\n}\n" }, "contracts/bridge/L1BridgeContractErrors.sol": { "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.21;\n\n// 0x6d963f88\nerror EthTransferFailed();\n\n// 0x1c55230b\nerror NativeTokenVaultAlreadySet();\n\n// 0x61cdb17e\nerror WrongMsgLength(uint256 expected, uint256 length);\n\n// 0xe4742c42\nerror ZeroAmountToTransfer();\n\n// 0xfeda3bf8\nerror WrongAmountTransferred(uint256 balance, uint256 nullifierChainBalance);\n\n// 0x066f53b1\nerror EmptyToken();\n\n// 0x0fef9068\nerror ClaimFailedDepositFailed();\n\n// 0x636c90db\nerror WrongL2Sender(address providedL2Sender);\n\n// 0xb4aeddbc\nerror WrongCounterpart();\n" @@ -29,7 +29,7 @@ "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {Ownable2Step} from \"@openzeppelin/contracts-v4/access/Ownable2Step.sol\";\n\nimport {ZeroAddress, Unauthorized, WrappedBaseTokenAlreadyRegistered} from \"../common/L1ContractErrors.sol\";\n\n/// @title L2WrappedBaseTokenStore\n/// @author Matter Labs\n/// @custom:security-contact security@matterlabs.dev\n/// @notice This contract is used as a store for L2 deployments of L2WrappedBaseToken for chains that have it.\n/// These values will be stored in the corresponding chain's L2NativeTokenVault upon migration to the new version,\n/// so these values being correct is crucial. The following upgrade process is expected for this contract:\n/// - It will be populated for the existing chains before the governance reviews the values.\n/// - Each new chain (before the new protocol version is available) will have to double check that the admin\n/// has set the correct value in this contract. If the admin did not set a correct value, the chain should be discarded.\n/// - Once the upgrade is done, this contract will no longer be needed. Even though it is unlikely for a chain to be corrupted,\n/// the governance can fix any corrupted chains in the next upgrade.\n/// @dev This contract is not expected to be deployed as a proxy, but rather a standalone contract.\n/// @dev The `admin` of this contract is expected to be some cold wallet, trusted to provide correct values. However,\n/// due to process above, even its malicious behavior should not impact security of the ecosystem.\n/// @dev The `owner` of this contract is trusted decentralized governance.\ncontract L2WrappedBaseTokenStore is Ownable2Step {\n /// @notice Mapping from chain ID to L2 wrapped base token address.\n mapping(uint256 chainId => address l2WBaseTokenAddress) public l2WBaseTokenAddress;\n\n /// @notice Admin address who has the right to register weth token deployment for a chain.\n address public admin;\n\n /// @notice used to accept the admin role\n address public pendingAdmin;\n\n /// @notice Admin changed\n event NewAdmin(address indexed oldAdmin, address indexed newAdmin);\n\n /// @notice pendingAdmin is changed\n /// @dev Also emitted when new admin is accepted and in this case, `newPendingAdmin` would be zero address\n event NewPendingAdmin(address indexed oldPendingAdmin, address indexed newPendingAdmin);\n\n /// @notice Emitted when the L2 wrapped base token address is set for a chain\n /// @param chainId The id of the chain.\n /// @param l2WBaseTokenAddress The L2 wrapped base token address.\n event NewWBaseTokenAddress(uint256 indexed chainId, address indexed l2WBaseTokenAddress);\n\n /// @notice Sets the initial owner and admin.\n /// @param _initialOwner The initial owner.\n /// @param _admin The address of the admin.\n constructor(address _initialOwner, address _admin) {\n if (_admin == address(0) || _initialOwner == address(0)) {\n revert ZeroAddress();\n }\n admin = _admin;\n _transferOwnership(_initialOwner);\n }\n\n /// @notice Throws if called by any account other than the owner or admin.\n modifier onlyOwnerOrAdmin() {\n if (msg.sender != owner() && msg.sender != admin) {\n revert Unauthorized(msg.sender);\n }\n _;\n }\n\n /// @notice Initializes the L2 WBaseToken address for a specific chain ID.\n /// @dev Can be called by the owner or the admin.\n /// @param _chainId The ID of the blockchain network.\n /// @param _l2WBaseToken The address of the L2 WBaseToken token.\n function initializeChain(uint256 _chainId, address _l2WBaseToken) external onlyOwnerOrAdmin {\n if (_l2WBaseToken == address(0)) {\n revert ZeroAddress();\n }\n if (l2WBaseTokenAddress[_chainId] != address(0)) {\n revert WrappedBaseTokenAlreadyRegistered();\n }\n _setWBaseTokenAddress(_chainId, _l2WBaseToken);\n }\n\n /// @notice Reinitializes the L2 WBaseToken address for a specific chain ID.\n /// @dev Can only be called by the owner. It can not be called by the admin second time\n /// to prevent retroactively damaging existing chains.\n /// @param _chainId The ID of the blockchain network.\n /// @param _l2WBaseToken The new address of the L2 WBaseToken token.\n function reinitializeChain(uint256 _chainId, address _l2WBaseToken) external onlyOwner {\n if (_l2WBaseToken == address(0)) {\n revert ZeroAddress();\n }\n _setWBaseTokenAddress(_chainId, _l2WBaseToken);\n }\n\n /// @notice Sets the address of the L2 wrapped base token deployment for a chain.\n /// @param _chainId The ID of the blockchain network.\n /// @param _l2WBaseToken The new address of the L2 WBaseToken token.\n function _setWBaseTokenAddress(uint256 _chainId, address _l2WBaseToken) internal {\n l2WBaseTokenAddress[_chainId] = _l2WBaseToken;\n emit NewWBaseTokenAddress(_chainId, _l2WBaseToken);\n }\n\n /// @notice Starts the transfer of admin rights. Only the current admin or owner can propose a new pending one.\n /// @notice New admin can accept admin rights by calling `acceptAdmin` function.\n /// @param _newPendingAdmin Address of the new admin\n /// @dev Please note, if the owner wants to enforce the admin change it must execute both `setPendingAdmin` and\n /// `acceptAdmin` atomically. Otherwise `admin` can set different pending admin and so fail to accept the admin rights.\n function setPendingAdmin(address _newPendingAdmin) external onlyOwnerOrAdmin {\n if (_newPendingAdmin == address(0)) {\n revert ZeroAddress();\n }\n // Save previous value into the stack to put it into the event later\n address oldPendingAdmin = pendingAdmin;\n // Change pending admin\n pendingAdmin = _newPendingAdmin;\n emit NewPendingAdmin(oldPendingAdmin, _newPendingAdmin);\n }\n\n /// @notice Accepts transfer of admin rights. Only pending admin can accept the role.\n function acceptAdmin() external {\n address currentPendingAdmin = pendingAdmin;\n // Only proposed by current admin address can claim the admin rights\n if (msg.sender != currentPendingAdmin) {\n revert Unauthorized(msg.sender);\n }\n\n address previousAdmin = admin;\n admin = currentPendingAdmin;\n delete pendingAdmin;\n\n emit NewPendingAdmin(currentPendingAdmin, address(0));\n emit NewAdmin(previousAdmin, currentPendingAdmin);\n }\n}\n" }, "contracts/bridge/asset-router/AssetRouterBase.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.24;\n\nimport {Ownable2StepUpgradeable} from \"@openzeppelin/contracts-upgradeable-v4/access/Ownable2StepUpgradeable.sol\";\nimport {PausableUpgradeable} from \"@openzeppelin/contracts-upgradeable-v4/security/PausableUpgradeable.sol\";\n\nimport {IERC20} from \"@openzeppelin/contracts-v4/token/ERC20/IERC20.sol\";\nimport {SafeERC20} from \"@openzeppelin/contracts-v4/token/ERC20/utils/SafeERC20.sol\";\n\nimport {IAssetRouterBase} from \"./IAssetRouterBase.sol\";\nimport {IAssetHandler} from \"../interfaces/IAssetHandler.sol\";\nimport {DataEncoding} from \"../../common/libraries/DataEncoding.sol\";\n\nimport {L2_NATIVE_TOKEN_VAULT_ADDR} from \"../../common/L2ContractAddresses.sol\";\n\nimport {IBridgehub} from \"../../bridgehub/IBridgehub.sol\";\nimport {Unauthorized} from \"../../common/L1ContractErrors.sol\";\nimport {INativeTokenVault} from \"../ntv/INativeTokenVault.sol\";\n\n/// @author Matter Labs\n/// @custom:security-contact security@matterlabs.dev\n/// @dev Bridges assets between L1 and ZK chain, supporting both ETH and ERC20 tokens.\n/// @dev Designed for use with a proxy for upgradability.\nabstract contract AssetRouterBase is IAssetRouterBase, Ownable2StepUpgradeable, PausableUpgradeable {\n using SafeERC20 for IERC20;\n\n /// @dev Bridgehub smart contract that is used to operate with L2 via asynchronous L2 <-> L1 communication.\n IBridgehub public immutable override BRIDGE_HUB;\n\n /// @dev Chain ID of L1 for bridging reasons\n uint256 public immutable L1_CHAIN_ID;\n\n /// @dev Chain ID of Era for legacy reasons\n uint256 public immutable ERA_CHAIN_ID;\n\n /// @dev Maps asset ID to address of corresponding asset handler.\n /// @dev Tracks the address of Asset Handler contracts, where bridged funds are locked for each asset.\n /// @dev P.S. this liquidity was locked directly in SharedBridge before.\n /// @dev Current AssetHandlers: NTV for tokens, Bridgehub for chains.\n mapping(bytes32 assetId => address assetHandlerAddress) public assetHandlerAddress;\n\n /// @dev Maps asset ID to the asset deployment tracker address.\n /// @dev Tracks the address of Deployment Tracker contract on L1, which sets Asset Handlers on L2s (ZK chain).\n /// @dev For the asset and stores respective addresses.\n /// @dev Current AssetDeploymentTrackers: NTV for tokens, CTMDeploymentTracker for chains.\n mapping(bytes32 assetId => address assetDeploymentTracker) public assetDeploymentTracker;\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[48] private __gap;\n\n /// @notice Checks that the message sender is the bridgehub.\n modifier onlyBridgehub() {\n if (msg.sender != address(BRIDGE_HUB)) {\n revert Unauthorized(msg.sender);\n }\n _;\n }\n\n /// @dev Contract is expected to be used as proxy implementation.\n /// @dev Initialize the implementation to prevent Parity hack.\n constructor(uint256 _l1ChainId, uint256 _eraChainId, IBridgehub _bridgehub) {\n L1_CHAIN_ID = _l1ChainId;\n ERA_CHAIN_ID = _eraChainId;\n BRIDGE_HUB = _bridgehub;\n }\n\n /// @inheritdoc IAssetRouterBase\n function setAssetHandlerAddressThisChain(\n bytes32 _assetRegistrationData,\n address _assetHandlerAddress\n ) external virtual override;\n\n function _setAssetHandlerAddressThisChain(\n address _nativeTokenVault,\n bytes32 _assetRegistrationData,\n address _assetHandlerAddress\n ) internal {\n bool senderIsNTV = msg.sender == address(_nativeTokenVault);\n address sender = senderIsNTV ? L2_NATIVE_TOKEN_VAULT_ADDR : msg.sender;\n bytes32 assetId = DataEncoding.encodeAssetId(block.chainid, _assetRegistrationData, sender);\n if (!senderIsNTV && msg.sender != assetDeploymentTracker[assetId]) {\n revert Unauthorized(msg.sender);\n }\n _setAssetHandler(assetId, _assetHandlerAddress);\n assetDeploymentTracker[assetId] = msg.sender;\n emit AssetDeploymentTrackerRegistered(assetId, _assetRegistrationData, msg.sender);\n }\n\n /*//////////////////////////////////////////////////////////////\n Receive transaction Functions\n //////////////////////////////////////////////////////////////*/\n\n /// @inheritdoc IAssetRouterBase\n function finalizeDeposit(uint256 _chainId, bytes32 _assetId, bytes calldata _transferData) public payable virtual;\n\n function _finalizeDeposit(\n uint256 _chainId,\n bytes32 _assetId,\n bytes calldata _transferData,\n address _nativeTokenVault\n ) internal {\n address assetHandler = assetHandlerAddress[_assetId];\n\n if (assetHandler != address(0)) {\n IAssetHandler(assetHandler).bridgeMint{value: msg.value}(_chainId, _assetId, _transferData);\n } else {\n _setAssetHandler(_assetId, _nativeTokenVault);\n // Native token vault may not support non-zero `msg.value`, but we still provide it here to\n // prevent the passed ETH from being stuck in the asset router and also for consistency.\n // So the decision on whether to support non-zero `msg.value` is done at the asset handler layer.\n IAssetHandler(_nativeTokenVault).bridgeMint{value: msg.value}(_chainId, _assetId, _transferData); // ToDo: Maybe it's better to receive amount and receiver here? transferData may have different encoding\n }\n }\n\n /*//////////////////////////////////////////////////////////////\n Internal Functions\n //////////////////////////////////////////////////////////////*/\n\n function _setAssetHandler(bytes32 _assetId, address _assetHandlerAddress) internal {\n assetHandlerAddress[_assetId] = _assetHandlerAddress;\n emit AssetHandlerRegistered(_assetId, _assetHandlerAddress);\n }\n\n /// @dev send the burn message to the asset\n /// @notice Forwards the burn request for specific asset to respective asset handler.\n /// @param _chainId The chain ID of the ZK chain to which to deposit.\n /// @param _nextMsgValue The L2 `msg.value` from the L1 -> L2 deposit transaction.\n /// @param _assetId The deposited asset ID.\n /// @param _originalCaller The `msg.sender` address from the external call that initiated current one.\n /// @param _transferData The encoded data, which is used by the asset handler to determine L2 recipient and amount. Might include extra information.\n /// @param _passValue Boolean indicating whether to pass msg.value in the call.\n /// @param _nativeTokenVault The address of the native token vault.\n /// @return bridgeMintCalldata The calldata used by remote asset handler to mint tokens for recipient.\n function _burn(\n uint256 _chainId,\n uint256 _nextMsgValue,\n bytes32 _assetId,\n address _originalCaller,\n bytes memory _transferData,\n bool _passValue,\n address _nativeTokenVault\n ) internal returns (bytes memory bridgeMintCalldata) {\n address l1AssetHandler = assetHandlerAddress[_assetId];\n if (l1AssetHandler == address(0)) {\n // As a UX feature, whenever an asset handler is not present, we always try to register asset within native token vault.\n // The Native Token Vault is trusted to revert in an asset does not belong to it.\n //\n // Note, that it may \"pollute\" error handling a bit: instead of getting error for asset handler not being\n // present, the user will get whatever error the native token vault will return, however, providing\n // more advanced error handling requires more extensive code and will be added in the future releases.\n INativeTokenVault(_nativeTokenVault).tryRegisterTokenFromBurnData(_transferData, _assetId);\n\n // We do not do any additional transformations here (like setting `assetHandler` in the mapping),\n // because we expect that all those happened inside `tryRegisterTokenFromBurnData`\n\n l1AssetHandler = _nativeTokenVault;\n }\n\n uint256 msgValue = _passValue ? msg.value : 0;\n bridgeMintCalldata = IAssetHandler(l1AssetHandler).bridgeBurn{value: msgValue}({\n _chainId: _chainId,\n _msgValue: _nextMsgValue,\n _assetId: _assetId,\n _originalCaller: _originalCaller,\n _data: _transferData\n });\n }\n\n /// @notice Ensures that token is registered with native token vault.\n /// @dev Only used when deposit is made with legacy data encoding format.\n /// @param _token The native token address which should be registered with native token vault.\n /// @return assetId The asset ID of the token provided.\n function _ensureTokenRegisteredWithNTV(address _token) internal virtual returns (bytes32 assetId);\n\n /*//////////////////////////////////////////////////////////////\n PAUSE\n //////////////////////////////////////////////////////////////*/\n\n /// @notice Pauses all functions marked with the `whenNotPaused` modifier.\n function pause() external onlyOwner {\n _pause();\n }\n\n /// @notice Unpauses the contract, allowing all functions marked with the `whenNotPaused` modifier to be called again.\n function unpause() external onlyOwner {\n _unpause();\n }\n}\n" + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.24;\n\nimport {Ownable2StepUpgradeable} from \"@openzeppelin/contracts-upgradeable-v4/access/Ownable2StepUpgradeable.sol\";\nimport {PausableUpgradeable} from \"@openzeppelin/contracts-upgradeable-v4/security/PausableUpgradeable.sol\";\n\nimport {IERC20} from \"@openzeppelin/contracts-v4/token/ERC20/IERC20.sol\";\nimport {SafeERC20} from \"@openzeppelin/contracts-v4/token/ERC20/utils/SafeERC20.sol\";\n\nimport {IAssetRouterBase} from \"./IAssetRouterBase.sol\";\nimport {IAssetHandler} from \"../interfaces/IAssetHandler.sol\";\nimport {DataEncoding} from \"../../common/libraries/DataEncoding.sol\";\n\nimport {L2_NATIVE_TOKEN_VAULT_ADDR} from \"../../common/L2ContractAddresses.sol\";\n\nimport {IBridgehub} from \"../../bridgehub/IBridgehub.sol\";\nimport {Unauthorized} from \"../../common/L1ContractErrors.sol\";\nimport {INativeTokenVault} from \"../ntv/INativeTokenVault.sol\";\n\n/// @author Matter Labs\n/// @custom:security-contact security@matterlabs.dev\n/// @dev Bridges assets between L1 and ZK chain, supporting both ETH and ERC20 tokens.\n/// @dev Designed for use with a proxy for upgradability.\nabstract contract AssetRouterBase is IAssetRouterBase, Ownable2StepUpgradeable, PausableUpgradeable {\n using SafeERC20 for IERC20;\n\n /// @dev Bridgehub smart contract that is used to operate with L2 via asynchronous L2 <-> L1 communication.\n IBridgehub public immutable override BRIDGE_HUB;\n\n /// @dev Chain ID of L1 for bridging reasons\n uint256 public immutable L1_CHAIN_ID;\n\n /// @dev Chain ID of Era for legacy reasons\n uint256 public immutable ERA_CHAIN_ID;\n\n /// @dev Maps asset ID to address of corresponding asset handler.\n /// @dev Tracks the address of Asset Handler contracts, where bridged funds are locked for each asset.\n /// @dev P.S. this liquidity was locked directly in SharedBridge before.\n /// @dev Current AssetHandlers: NTV for tokens, Bridgehub for chains.\n mapping(bytes32 assetId => address assetHandlerAddress) public assetHandlerAddress;\n\n /// @dev Maps asset ID to the asset deployment tracker address.\n /// @dev Tracks the address of Deployment Tracker contract on L1, which sets Asset Handlers on L2s (ZK chain).\n /// @dev For the asset and stores respective addresses.\n /// @dev Current AssetDeploymentTrackers: NTV for tokens, CTMDeploymentTracker for chains.\n mapping(bytes32 assetId => address assetDeploymentTracker) public assetDeploymentTracker;\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[48] private __gap;\n\n /// @notice Checks that the message sender is the bridgehub.\n modifier onlyBridgehub() {\n if (msg.sender != address(BRIDGE_HUB)) {\n revert Unauthorized(msg.sender);\n }\n _;\n }\n\n /// @dev Contract is expected to be used as proxy implementation.\n /// @dev Initialize the implementation to prevent Parity hack.\n constructor(uint256 _l1ChainId, uint256 _eraChainId, IBridgehub _bridgehub) {\n L1_CHAIN_ID = _l1ChainId;\n ERA_CHAIN_ID = _eraChainId;\n BRIDGE_HUB = _bridgehub;\n }\n\n /// @inheritdoc IAssetRouterBase\n function setAssetHandlerAddressThisChain(\n bytes32 _assetRegistrationData,\n address _assetHandlerAddress\n ) external virtual override;\n\n function _setAssetHandlerAddressThisChain(\n address _nativeTokenVault,\n bytes32 _assetRegistrationData,\n address _assetHandlerAddress\n ) internal {\n bool senderIsNTV = msg.sender == address(_nativeTokenVault);\n address sender = senderIsNTV ? L2_NATIVE_TOKEN_VAULT_ADDR : msg.sender;\n bytes32 assetId = DataEncoding.encodeAssetId(block.chainid, _assetRegistrationData, sender);\n if (!senderIsNTV && msg.sender != assetDeploymentTracker[assetId]) {\n revert Unauthorized(msg.sender);\n }\n _setAssetHandler(assetId, _assetHandlerAddress);\n assetDeploymentTracker[assetId] = msg.sender;\n emit AssetDeploymentTrackerRegistered(assetId, _assetRegistrationData, msg.sender);\n }\n\n /*//////////////////////////////////////////////////////////////\n Receive transaction Functions\n //////////////////////////////////////////////////////////////*/\n\n /// @inheritdoc IAssetRouterBase\n function finalizeDeposit(uint256 _chainId, bytes32 _assetId, bytes calldata _transferData) public payable virtual;\n\n function _finalizeDeposit(\n uint256 _chainId,\n bytes32 _assetId,\n bytes calldata _transferData,\n address _nativeTokenVault\n ) internal {\n address assetHandler = assetHandlerAddress[_assetId];\n\n if (assetHandler != address(0)) {\n IAssetHandler(assetHandler).bridgeMint{value: msg.value}(_chainId, _assetId, _transferData);\n } else {\n _setAssetHandler(_assetId, _nativeTokenVault);\n // Native token vault may not support non-zero `msg.value`, but we still provide it here to\n // prevent the passed ETH from being stuck in the asset router and also for consistency.\n // So the decision on whether to support non-zero `msg.value` is done at the asset handler layer.\n IAssetHandler(_nativeTokenVault).bridgeMint{value: msg.value}(_chainId, _assetId, _transferData); // ToDo: Maybe it's better to receive amount and receiver here? transferData may have different encoding\n }\n }\n\n /*//////////////////////////////////////////////////////////////\n Internal Functions\n //////////////////////////////////////////////////////////////*/\n\n function _setAssetHandler(bytes32 _assetId, address _assetHandlerAddress) internal {\n assetHandlerAddress[_assetId] = _assetHandlerAddress;\n emit AssetHandlerRegistered(_assetId, _assetHandlerAddress);\n }\n\n /// @dev send the burn message to the asset\n /// @notice Forwards the burn request for specific asset to respective asset handler.\n /// @param _chainId The chain ID of the ZK chain to which to deposit.\n /// @param _nextMsgValue The L2 `msg.value` from the L1 -> L2 deposit transaction.\n /// @param _assetId The deposited asset ID.\n /// @param _originalCaller The `msg.sender` address from the external call that initiated current one.\n /// @param _transferData The encoded data, which is used by the asset handler to determine L2 recipient and amount. Might include extra information.\n /// @param _passValue Boolean indicating whether to pass msg.value in the call.\n /// @param _nativeTokenVault The address of the native token vault.\n /// @return bridgeMintCalldata The calldata used by remote asset handler to mint tokens for recipient.\n function _burn(\n uint256 _chainId,\n uint256 _nextMsgValue,\n bytes32 _assetId,\n address _originalCaller,\n bytes memory _transferData,\n bool _passValue,\n address _nativeTokenVault\n ) internal returns (bytes memory bridgeMintCalldata) {\n address l1AssetHandler = assetHandlerAddress[_assetId];\n if (l1AssetHandler == address(0)) {\n // As a UX feature, whenever an asset handler is not present, we always try to register asset within native token vault.\n // The Native Token Vault is trusted to revert in an asset does not belong to it.\n //\n // Note, that it may \"pollute\" error handling a bit: instead of getting error for asset handler not being\n // present, the user will get whatever error the native token vault will return, however, providing\n // more advanced error handling requires more extensive code and will be added in the future releases.\n INativeTokenVaultBase(_nativeTokenVault).tryRegisterTokenFromBurnData(_transferData, _assetId);\n\n // We do not do any additional transformations here (like setting `assetHandler` in the mapping),\n // because we expect that all those happened inside `tryRegisterTokenFromBurnData`\n\n l1AssetHandler = _nativeTokenVault;\n }\n\n uint256 msgValue = _passValue ? msg.value : 0;\n bridgeMintCalldata = IAssetHandler(l1AssetHandler).bridgeBurn{value: msgValue}({\n _chainId: _chainId,\n _msgValue: _nextMsgValue,\n _assetId: _assetId,\n _originalCaller: _originalCaller,\n _data: _transferData\n });\n }\n\n /// @notice Ensures that token is registered with native token vault.\n /// @dev Only used when deposit is made with legacy data encoding format.\n /// @param _token The native token address which should be registered with native token vault.\n /// @return assetId The asset ID of the token provided.\n function _ensureTokenRegisteredWithNTV(address _token) internal virtual returns (bytes32 assetId);\n\n /*//////////////////////////////////////////////////////////////\n PAUSE\n //////////////////////////////////////////////////////////////*/\n\n /// @notice Pauses all functions marked with the `whenNotPaused` modifier.\n function pause() external onlyOwner {\n _pause();\n }\n\n /// @notice Unpauses the contract, allowing all functions marked with the `whenNotPaused` modifier to be called again.\n function unpause() external onlyOwner {\n _unpause();\n }\n}\n" }, "contracts/bridge/asset-router/IAssetRouterBase.sol": { "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.24;\n\nimport {IBridgehub} from \"../../bridgehub/IBridgehub.sol\";\n\n/// @dev The encoding version used for legacy txs.\nbytes1 constant LEGACY_ENCODING_VERSION = 0x00;\n\n/// @dev The encoding version used for new txs.\nbytes1 constant NEW_ENCODING_VERSION = 0x01;\n\n/// @dev The encoding version used for txs that set the asset handler on the counterpart contract.\nbytes1 constant SET_ASSET_HANDLER_COUNTERPART_ENCODING_VERSION = 0x02;\n\n/// @title L1 Bridge contract interface\n/// @author Matter Labs\n/// @custom:security-contact security@matterlabs.dev\ninterface IAssetRouterBase {\n event BridgehubDepositBaseTokenInitiated(\n uint256 indexed chainId,\n address indexed from,\n bytes32 assetId,\n uint256 amount\n );\n\n event BridgehubDepositInitiated(\n uint256 indexed chainId,\n bytes32 indexed txDataHash,\n address indexed from,\n bytes32 assetId,\n bytes bridgeMintCalldata\n );\n\n event BridgehubWithdrawalInitiated(\n uint256 chainId,\n address indexed sender,\n bytes32 indexed assetId,\n bytes32 assetDataHash // Todo: What's the point of emitting hash?\n );\n\n event AssetDeploymentTrackerRegistered(\n bytes32 indexed assetId,\n bytes32 indexed additionalData,\n address assetDeploymentTracker\n );\n\n event AssetHandlerRegistered(bytes32 indexed assetId, address indexed _assetHandlerAddress);\n\n event DepositFinalizedAssetRouter(uint256 indexed chainId, bytes32 indexed assetId, bytes assetData);\n\n function BRIDGE_HUB() external view returns (IBridgehub);\n\n /// @notice Sets the asset handler address for a specified asset ID on the chain of the asset deployment tracker.\n /// @dev The caller of this function is encoded within the `assetId`, therefore, it should be invoked by the asset deployment tracker contract.\n /// @dev No access control on the caller, as msg.sender is encoded in the assetId.\n /// @dev Typically, for most tokens, ADT is the native token vault. However, custom tokens may have their own specific asset deployment trackers.\n /// @dev `setAssetHandlerAddressOnCounterpart` should be called on L1 to set asset handlers on L2 chains for a specific asset ID.\n /// @param _assetRegistrationData The asset data which may include the asset address and any additional required data or encodings.\n /// @param _assetHandlerAddress The address of the asset handler to be set for the provided asset.\n function setAssetHandlerAddressThisChain(bytes32 _assetRegistrationData, address _assetHandlerAddress) external;\n\n function assetHandlerAddress(bytes32 _assetId) external view returns (address);\n\n /// @notice Finalize the withdrawal and release funds.\n /// @param _chainId The chain ID of the transaction to check.\n /// @param _assetId The bridged asset ID.\n /// @param _transferData The position in the L2 logs Merkle tree of the l2Log that was sent with the message.\n /// @dev We have both the legacy finalizeWithdrawal and the new finalizeDeposit functions,\n /// finalizeDeposit uses the new format. On the L2 we have finalizeDeposit with new and old formats both.\n function finalizeDeposit(uint256 _chainId, bytes32 _assetId, bytes memory _transferData) external payable;\n}\n" @@ -41,7 +41,7 @@ "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport {IAssetRouterBase} from \"./IAssetRouterBase.sol\";\n\n/// @author Matter Labs\n/// @custom:security-contact security@matterlabs.dev\ninterface IL2AssetRouter is IAssetRouterBase {\n event WithdrawalInitiatedAssetRouter(\n uint256 chainId,\n address indexed l2Sender,\n bytes32 indexed assetId,\n bytes assetData\n );\n\n function withdraw(bytes32 _assetId, bytes calldata _transferData) external returns (bytes32);\n\n function L1_ASSET_ROUTER() external view returns (address);\n\n function withdrawLegacyBridge(address _l1Receiver, address _l2Token, uint256 _amount, address _sender) external;\n\n function finalizeDepositLegacyBridge(\n address _l1Sender,\n address _l2Receiver,\n address _l1Token,\n uint256 _amount,\n bytes calldata _data\n ) external;\n\n /// @dev Used to set the assetHandlerAddress for a given assetId.\n /// @dev Will be used by ZK Gateway\n function setAssetHandlerAddress(uint256 _originChainId, bytes32 _assetId, address _assetHandlerAddress) external;\n\n /// @notice Function that allows native token vault to register itself as the asset handler for\n /// a legacy asset.\n /// @param _assetId The assetId of the legacy token.\n function setLegacyTokenAssetHandler(bytes32 _assetId) external;\n}\n" }, "contracts/bridge/asset-router/L1AssetRouter.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.24;\n\nimport {IERC20} from \"@openzeppelin/contracts-v4/token/ERC20/IERC20.sol\";\nimport {SafeERC20} from \"@openzeppelin/contracts-v4/token/ERC20/utils/SafeERC20.sol\";\n\nimport {IL1AssetRouter} from \"./IL1AssetRouter.sol\";\nimport {IL2AssetRouter} from \"./IL2AssetRouter.sol\";\nimport {IAssetRouterBase, LEGACY_ENCODING_VERSION, NEW_ENCODING_VERSION, SET_ASSET_HANDLER_COUNTERPART_ENCODING_VERSION} from \"./IAssetRouterBase.sol\";\nimport {AssetRouterBase} from \"./AssetRouterBase.sol\";\n\nimport {IL1AssetHandler} from \"../interfaces/IL1AssetHandler.sol\";\nimport {IL1ERC20Bridge} from \"../interfaces/IL1ERC20Bridge.sol\";\nimport {IAssetHandler} from \"../interfaces/IAssetHandler.sol\";\nimport {IL1Nullifier} from \"../interfaces/IL1Nullifier.sol\";\nimport {INativeTokenVault} from \"../ntv/INativeTokenVault.sol\";\nimport {IL2SharedBridgeLegacyFunctions} from \"../interfaces/IL2SharedBridgeLegacyFunctions.sol\";\n\nimport {ReentrancyGuard} from \"../../common/ReentrancyGuard.sol\";\nimport {DataEncoding} from \"../../common/libraries/DataEncoding.sol\";\nimport {AddressAliasHelper} from \"../../vendor/AddressAliasHelper.sol\";\nimport {TWO_BRIDGES_MAGIC_VALUE, ETH_TOKEN_ADDRESS} from \"../../common/Config.sol\";\nimport {NativeTokenVaultAlreadySet} from \"../L1BridgeContractErrors.sol\";\nimport {LegacyEncodingUsedForNonL1Token, LegacyBridgeUsesNonNativeToken, NonEmptyMsgValue, UnsupportedEncodingVersion, AssetIdNotSupported, AssetHandlerDoesNotExist, Unauthorized, ZeroAddress, TokenNotSupported, AddressAlreadyUsed, TokensWithFeesNotSupported} from \"../../common/L1ContractErrors.sol\";\nimport {L2_ASSET_ROUTER_ADDR} from \"../../common/L2ContractAddresses.sol\";\n\nimport {IBridgehub, L2TransactionRequestTwoBridgesInner, L2TransactionRequestDirect} from \"../../bridgehub/IBridgehub.sol\";\n\nimport {IL1AssetDeploymentTracker} from \"../interfaces/IL1AssetDeploymentTracker.sol\";\n\n/// @author Matter Labs\n/// @custom:security-contact security@matterlabs.dev\n/// @dev Bridges assets between L1 and ZK chain, supporting both ETH and ERC20 tokens.\n/// @dev Designed for use with a proxy for upgradability.\ncontract L1AssetRouter is AssetRouterBase, IL1AssetRouter, ReentrancyGuard {\n using SafeERC20 for IERC20;\n\n /// @dev The address of the WETH token on L1.\n address public immutable override L1_WETH_TOKEN;\n\n /// @dev The assetId of the base token.\n bytes32 public immutable ETH_TOKEN_ASSET_ID;\n\n /// @dev The address of ZKsync Era diamond proxy contract.\n address internal immutable ERA_DIAMOND_PROXY;\n\n /// @dev Address of nullifier.\n IL1Nullifier public immutable L1_NULLIFIER;\n\n /// @dev Address of native token vault.\n INativeTokenVault public nativeTokenVault;\n\n /// @dev Address of legacy bridge.\n IL1ERC20Bridge public legacyBridge;\n\n /// @notice Checks that the message sender is the nullifier.\n modifier onlyNullifier() {\n if (msg.sender != address(L1_NULLIFIER)) {\n revert Unauthorized(msg.sender);\n }\n _;\n }\n\n /// @notice Checks that the message sender is the bridgehub or ZKsync Era Diamond Proxy.\n modifier onlyBridgehubOrEra(uint256 _chainId) {\n if (msg.sender != address(BRIDGE_HUB) && (_chainId != ERA_CHAIN_ID || msg.sender != ERA_DIAMOND_PROXY)) {\n revert Unauthorized(msg.sender);\n }\n _;\n }\n\n /// @notice Checks that the message sender is the legacy bridge.\n modifier onlyLegacyBridge() {\n if (msg.sender != address(legacyBridge)) {\n revert Unauthorized(msg.sender);\n }\n _;\n }\n\n /// @notice Checks that the message sender is the native token vault.\n modifier onlyNativeTokenVault() {\n if (msg.sender != address(nativeTokenVault)) {\n revert Unauthorized(msg.sender);\n }\n _;\n }\n\n /// @dev Contract is expected to be used as proxy implementation.\n /// @dev Initialize the implementation to prevent Parity hack.\n constructor(\n address _l1WethAddress,\n address _bridgehub,\n address _l1Nullifier,\n uint256 _eraChainId,\n address _eraDiamondProxy\n ) reentrancyGuardInitializer AssetRouterBase(block.chainid, _eraChainId, IBridgehub(_bridgehub)) {\n _disableInitializers();\n L1_WETH_TOKEN = _l1WethAddress;\n ERA_DIAMOND_PROXY = _eraDiamondProxy;\n L1_NULLIFIER = IL1Nullifier(_l1Nullifier);\n ETH_TOKEN_ASSET_ID = DataEncoding.encodeNTVAssetId(block.chainid, ETH_TOKEN_ADDRESS);\n }\n\n /// @dev Initializes a contract bridge for later use. Expected to be used in the proxy.\n /// @dev Used for testing purposes only, as the contract has been initialized on mainnet.\n /// @param _owner The address which can change L2 token implementation and upgrade the bridge implementation.\n /// The owner is the Governor and separate from the ProxyAdmin from now on, so that the Governor can call the bridge.\n function initialize(address _owner) external reentrancyGuardInitializer initializer {\n if (_owner == address(0)) {\n revert ZeroAddress();\n }\n _transferOwnership(_owner);\n }\n\n /// @notice Sets the NativeTokenVault contract address.\n /// @dev Should be called only once by the owner.\n /// @param _nativeTokenVault The address of the native token vault.\n function setNativeTokenVault(INativeTokenVault _nativeTokenVault) external onlyOwner {\n if (address(nativeTokenVault) != address(0)) {\n revert NativeTokenVaultAlreadySet();\n }\n if (address(_nativeTokenVault) == address(0)) {\n revert ZeroAddress();\n }\n nativeTokenVault = _nativeTokenVault;\n bytes32 ethAssetId = DataEncoding.encodeNTVAssetId(block.chainid, ETH_TOKEN_ADDRESS);\n _setAssetHandler(ethAssetId, address(_nativeTokenVault));\n }\n\n /// @notice Sets the L1ERC20Bridge contract address.\n /// @dev Should be called only once by the owner.\n /// @param _legacyBridge The address of the legacy bridge.\n function setL1Erc20Bridge(IL1ERC20Bridge _legacyBridge) external onlyOwner {\n if (address(legacyBridge) != address(0)) {\n revert AddressAlreadyUsed(address(legacyBridge));\n }\n if (address(_legacyBridge) == address(0)) {\n revert ZeroAddress();\n }\n legacyBridge = _legacyBridge;\n }\n\n /// @notice Used to set the assed deployment tracker address for given asset data.\n /// @param _assetRegistrationData The asset data which may include the asset address and any additional required data or encodings.\n /// @param _assetDeploymentTracker The whitelisted address of asset deployment tracker for provided asset.\n function setAssetDeploymentTracker(\n bytes32 _assetRegistrationData,\n address _assetDeploymentTracker\n ) external onlyOwner {\n bytes32 assetId = DataEncoding.encodeAssetId(block.chainid, _assetRegistrationData, _assetDeploymentTracker);\n assetDeploymentTracker[assetId] = _assetDeploymentTracker;\n emit AssetDeploymentTrackerSet(assetId, _assetDeploymentTracker, _assetRegistrationData);\n }\n\n /// @inheritdoc IAssetRouterBase\n function setAssetHandlerAddressThisChain(\n bytes32 _assetRegistrationData,\n address _assetHandlerAddress\n ) external override(AssetRouterBase, IAssetRouterBase) {\n _setAssetHandlerAddressThisChain(address(nativeTokenVault), _assetRegistrationData, _assetHandlerAddress);\n }\n\n /// @notice Used to set the asset handler address for a given asset ID on a remote ZK chain\n /// @param _chainId The ZK chain ID.\n /// @param _originalCaller The `msg.sender` address from the external call that initiated current one.\n /// @param _assetId The encoding of asset ID.\n /// @param _assetHandlerAddressOnCounterpart The address of the asset handler, which will hold the token of interest.\n /// @return request The tx request sent to the Bridgehub\n function _setAssetHandlerAddressOnCounterpart(\n uint256 _chainId,\n address _originalCaller,\n bytes32 _assetId,\n address _assetHandlerAddressOnCounterpart\n ) internal view returns (L2TransactionRequestTwoBridgesInner memory request) {\n IL1AssetDeploymentTracker(assetDeploymentTracker[_assetId]).bridgeCheckCounterpartAddress(\n _chainId,\n _assetId,\n _originalCaller,\n _assetHandlerAddressOnCounterpart\n );\n\n bytes memory l2Calldata = abi.encodeCall(\n IL2AssetRouter.setAssetHandlerAddress,\n (block.chainid, _assetId, _assetHandlerAddressOnCounterpart)\n );\n request = L2TransactionRequestTwoBridgesInner({\n magicValue: TWO_BRIDGES_MAGIC_VALUE,\n l2Contract: L2_ASSET_ROUTER_ADDR,\n l2Calldata: l2Calldata,\n factoryDeps: new bytes[](0),\n txDataHash: bytes32(0x00)\n });\n }\n\n /*//////////////////////////////////////////////////////////////\n INITIATTE DEPOSIT Functions\n //////////////////////////////////////////////////////////////*/\n\n /// @inheritdoc IL1AssetRouter\n function bridgehubDepositBaseToken(\n uint256 _chainId,\n bytes32 _assetId,\n address _originalCaller,\n uint256 _amount\n ) public payable virtual override onlyBridgehubOrEra(_chainId) whenNotPaused {\n address assetHandler = assetHandlerAddress[_assetId];\n if (assetHandler == address(0)) {\n revert AssetHandlerDoesNotExist(_assetId);\n }\n\n // slither-disable-next-line unused-return\n IAssetHandler(assetHandler).bridgeBurn{value: msg.value}({\n _chainId: _chainId,\n _msgValue: 0,\n _assetId: _assetId,\n _originalCaller: _originalCaller,\n _data: DataEncoding.encodeBridgeBurnData(_amount, address(0), address(0))\n });\n\n // Note that we don't save the deposited amount, as this is for the base token, which gets sent to the refundRecipient if the tx fails\n emit BridgehubDepositBaseTokenInitiated(_chainId, _originalCaller, _assetId, _amount);\n }\n\n /// @inheritdoc IL1AssetRouter\n function bridgehubDeposit(\n uint256 _chainId,\n address _originalCaller,\n uint256 _value,\n bytes calldata _data\n )\n external\n payable\n virtual\n override\n onlyBridgehub\n whenNotPaused\n returns (L2TransactionRequestTwoBridgesInner memory request)\n {\n bytes32 assetId;\n bytes memory transferData;\n bytes1 encodingVersion = _data[0];\n // The new encoding ensures that the calldata is collision-resistant with respect to the legacy format.\n // In the legacy calldata, the first input was the address, meaning the most significant byte was always `0x00`.\n if (encodingVersion == SET_ASSET_HANDLER_COUNTERPART_ENCODING_VERSION) {\n if (msg.value != 0 || _value != 0) {\n revert NonEmptyMsgValue();\n }\n\n (bytes32 _assetId, address _assetHandlerAddressOnCounterpart) = abi.decode(_data[1:], (bytes32, address));\n return\n _setAssetHandlerAddressOnCounterpart(\n _chainId,\n _originalCaller,\n _assetId,\n _assetHandlerAddressOnCounterpart\n );\n } else if (encodingVersion == NEW_ENCODING_VERSION) {\n (assetId, transferData) = abi.decode(_data[1:], (bytes32, bytes));\n } else if (encodingVersion == LEGACY_ENCODING_VERSION) {\n (assetId, transferData) = _handleLegacyData(_data, _originalCaller);\n } else {\n revert UnsupportedEncodingVersion();\n }\n\n if (BRIDGE_HUB.baseTokenAssetId(_chainId) == assetId) {\n revert AssetIdNotSupported(assetId);\n }\n\n address ntvCached = address(nativeTokenVault);\n\n bytes memory bridgeMintCalldata = _burn({\n _chainId: _chainId,\n _nextMsgValue: _value,\n _assetId: assetId,\n _originalCaller: _originalCaller,\n _transferData: transferData,\n _passValue: true,\n _nativeTokenVault: ntvCached\n });\n\n bytes32 txDataHash = DataEncoding.encodeTxDataHash({\n _nativeTokenVault: ntvCached,\n _encodingVersion: encodingVersion,\n _originalCaller: _originalCaller,\n _assetId: assetId,\n _transferData: transferData\n });\n\n request = _requestToBridge({\n _originalCaller: _originalCaller,\n _assetId: assetId,\n _bridgeMintCalldata: bridgeMintCalldata,\n _txDataHash: txDataHash\n });\n\n emit BridgehubDepositInitiated({\n chainId: _chainId,\n txDataHash: txDataHash,\n from: _originalCaller,\n assetId: assetId,\n bridgeMintCalldata: bridgeMintCalldata\n });\n }\n\n /// @inheritdoc IL1AssetRouter\n function bridgehubConfirmL2Transaction(\n uint256 _chainId,\n bytes32 _txDataHash,\n bytes32 _txHash\n ) external override onlyBridgehub whenNotPaused {\n L1_NULLIFIER.bridgehubConfirmL2TransactionForwarded(_chainId, _txDataHash, _txHash);\n }\n\n /*//////////////////////////////////////////////////////////////\n Receive transaction Functions\n //////////////////////////////////////////////////////////////*/\n\n /// @inheritdoc IAssetRouterBase\n function finalizeDeposit(\n uint256 _chainId,\n bytes32 _assetId,\n bytes calldata _transferData\n ) public payable override(AssetRouterBase, IAssetRouterBase) onlyNullifier {\n _finalizeDeposit(_chainId, _assetId, _transferData, address(nativeTokenVault));\n emit DepositFinalizedAssetRouter(_chainId, _assetId, _transferData);\n }\n\n /*//////////////////////////////////////////////////////////////\n CLAIM FAILED DEPOSIT Functions\n //////////////////////////////////////////////////////////////*/\n\n /// @inheritdoc IL1AssetRouter\n function bridgeRecoverFailedTransfer(\n uint256 _chainId,\n address _depositSender,\n bytes32 _assetId,\n bytes calldata _assetData\n ) external override onlyNullifier nonReentrant whenNotPaused {\n IL1AssetHandler(assetHandlerAddress[_assetId]).bridgeRecoverFailedTransfer(\n _chainId,\n _assetId,\n _depositSender,\n _assetData\n );\n\n emit ClaimedFailedDepositAssetRouter(_chainId, _assetId, _assetData);\n }\n\n function bridgeRecoverFailedTransfer(\n uint256 _chainId,\n address _depositSender,\n bytes32 _assetId,\n bytes calldata _assetData,\n bytes32 _l2TxHash,\n uint256 _l2BatchNumber,\n uint256 _l2MessageIndex,\n uint16 _l2TxNumberInBatch,\n bytes32[] calldata _merkleProof\n ) external {\n L1_NULLIFIER.bridgeRecoverFailedTransfer({\n _chainId: _chainId,\n _depositSender: _depositSender,\n _assetId: _assetId,\n _assetData: _assetData,\n _l2TxHash: _l2TxHash,\n _l2BatchNumber: _l2BatchNumber,\n _l2MessageIndex: _l2MessageIndex,\n _l2TxNumberInBatch: _l2TxNumberInBatch,\n _merkleProof: _merkleProof\n });\n }\n\n /*//////////////////////////////////////////////////////////////\n Internal & Helpers\n //////////////////////////////////////////////////////////////*/\n\n /// @notice Decodes the transfer input for legacy data and transfers allowance to NTV.\n /// @dev Is not applicable for custom asset handlers.\n /// @param _data The encoded transfer data (address _l1Token, uint256 _depositAmount, address _l2Receiver).\n /// @return Tuple of asset ID and encoded transfer data to conform with new encoding standard.\n function _handleLegacyData(bytes calldata _data, address) internal returns (bytes32, bytes memory) {\n (address _l1Token, uint256 _depositAmount, address _l2Receiver) = abi.decode(\n _data,\n (address, uint256, address)\n );\n bytes32 assetId = _ensureTokenRegisteredWithNTV(_l1Token);\n\n // We ensure that the legacy data format can not be used for tokens that did not originate from L1.\n bytes32 expectedAssetId = DataEncoding.encodeNTVAssetId(block.chainid, _l1Token);\n if (assetId != expectedAssetId) {\n revert LegacyEncodingUsedForNonL1Token();\n }\n\n if (assetId == ETH_TOKEN_ASSET_ID) {\n // In the old SDK/contracts the user had to always provide `0` as the deposit amount for ETH token, while\n // ultimately the provided `msg.value` was used as the deposit amount. This check is needed for backwards compatibility.\n\n if (_depositAmount == 0) {\n _depositAmount = msg.value;\n }\n }\n\n return (assetId, DataEncoding.encodeBridgeBurnData(_depositAmount, _l2Receiver, _l1Token));\n }\n\n /// @notice Ensures that token is registered with native token vault.\n /// @dev Only used when deposit is made with legacy data encoding format.\n /// @param _token The native token address which should be registered with native token vault.\n /// @return assetId The asset ID of the token provided.\n function _ensureTokenRegisteredWithNTV(address _token) internal override returns (bytes32 assetId) {\n assetId = nativeTokenVault.assetId(_token);\n if (assetId != bytes32(0)) {\n return assetId;\n }\n nativeTokenVault.ensureTokenIsRegistered(_token);\n assetId = nativeTokenVault.assetId(_token);\n }\n\n /// @inheritdoc IL1AssetRouter\n function transferFundsToNTV(\n bytes32 _assetId,\n uint256 _amount,\n address _originalCaller\n ) external onlyNativeTokenVault returns (bool) {\n address l1TokenAddress = INativeTokenVault(address(nativeTokenVault)).tokenAddress(_assetId);\n if (l1TokenAddress == address(0) || l1TokenAddress == ETH_TOKEN_ADDRESS) {\n return false;\n }\n IERC20 l1Token = IERC20(l1TokenAddress);\n\n // Do the transfer if allowance to Shared bridge is bigger than amount\n // And if there is not enough allowance for the NTV\n bool weCanTransfer = false;\n if (l1Token.allowance(address(legacyBridge), address(this)) >= _amount) {\n _originalCaller = address(legacyBridge);\n weCanTransfer = true;\n } else if (\n l1Token.allowance(_originalCaller, address(this)) >= _amount &&\n l1Token.allowance(_originalCaller, address(nativeTokenVault)) < _amount\n ) {\n weCanTransfer = true;\n }\n if (weCanTransfer) {\n uint256 balanceBefore = l1Token.balanceOf(address(nativeTokenVault));\n // slither-disable-next-line arbitrary-send-erc20\n l1Token.safeTransferFrom(_originalCaller, address(nativeTokenVault), _amount);\n uint256 balanceAfter = l1Token.balanceOf(address(nativeTokenVault));\n\n if (balanceAfter - balanceBefore != _amount) {\n revert TokensWithFeesNotSupported();\n }\n return true;\n }\n return false;\n }\n\n /// @dev The request data that is passed to the bridgehub.\n /// @param _originalCaller The `msg.sender` address from the external call that initiated current one.\n /// @param _assetId The deposited asset ID.\n /// @param _bridgeMintCalldata The calldata used by remote asset handler to mint tokens for recipient.\n /// @param _txDataHash The keccak256 hash of 0x01 || abi.encode(bytes32, bytes) to identify deposits.\n /// @return request The data used by the bridgehub to create L2 transaction request to specific ZK chain.\n function _requestToBridge(\n address _originalCaller,\n bytes32 _assetId,\n bytes memory _bridgeMintCalldata,\n bytes32 _txDataHash\n ) internal view virtual returns (L2TransactionRequestTwoBridgesInner memory request) {\n bytes memory l2TxCalldata = getDepositCalldata(_originalCaller, _assetId, _bridgeMintCalldata);\n\n request = L2TransactionRequestTwoBridgesInner({\n magicValue: TWO_BRIDGES_MAGIC_VALUE,\n l2Contract: L2_ASSET_ROUTER_ADDR,\n l2Calldata: l2TxCalldata,\n factoryDeps: new bytes[](0),\n txDataHash: _txDataHash\n });\n }\n\n /// @inheritdoc IL1AssetRouter\n function getDepositCalldata(\n address _sender,\n bytes32 _assetId,\n bytes memory _assetData\n ) public view override returns (bytes memory) {\n // First branch covers the case when asset is not registered with NTV (custom asset handler)\n // Second branch handles tokens registered with NTV and uses legacy calldata encoding\n // We need to use the legacy encoding to support the old SDK, which relies on a specific encoding of the data.\n if (\n (nativeTokenVault.tokenAddress(_assetId) == address(0)) ||\n (nativeTokenVault.originChainId(_assetId) != block.chainid)\n ) {\n return abi.encodeCall(IAssetRouterBase.finalizeDeposit, (block.chainid, _assetId, _assetData));\n } else {\n // slither-disable-next-line unused-return\n (, address _receiver, address _parsedNativeToken, uint256 _amount, bytes memory _gettersData) = DataEncoding\n .decodeBridgeMintData(_assetData);\n return\n _getLegacyNTVCalldata({\n _sender: _sender,\n _receiver: _receiver,\n _parsedNativeToken: _parsedNativeToken,\n _amount: _amount,\n _gettersData: _gettersData\n });\n }\n }\n\n function _getLegacyNTVCalldata(\n address _sender,\n address _receiver,\n address _parsedNativeToken,\n uint256 _amount,\n bytes memory _gettersData\n ) internal pure returns (bytes memory) {\n return\n abi.encodeCall(\n IL2SharedBridgeLegacyFunctions.finalizeDeposit,\n (_sender, _receiver, _parsedNativeToken, _amount, _gettersData)\n );\n }\n\n /*//////////////////////////////////////////////////////////////\n Legacy Functions\n //////////////////////////////////////////////////////////////*/\n\n /// @inheritdoc IL1AssetRouter\n function depositLegacyErc20Bridge(\n address _originalCaller,\n address _l2Receiver,\n address _l1Token,\n uint256 _amount,\n uint256 _l2TxGasLimit,\n uint256 _l2TxGasPerPubdataByte,\n address _refundRecipient\n ) external payable override onlyLegacyBridge nonReentrant whenNotPaused returns (bytes32 txHash) {\n if (_l1Token == L1_WETH_TOKEN) {\n revert TokenNotSupported(L1_WETH_TOKEN);\n }\n\n bytes32 _assetId;\n {\n // Note, that to keep the code simple, while avoiding \"stack too deep\" error,\n // this `bridgeData` variable is reused in two places with different meanings:\n // - Firstly, it denotes the bridgeBurn data to be used for the NativeTokenVault\n // - Secondly, after the call to `_burn` function, it denotes the `bridgeMint` data that\n // will be sent to the L2 counterpart of the L1NTV.\n bytes memory bridgeData = DataEncoding.encodeBridgeBurnData(_amount, _l2Receiver, _l1Token);\n // Inner call to encode data to decrease local var numbers\n _assetId = _ensureTokenRegisteredWithNTV(_l1Token);\n // Legacy bridge is only expected to use native tokens for L1.\n if (_assetId != DataEncoding.encodeNTVAssetId(block.chainid, _l1Token)) {\n revert LegacyBridgeUsesNonNativeToken();\n }\n\n // Note, that starting from here `bridgeData` starts denoting bridgeMintData.\n bridgeData = _burn({\n _chainId: ERA_CHAIN_ID,\n _nextMsgValue: 0,\n _assetId: _assetId,\n _originalCaller: _originalCaller,\n _transferData: bridgeData,\n _passValue: false,\n _nativeTokenVault: address(nativeTokenVault)\n });\n\n bytes memory l2TxCalldata = getDepositCalldata(_originalCaller, _assetId, bridgeData);\n\n // If the refund recipient is not specified, the refund will be sent to the sender of the transaction.\n // Otherwise, the refund will be sent to the specified address.\n // If the recipient is a contract on L1, the address alias will be applied.\n address refundRecipient = AddressAliasHelper.actualRefundRecipient(_refundRecipient, _originalCaller);\n\n L2TransactionRequestDirect memory request = L2TransactionRequestDirect({\n chainId: ERA_CHAIN_ID,\n l2Contract: L2_ASSET_ROUTER_ADDR,\n mintValue: msg.value, // l2 gas + l2 msg.Value the bridgehub will withdraw the mintValue from the base token bridge for gas\n l2Value: 0, // L2 msg.value, this contract doesn't support base token deposits or wrapping functionality, for direct deposits use bridgehub\n l2Calldata: l2TxCalldata,\n l2GasLimit: _l2TxGasLimit,\n l2GasPerPubdataByteLimit: _l2TxGasPerPubdataByte,\n factoryDeps: new bytes[](0),\n refundRecipient: refundRecipient\n });\n txHash = BRIDGE_HUB.requestL2TransactionDirect{value: msg.value}(request);\n }\n\n {\n bytes memory transferData = DataEncoding.encodeBridgeBurnData(_amount, _l2Receiver, _l1Token);\n // Save the deposited amount to claim funds on L1 if the deposit failed on L2\n L1_NULLIFIER.bridgehubConfirmL2TransactionForwarded(\n ERA_CHAIN_ID,\n DataEncoding.encodeTxDataHash({\n _encodingVersion: LEGACY_ENCODING_VERSION,\n _originalCaller: _originalCaller,\n _assetId: _assetId,\n _nativeTokenVault: address(nativeTokenVault),\n _transferData: transferData\n }),\n txHash\n );\n }\n\n emit LegacyDepositInitiated({\n chainId: ERA_CHAIN_ID,\n l2DepositTxHash: txHash,\n from: _originalCaller,\n to: _l2Receiver,\n l1Token: _l1Token,\n amount: _amount\n });\n }\n\n /// @inheritdoc IL1AssetRouter\n function finalizeWithdrawal(\n uint256 _chainId,\n uint256 _l2BatchNumber,\n uint256 _l2MessageIndex,\n uint16 _l2TxNumberInBatch,\n bytes calldata _message,\n bytes32[] calldata _merkleProof\n ) external override {\n L1_NULLIFIER.finalizeWithdrawal({\n _chainId: _chainId,\n _l2BatchNumber: _l2BatchNumber,\n _l2MessageIndex: _l2MessageIndex,\n _l2TxNumberInBatch: _l2TxNumberInBatch,\n _message: _message,\n _merkleProof: _merkleProof\n });\n }\n\n /// @dev Withdraw funds from the initiated deposit, that failed when finalizing on L2.\n /// @param _depositSender The address of the deposit initiator.\n /// @param _l1Token The address of the deposited L1 ERC20 token.\n /// @param _amount The amount of the deposit that failed.\n /// @param _l2TxHash The L2 transaction hash of the failed deposit finalization.\n /// @param _l2BatchNumber The L2 batch number where the deposit finalization was processed.\n /// @param _l2MessageIndex The position in the L2 logs Merkle tree of the l2Log that was sent with the message.\n /// @param _l2TxNumberInBatch The L2 transaction number in a batch, in which the log was sent.\n /// @param _merkleProof The Merkle proof of the processing L1 -> L2 transaction with deposit finalization.\n function claimFailedDeposit(\n uint256 _chainId,\n address _depositSender,\n address _l1Token,\n uint256 _amount,\n bytes32 _l2TxHash,\n uint256 _l2BatchNumber,\n uint256 _l2MessageIndex,\n uint16 _l2TxNumberInBatch,\n bytes32[] calldata _merkleProof\n ) external {\n L1_NULLIFIER.claimFailedDeposit({\n _chainId: _chainId,\n _depositSender: _depositSender,\n _l1Token: _l1Token,\n _amount: _amount,\n _l2TxHash: _l2TxHash,\n _l2BatchNumber: _l2BatchNumber,\n _l2MessageIndex: _l2MessageIndex,\n _l2TxNumberInBatch: _l2TxNumberInBatch,\n _merkleProof: _merkleProof\n });\n }\n\n /// @notice Legacy read method, which forwards the call to L1Nullifier to check if withdrawal was finalized\n function isWithdrawalFinalized(\n uint256 _chainId,\n uint256 _l2BatchNumber,\n uint256 _l2MessageIndex\n ) external view returns (bool) {\n return L1_NULLIFIER.isWithdrawalFinalized(_chainId, _l2BatchNumber, _l2MessageIndex);\n }\n\n /// @notice Legacy function to get the L2 shared bridge address for a chain.\n /// @dev In case the chain has been deployed after the gateway release,\n /// the returned value is 0.\n function l2BridgeAddress(uint256 _chainId) external view override returns (address) {\n return L1_NULLIFIER.l2BridgeAddress(_chainId);\n }\n}\n" + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.24;\n\nimport {IERC20} from \"@openzeppelin/contracts-v4/token/ERC20/IERC20.sol\";\nimport {SafeERC20} from \"@openzeppelin/contracts-v4/token/ERC20/utils/SafeERC20.sol\";\n\nimport {IL1AssetRouter} from \"./IL1AssetRouter.sol\";\nimport {IL2AssetRouter} from \"./IL2AssetRouter.sol\";\nimport {IAssetRouterBase, LEGACY_ENCODING_VERSION, NEW_ENCODING_VERSION, SET_ASSET_HANDLER_COUNTERPART_ENCODING_VERSION} from \"./IAssetRouterBase.sol\";\nimport {AssetRouterBase} from \"./AssetRouterBase.sol\";\n\nimport {IL1AssetHandler} from \"../interfaces/IL1AssetHandler.sol\";\nimport {IL1ERC20Bridge} from \"../interfaces/IL1ERC20Bridge.sol\";\nimport {IAssetHandler} from \"../interfaces/IAssetHandler.sol\";\nimport {IL1Nullifier} from \"../interfaces/IL1Nullifier.sol\";\nimport {INativeTokenVault} from \"../ntv/INativeTokenVault.sol\";\nimport {IL2SharedBridgeLegacyFunctions} from \"../interfaces/IL2SharedBridgeLegacyFunctions.sol\";\n\nimport {ReentrancyGuard} from \"../../common/ReentrancyGuard.sol\";\nimport {DataEncoding} from \"../../common/libraries/DataEncoding.sol\";\nimport {AddressAliasHelper} from \"../../vendor/AddressAliasHelper.sol\";\nimport {TWO_BRIDGES_MAGIC_VALUE, ETH_TOKEN_ADDRESS} from \"../../common/Config.sol\";\nimport {NativeTokenVaultAlreadySet} from \"../L1BridgeContractErrors.sol\";\nimport {LegacyEncodingUsedForNonL1Token, LegacyBridgeUsesNonNativeToken, NonEmptyMsgValue, UnsupportedEncodingVersion, AssetIdNotSupported, AssetHandlerDoesNotExist, Unauthorized, ZeroAddress, TokenNotSupported, AddressAlreadyUsed, TokensWithFeesNotSupported} from \"../../common/L1ContractErrors.sol\";\nimport {L2_ASSET_ROUTER_ADDR} from \"../../common/L2ContractAddresses.sol\";\n\nimport {IBridgehub, L2TransactionRequestTwoBridgesInner, L2TransactionRequestDirect} from \"../../bridgehub/IBridgehub.sol\";\n\nimport {IL1AssetDeploymentTracker} from \"../interfaces/IL1AssetDeploymentTracker.sol\";\n\n/// @author Matter Labs\n/// @custom:security-contact security@matterlabs.dev\n/// @dev Bridges assets between L1 and ZK chain, supporting both ETH and ERC20 tokens.\n/// @dev Designed for use with a proxy for upgradability.\ncontract L1AssetRouter is AssetRouterBase, IL1AssetRouter, ReentrancyGuard {\n using SafeERC20 for IERC20;\n\n /// @dev The address of the WETH token on L1.\n address public immutable override L1_WETH_TOKEN;\n\n /// @dev The assetId of the base token.\n bytes32 public immutable ETH_TOKEN_ASSET_ID;\n\n /// @dev The address of ZKsync Era diamond proxy contract.\n address internal immutable ERA_DIAMOND_PROXY;\n\n /// @dev Address of nullifier.\n IL1Nullifier public immutable L1_NULLIFIER;\n\n /// @dev Address of native token vault.\n INativeTokenVault public nativeTokenVault;\n\n /// @dev Address of legacy bridge.\n IL1ERC20Bridge public legacyBridge;\n\n /// @notice Checks that the message sender is the nullifier.\n modifier onlyNullifier() {\n if (msg.sender != address(L1_NULLIFIER)) {\n revert Unauthorized(msg.sender);\n }\n _;\n }\n\n /// @notice Checks that the message sender is the bridgehub or ZKsync Era Diamond Proxy.\n modifier onlyBridgehubOrEra(uint256 _chainId) {\n if (msg.sender != address(BRIDGE_HUB) && (_chainId != ERA_CHAIN_ID || msg.sender != ERA_DIAMOND_PROXY)) {\n revert Unauthorized(msg.sender);\n }\n _;\n }\n\n /// @notice Checks that the message sender is the legacy bridge.\n modifier onlyLegacyBridge() {\n if (msg.sender != address(legacyBridge)) {\n revert Unauthorized(msg.sender);\n }\n _;\n }\n\n /// @notice Checks that the message sender is the native token vault.\n modifier onlyNativeTokenVault() {\n if (msg.sender != address(nativeTokenVault)) {\n revert Unauthorized(msg.sender);\n }\n _;\n }\n\n /// @dev Contract is expected to be used as proxy implementation.\n /// @dev Initialize the implementation to prevent Parity hack.\n constructor(\n address _l1WethAddress,\n address _bridgehub,\n address _l1Nullifier,\n uint256 _eraChainId,\n address _eraDiamondProxy\n ) reentrancyGuardInitializer AssetRouterBase(block.chainid, _eraChainId, IBridgehub(_bridgehub)) {\n _disableInitializers();\n L1_WETH_TOKEN = _l1WethAddress;\n ERA_DIAMOND_PROXY = _eraDiamondProxy;\n L1_NULLIFIER = IL1Nullifier(_l1Nullifier);\n ETH_TOKEN_ASSET_ID = DataEncoding.encodeNTVAssetId(block.chainid, ETH_TOKEN_ADDRESS);\n }\n\n /// @dev Initializes a contract bridge for later use. Expected to be used in the proxy.\n /// @dev Used for testing purposes only, as the contract has been initialized on mainnet.\n /// @param _owner The address which can change L2 token implementation and upgrade the bridge implementation.\n /// The owner is the Governor and separate from the ProxyAdmin from now on, so that the Governor can call the bridge.\n function initialize(address _owner) external reentrancyGuardInitializer initializer {\n if (_owner == address(0)) {\n revert ZeroAddress();\n }\n _transferOwnership(_owner);\n }\n\n /// @notice Sets the NativeTokenVault contract address.\n /// @dev Should be called only once by the owner.\n /// @param _nativeTokenVault The address of the native token vault.\n function setNativeTokenVault(INativeTokenVault _nativeTokenVault) external onlyOwner {\n if (address(nativeTokenVault) != address(0)) {\n revert NativeTokenVaultAlreadySet();\n }\n if (address(_nativeTokenVault) == address(0)) {\n revert ZeroAddress();\n }\n nativeTokenVault = _nativeTokenVault;\n bytes32 ethAssetId = DataEncoding.encodeNTVAssetId(block.chainid, ETH_TOKEN_ADDRESS);\n _setAssetHandler(ethAssetId, address(_nativeTokenVault));\n }\n\n /// @notice Sets the L1ERC20Bridge contract address.\n /// @dev Should be called only once by the owner.\n /// @param _legacyBridge The address of the legacy bridge.\n function setL1Erc20Bridge(IL1ERC20Bridge _legacyBridge) external onlyOwner {\n if (address(legacyBridge) != address(0)) {\n revert AddressAlreadyUsed(address(legacyBridge));\n }\n if (address(_legacyBridge) == address(0)) {\n revert ZeroAddress();\n }\n legacyBridge = _legacyBridge;\n }\n\n /// @notice Used to set the assed deployment tracker address for given asset data.\n /// @param _assetRegistrationData The asset data which may include the asset address and any additional required data or encodings.\n /// @param _assetDeploymentTracker The whitelisted address of asset deployment tracker for provided asset.\n function setAssetDeploymentTracker(\n bytes32 _assetRegistrationData,\n address _assetDeploymentTracker\n ) external onlyOwner {\n bytes32 assetId = DataEncoding.encodeAssetId(block.chainid, _assetRegistrationData, _assetDeploymentTracker);\n assetDeploymentTracker[assetId] = _assetDeploymentTracker;\n emit AssetDeploymentTrackerSet(assetId, _assetDeploymentTracker, _assetRegistrationData);\n }\n\n /// @inheritdoc IAssetRouterBase\n function setAssetHandlerAddressThisChain(\n bytes32 _assetRegistrationData,\n address _assetHandlerAddress\n ) external override(AssetRouterBase, IAssetRouterBase) {\n _setAssetHandlerAddressThisChain(address(nativeTokenVault), _assetRegistrationData, _assetHandlerAddress);\n }\n\n /// @notice Used to set the asset handler address for a given asset ID on a remote ZK chain\n /// @param _chainId The ZK chain ID.\n /// @param _originalCaller The `msg.sender` address from the external call that initiated current one.\n /// @param _assetId The encoding of asset ID.\n /// @param _assetHandlerAddressOnCounterpart The address of the asset handler, which will hold the token of interest.\n /// @return request The tx request sent to the Bridgehub\n function _setAssetHandlerAddressOnCounterpart(\n uint256 _chainId,\n address _originalCaller,\n bytes32 _assetId,\n address _assetHandlerAddressOnCounterpart\n ) internal view returns (L2TransactionRequestTwoBridgesInner memory request) {\n IL1AssetDeploymentTracker(assetDeploymentTracker[_assetId]).bridgeCheckCounterpartAddress(\n _chainId,\n _assetId,\n _originalCaller,\n _assetHandlerAddressOnCounterpart\n );\n\n bytes memory l2Calldata = abi.encodeCall(\n IL2AssetRouter.setAssetHandlerAddress,\n (block.chainid, _assetId, _assetHandlerAddressOnCounterpart)\n );\n request = L2TransactionRequestTwoBridgesInner({\n magicValue: TWO_BRIDGES_MAGIC_VALUE,\n l2Contract: L2_ASSET_ROUTER_ADDR,\n l2Calldata: l2Calldata,\n factoryDeps: new bytes[](0),\n txDataHash: bytes32(0x00)\n });\n }\n\n /*//////////////////////////////////////////////////////////////\n INITIATTE DEPOSIT Functions\n //////////////////////////////////////////////////////////////*/\n\n /// @inheritdoc IL1AssetRouter\n function bridgehubDepositBaseToken(\n uint256 _chainId,\n bytes32 _assetId,\n address _originalCaller,\n uint256 _amount\n ) public payable virtual override onlyBridgehubOrEra(_chainId) whenNotPaused {\n address assetHandler = assetHandlerAddress[_assetId];\n if (assetHandler == address(0)) {\n revert AssetHandlerDoesNotExist(_assetId);\n }\n\n // slither-disable-next-line unused-return\n IAssetHandler(assetHandler).bridgeBurn{value: msg.value}({\n _chainId: _chainId,\n _msgValue: 0,\n _assetId: _assetId,\n _originalCaller: _originalCaller,\n _data: DataEncoding.encodeBridgeBurnData(_amount, address(0), address(0))\n });\n\n // Note that we don't save the deposited amount, as this is for the base token, which gets sent to the refundRecipient if the tx fails\n emit BridgehubDepositBaseTokenInitiated(_chainId, _originalCaller, _assetId, _amount);\n }\n\n /// @inheritdoc IL1AssetRouter\n function bridgehubDeposit(\n uint256 _chainId,\n address _originalCaller,\n uint256 _value,\n bytes calldata _data\n )\n external\n payable\n virtual\n override\n onlyBridgehub\n whenNotPaused\n returns (L2TransactionRequestTwoBridgesInner memory request)\n {\n bytes32 assetId;\n bytes memory transferData;\n bytes1 encodingVersion = _data[0];\n // The new encoding ensures that the calldata is collision-resistant with respect to the legacy format.\n // In the legacy calldata, the first input was the address, meaning the most significant byte was always `0x00`.\n if (encodingVersion == SET_ASSET_HANDLER_COUNTERPART_ENCODING_VERSION) {\n if (msg.value != 0 || _value != 0) {\n revert NonEmptyMsgValue();\n }\n\n (bytes32 _assetId, address _assetHandlerAddressOnCounterpart) = abi.decode(_data[1:], (bytes32, address));\n return\n _setAssetHandlerAddressOnCounterpart(\n _chainId,\n _originalCaller,\n _assetId,\n _assetHandlerAddressOnCounterpart\n );\n } else if (encodingVersion == NEW_ENCODING_VERSION) {\n (assetId, transferData) = abi.decode(_data[1:], (bytes32, bytes));\n } else if (encodingVersion == LEGACY_ENCODING_VERSION) {\n (assetId, transferData) = _handleLegacyData(_data, _originalCaller);\n } else {\n revert UnsupportedEncodingVersion();\n }\n\n if (BRIDGE_HUB.baseTokenAssetId(_chainId) == assetId) {\n revert AssetIdNotSupported(assetId);\n }\n\n address ntvCached = address(nativeTokenVault);\n\n bytes memory bridgeMintCalldata = _burn({\n _chainId: _chainId,\n _nextMsgValue: _value,\n _assetId: assetId,\n _originalCaller: _originalCaller,\n _transferData: transferData,\n _passValue: true,\n _nativeTokenVault: ntvCached\n });\n\n bytes32 txDataHash = DataEncoding.encodeTxDataHash({\n _nativeTokenVault: ntvCached,\n _encodingVersion: encodingVersion,\n _originalCaller: _originalCaller,\n _assetId: assetId,\n _transferData: transferData\n });\n\n request = _requestToBridge({\n _originalCaller: _originalCaller,\n _assetId: assetId,\n _bridgeMintCalldata: bridgeMintCalldata,\n _txDataHash: txDataHash\n });\n\n emit BridgehubDepositInitiated({\n chainId: _chainId,\n txDataHash: txDataHash,\n from: _originalCaller,\n assetId: assetId,\n bridgeMintCalldata: bridgeMintCalldata\n });\n }\n\n /// @inheritdoc IL1AssetRouter\n function bridgehubConfirmL2Transaction(\n uint256 _chainId,\n bytes32 _txDataHash,\n bytes32 _txHash\n ) external override onlyBridgehub whenNotPaused {\n L1_NULLIFIER.bridgehubConfirmL2TransactionForwarded(_chainId, _txDataHash, _txHash);\n }\n\n /*//////////////////////////////////////////////////////////////\n Receive transaction Functions\n //////////////////////////////////////////////////////////////*/\n\n /// @inheritdoc IAssetRouterBase\n function finalizeDeposit(\n uint256 _chainId,\n bytes32 _assetId,\n bytes calldata _transferData\n ) public payable override(AssetRouterBase, IAssetRouterBase) onlyNullifier {\n _finalizeDeposit(_chainId, _assetId, _transferData, address(nativeTokenVault));\n emit DepositFinalizedAssetRouter(_chainId, _assetId, _transferData);\n }\n\n /*//////////////////////////////////////////////////////////////\n CLAIM FAILED DEPOSIT Functions\n //////////////////////////////////////////////////////////////*/\n\n /// @inheritdoc IL1AssetRouter\n function bridgeRecoverFailedTransfer(\n uint256 _chainId,\n address _depositSender,\n bytes32 _assetId,\n bytes calldata _assetData\n ) external override onlyNullifier nonReentrant whenNotPaused {\n IL1AssetHandler(assetHandlerAddress[_assetId]).bridgeRecoverFailedTransfer(\n _chainId,\n _assetId,\n _depositSender,\n _assetData\n );\n\n emit ClaimedFailedDepositAssetRouter(_chainId, _assetId, _assetData);\n }\n\n function bridgeRecoverFailedTransfer(\n uint256 _chainId,\n address _depositSender,\n bytes32 _assetId,\n bytes calldata _assetData,\n bytes32 _l2TxHash,\n uint256 _l2BatchNumber,\n uint256 _l2MessageIndex,\n uint16 _l2TxNumberInBatch,\n bytes32[] calldata _merkleProof\n ) external {\n L1_NULLIFIER.bridgeRecoverFailedTransfer({\n _chainId: _chainId,\n _depositSender: _depositSender,\n _assetId: _assetId,\n _assetData: _assetData,\n _l2TxHash: _l2TxHash,\n _l2BatchNumber: _l2BatchNumber,\n _l2MessageIndex: _l2MessageIndex,\n _l2TxNumberInBatch: _l2TxNumberInBatch,\n _merkleProof: _merkleProof\n });\n }\n\n /*//////////////////////////////////////////////////////////////\n Internal & Helpers\n //////////////////////////////////////////////////////////////*/\n\n /// @notice Decodes the transfer input for legacy data and transfers allowance to NTV.\n /// @dev Is not applicable for custom asset handlers.\n /// @param _data The encoded transfer data (address _l1Token, uint256 _depositAmount, address _l2Receiver).\n /// @return Tuple of asset ID and encoded transfer data to conform with new encoding standard.\n function _handleLegacyData(bytes calldata _data, address) internal returns (bytes32, bytes memory) {\n (address _l1Token, uint256 _depositAmount, address _l2Receiver) = abi.decode(\n _data,\n (address, uint256, address)\n );\n bytes32 assetId = _ensureTokenRegisteredWithNTV(_l1Token);\n\n // We ensure that the legacy data format can not be used for tokens that did not originate from L1.\n bytes32 expectedAssetId = DataEncoding.encodeNTVAssetId(block.chainid, _l1Token);\n if (assetId != expectedAssetId) {\n revert LegacyEncodingUsedForNonL1Token();\n }\n\n if (assetId == ETH_TOKEN_ASSET_ID) {\n // In the old SDK/contracts the user had to always provide `0` as the deposit amount for ETH token, while\n // ultimately the provided `msg.value` was used as the deposit amount. This check is needed for backwards compatibility.\n\n if (_depositAmount == 0) {\n _depositAmount = msg.value;\n }\n }\n\n return (assetId, DataEncoding.encodeBridgeBurnData(_depositAmount, _l2Receiver, _l1Token));\n }\n\n /// @notice Ensures that token is registered with native token vault.\n /// @dev Only used when deposit is made with legacy data encoding format.\n /// @param _token The native token address which should be registered with native token vault.\n /// @return assetId The asset ID of the token provided.\n function _ensureTokenRegisteredWithNTV(address _token) internal override returns (bytes32 assetId) {\n assetId = nativeTokenVault.assetId(_token);\n if (assetId != bytes32(0)) {\n return assetId;\n }\n nativeTokenVault.ensureTokenIsRegistered(_token);\n assetId = nativeTokenVault.assetId(_token);\n }\n\n /// @inheritdoc IL1AssetRouter\n function transferFundsToNTV(\n bytes32 _assetId,\n uint256 _amount,\n address _originalCaller\n ) external onlyNativeTokenVault returns (bool) {\n address l1TokenAddress = INativeTokenVaultBase(address(nativeTokenVault)).tokenAddress(_assetId);\n if (l1TokenAddress == address(0) || l1TokenAddress == ETH_TOKEN_ADDRESS) {\n return false;\n }\n IERC20 l1Token = IERC20(l1TokenAddress);\n\n // Do the transfer if allowance to Shared bridge is bigger than amount\n // And if there is not enough allowance for the NTV\n bool weCanTransfer = false;\n if (l1Token.allowance(address(legacyBridge), address(this)) >= _amount) {\n _originalCaller = address(legacyBridge);\n weCanTransfer = true;\n } else if (\n l1Token.allowance(_originalCaller, address(this)) >= _amount &&\n l1Token.allowance(_originalCaller, address(nativeTokenVault)) < _amount\n ) {\n weCanTransfer = true;\n }\n if (weCanTransfer) {\n uint256 balanceBefore = l1Token.balanceOf(address(nativeTokenVault));\n // slither-disable-next-line arbitrary-send-erc20\n l1Token.safeTransferFrom(_originalCaller, address(nativeTokenVault), _amount);\n uint256 balanceAfter = l1Token.balanceOf(address(nativeTokenVault));\n\n if (balanceAfter - balanceBefore != _amount) {\n revert TokensWithFeesNotSupported();\n }\n return true;\n }\n return false;\n }\n\n /// @dev The request data that is passed to the bridgehub.\n /// @param _originalCaller The `msg.sender` address from the external call that initiated current one.\n /// @param _assetId The deposited asset ID.\n /// @param _bridgeMintCalldata The calldata used by remote asset handler to mint tokens for recipient.\n /// @param _txDataHash The keccak256 hash of 0x01 || abi.encode(bytes32, bytes) to identify deposits.\n /// @return request The data used by the bridgehub to create L2 transaction request to specific ZK chain.\n function _requestToBridge(\n address _originalCaller,\n bytes32 _assetId,\n bytes memory _bridgeMintCalldata,\n bytes32 _txDataHash\n ) internal view virtual returns (L2TransactionRequestTwoBridgesInner memory request) {\n bytes memory l2TxCalldata = getDepositCalldata(_originalCaller, _assetId, _bridgeMintCalldata);\n\n request = L2TransactionRequestTwoBridgesInner({\n magicValue: TWO_BRIDGES_MAGIC_VALUE,\n l2Contract: L2_ASSET_ROUTER_ADDR,\n l2Calldata: l2TxCalldata,\n factoryDeps: new bytes[](0),\n txDataHash: _txDataHash\n });\n }\n\n /// @inheritdoc IL1AssetRouter\n function getDepositCalldata(\n address _sender,\n bytes32 _assetId,\n bytes memory _assetData\n ) public view override returns (bytes memory) {\n // First branch covers the case when asset is not registered with NTV (custom asset handler)\n // Second branch handles tokens registered with NTV and uses legacy calldata encoding\n // We need to use the legacy encoding to support the old SDK, which relies on a specific encoding of the data.\n if (\n (nativeTokenVault.tokenAddress(_assetId) == address(0)) ||\n (nativeTokenVault.originChainId(_assetId) != block.chainid)\n ) {\n return abi.encodeCall(IAssetRouterBase.finalizeDeposit, (block.chainid, _assetId, _assetData));\n } else {\n // slither-disable-next-line unused-return\n (, address _receiver, address _parsedNativeToken, uint256 _amount, bytes memory _gettersData) = DataEncoding\n .decodeBridgeMintData(_assetData);\n return\n _getLegacyNTVCalldata({\n _sender: _sender,\n _receiver: _receiver,\n _parsedNativeToken: _parsedNativeToken,\n _amount: _amount,\n _gettersData: _gettersData\n });\n }\n }\n\n function _getLegacyNTVCalldata(\n address _sender,\n address _receiver,\n address _parsedNativeToken,\n uint256 _amount,\n bytes memory _gettersData\n ) internal pure returns (bytes memory) {\n return\n abi.encodeCall(\n IL2SharedBridgeLegacyFunctions.finalizeDeposit,\n (_sender, _receiver, _parsedNativeToken, _amount, _gettersData)\n );\n }\n\n /*//////////////////////////////////////////////////////////////\n Legacy Functions\n //////////////////////////////////////////////////////////////*/\n\n /// @inheritdoc IL1AssetRouter\n function depositLegacyErc20Bridge(\n address _originalCaller,\n address _l2Receiver,\n address _l1Token,\n uint256 _amount,\n uint256 _l2TxGasLimit,\n uint256 _l2TxGasPerPubdataByte,\n address _refundRecipient\n ) external payable override onlyLegacyBridge nonReentrant whenNotPaused returns (bytes32 txHash) {\n if (_l1Token == L1_WETH_TOKEN) {\n revert TokenNotSupported(L1_WETH_TOKEN);\n }\n\n bytes32 _assetId;\n {\n // Note, that to keep the code simple, while avoiding \"stack too deep\" error,\n // this `bridgeData` variable is reused in two places with different meanings:\n // - Firstly, it denotes the bridgeBurn data to be used for the NativeTokenVault\n // - Secondly, after the call to `_burn` function, it denotes the `bridgeMint` data that\n // will be sent to the L2 counterpart of the L1NTV.\n bytes memory bridgeData = DataEncoding.encodeBridgeBurnData(_amount, _l2Receiver, _l1Token);\n // Inner call to encode data to decrease local var numbers\n _assetId = _ensureTokenRegisteredWithNTV(_l1Token);\n // Legacy bridge is only expected to use native tokens for L1.\n if (_assetId != DataEncoding.encodeNTVAssetId(block.chainid, _l1Token)) {\n revert LegacyBridgeUsesNonNativeToken();\n }\n\n // Note, that starting from here `bridgeData` starts denoting bridgeMintData.\n bridgeData = _burn({\n _chainId: ERA_CHAIN_ID,\n _nextMsgValue: 0,\n _assetId: _assetId,\n _originalCaller: _originalCaller,\n _transferData: bridgeData,\n _passValue: false,\n _nativeTokenVault: address(nativeTokenVault)\n });\n\n bytes memory l2TxCalldata = getDepositCalldata(_originalCaller, _assetId, bridgeData);\n\n // If the refund recipient is not specified, the refund will be sent to the sender of the transaction.\n // Otherwise, the refund will be sent to the specified address.\n // If the recipient is a contract on L1, the address alias will be applied.\n address refundRecipient = AddressAliasHelper.actualRefundRecipient(_refundRecipient, _originalCaller);\n\n L2TransactionRequestDirect memory request = L2TransactionRequestDirect({\n chainId: ERA_CHAIN_ID,\n l2Contract: L2_ASSET_ROUTER_ADDR,\n mintValue: msg.value, // l2 gas + l2 msg.Value the bridgehub will withdraw the mintValue from the base token bridge for gas\n l2Value: 0, // L2 msg.value, this contract doesn't support base token deposits or wrapping functionality, for direct deposits use bridgehub\n l2Calldata: l2TxCalldata,\n l2GasLimit: _l2TxGasLimit,\n l2GasPerPubdataByteLimit: _l2TxGasPerPubdataByte,\n factoryDeps: new bytes[](0),\n refundRecipient: refundRecipient\n });\n txHash = BRIDGE_HUB.requestL2TransactionDirect{value: msg.value}(request);\n }\n\n {\n bytes memory transferData = DataEncoding.encodeBridgeBurnData(_amount, _l2Receiver, _l1Token);\n // Save the deposited amount to claim funds on L1 if the deposit failed on L2\n L1_NULLIFIER.bridgehubConfirmL2TransactionForwarded(\n ERA_CHAIN_ID,\n DataEncoding.encodeTxDataHash({\n _encodingVersion: LEGACY_ENCODING_VERSION,\n _originalCaller: _originalCaller,\n _assetId: _assetId,\n _nativeTokenVault: address(nativeTokenVault),\n _transferData: transferData\n }),\n txHash\n );\n }\n\n emit LegacyDepositInitiated({\n chainId: ERA_CHAIN_ID,\n l2DepositTxHash: txHash,\n from: _originalCaller,\n to: _l2Receiver,\n l1Token: _l1Token,\n amount: _amount\n });\n }\n\n /// @inheritdoc IL1AssetRouter\n function finalizeWithdrawal(\n uint256 _chainId,\n uint256 _l2BatchNumber,\n uint256 _l2MessageIndex,\n uint16 _l2TxNumberInBatch,\n bytes calldata _message,\n bytes32[] calldata _merkleProof\n ) external override {\n L1_NULLIFIER.finalizeWithdrawal({\n _chainId: _chainId,\n _l2BatchNumber: _l2BatchNumber,\n _l2MessageIndex: _l2MessageIndex,\n _l2TxNumberInBatch: _l2TxNumberInBatch,\n _message: _message,\n _merkleProof: _merkleProof\n });\n }\n\n /// @dev Withdraw funds from the initiated deposit, that failed when finalizing on L2.\n /// @param _depositSender The address of the deposit initiator.\n /// @param _l1Token The address of the deposited L1 ERC20 token.\n /// @param _amount The amount of the deposit that failed.\n /// @param _l2TxHash The L2 transaction hash of the failed deposit finalization.\n /// @param _l2BatchNumber The L2 batch number where the deposit finalization was processed.\n /// @param _l2MessageIndex The position in the L2 logs Merkle tree of the l2Log that was sent with the message.\n /// @param _l2TxNumberInBatch The L2 transaction number in a batch, in which the log was sent.\n /// @param _merkleProof The Merkle proof of the processing L1 -> L2 transaction with deposit finalization.\n function claimFailedDeposit(\n uint256 _chainId,\n address _depositSender,\n address _l1Token,\n uint256 _amount,\n bytes32 _l2TxHash,\n uint256 _l2BatchNumber,\n uint256 _l2MessageIndex,\n uint16 _l2TxNumberInBatch,\n bytes32[] calldata _merkleProof\n ) external {\n L1_NULLIFIER.claimFailedDeposit({\n _chainId: _chainId,\n _depositSender: _depositSender,\n _l1Token: _l1Token,\n _amount: _amount,\n _l2TxHash: _l2TxHash,\n _l2BatchNumber: _l2BatchNumber,\n _l2MessageIndex: _l2MessageIndex,\n _l2TxNumberInBatch: _l2TxNumberInBatch,\n _merkleProof: _merkleProof\n });\n }\n\n /// @notice Legacy read method, which forwards the call to L1Nullifier to check if withdrawal was finalized\n function isWithdrawalFinalized(\n uint256 _chainId,\n uint256 _l2BatchNumber,\n uint256 _l2MessageIndex\n ) external view returns (bool) {\n return L1_NULLIFIER.isWithdrawalFinalized(_chainId, _l2BatchNumber, _l2MessageIndex);\n }\n\n /// @notice Legacy function to get the L2 shared bridge address for a chain.\n /// @dev In case the chain has been deployed after the gateway release,\n /// the returned value is 0.\n function l2BridgeAddress(uint256 _chainId) external view override returns (address) {\n return L1_NULLIFIER.l2BridgeAddress(_chainId);\n }\n}\n" }, "contracts/bridge/asset-router/L2AssetRouter.sol": { "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.24;\n\nimport {IL2AssetRouter} from \"./IL2AssetRouter.sol\";\nimport {IAssetRouterBase} from \"./IAssetRouterBase.sol\";\nimport {AssetRouterBase} from \"./AssetRouterBase.sol\";\n\nimport {IL2NativeTokenVault} from \"../ntv/IL2NativeTokenVault.sol\";\nimport {IL2SharedBridgeLegacy} from \"../interfaces/IL2SharedBridgeLegacy.sol\";\nimport {IBridgedStandardToken} from \"../interfaces/IBridgedStandardToken.sol\";\nimport {IL1ERC20Bridge} from \"../interfaces/IL1ERC20Bridge.sol\";\n\nimport {IBridgehub} from \"../../bridgehub/IBridgehub.sol\";\nimport {AddressAliasHelper} from \"../../vendor/AddressAliasHelper.sol\";\nimport {ReentrancyGuard} from \"../../common/ReentrancyGuard.sol\";\n\nimport {L2_NATIVE_TOKEN_VAULT_ADDR, L2_BRIDGEHUB_ADDR} from \"../../common/L2ContractAddresses.sol\";\nimport {L2ContractHelper} from \"../../common/libraries/L2ContractHelper.sol\";\nimport {DataEncoding} from \"../../common/libraries/DataEncoding.sol\";\nimport {TokenNotLegacy, EmptyAddress, InvalidCaller, AmountMustBeGreaterThanZero, AssetIdNotSupported} from \"../../common/L1ContractErrors.sol\";\n\n/// @author Matter Labs\n/// @custom:security-contact security@matterlabs.dev\n/// @notice The \"default\" bridge implementation for the ERC20 tokens. Note, that it does not\n/// support any custom token logic, i.e. rebase tokens' functionality is not supported.\ncontract L2AssetRouter is AssetRouterBase, IL2AssetRouter, ReentrancyGuard {\n /// @dev The address of the L2 legacy shared bridge.\n address public immutable L2_LEGACY_SHARED_BRIDGE;\n\n /// @dev The asset id of the base token.\n bytes32 public immutable BASE_TOKEN_ASSET_ID;\n\n /// @dev The address of the L1 asset router counterpart.\n address public immutable override L1_ASSET_ROUTER;\n\n /// @notice Checks that the message sender is the L1 Asset Router.\n modifier onlyAssetRouterCounterpart(uint256 _originChainId) {\n if (_originChainId == L1_CHAIN_ID) {\n // Only the L1 Asset Router counterpart can initiate and finalize the deposit.\n if (AddressAliasHelper.undoL1ToL2Alias(msg.sender) != L1_ASSET_ROUTER) {\n revert InvalidCaller(msg.sender);\n }\n } else {\n revert InvalidCaller(msg.sender); // xL2 messaging not supported for now\n }\n _;\n }\n\n /// @notice Checks that the message sender is the L1 Asset Router.\n modifier onlyAssetRouterCounterpartOrSelf(uint256 _chainId) {\n if (_chainId == L1_CHAIN_ID) {\n // Only the L1 Asset Router counterpart can initiate and finalize the deposit.\n if ((AddressAliasHelper.undoL1ToL2Alias(msg.sender) != L1_ASSET_ROUTER) && (msg.sender != address(this))) {\n revert InvalidCaller(msg.sender);\n }\n } else {\n revert InvalidCaller(msg.sender); // xL2 messaging not supported for now\n }\n _;\n }\n\n /// @notice Checks that the message sender is the legacy L2 bridge.\n modifier onlyLegacyBridge() {\n if (msg.sender != L2_LEGACY_SHARED_BRIDGE) {\n revert InvalidCaller(msg.sender);\n }\n _;\n }\n\n modifier onlyNTV() {\n if (msg.sender != L2_NATIVE_TOKEN_VAULT_ADDR) {\n revert InvalidCaller(msg.sender);\n }\n _;\n }\n\n /// @dev Disable the initialization to prevent Parity hack.\n /// @dev this contract is deployed in the L2GenesisUpgrade, and is meant as direct deployment without a proxy.\n /// @param _l1AssetRouter The address of the L1 Bridge contract.\n constructor(\n uint256 _l1ChainId,\n uint256 _eraChainId,\n address _l1AssetRouter,\n address _legacySharedBridge,\n bytes32 _baseTokenAssetId,\n address _aliasedOwner\n ) AssetRouterBase(_l1ChainId, _eraChainId, IBridgehub(L2_BRIDGEHUB_ADDR)) reentrancyGuardInitializer {\n L2_LEGACY_SHARED_BRIDGE = _legacySharedBridge;\n if (_l1AssetRouter == address(0)) {\n revert EmptyAddress();\n }\n L1_ASSET_ROUTER = _l1AssetRouter;\n _setAssetHandler(_baseTokenAssetId, L2_NATIVE_TOKEN_VAULT_ADDR);\n BASE_TOKEN_ASSET_ID = _baseTokenAssetId;\n _disableInitializers();\n _transferOwnership(_aliasedOwner);\n }\n\n /// @inheritdoc IL2AssetRouter\n function setAssetHandlerAddress(\n uint256 _originChainId,\n bytes32 _assetId,\n address _assetHandlerAddress\n ) external override onlyAssetRouterCounterpart(_originChainId) {\n _setAssetHandler(_assetId, _assetHandlerAddress);\n }\n\n /// @inheritdoc IAssetRouterBase\n function setAssetHandlerAddressThisChain(\n bytes32 _assetRegistrationData,\n address _assetHandlerAddress\n ) external override(AssetRouterBase, IAssetRouterBase) {\n _setAssetHandlerAddressThisChain(L2_NATIVE_TOKEN_VAULT_ADDR, _assetRegistrationData, _assetHandlerAddress);\n }\n\n function setLegacyTokenAssetHandler(bytes32 _assetId) external override onlyNTV {\n // Note, that it is an asset handler, but not asset deployment tracker,\n // which is located on L1.\n _setAssetHandler(_assetId, L2_NATIVE_TOKEN_VAULT_ADDR);\n }\n\n /*//////////////////////////////////////////////////////////////\n Receive transaction Functions\n //////////////////////////////////////////////////////////////*/\n\n /// @notice Finalize the deposit and mint funds\n /// @param _assetId The encoding of the asset on L2\n /// @param _transferData The encoded data required for deposit (address _l1Sender, uint256 _amount, address _l2Receiver, bytes memory erc20Data, address originToken)\n function finalizeDeposit(\n // solhint-disable-next-line no-unused-vars\n uint256,\n bytes32 _assetId,\n bytes calldata _transferData\n )\n public\n payable\n override(AssetRouterBase, IAssetRouterBase)\n onlyAssetRouterCounterpartOrSelf(L1_CHAIN_ID)\n nonReentrant\n {\n if (_assetId == BASE_TOKEN_ASSET_ID) {\n revert AssetIdNotSupported(BASE_TOKEN_ASSET_ID);\n }\n _finalizeDeposit(L1_CHAIN_ID, _assetId, _transferData, L2_NATIVE_TOKEN_VAULT_ADDR);\n\n emit DepositFinalizedAssetRouter(L1_CHAIN_ID, _assetId, _transferData);\n }\n\n /// @notice Initiates a withdrawal by burning funds on the contract and sending the message to L1\n /// where tokens would be unlocked\n /// @dev IMPORTANT: this method will be deprecated in one of the future releases, so contracts\n /// that rely on it must be upgradeable.\n /// @param _assetId The asset id of the withdrawn asset\n /// @param _assetData The data that is passed to the asset handler contract\n function withdraw(bytes32 _assetId, bytes memory _assetData) public override nonReentrant returns (bytes32) {\n return _withdrawSender(_assetId, _assetData, msg.sender, true);\n }\n\n /*//////////////////////////////////////////////////////////////\n Internal & Helpers\n //////////////////////////////////////////////////////////////*/\n\n /// @inheritdoc AssetRouterBase\n function _ensureTokenRegisteredWithNTV(address _token) internal override returns (bytes32 assetId) {\n IL2NativeTokenVault nativeTokenVault = IL2NativeTokenVault(L2_NATIVE_TOKEN_VAULT_ADDR);\n nativeTokenVault.ensureTokenIsRegistered(_token);\n assetId = nativeTokenVault.assetId(_token);\n }\n\n /// @param _assetId The asset id of the withdrawn asset\n /// @param _assetData The data that is passed to the asset handler contract\n /// @param _sender The address of the sender of the message\n /// @param _alwaysNewMessageFormat Whether to use the new message format compatible with Custom Asset Handlers\n function _withdrawSender(\n bytes32 _assetId,\n bytes memory _assetData,\n address _sender,\n bool _alwaysNewMessageFormat\n ) internal returns (bytes32 txHash) {\n bytes memory l1bridgeMintData = _burn({\n _chainId: L1_CHAIN_ID,\n _nextMsgValue: 0,\n _assetId: _assetId,\n _originalCaller: _sender,\n _transferData: _assetData,\n _passValue: false,\n _nativeTokenVault: L2_NATIVE_TOKEN_VAULT_ADDR\n });\n\n bytes memory message;\n if (_alwaysNewMessageFormat || L2_LEGACY_SHARED_BRIDGE == address(0)) {\n message = _getAssetRouterWithdrawMessage(_assetId, l1bridgeMintData);\n // slither-disable-next-line unused-return\n txHash = L2ContractHelper.sendMessageToL1(message);\n } else {\n address l1Token = IBridgedStandardToken(\n IL2NativeTokenVault(L2_NATIVE_TOKEN_VAULT_ADDR).tokenAddress(_assetId)\n ).originToken();\n if (l1Token == address(0)) {\n revert AssetIdNotSupported(_assetId);\n }\n // slither-disable-next-line unused-return\n (uint256 amount, address l1Receiver, ) = DataEncoding.decodeBridgeBurnData(_assetData);\n message = _getSharedBridgeWithdrawMessage(l1Receiver, l1Token, amount);\n txHash = IL2SharedBridgeLegacy(L2_LEGACY_SHARED_BRIDGE).sendMessageToL1(message);\n }\n\n emit WithdrawalInitiatedAssetRouter(L1_CHAIN_ID, _sender, _assetId, _assetData);\n }\n\n /// @notice Encodes the message for l2ToL1log sent during withdraw initialization.\n /// @param _assetId The encoding of the asset on L2 which is withdrawn.\n /// @param _l1bridgeMintData The calldata used by l1 asset handler to unlock tokens for recipient.\n function _getAssetRouterWithdrawMessage(\n bytes32 _assetId,\n bytes memory _l1bridgeMintData\n ) internal view returns (bytes memory) {\n // solhint-disable-next-line func-named-parameters\n return abi.encodePacked(IAssetRouterBase.finalizeDeposit.selector, block.chainid, _assetId, _l1bridgeMintData);\n }\n\n /// @notice Encodes the message for l2ToL1log sent during withdraw initialization.\n function _getSharedBridgeWithdrawMessage(\n address _l1Receiver,\n address _l1Token,\n uint256 _amount\n ) internal pure returns (bytes memory) {\n // solhint-disable-next-line func-named-parameters\n return abi.encodePacked(IL1ERC20Bridge.finalizeWithdrawal.selector, _l1Receiver, _l1Token, _amount);\n }\n\n /*//////////////////////////////////////////////////////////////\n LEGACY FUNCTIONS\n //////////////////////////////////////////////////////////////*/\n\n /// @notice Legacy finalizeDeposit.\n /// @dev Finalizes the deposit and mint funds.\n /// @param _l1Sender The address of token sender on L1.\n /// @param _l2Receiver The address of token receiver on L2.\n /// @param _l1Token The address of the token transferred.\n /// @param _amount The amount of the token transferred.\n /// @param _data The metadata of the token transferred.\n function finalizeDeposit(\n address _l1Sender,\n address _l2Receiver,\n address _l1Token,\n uint256 _amount,\n bytes calldata _data\n ) external payable onlyAssetRouterCounterpart(L1_CHAIN_ID) {\n _translateLegacyFinalizeDeposit({\n _l1Sender: _l1Sender,\n _l2Receiver: _l2Receiver,\n _l1Token: _l1Token,\n _amount: _amount,\n _data: _data\n });\n }\n\n function finalizeDepositLegacyBridge(\n address _l1Sender,\n address _l2Receiver,\n address _l1Token,\n uint256 _amount,\n bytes calldata _data\n ) external onlyLegacyBridge {\n _translateLegacyFinalizeDeposit({\n _l1Sender: _l1Sender,\n _l2Receiver: _l2Receiver,\n _l1Token: _l1Token,\n _amount: _amount,\n _data: _data\n });\n }\n\n function _translateLegacyFinalizeDeposit(\n address _l1Sender,\n address _l2Receiver,\n address _l1Token,\n uint256 _amount,\n bytes calldata _data\n ) internal {\n bytes32 assetId = DataEncoding.encodeNTVAssetId(L1_CHAIN_ID, _l1Token);\n // solhint-disable-next-line func-named-parameters\n bytes memory data = DataEncoding.encodeBridgeMintData(_l1Sender, _l2Receiver, _l1Token, _amount, _data);\n this.finalizeDeposit{value: msg.value}(L1_CHAIN_ID, assetId, data);\n }\n\n /// @notice Initiates a withdrawal by burning funds on the contract and sending the message to L1\n /// where tokens would be unlocked\n /// @dev A compatibility method to support legacy functionality for the SDK.\n /// @param _l1Receiver The account address that should receive funds on L1\n /// @param _l2Token The L2 token address which is withdrawn\n /// @param _amount The total amount of tokens to be withdrawn\n function withdraw(address _l1Receiver, address _l2Token, uint256 _amount) external nonReentrant {\n if (_amount == 0) {\n revert AmountMustBeGreaterThanZero();\n }\n _withdrawLegacy(_l1Receiver, _l2Token, _amount, msg.sender);\n }\n\n /// @notice Legacy withdraw.\n /// @dev Finalizes the deposit and mint funds.\n /// @param _l1Receiver The address of token receiver on L1.\n /// @param _l2Token The address of token on L2.\n /// @param _amount The amount of the token transferred.\n /// @param _sender The original msg.sender.\n function withdrawLegacyBridge(\n address _l1Receiver,\n address _l2Token,\n uint256 _amount,\n address _sender\n ) external onlyLegacyBridge nonReentrant {\n _withdrawLegacy(_l1Receiver, _l2Token, _amount, _sender);\n }\n\n function _withdrawLegacy(address _l1Receiver, address _l2Token, uint256 _amount, address _sender) internal {\n address l1Address = l1TokenAddress(_l2Token);\n if (l1Address == address(0)) {\n revert TokenNotLegacy();\n }\n bytes32 assetId = DataEncoding.encodeNTVAssetId(L1_CHAIN_ID, l1Address);\n bytes memory data = DataEncoding.encodeBridgeBurnData(_amount, _l1Receiver, _l2Token);\n _withdrawSender(assetId, data, _sender, false);\n }\n\n /// @notice Legacy getL1TokenAddress.\n /// @param _l2Token The address of token on L2.\n /// @return The address of token on L1.\n function l1TokenAddress(address _l2Token) public view returns (address) {\n bytes32 assetId = IL2NativeTokenVault(L2_NATIVE_TOKEN_VAULT_ADDR).assetId(_l2Token);\n if (assetId == bytes32(0)) {\n return address(0);\n }\n uint256 originChainId = IL2NativeTokenVault(L2_NATIVE_TOKEN_VAULT_ADDR).originChainId(assetId);\n if (originChainId != L1_CHAIN_ID) {\n return address(0);\n }\n\n return IBridgedStandardToken(_l2Token).originToken();\n }\n\n /// @notice Legacy function used for backward compatibility to return L2 wrapped token\n /// @notice address corresponding to provided L1 token address and deployed through NTV.\n /// @dev However, the shared bridge can use custom asset handlers such that L2 addresses differ,\n /// @dev or an L1 token may not have an L2 counterpart.\n /// @param _l1Token The address of token on L1.\n /// @return Address of an L2 token counterpart\n function l2TokenAddress(address _l1Token) public view returns (address) {\n IL2NativeTokenVault l2NativeTokenVault = IL2NativeTokenVault(L2_NATIVE_TOKEN_VAULT_ADDR);\n address currentlyDeployedAddress = l2NativeTokenVault.l2TokenAddress(_l1Token);\n\n if (currentlyDeployedAddress != address(0)) {\n return currentlyDeployedAddress;\n }\n\n // For backwards compatibility, the bridge smust return the address of the token even if it\n // has not been deployed yet.\n return l2NativeTokenVault.calculateCreate2TokenAddress(L1_CHAIN_ID, _l1Token);\n }\n\n /// @notice Returns the address of the L1 asset router.\n /// @dev The old name is kept for backward compatibility.\n function l1Bridge() external view returns (address) {\n return L1_ASSET_ROUTER;\n }\n}\n" @@ -146,7 +146,7 @@ "content": "// SPDX-License-Identifier: MIT\n// We use a floating point pragma here so it can be used within other projects that interact with the ZKsync ecosystem without using our exact pragma version.\npragma solidity ^0.8.21;\n\n/**\n * @author Matter Labs\n * @notice System smart contract that is responsible for deploying other smart contracts on a ZK chain.\n */\ninterface IL2ContractDeployer {\n /// @notice A struct that describes a forced deployment on an address.\n /// @param bytecodeHash The bytecode hash to put on an address.\n /// @param newAddress The address on which to deploy the bytecodehash to.\n /// @param callConstructor Whether to run the constructor on the force deployment.\n /// @param value The `msg.value` with which to initialize a contract.\n /// @param input The constructor calldata.\n struct ForceDeployment {\n bytes32 bytecodeHash;\n address newAddress;\n bool callConstructor;\n uint256 value;\n bytes input;\n }\n\n /// @notice This method is to be used only during an upgrade to set bytecodes on specific addresses.\n function forceDeployOnAddresses(ForceDeployment[] calldata _deployParams) external;\n\n /// @notice Deploys a contract with similar address derivation rules to the EVM's `CREATE2` opcode.\n /// @param _salt The create2 salt.\n /// @param _bytecodeHash The correctly formatted hash of the bytecode.\n /// @param _input The constructor calldata.\n function create2(bytes32 _salt, bytes32 _bytecodeHash, bytes calldata _input) external;\n}\n" }, "contracts/common/libraries/DataEncoding.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.24;\n\nimport {L2_NATIVE_TOKEN_VAULT_ADDR} from \"../L2ContractAddresses.sol\";\nimport {LEGACY_ENCODING_VERSION, NEW_ENCODING_VERSION} from \"../../bridge/asset-router/IAssetRouterBase.sol\";\nimport {INativeTokenVault} from \"../../bridge/ntv/INativeTokenVault.sol\";\nimport {IncorrectTokenAddressFromNTV, UnsupportedEncodingVersion, InvalidNTVBurnData} from \"../L1ContractErrors.sol\";\n\n/**\n * @author Matter Labs\n * @custom:security-contact security@matterlabs.dev\n * @notice Helper library for transfer data encoding and decoding to reduce possibility of errors.\n */\nlibrary DataEncoding {\n /// @notice Abi.encodes the data required for bridgeBurn for NativeTokenVault.\n /// @param _amount The amount of token to be transferred.\n /// @param _remoteReceiver The address which to receive tokens on remote chain.\n /// @param _maybeTokenAddress The helper field that should be either equal to 0 (in this case\n /// it is assumed that the token has been registered within NativeTokenVault already) or it\n /// can be equal to the address of the token on the current chain. Providing non-zero address\n /// allows it to be automatically registered in case it is not yet a part of NativeTokenVault.\n /// @return The encoded bridgeBurn data\n function encodeBridgeBurnData(\n uint256 _amount,\n address _remoteReceiver,\n address _maybeTokenAddress\n ) internal pure returns (bytes memory) {\n return abi.encode(_amount, _remoteReceiver, _maybeTokenAddress);\n }\n\n /// @notice Function decoding bridgeBurn data previously encoded with this library.\n /// @param _data The encoded data for bridgeBurn\n /// @return amount The amount of token to be transferred.\n /// @return receiver The address which to receive tokens on remote chain.\n /// @return maybeTokenAddress The helper field that should be either equal to 0 (in this case\n /// it is assumed that the token has been registered within NativeTokenVault already) or it\n /// can be equal to the address of the token on the current chain. Providing non-zero address\n /// allows it to be automatically registered in case it is not yet a part of NativeTokenVault.\n function decodeBridgeBurnData(\n bytes memory _data\n ) internal pure returns (uint256 amount, address receiver, address maybeTokenAddress) {\n if (_data.length != 96) {\n // For better error handling\n revert InvalidNTVBurnData();\n }\n\n (amount, receiver, maybeTokenAddress) = abi.decode(_data, (uint256, address, address));\n }\n\n /// @notice Abi.encodes the data required for bridgeMint on remote chain.\n /// @param _originalCaller The address which initiated the transfer.\n /// @param _remoteReceiver The address which to receive tokens on remote chain.\n /// @param _originToken The transferred token address.\n /// @param _amount The amount of token to be transferred.\n /// @param _erc20Metadata The transferred token metadata.\n /// @return The encoded bridgeMint data\n function encodeBridgeMintData(\n address _originalCaller,\n address _remoteReceiver,\n address _originToken,\n uint256 _amount,\n bytes memory _erc20Metadata\n ) internal pure returns (bytes memory) {\n // solhint-disable-next-line func-named-parameters\n return abi.encode(_originalCaller, _remoteReceiver, _originToken, _amount, _erc20Metadata);\n }\n\n /// @notice Function decoding transfer data previously encoded with this library.\n /// @param _bridgeMintData The encoded bridgeMint data\n /// @return _originalCaller The address which initiated the transfer.\n /// @return _remoteReceiver The address which to receive tokens on remote chain.\n /// @return _parsedOriginToken The transferred token address.\n /// @return _amount The amount of token to be transferred.\n /// @return _erc20Metadata The transferred token metadata.\n function decodeBridgeMintData(\n bytes memory _bridgeMintData\n )\n internal\n pure\n returns (\n address _originalCaller,\n address _remoteReceiver,\n address _parsedOriginToken,\n uint256 _amount,\n bytes memory _erc20Metadata\n )\n {\n (_originalCaller, _remoteReceiver, _parsedOriginToken, _amount, _erc20Metadata) = abi.decode(\n _bridgeMintData,\n (address, address, address, uint256, bytes)\n );\n }\n\n /// @notice Encodes the asset data by combining chain id, asset deployment tracker and asset data.\n /// @param _chainId The id of the chain token is native to.\n /// @param _assetData The asset data that has to be encoded.\n /// @param _sender The asset deployment tracker address.\n /// @return The encoded asset data.\n function encodeAssetId(uint256 _chainId, bytes32 _assetData, address _sender) internal pure returns (bytes32) {\n return keccak256(abi.encode(_chainId, _sender, _assetData));\n }\n\n /// @notice Encodes the asset data by combining chain id, asset deployment tracker and asset data.\n /// @param _chainId The id of the chain token is native to.\n /// @param _tokenAddress The address of token that has to be encoded (asset data is the address itself).\n /// @param _sender The asset deployment tracker address.\n /// @return The encoded asset data.\n function encodeAssetId(uint256 _chainId, address _tokenAddress, address _sender) internal pure returns (bytes32) {\n return keccak256(abi.encode(_chainId, _sender, _tokenAddress));\n }\n\n /// @notice Encodes the asset data by combining chain id, NTV as asset deployment tracker and asset data.\n /// @param _chainId The id of the chain token is native to.\n /// @param _assetData The asset data that has to be encoded.\n /// @return The encoded asset data.\n function encodeNTVAssetId(uint256 _chainId, bytes32 _assetData) internal pure returns (bytes32) {\n return keccak256(abi.encode(_chainId, L2_NATIVE_TOKEN_VAULT_ADDR, _assetData));\n }\n\n /// @notice Encodes the asset data by combining chain id, NTV as asset deployment tracker and token address.\n /// @param _chainId The id of the chain token is native to.\n /// @param _tokenAddress The address of token that has to be encoded (asset data is the address itself).\n /// @return The encoded asset data.\n function encodeNTVAssetId(uint256 _chainId, address _tokenAddress) internal pure returns (bytes32) {\n return keccak256(abi.encode(_chainId, L2_NATIVE_TOKEN_VAULT_ADDR, _tokenAddress));\n }\n\n /// @dev Encodes the transaction data hash using either the latest encoding standard or the legacy standard.\n /// @param _encodingVersion EncodingVersion.\n /// @param _originalCaller The address of the entity that initiated the deposit.\n /// @param _assetId The unique identifier of the deposited L1 token.\n /// @param _nativeTokenVault The address of the token, only used if the encoding version is legacy.\n /// @param _transferData The encoded transfer data, which includes both the deposit amount and the address of the L2 receiver.\n /// @return txDataHash The resulting encoded transaction data hash.\n function encodeTxDataHash(\n bytes1 _encodingVersion,\n address _originalCaller,\n bytes32 _assetId,\n address _nativeTokenVault,\n bytes memory _transferData\n ) internal view returns (bytes32 txDataHash) {\n if (_encodingVersion == LEGACY_ENCODING_VERSION) {\n address tokenAddress = INativeTokenVault(_nativeTokenVault).tokenAddress(_assetId);\n\n // This is a double check to ensure that the used token for the legacy encoding is correct.\n // This revert should never be emitted and in real life and should only serve as a guard in\n // case of inconsistent state of Native Token Vault.\n bytes32 expectedAssetId = encodeNTVAssetId(block.chainid, tokenAddress);\n if (_assetId != expectedAssetId) {\n revert IncorrectTokenAddressFromNTV(_assetId, tokenAddress);\n }\n\n (uint256 depositAmount, , ) = decodeBridgeBurnData(_transferData);\n txDataHash = keccak256(abi.encode(_originalCaller, tokenAddress, depositAmount));\n } else if (_encodingVersion == NEW_ENCODING_VERSION) {\n // Similarly to calldata, the txDataHash is collision-resistant.\n // In the legacy data hash, the first encoded variable was the address, which is padded with zeros during `abi.encode`.\n txDataHash = keccak256(\n bytes.concat(_encodingVersion, abi.encode(_originalCaller, _assetId, _transferData))\n );\n } else {\n revert UnsupportedEncodingVersion();\n }\n }\n\n /// @notice Decodes the token data by combining chain id, asset deployment tracker and asset data.\n function decodeTokenData(\n bytes calldata _tokenData\n ) internal pure returns (uint256 chainId, bytes memory name, bytes memory symbol, bytes memory decimals) {\n bytes1 encodingVersion = _tokenData[0];\n if (encodingVersion == LEGACY_ENCODING_VERSION) {\n (name, symbol, decimals) = abi.decode(_tokenData, (bytes, bytes, bytes));\n } else if (encodingVersion == NEW_ENCODING_VERSION) {\n return abi.decode(_tokenData[1:], (uint256, bytes, bytes, bytes));\n } else {\n revert UnsupportedEncodingVersion();\n }\n }\n\n /// @notice Encodes the token data by combining chain id, and its metadata.\n /// @dev Note that all the metadata of the token is expected to be ABI encoded.\n /// @param _chainId The id of the chain token is native to.\n /// @param _name The name of the token.\n /// @param _symbol The symbol of the token.\n /// @param _decimals The decimals of the token.\n /// @return The encoded token data.\n function encodeTokenData(\n uint256 _chainId,\n bytes memory _name,\n bytes memory _symbol,\n bytes memory _decimals\n ) internal pure returns (bytes memory) {\n return bytes.concat(NEW_ENCODING_VERSION, abi.encode(_chainId, _name, _symbol, _decimals));\n }\n}\n" + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.24;\n\nimport {L2_NATIVE_TOKEN_VAULT_ADDR} from \"../L2ContractAddresses.sol\";\nimport {LEGACY_ENCODING_VERSION, NEW_ENCODING_VERSION} from \"../../bridge/asset-router/IAssetRouterBase.sol\";\nimport {INativeTokenVault} from \"../../bridge/ntv/INativeTokenVault.sol\";\nimport {IncorrectTokenAddressFromNTV, UnsupportedEncodingVersion, InvalidNTVBurnData} from \"../L1ContractErrors.sol\";\n\n/**\n * @author Matter Labs\n * @custom:security-contact security@matterlabs.dev\n * @notice Helper library for transfer data encoding and decoding to reduce possibility of errors.\n */\nlibrary DataEncoding {\n /// @notice Abi.encodes the data required for bridgeBurn for NativeTokenVault.\n /// @param _amount The amount of token to be transferred.\n /// @param _remoteReceiver The address which to receive tokens on remote chain.\n /// @param _maybeTokenAddress The helper field that should be either equal to 0 (in this case\n /// it is assumed that the token has been registered within NativeTokenVault already) or it\n /// can be equal to the address of the token on the current chain. Providing non-zero address\n /// allows it to be automatically registered in case it is not yet a part of NativeTokenVault.\n /// @return The encoded bridgeBurn data\n function encodeBridgeBurnData(\n uint256 _amount,\n address _remoteReceiver,\n address _maybeTokenAddress\n ) internal pure returns (bytes memory) {\n return abi.encode(_amount, _remoteReceiver, _maybeTokenAddress);\n }\n\n /// @notice Function decoding bridgeBurn data previously encoded with this library.\n /// @param _data The encoded data for bridgeBurn\n /// @return amount The amount of token to be transferred.\n /// @return receiver The address which to receive tokens on remote chain.\n /// @return maybeTokenAddress The helper field that should be either equal to 0 (in this case\n /// it is assumed that the token has been registered within NativeTokenVault already) or it\n /// can be equal to the address of the token on the current chain. Providing non-zero address\n /// allows it to be automatically registered in case it is not yet a part of NativeTokenVault.\n function decodeBridgeBurnData(\n bytes memory _data\n ) internal pure returns (uint256 amount, address receiver, address maybeTokenAddress) {\n if (_data.length != 96) {\n // For better error handling\n revert InvalidNTVBurnData();\n }\n\n (amount, receiver, maybeTokenAddress) = abi.decode(_data, (uint256, address, address));\n }\n\n /// @notice Abi.encodes the data required for bridgeMint on remote chain.\n /// @param _originalCaller The address which initiated the transfer.\n /// @param _remoteReceiver The address which to receive tokens on remote chain.\n /// @param _originToken The transferred token address.\n /// @param _amount The amount of token to be transferred.\n /// @param _erc20Metadata The transferred token metadata.\n /// @return The encoded bridgeMint data\n function encodeBridgeMintData(\n address _originalCaller,\n address _remoteReceiver,\n address _originToken,\n uint256 _amount,\n bytes memory _erc20Metadata\n ) internal pure returns (bytes memory) {\n // solhint-disable-next-line func-named-parameters\n return abi.encode(_originalCaller, _remoteReceiver, _originToken, _amount, _erc20Metadata);\n }\n\n /// @notice Function decoding transfer data previously encoded with this library.\n /// @param _bridgeMintData The encoded bridgeMint data\n /// @return _originalCaller The address which initiated the transfer.\n /// @return _remoteReceiver The address which to receive tokens on remote chain.\n /// @return _parsedOriginToken The transferred token address.\n /// @return _amount The amount of token to be transferred.\n /// @return _erc20Metadata The transferred token metadata.\n function decodeBridgeMintData(\n bytes memory _bridgeMintData\n )\n internal\n pure\n returns (\n address _originalCaller,\n address _remoteReceiver,\n address _parsedOriginToken,\n uint256 _amount,\n bytes memory _erc20Metadata\n )\n {\n (_originalCaller, _remoteReceiver, _parsedOriginToken, _amount, _erc20Metadata) = abi.decode(\n _bridgeMintData,\n (address, address, address, uint256, bytes)\n );\n }\n\n /// @notice Encodes the asset data by combining chain id, asset deployment tracker and asset data.\n /// @param _chainId The id of the chain token is native to.\n /// @param _assetData The asset data that has to be encoded.\n /// @param _sender The asset deployment tracker address.\n /// @return The encoded asset data.\n function encodeAssetId(uint256 _chainId, bytes32 _assetData, address _sender) internal pure returns (bytes32) {\n return keccak256(abi.encode(_chainId, _sender, _assetData));\n }\n\n /// @notice Encodes the asset data by combining chain id, asset deployment tracker and asset data.\n /// @param _chainId The id of the chain token is native to.\n /// @param _tokenAddress The address of token that has to be encoded (asset data is the address itself).\n /// @param _sender The asset deployment tracker address.\n /// @return The encoded asset data.\n function encodeAssetId(uint256 _chainId, address _tokenAddress, address _sender) internal pure returns (bytes32) {\n return keccak256(abi.encode(_chainId, _sender, _tokenAddress));\n }\n\n /// @notice Encodes the asset data by combining chain id, NTV as asset deployment tracker and asset data.\n /// @param _chainId The id of the chain token is native to.\n /// @param _assetData The asset data that has to be encoded.\n /// @return The encoded asset data.\n function encodeNTVAssetId(uint256 _chainId, bytes32 _assetData) internal pure returns (bytes32) {\n return keccak256(abi.encode(_chainId, L2_NATIVE_TOKEN_VAULT_ADDR, _assetData));\n }\n\n /// @notice Encodes the asset data by combining chain id, NTV as asset deployment tracker and token address.\n /// @param _chainId The id of the chain token is native to.\n /// @param _tokenAddress The address of token that has to be encoded (asset data is the address itself).\n /// @return The encoded asset data.\n function encodeNTVAssetId(uint256 _chainId, address _tokenAddress) internal pure returns (bytes32) {\n return keccak256(abi.encode(_chainId, L2_NATIVE_TOKEN_VAULT_ADDR, _tokenAddress));\n }\n\n /// @dev Encodes the transaction data hash using either the latest encoding standard or the legacy standard.\n /// @param _encodingVersion EncodingVersion.\n /// @param _originalCaller The address of the entity that initiated the deposit.\n /// @param _assetId The unique identifier of the deposited L1 token.\n /// @param _nativeTokenVault The address of the token, only used if the encoding version is legacy.\n /// @param _transferData The encoded transfer data, which includes both the deposit amount and the address of the L2 receiver.\n /// @return txDataHash The resulting encoded transaction data hash.\n function encodeTxDataHash(\n bytes1 _encodingVersion,\n address _originalCaller,\n bytes32 _assetId,\n address _nativeTokenVault,\n bytes memory _transferData\n ) internal view returns (bytes32 txDataHash) {\n if (_encodingVersion == LEGACY_ENCODING_VERSION) {\n address tokenAddress = INativeTokenVaultBase(_nativeTokenVault).tokenAddress(_assetId);\n\n // This is a double check to ensure that the used token for the legacy encoding is correct.\n // This revert should never be emitted and in real life and should only serve as a guard in\n // case of inconsistent state of Native Token Vault.\n bytes32 expectedAssetId = encodeNTVAssetId(block.chainid, tokenAddress);\n if (_assetId != expectedAssetId) {\n revert IncorrectTokenAddressFromNTV(_assetId, tokenAddress);\n }\n\n (uint256 depositAmount, , ) = decodeBridgeBurnData(_transferData);\n txDataHash = keccak256(abi.encode(_originalCaller, tokenAddress, depositAmount));\n } else if (_encodingVersion == NEW_ENCODING_VERSION) {\n // Similarly to calldata, the txDataHash is collision-resistant.\n // In the legacy data hash, the first encoded variable was the address, which is padded with zeros during `abi.encode`.\n txDataHash = keccak256(\n bytes.concat(_encodingVersion, abi.encode(_originalCaller, _assetId, _transferData))\n );\n } else {\n revert UnsupportedEncodingVersion();\n }\n }\n\n /// @notice Decodes the token data by combining chain id, asset deployment tracker and asset data.\n function decodeTokenData(\n bytes calldata _tokenData\n ) internal pure returns (uint256 chainId, bytes memory name, bytes memory symbol, bytes memory decimals) {\n bytes1 encodingVersion = _tokenData[0];\n if (encodingVersion == LEGACY_ENCODING_VERSION) {\n (name, symbol, decimals) = abi.decode(_tokenData, (bytes, bytes, bytes));\n } else if (encodingVersion == NEW_ENCODING_VERSION) {\n return abi.decode(_tokenData[1:], (uint256, bytes, bytes, bytes));\n } else {\n revert UnsupportedEncodingVersion();\n }\n }\n\n /// @notice Encodes the token data by combining chain id, and its metadata.\n /// @dev Note that all the metadata of the token is expected to be ABI encoded.\n /// @param _chainId The id of the chain token is native to.\n /// @param _name The name of the token.\n /// @param _symbol The symbol of the token.\n /// @param _decimals The decimals of the token.\n /// @return The encoded token data.\n function encodeTokenData(\n uint256 _chainId,\n bytes memory _name,\n bytes memory _symbol,\n bytes memory _decimals\n ) internal pure returns (bytes memory) {\n return bytes.concat(NEW_ENCODING_VERSION, abi.encode(_chainId, _name, _symbol, _decimals));\n }\n}\n" }, "contracts/common/libraries/DynamicIncrementalMerkle.sol": { "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.24;\n\nimport {Merkle} from \"./Merkle.sol\";\nimport {Arrays} from \"@openzeppelin/contracts-v4/utils/Arrays.sol\";\n\n/**\n * @dev Library for managing https://wikipedia.org/wiki/Merkle_Tree[Merkle Tree] data structures.\n *\n * Each tree is a complete binary tree with the ability to sequentially insert leaves, changing them from a zero to a\n * non-zero value and updating its root. This structure allows inserting commitments (or other entries) that are not\n * stored, but can be proven to be part of the tree at a later time if the root is kept. See {MerkleProof}.\n *\n * A tree is defined by the following parameters:\n *\n * * Depth: The number of levels in the tree, it also defines the maximum number of leaves as 2**depth.\n * * Zero value: The value that represents an empty leaf. Used to avoid regular zero values to be part of the tree.\n * * Hashing function: A cryptographic hash function used to produce internal nodes.\n *\n * This is a fork of OpenZeppelin's [`MerkleTree`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/9af280dc4b45ee5bda96ba47ff829b407eaab67e/contracts/utils/structs/MerkleTree.sol)\n * library, with the changes to support dynamic tree growth (doubling the size when full).\n */\nlibrary DynamicIncrementalMerkle {\n /**\n * @dev A complete `bytes32` Merkle tree.\n *\n * The `sides` and `zero` arrays are set to have a length equal to the depth of the tree during setup.\n *\n * Struct members have an underscore prefix indicating that they are \"private\" and should not be read or written to\n * directly. Use the functions provided below instead. Modifying the struct manually may violate assumptions and\n * lead to unexpected behavior.\n *\n * NOTE: The `root` and the updates history is not stored within the tree. Consider using a secondary structure to\n * store a list of historical roots from the values returned from {setup} and {push} (e.g. a mapping, {BitMaps} or\n * {Checkpoints}).\n *\n * WARNING: Updating any of the tree's parameters after the first insertion will result in a corrupted tree.\n */\n struct Bytes32PushTree {\n uint256 _nextLeafIndex;\n bytes32[] _sides;\n bytes32[] _zeros;\n }\n\n /**\n * @dev Initialize a {Bytes32PushTree} using {Hashes-Keccak256} to hash internal nodes.\n * The capacity of the tree (i.e. number of leaves) is set to `2**levels`.\n *\n * IMPORTANT: The zero value should be carefully chosen since it will be stored in the tree representing\n * empty leaves. It should be a value that is not expected to be part of the tree.\n */\n function setup(Bytes32PushTree storage self, bytes32 zero) internal returns (bytes32 initialRoot) {\n self._nextLeafIndex = 0;\n self._zeros.push(zero);\n self._sides.push(bytes32(0));\n return bytes32(0);\n }\n\n /**\n * @dev Resets the tree to a blank state.\n * Calling this function on MerkleTree that was already setup and used will reset it to a blank state.\n * @param zero The value that represents an empty leaf.\n * @return initialRoot The initial root of the tree.\n */\n function reset(Bytes32PushTree storage self, bytes32 zero) internal returns (bytes32 initialRoot) {\n self._nextLeafIndex = 0;\n uint256 length = self._zeros.length;\n for (uint256 i = length; 0 < i; --i) {\n self._zeros.pop();\n }\n length = self._sides.length;\n for (uint256 i = length; 0 < i; --i) {\n self._sides.pop();\n }\n self._zeros.push(zero);\n self._sides.push(bytes32(0));\n return bytes32(0);\n }\n\n /**\n * @dev Insert a new leaf in the tree, and compute the new root. Returns the position of the inserted leaf in the\n * tree, and the resulting root.\n *\n * Hashing the leaf before calling this function is recommended as a protection against\n * second pre-image attacks.\n */\n function push(Bytes32PushTree storage self, bytes32 leaf) internal returns (uint256 index, bytes32 newRoot) {\n // Cache read\n uint256 levels = self._zeros.length - 1;\n\n // Get leaf index\n // solhint-disable-next-line gas-increment-by-one\n index = self._nextLeafIndex++;\n\n // Check if tree is full.\n if (index == 1 << levels) {\n bytes32 zero = self._zeros[levels];\n bytes32 newZero = Merkle.efficientHash(zero, zero);\n self._zeros.push(newZero);\n self._sides.push(bytes32(0));\n ++levels;\n }\n\n // Rebuild branch from leaf to root\n uint256 currentIndex = index;\n bytes32 currentLevelHash = leaf;\n bool updatedSides = false;\n for (uint32 i = 0; i < levels; ++i) {\n // Reaching the parent node, is currentLevelHash the left child?\n bool isLeft = currentIndex % 2 == 0;\n\n // If so, next time we will come from the right, so we need to save it\n if (isLeft && !updatedSides) {\n Arrays.unsafeAccess(self._sides, i).value = currentLevelHash;\n updatedSides = true;\n }\n\n // Compute the current node hash by using the hash function\n // with either its sibling (side) or the zero value for that level.\n currentLevelHash = Merkle.efficientHash(\n isLeft ? currentLevelHash : Arrays.unsafeAccess(self._sides, i).value,\n isLeft ? Arrays.unsafeAccess(self._zeros, i).value : currentLevelHash\n );\n\n // Update node index\n currentIndex >>= 1;\n }\n\n Arrays.unsafeAccess(self._sides, levels).value = currentLevelHash;\n return (index, currentLevelHash);\n }\n\n /**\n * @dev Tree's root.\n */\n function root(Bytes32PushTree storage self) internal view returns (bytes32) {\n return Arrays.unsafeAccess(self._sides, self._sides.length - 1).value;\n }\n\n /**\n * @dev Tree's height (does not include the root node).\n */\n function height(Bytes32PushTree storage self) internal view returns (uint256) {\n return self._sides.length - 1;\n }\n}\n" diff --git a/l1-contracts/scripts/blake2s256.ts b/l1-contracts/scripts/blake2s256.ts new file mode 100644 index 0000000000..085811d9c8 --- /dev/null +++ b/l1-contracts/scripts/blake2s256.ts @@ -0,0 +1,32 @@ +#!/usr/bin/env ts-node + +import * as blakejs from "blakejs"; + +// Helper to convert a hex string to Uint8Array +function hexToBytes(hex: string): Uint8Array { + if (hex.startsWith("0x")) hex = hex.slice(2); + if (hex.length % 2 !== 0) { + throw new Error("Invalid hex string"); + } + const bytes = new Uint8Array(hex.length / 2); + for (let i = 0; i < bytes.length; i++) { + bytes[i] = parseInt(hex.slice(i * 2, i * 2 + 2), 16); + } + return bytes; +} + +// Grab the input from the command-line arguments (excluding node and script path) +const input = process.argv.slice(2).join(" "); +if (!input) { + console.error("Usage: blake2s-hash "); + process.exit(1); +} + +// Convert input hex to bytes +const inputBytes = hexToBytes(input); + +// Compute the BLAKE2s hash +const hash = blakejs.blake2sHex(inputBytes); + +// Output +console.log(hash); diff --git a/l1-contracts/scripts/errors-lint.ts b/l1-contracts/scripts/errors-lint.ts index afafc98922..01c19bf599 100644 --- a/l1-contracts/scripts/errors-lint.ts +++ b/l1-contracts/scripts/errors-lint.ts @@ -2,6 +2,7 @@ import { Command } from "commander"; import * as fs from "fs"; import * as path from "path"; import { ethers } from "ethers"; +import * as https from "https"; // Constant arrays const CONTRACTS_DIRECTORIES = { @@ -18,6 +19,87 @@ const CONTRACTS_DIRECTORIES = { "../da-contracts/contracts": ["DAContractsErrors.sol"], }; +// Helper function to query the signature database +async function querySignatureDatabase(signature: string): Promise { + const url = `https://api.openchain.xyz/signature-database/v1/search?query=${encodeURIComponent( + signature + )}&_=${Date.now()}`; // add a timestamp to avoid caching + return new Promise((resolve, reject) => { + https + .get(url, (res) => { + let data = ""; + res.on("data", (chunk) => { + data += chunk; + }); + res.on("end", () => { + try { + const parsedData = JSON.parse(data); + if (!parsedData.ok || !parsedData.result) { + return reject(new Error(`Invalid response from signature database. Response: ${data}`)); + } + + const { event, function: func } = parsedData.result; + const signatureFound = Object.keys(event || {}).length > 0 || Object.keys(func || {}).length > 0; + resolve(signatureFound); + } catch (e) { + reject(new Error(`Failed to parse response from signature database: ${data}`)); + } + }); + }) + .on("error", (err) => { + reject(new Error(`Error querying signature database: ${err.message}`)); + }); + }); +} + +// Helper function to submit a signature to the database +async function submitSignatureToDatabase(signature: string): Promise { + const postData = JSON.stringify({ + function: [signature], + event: [], + }); + + const options = { + hostname: "api.openchain.xyz", + path: "/signature-database/v1/import", + method: "POST", + headers: { + "Content-Type": "application/json", + "Content-Length": Buffer.byteLength(postData), + }, + }; + + return new Promise((resolve, reject) => { + const req = https.request(options, (res) => { + let responseBody = ""; + res.on("data", (chunk) => (responseBody += chunk)); + + res.on("end", () => { + if (res.statusCode >= 200 && res.statusCode < 300) { + console.log(`Signature "${signature}" submitted successfully.`); + resolve(); + } else if (res.statusCode === 400 && responseBody.includes("already exists")) { + console.log( + `Signature "${signature}" already exists in the database (race condition?). Treating as success.` + ); + resolve(); + } else { + reject( + new Error(`Failed to submit signature "${signature}". Status: ${res.statusCode}, Body: ${responseBody}`) + ); + } + }); + }); + + req.on("error", (e) => { + reject(new Error(`Error submitting signature "${signature}": ${e.message}`)); + }); + + req.write(postData); + req.end(); + }); +} + // Helper: sort error blocks (selector + multi-line error) alphabetically by error name function sortErrorBlocks(lines: string[]): string[] { const before: string[] = []; @@ -83,7 +165,11 @@ function sortErrorBlocks(lines: string[]): string[] { } // Process a file: handle selector insertion, multiline parsing, and sorting -function processFile(filePath: string, fix: boolean, collectedErrors: Map): boolean { +async function processFile( + filePath: string, + fix: boolean, + collectedErrors: Map +): Promise { const content = fs.readFileSync(filePath, "utf8"); // Find all enum definitions in the file @@ -134,13 +220,23 @@ function processFile(filePath: string, fix: boolean, collectedErrors: Map output.push(l)); i++; @@ -174,6 +270,10 @@ function collectErrorUsages(directories: string[], usedErrors: Set) { const revertRegex = /revert\s+([A-Za-z0-9_]+)/g; let match; while ((match = revertRegex.exec(fileContent)) !== null) usedErrors.add(match[1]); + + // Also check for error selector usage like ErrorName.selector + const selectorRegex = /([A-Za-z0-9_]+)\.selector/g; + while ((match = selectorRegex.exec(fileContent)) !== null) usedErrors.add(match[1]); } } } @@ -198,7 +298,7 @@ async function main() { const usedErrors = new Set(); for (const customErrorFile of errorsPaths) { const absolutePath = path.resolve(contractsPath + "/" + customErrorFile); - const result = processFile(absolutePath, options.fix, declaredErrors); + const result = await processFile(absolutePath, options.fix, declaredErrors); if (result && options.check) hasErrors = true; } if (options.check && hasErrors) { @@ -206,7 +306,12 @@ async function main() { process.exit(1); } if (options.check) { - collectErrorUsages([contractsPath], usedErrors); + // Check for error usage in contracts, test files, and deploy scripts + const searchPaths = [contractsPath]; + if (contractsPath === "contracts") { + searchPaths.push("test"); // Also search test directory for contracts + } + collectErrorUsages(searchPaths, usedErrors); const unusedErrors = [...declaredErrors].filter(([, [errorName]]) => !usedErrors.has(errorName)); if (unusedErrors.length > 0) { for (const [errorSig, errorFile] of unusedErrors) diff --git a/l1-contracts/snapshots/Executor.json b/l1-contracts/snapshots/Executor.json deleted file mode 100644 index 4bd567ef37..0000000000 --- a/l1-contracts/snapshots/Executor.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "commit": "177141", - "execute": "103822", - "precommit": "60124", - "prove": "72189" -} diff --git a/l1-contracts/test/foundry/l1/integration/AssetRouterTest.t.sol b/l1-contracts/test/foundry/l1/integration/AssetRouterTest.t.sol index 9860ee71a4..fda0cf56bb 100644 --- a/l1-contracts/test/foundry/l1/integration/AssetRouterTest.t.sol +++ b/l1-contracts/test/foundry/l1/integration/AssetRouterTest.t.sol @@ -2,33 +2,27 @@ pragma solidity 0.8.28; import {Test} from "forge-std/Test.sol"; -import {Vm} from "forge-std/Vm.sol"; + import {console2 as console} from "forge-std/console2.sol"; -import {IBridgehub, L2TransactionRequestDirect, L2TransactionRequestTwoBridgesOuter} from "contracts/bridgehub/IBridgehub.sol"; +import {IBridgehubBase, L2TransactionRequestTwoBridgesOuter} from "contracts/bridgehub/IBridgehubBase.sol"; import {TestnetERC20Token} from "contracts/dev-contracts/TestnetERC20Token.sol"; -import {MailboxFacet} from "contracts/state-transition/chain-deps/facets/Mailbox.sol"; -import {GettersFacet} from "contracts/state-transition/chain-deps/facets/Getters.sol"; -import {IMailbox} from "contracts/state-transition/chain-interfaces/IMailbox.sol"; -import {IExecutor} from "contracts/state-transition/chain-interfaces/IExecutor.sol"; + import {L1ContractDeployer} from "./_SharedL1ContractDeployer.t.sol"; import {TokenDeployer} from "./_SharedTokenDeployer.t.sol"; import {ZKChainDeployer} from "./_SharedZKChainDeployer.t.sol"; import {L2TxMocker} from "./_SharedL2TxMocker.t.sol"; -import {DEFAULT_L2_LOGS_TREE_ROOT_HASH, EMPTY_STRING_KECCAK, ETH_TOKEN_ADDRESS, REQUIRED_L2_GAS_PRICE_PER_PUBDATA} from "contracts/common/Config.sol"; -import {L2CanonicalTransaction, L2Message} from "contracts/common/Messaging.sol"; -import {L2_ASSET_ROUTER_ADDR, L2_BASE_TOKEN_SYSTEM_CONTRACT_ADDR, L2_NATIVE_TOKEN_VAULT_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; -import {IL1ERC20Bridge} from "contracts/bridge/interfaces/IL1ERC20Bridge.sol"; -import {IZKChain} from "contracts/state-transition/chain-interfaces/IZKChain.sol"; -import {IChainTypeManager} from "contracts/state-transition/IChainTypeManager.sol"; -import {IL1AssetRouter} from "contracts/bridge/asset-router/IL1AssetRouter.sol"; -import {IL1NativeTokenVault} from "contracts/bridge/ntv/IL1NativeTokenVault.sol"; -import {INativeTokenVault} from "contracts/bridge/ntv/INativeTokenVault.sol"; -import {FinalizeL1DepositParams, IL1Nullifier} from "contracts/bridge/interfaces/IL1Nullifier.sol"; -import {IAssetRouterBase, LEGACY_ENCODING_VERSION, NEW_ENCODING_VERSION} from "contracts/bridge/asset-router/IAssetRouterBase.sol"; +import {ETH_TOKEN_ADDRESS, REQUIRED_L2_GAS_PRICE_PER_PUBDATA} from "contracts/common/Config.sol"; +import {L2Message} from "contracts/common/Messaging.sol"; +import {L2_ASSET_ROUTER_ADDR, L2_NATIVE_TOKEN_VAULT_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; + +import {NativeTokenVaultBase} from "contracts/bridge/ntv/NativeTokenVaultBase.sol"; +import {FinalizeL1DepositParams} from "contracts/bridge/interfaces/IL1Nullifier.sol"; +import {IAssetRouterBase, NEW_ENCODING_VERSION} from "contracts/bridge/asset-router/IAssetRouterBase.sol"; +import {AssetRouterBase} from "contracts/bridge/asset-router/AssetRouterBase.sol"; import {DataEncoding} from "contracts/common/libraries/DataEncoding.sol"; import {BridgeHelper} from "contracts/bridge/BridgeHelper.sol"; -import {BridgedStandardERC20, IBridgedStandardToken, NonSequentialVersion} from "contracts/bridge/BridgedStandardERC20.sol"; +import {BridgedStandardERC20, NonSequentialVersion} from "contracts/bridge/BridgedStandardERC20.sol"; import {IERC20} from "@openzeppelin/contracts-v4/token/ERC20/IERC20.sol"; import {ConfigSemaphore} from "./utils/_ConfigSemaphore.sol"; @@ -82,7 +76,7 @@ contract AssetRouterIntegrationTest is L1ContractDeployer, ZKChainDeployer, Toke function depositToL1(address _tokenAddress) public { vm.mockCall( address(addresses.bridgehub), - abi.encodeWithSelector(IBridgehub.proveL2MessageInclusion.selector), + abi.encodeWithSelector(IBridgehubBase.proveL2MessageInclusion.selector), abi.encode(true) ); uint256 chainId = eraZKChainId; @@ -102,7 +96,7 @@ contract AssetRouterIntegrationTest is L1ContractDeployer, ZKChainDeployer, Toke l2Sender: L2_ASSET_ROUTER_ADDR, l2TxNumberInBatch: 1, message: abi.encodePacked( - IAssetRouterBase.finalizeDeposit.selector, + AssetRouterBase.finalizeDeposit.selector, chainId, l2TokenAssetId, transferData @@ -166,7 +160,7 @@ contract AssetRouterIntegrationTest is L1ContractDeployer, ZKChainDeployer, Toke vm.store(address(bridgedToken), bytes32(uint256(207)), bytes32(0)); vm.mockCall( address(L2_NATIVE_TOKEN_VAULT_ADDR), - abi.encodeWithSelector(INativeTokenVault.L1_CHAIN_ID.selector), + abi.encodeWithSelector(NativeTokenVaultBase.L1_CHAIN_ID.selector), abi.encode(block.chainid) ); vm.broadcast(L2_NATIVE_TOKEN_VAULT_ADDR); // kl todo call ntv, or even assetRouter/bridgehub diff --git a/l1-contracts/test/foundry/l1/integration/BridgeHubInvariantTests.t.sol b/l1-contracts/test/foundry/l1/integration/BridgeHubInvariantTests.t.sol index 1574875935..3aa4a0ca96 100644 --- a/l1-contracts/test/foundry/l1/integration/BridgeHubInvariantTests.t.sol +++ b/l1-contracts/test/foundry/l1/integration/BridgeHubInvariantTests.t.sol @@ -4,7 +4,7 @@ pragma solidity 0.8.28; import {Test} from "forge-std/Test.sol"; import {Vm} from "forge-std/Vm.sol"; -import {IBridgehub, L2TransactionRequestDirect, L2TransactionRequestTwoBridgesOuter} from "contracts/bridgehub/IBridgehub.sol"; +import {IBridgehubBase, L2TransactionRequestDirect, L2TransactionRequestTwoBridgesOuter} from "contracts/bridgehub/IBridgehubBase.sol"; import {TestnetERC20Token} from "contracts/dev-contracts/TestnetERC20Token.sol"; import {MailboxFacet} from "contracts/state-transition/chain-deps/facets/Mailbox.sol"; import {GettersFacet} from "contracts/state-transition/chain-deps/facets/Getters.sol"; @@ -18,7 +18,7 @@ import {DEFAULT_L2_LOGS_TREE_ROOT_HASH, EMPTY_STRING_KECCAK, ETH_TOKEN_ADDRESS, import {L2CanonicalTransaction, L2Message} from "contracts/common/Messaging.sol"; import {L2_BASE_TOKEN_SYSTEM_CONTRACT_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; import {IL1ERC20Bridge} from "contracts/bridge/interfaces/IL1ERC20Bridge.sol"; -import {DataEncoding} from "contracts/common/libraries/DataEncoding.sol"; + import {AddressesAlreadyGenerated} from "test/foundry/L1TestsErrors.sol"; contract BridgeHubInvariantTests is L1ContractDeployer, ZKChainDeployer, TokenDeployer, L2TxMocker { @@ -512,7 +512,7 @@ contract BridgeHubInvariantTests is L1ContractDeployer, ZKChainDeployer, TokenDe addresses.bridgehubProxyAddress, // solhint-disable-next-line func-named-parameters abi.encodeWithSelector( - IBridgehub.proveL2MessageInclusion.selector, + IBridgehubBase.proveL2MessageInclusion.selector, currentChainId, l2BatchNumber, l2MessageIndex, @@ -572,7 +572,7 @@ contract BridgeHubInvariantTests is L1ContractDeployer, ZKChainDeployer, TokenDe addresses.bridgehubProxyAddress, // solhint-disable-next-line func-named-parameters abi.encodeWithSelector( - IBridgehub.proveL2MessageInclusion.selector, + IBridgehubBase.proveL2MessageInclusion.selector, currentChainId, l2BatchNumber, l2MessageIndex, diff --git a/l1-contracts/test/foundry/l1/integration/BridgehubTests.t.sol b/l1-contracts/test/foundry/l1/integration/BridgehubTests.t.sol index aeaa68400d..5d9bb25681 100644 --- a/l1-contracts/test/foundry/l1/integration/BridgehubTests.t.sol +++ b/l1-contracts/test/foundry/l1/integration/BridgehubTests.t.sol @@ -4,7 +4,8 @@ pragma solidity 0.8.28; import {Test} from "forge-std/Test.sol"; import {Vm} from "forge-std/Vm.sol"; -import {IBridgehub, L2TransactionRequestDirect, L2TransactionRequestTwoBridgesOuter} from "contracts/bridgehub/IBridgehub.sol"; +import {IL1Bridgehub, L2TransactionRequestDirect, L2TransactionRequestTwoBridgesOuter} from "contracts/bridgehub/IL1Bridgehub.sol"; +import {IBridgehubBase} from "contracts/bridgehub/IBridgehubBase.sol"; import {TestnetERC20Token} from "contracts/dev-contracts/TestnetERC20Token.sol"; import {MailboxFacet} from "contracts/state-transition/chain-deps/facets/Mailbox.sol"; import {GettersFacet} from "contracts/state-transition/chain-deps/facets/Getters.sol"; @@ -18,7 +19,7 @@ import {DEFAULT_L2_LOGS_TREE_ROOT_HASH, EMPTY_STRING_KECCAK, ETH_TOKEN_ADDRESS, import {L2CanonicalTransaction, L2Message} from "contracts/common/Messaging.sol"; import {L2_BASE_TOKEN_SYSTEM_CONTRACT_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; import {IL1ERC20Bridge} from "contracts/bridge/interfaces/IL1ERC20Bridge.sol"; -import {DataEncoding} from "contracts/common/libraries/DataEncoding.sol"; + import {AddressesAlreadyGenerated} from "test/foundry/L1TestsErrors.sol"; contract BridgeHubInvariantTests is L1ContractDeployer, ZKChainDeployer, TokenDeployer, L2TxMocker { @@ -512,7 +513,7 @@ contract BridgeHubInvariantTests is L1ContractDeployer, ZKChainDeployer, TokenDe addresses.bridgehubProxyAddress, // solhint-disable-next-line func-named-parameters abi.encodeWithSelector( - IBridgehub.proveL2MessageInclusion.selector, + IBridgehubBase.proveL2MessageInclusion.selector, currentChainId, l2BatchNumber, l2MessageIndex, @@ -572,7 +573,7 @@ contract BridgeHubInvariantTests is L1ContractDeployer, ZKChainDeployer, TokenDe addresses.bridgehubProxyAddress, // solhint-disable-next-line func-named-parameters abi.encodeWithSelector( - IBridgehub.proveL2MessageInclusion.selector, + IBridgehubBase.proveL2MessageInclusion.selector, currentChainId, l2BatchNumber, l2MessageIndex, diff --git a/l1-contracts/test/foundry/l1/integration/DeploymentTest.t.sol b/l1-contracts/test/foundry/l1/integration/DeploymentTest.t.sol index a5e2572455..d83e7c2b30 100644 --- a/l1-contracts/test/foundry/l1/integration/DeploymentTest.t.sol +++ b/l1-contracts/test/foundry/l1/integration/DeploymentTest.t.sol @@ -2,30 +2,21 @@ pragma solidity 0.8.28; import {Test} from "forge-std/Test.sol"; -import {Vm} from "forge-std/Vm.sol"; import {Ownable} from "@openzeppelin/contracts-v4/access/Ownable.sol"; -import {IBridgehub, L2TransactionRequestDirect, L2TransactionRequestTwoBridgesOuter} from "contracts/bridgehub/IBridgehub.sol"; -import {TestnetERC20Token} from "contracts/dev-contracts/TestnetERC20Token.sol"; -import {MailboxFacet} from "contracts/state-transition/chain-deps/facets/Mailbox.sol"; -import {GettersFacet} from "contracts/state-transition/chain-deps/facets/Getters.sol"; -import {IMailbox} from "contracts/state-transition/chain-interfaces/IMailbox.sol"; -import {IExecutor} from "contracts/state-transition/chain-interfaces/IExecutor.sol"; import {L1ContractDeployer} from "./_SharedL1ContractDeployer.t.sol"; import {TokenDeployer} from "./_SharedTokenDeployer.t.sol"; import {ZKChainDeployer} from "./_SharedZKChainDeployer.t.sol"; import {L2TxMocker} from "./_SharedL2TxMocker.t.sol"; -import {DEFAULT_L2_LOGS_TREE_ROOT_HASH, EMPTY_STRING_KECCAK, ETH_TOKEN_ADDRESS, REQUIRED_L2_GAS_PRICE_PER_PUBDATA} from "contracts/common/Config.sol"; -import {L2CanonicalTransaction, L2Message} from "contracts/common/Messaging.sol"; -import {L2_BASE_TOKEN_SYSTEM_CONTRACT_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; -import {IL1ERC20Bridge} from "contracts/bridge/interfaces/IL1ERC20Bridge.sol"; +import {ETH_TOKEN_ADDRESS} from "contracts/common/Config.sol"; + import {IZKChain} from "contracts/state-transition/chain-interfaces/IZKChain.sol"; import {IChainTypeManager} from "contracts/state-transition/IChainTypeManager.sol"; import {AddressesAlreadyGenerated} from "test/foundry/L1TestsErrors.sol"; import {DataEncoding} from "contracts/common/libraries/DataEncoding.sol"; import {IncorrectBridgeHubAddress} from "contracts/common/L1ContractErrors.sol"; -import {MessageRoot} from "contracts/bridgehub/MessageRoot.sol"; +import {L1MessageRoot} from "contracts/bridgehub/L1MessageRoot.sol"; import {ConfigSemaphore} from "./utils/_ConfigSemaphore.sol"; contract DeploymentTests is L1ContractDeployer, ZKChainDeployer, TokenDeployer, L2TxMocker, ConfigSemaphore { @@ -117,7 +108,7 @@ contract DeploymentTests is L1ContractDeployer, ZKChainDeployer, TokenDeployer, assertEq(addresses.bridgehub.settlementLayer(randomChainId), block.chainid); address messageRoot = address(addresses.bridgehub.messageRoot()); - assertTrue(MessageRoot(messageRoot).chainIndex(randomChainId) != 0); + assertTrue(L1MessageRoot(messageRoot).chainIndex(randomChainId) != 0); } function test_registerAlreadyDeployedZKChain() public { diff --git a/l1-contracts/test/foundry/l1/integration/L1GatewayTests.t.sol b/l1-contracts/test/foundry/l1/integration/L1GatewayTests.t.sol index 62367c6552..82c9bf8ba5 100644 --- a/l1-contracts/test/foundry/l1/integration/L1GatewayTests.t.sol +++ b/l1-contracts/test/foundry/l1/integration/L1GatewayTests.t.sol @@ -2,37 +2,32 @@ pragma solidity 0.8.28; import {Test} from "forge-std/Test.sol"; -import {Vm} from "forge-std/Vm.sol"; + import "forge-std/console.sol"; import {Ownable} from "@openzeppelin/contracts-v4/access/Ownable.sol"; -import {BridgehubBurnCTMAssetData, BridgehubMintCTMAssetData, IBridgehub, L2TransactionRequestDirect, L2TransactionRequestTwoBridgesOuter} from "contracts/bridgehub/IBridgehub.sol"; -import {TestnetERC20Token} from "contracts/dev-contracts/TestnetERC20Token.sol"; -import {MailboxFacet} from "contracts/state-transition/chain-deps/facets/Mailbox.sol"; -import {GettersFacet} from "contracts/state-transition/chain-deps/facets/Getters.sol"; -import {IMailbox} from "contracts/state-transition/chain-interfaces/IMailbox.sol"; -import {IExecutor} from "contracts/state-transition/chain-interfaces/IExecutor.sol"; +import {IL1Bridgehub} from "contracts/bridgehub/IL1Bridgehub.sol"; +import {IBridgehubBase, BridgehubBurnCTMAssetData, BridgehubMintCTMAssetData, L2TransactionRequestDirect} from "contracts/bridgehub/IBridgehubBase.sol"; + import {L1ContractDeployer} from "./_SharedL1ContractDeployer.t.sol"; import {TokenDeployer} from "./_SharedTokenDeployer.t.sol"; import {ZKChainDeployer} from "./_SharedZKChainDeployer.t.sol"; import {GatewayDeployer} from "./_SharedGatewayDeployer.t.sol"; import {L2TxMocker} from "./_SharedL2TxMocker.t.sol"; -import {DEFAULT_L2_LOGS_TREE_ROOT_HASH, EMPTY_STRING_KECCAK, ETH_TOKEN_ADDRESS, REQUIRED_L2_GAS_PRICE_PER_PUBDATA, SETTLEMENT_LAYER_RELAY_SENDER} from "contracts/common/Config.sol"; +import {ETH_TOKEN_ADDRESS, SETTLEMENT_LAYER_RELAY_SENDER} from "contracts/common/Config.sol"; import {L2CanonicalTransaction, L2Message, TxStatus} from "contracts/common/Messaging.sol"; -import {L2_ASSET_ROUTER_ADDR, L2_BASE_TOKEN_SYSTEM_CONTRACT_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; -import {IL1ERC20Bridge} from "contracts/bridge/interfaces/IL1ERC20Bridge.sol"; + import {IL1AssetRouter} from "contracts/bridge/asset-router/IL1AssetRouter.sol"; import {IAssetRouterBase} from "contracts/bridge/asset-router/IAssetRouterBase.sol"; -import {FinalizeL1DepositParams, L1Nullifier} from "contracts/bridge/L1Nullifier.sol"; +import {AssetRouterBase} from "contracts/bridge/asset-router/AssetRouterBase.sol"; import {IZKChain} from "contracts/state-transition/chain-interfaces/IZKChain.sol"; import {IChainTypeManager} from "contracts/state-transition/IChainTypeManager.sol"; -import {AdminFacet} from "contracts/state-transition/chain-deps/facets/Admin.sol"; -import {AddressAliasHelper} from "contracts/vendor/AddressAliasHelper.sol"; + import {AddressesAlreadyGenerated} from "test/foundry/L1TestsErrors.sol"; -import {DataEncoding} from "contracts/common/libraries/DataEncoding.sol"; -import {IncorrectBridgeHubAddress} from "contracts/common/L1ContractErrors.sol"; + +import {NotInGatewayMode} from "contracts/bridgehub/L1BridgehubErrors.sol"; import {ChainAdmin} from "contracts/governance/ChainAdmin.sol"; import {IAdmin} from "contracts/state-transition/chain-interfaces/IAdmin.sol"; import {ConfigSemaphore} from "./utils/_ConfigSemaphore.sol"; @@ -107,8 +102,8 @@ contract L1GatewayTests is releaseConfigLock(); vm.deal(ecosystemConfig.ownerAddress, 100000000000000000000000000000000000); - migratingChain = IZKChain(IBridgehub(addresses.bridgehub).getZKChain(migratingChainId)); - gatewayChain = IZKChain(IBridgehub(addresses.bridgehub).getZKChain(gatewayChainId)); + migratingChain = IZKChain(IL1Bridgehub(addresses.bridgehub).getZKChain(migratingChainId)); + gatewayChain = IZKChain(IL1Bridgehub(addresses.bridgehub).getZKChain(gatewayChainId)); vm.deal(migratingChain.getAdmin(), 100000000000000000000000000000000000); vm.deal(gatewayChain.getAdmin(), 100000000000000000000000000000000000); @@ -153,7 +148,7 @@ contract L1GatewayTests is function test_startMessageToL2() public { _setUpGatewayWithFilterer(); gatewayScript.migrateChainToGateway(migratingChainId); - IBridgehub bridgehub = IBridgehub(addresses.bridgehub); + IL1Bridgehub bridgehub = IL1Bridgehub(addresses.bridgehub); uint256 expectedValue = 1000000000000000000000; L2TransactionRequestDirect memory request = _createL2TransactionRequestDirect( @@ -172,7 +167,7 @@ contract L1GatewayTests is gatewayScript.migrateChainToGateway(migratingChainId); // Setup - IBridgehub bridgehub = IBridgehub(addresses.bridgehub); + IL1Bridgehub bridgehub = IL1Bridgehub(addresses.bridgehub); bytes32 assetId = addresses.bridgehub.ctmAssetIdFromChainId(migratingChainId); bytes memory transferData; @@ -206,7 +201,7 @@ contract L1GatewayTests is vm.mockCall( address(addresses.bridgehub), abi.encodeWithSelector( - IBridgehub.proveL1ToL2TransactionStatus.selector, + IBridgehubBase.proveL1ToL2TransactionStatus.selector, migratingChainId, l2TxHash, l2BatchNumber, @@ -249,7 +244,7 @@ contract L1GatewayTests is } function migrateBackChain() public { - IBridgehub bridgehub = IBridgehub(addresses.bridgehub); + IL1Bridgehub bridgehub = IL1Bridgehub(addresses.bridgehub); IZKChain migratingChain = IZKChain(addresses.bridgehub.getZKChain(migratingChainId)); bytes32 assetId = addresses.bridgehub.ctmAssetIdFromChainId(migratingChainId); @@ -264,12 +259,12 @@ contract L1GatewayTests is vm.chainId(migratingChainId); vm.mockCall( address(addresses.bridgehub), - abi.encodeWithSelector(IBridgehub.proveL2MessageInclusion.selector), + abi.encodeWithSelector(IBridgehubBase.proveL2MessageInclusion.selector), abi.encode(true) ); vm.mockCall( address(addresses.bridgehub), - abi.encodeWithSelector(IBridgehub.ctmAssetIdFromChainId.selector), + abi.encodeWithSelector(IBridgehubBase.ctmAssetIdFromChainId.selector), abi.encode(assetId) ); vm.mockCall( @@ -295,7 +290,7 @@ contract L1GatewayTests is }); bytes memory bridgehubMintData = abi.encode(data); bytes memory message = abi.encodePacked( - IAssetRouterBase.finalizeDeposit.selector, + AssetRouterBase.finalizeDeposit.selector, gatewayChainId, assetId, bridgehubMintData @@ -367,8 +362,8 @@ contract L1GatewayTests is /// to increase coverage, properly tested in L2GatewayTests function test_forwardToL2OnGateway() public { _setUpGatewayWithFilterer(); - vm.chainId(12345); vm.startBroadcast(SETTLEMENT_LAYER_RELAY_SENDER); + vm.expectRevert(NotInGatewayMode.selector); addresses.bridgehub.forwardTransactionOnGateway(migratingChainId, bytes32(0), 0); vm.stopBroadcast(); } diff --git a/l1-contracts/test/foundry/l1/integration/UpgradeTestv27.t.sol b/l1-contracts/test/foundry/l1/integration/UpgradeTestv27.t.sol deleted file mode 100644 index f394726b3e..0000000000 --- a/l1-contracts/test/foundry/l1/integration/UpgradeTestv27.t.sol +++ /dev/null @@ -1,93 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -// solhint-disable no-console, gas-custom-errors - -import {Script, console2 as console} from "forge-std/Script.sol"; -import {stdToml} from "forge-std/StdToml.sol"; - -import {EcosystemUpgrade_v28} from "deploy-scripts/upgrade/EcosystemUpgrade_v28.s.sol"; -import {ChainUpgrade} from "deploy-scripts/upgrade/ChainUpgrade.s.sol"; -import {Call} from "contracts/governance/Common.sol"; -import {Test} from "forge-std/Test.sol"; - -// For now, this test is testing "stage" - as mainnet wasn't updated yet. -string constant ECOSYSTEM_INPUT = "/upgrade-envs/v0.27.0-evm/stage.toml"; -string constant ECOSYSTEM_OUTPUT = "/test/foundry/l1/integration/upgrade-envs/script-out/stage.toml"; -string constant CHAIN_INPUT = "/upgrade-envs/v0.27.0-evm/stage-era.toml"; -string constant CHAIN_OUTPUT = "/test/foundry/l1/integration/upgrade-envs/script-out/stage-era.toml"; - -contract UpgradeIntegrationTest is Test { - EcosystemUpgrade_v28 ecosystemUpgrade; - ChainUpgrade chainUpgrade; - - function setUp() public { - ecosystemUpgrade = new EcosystemUpgrade_v28(); - ecosystemUpgrade.initialize(ECOSYSTEM_INPUT, ECOSYSTEM_OUTPUT); - - chainUpgrade = new ChainUpgrade(); - } - - // NOTE: this test is currently testing "stage" - as mainnet is not upgraded yet. - function test_MainnetFork() public { - console.log("Preparing ecosystem upgrade"); - ecosystemUpgrade.prepareEcosystemUpgrade(); - - console.log("Preparing chain for the upgrade"); - chainUpgrade.prepareChain(ECOSYSTEM_INPUT, ECOSYSTEM_OUTPUT, CHAIN_INPUT, CHAIN_OUTPUT); - - // Note: stage1 calls are not used for V27 upgrade. This step will be required after Gateway launch - ( - Call[] memory upgradeGovernanceStage0Calls, - Call[] memory upgradeGovernanceStage1Calls, - Call[] memory upgradeGovernanceStage2Calls - ) = ecosystemUpgrade.prepareDefaultGovernanceCalls(); - - // console.log("Starting ecosystem upgrade stage 0!"); - // governanceMulticall(ecosystemUpgrade.getOwnerAddress(), upgradeGovernanceStage0Calls); - - console.log("Starting ecosystem upgrade stage 1!"); - governanceMulticall(ecosystemUpgrade.getOwnerAddress(), upgradeGovernanceStage1Calls); - - // console.log("Starting ecosystem upgrade stage 2!"); - - // Not needed without stage 1 - // if (ecosystemUpgrade.getGovernanceUpgradeInitialDelay() != 0) { - // vm.warp(block.timestamp + ecosystemUpgrade.getGovernanceUpgradeInitialDelay()); - // } - - // governanceMulticall(ecosystemUpgrade.getOwnerAddress(), upgradeGovernanceStage2Calls); - - console.log("Ecosystem upgrade is prepared, now all the chains have to upgrade to the new version"); - - console.log("Upgrading Era"); - - // Now, the admin of the Era needs to call the upgrade function. - // TODO: We do not include calls that ensure that the server is ready for the sake of brevity. - chainUpgrade.upgradeChain( - ecosystemUpgrade.getOldProtocolVersion(), - ecosystemUpgrade.generateUpgradeCutData(ecosystemUpgrade.getAddresses().stateTransition) - ); - - // TODO: here we should include tests that depoists work for upgraded chains - // including era specific deposit/withdraw functions - // We also may need to test that normal flow of block commit / verify / execute works (but it is hard) - // so it was tested in e2e local environment. - } - - /// @dev This is a contract that is used for additional visibility of transactions - /// that the decentralized governance should do. - function governanceMulticall(address governanceAddr, Call[] memory calls) internal { - // How the governance is implemented is out of scope here - vm.startBroadcast(governanceAddr); - - for (uint256 i = 0; i < calls.length; i++) { - Call memory call = calls[i]; - - (bool success, bytes memory data) = payable(call.target).call{value: call.value}(call.data); - require(success, "Multicall failed"); - } - - vm.stopBroadcast(); - } -} diff --git a/l1-contracts/test/foundry/l1/integration/UpgradeTestv28.t.sol b/l1-contracts/test/foundry/l1/integration/UpgradeTestv28.t.sol deleted file mode 100644 index d6712f6659..0000000000 --- a/l1-contracts/test/foundry/l1/integration/UpgradeTestv28.t.sol +++ /dev/null @@ -1,98 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -// solhint-disable no-console, gas-custom-errors - -import {Script, console2 as console} from "forge-std/Script.sol"; -import {stdToml} from "forge-std/StdToml.sol"; - -import {EcosystemUpgrade_v28} from "deploy-scripts/upgrade/EcosystemUpgrade_v28.s.sol"; -import {ChainUpgrade} from "deploy-scripts/upgrade/ChainUpgrade.s.sol"; -import {Call} from "contracts/governance/Common.sol"; -import {Test} from "forge-std/Test.sol"; - -// For now, this test is testing "stage" - as mainnet wasn't updated yet. -string constant ECOSYSTEM_INPUT = "/upgrade-envs/v0.28.0-precompiles/stage.toml"; -string constant ECOSYSTEM_OUTPUT = "/test/foundry/l1/integration/upgrade-envs/script-out/stage.toml"; -string constant CHAIN_INPUT = "/upgrade-envs/v0.28.0-precompiles/stage-gateway.toml"; -string constant CHAIN_OUTPUT = "/test/foundry/l1/integration/upgrade-envs/script-out/stage-gateway.toml"; - -contract UpgradeIntegrationTest is Test { - EcosystemUpgrade_v28 ecosystemUpgrade; - ChainUpgrade chainUpgrade; - - function setUp() public { - ecosystemUpgrade = new EcosystemUpgrade_v28(); - ecosystemUpgrade.initialize(ECOSYSTEM_INPUT, ECOSYSTEM_OUTPUT); - - chainUpgrade = new ChainUpgrade(); - } - - // NOTE: this test is currently testing "stage" - as mainnet is not upgraded yet. - function test_MainnetFork() public { - console.log("Preparing ecosystem upgrade"); - ecosystemUpgrade.prepareEcosystemUpgrade(); - - console.log("Preparing chain for the upgrade"); - chainUpgrade.prepareChain(ECOSYSTEM_INPUT, ECOSYSTEM_OUTPUT, CHAIN_INPUT, CHAIN_OUTPUT); - - // Note: stage1 calls are not used for V27 upgrade. This step will be required after Gateway launch - ( - Call[] memory upgradeGovernanceStage0Calls, - Call[] memory upgradeGovernanceStage1Calls, - Call[] memory upgradeGovernanceStage2Calls - ) = ecosystemUpgrade.prepareDefaultGovernanceCalls(); - - console.log("Starting ecosystem upgrade stage 0!"); - governanceMulticall(ecosystemUpgrade.getOwnerAddress(), upgradeGovernanceStage0Calls); - - console.log("Starting ecosystem upgrade stage 1!"); - governanceMulticall(ecosystemUpgrade.getOwnerAddress(), upgradeGovernanceStage1Calls); - - console.log("Starting ecosystem upgrade stage 2!"); - - governanceMulticall(ecosystemUpgrade.getOwnerAddress(), upgradeGovernanceStage2Calls); - - console.log("Ecosystem upgrade is prepared, now all the chains have to upgrade to the new version"); - - console.log("Upgrading gateway"); - - // Now, the admin of the Era needs to call the upgrade function. - // TODO: We do not include calls that ensure that the server is ready for the sake of brevity. - chainUpgrade.upgradeChain( - ecosystemUpgrade.getOldProtocolVersion(), - ecosystemUpgrade.generateUpgradeCutData(ecosystemUpgrade.getAddresses().stateTransition) - ); - - console.log("Creating new chain"); - address admin = ecosystemUpgrade.getBridgehubAdmin(); - vm.startPrank(admin); - Call memory createNewChainCall = ecosystemUpgrade.prepareCreateNewChainCall(555)[0]; - (bool success, bytes memory data) = payable(createNewChainCall.target).call{value: createNewChainCall.value}( - createNewChainCall.data - ); - require(success, "Create new chain call failed"); - vm.stopPrank(); - - // TODO: here we should include tests that depoists work for upgraded chains - // including era specific deposit/withdraw functions - // We also may need to test that normal flow of block commit / verify / execute works (but it is hard) - // so it was tested in e2e local environment. - } - - /// @dev This is a contract that is used for additional visibility of transactions - /// that the decentralized governance should do. - function governanceMulticall(address governanceAddr, Call[] memory calls) internal { - // How the governance is implemented is out of scope here - vm.startBroadcast(governanceAddr); - - for (uint256 i = 0; i < calls.length; i++) { - Call memory call = calls[i]; - - (bool success, bytes memory data) = payable(call.target).call{value: call.value}(call.data); - require(success, "Multicall failed"); - } - - vm.stopBroadcast(); - } -} diff --git a/l1-contracts/test/foundry/l1/integration/UpgradeTestv29.t.sol b/l1-contracts/test/foundry/l1/integration/UpgradeTestv29.t.sol index 7ad9904111..f127ce1a41 100644 --- a/l1-contracts/test/foundry/l1/integration/UpgradeTestv29.t.sol +++ b/l1-contracts/test/foundry/l1/integration/UpgradeTestv29.t.sol @@ -3,8 +3,7 @@ pragma solidity ^0.8.24; // solhint-disable no-console, gas-custom-errors -import {Script, console2 as console} from "forge-std/Script.sol"; -import {stdToml} from "forge-std/StdToml.sol"; +import {console2 as console} from "forge-std/Script.sol"; import {EcosystemUpgrade_v29} from "deploy-scripts/upgrade/EcosystemUpgrade_v29.s.sol"; import {ChainUpgrade} from "deploy-scripts/upgrade/ChainUpgrade.s.sol"; diff --git a/l1-contracts/test/foundry/l1/integration/_GatewayPreparationForTests.sol b/l1-contracts/test/foundry/l1/integration/_GatewayPreparationForTests.sol index 856e4af1c4..0467ce1147 100644 --- a/l1-contracts/test/foundry/l1/integration/_GatewayPreparationForTests.sol +++ b/l1-contracts/test/foundry/l1/integration/_GatewayPreparationForTests.sol @@ -2,7 +2,7 @@ import {stdToml} from "forge-std/StdToml.sol"; import {Script, console2 as console} from "forge-std/Script.sol"; import {GatewayGovernanceUtils} from "deploy-scripts/gateway/GatewayGovernanceUtils.s.sol"; -import {Bridgehub} from "contracts/bridgehub/Bridgehub.sol"; +import {L1Bridgehub} from "contracts/bridgehub/L1Bridgehub.sol"; import {DeployGatewayTransactionFilterer} from "deploy-scripts/gateway/DeployGatewayTransactionFilterer.s.sol"; @@ -43,7 +43,7 @@ contract GatewayPreparationForTests is Script, GatewayGovernanceUtils { function governanceRegisterGateway() public { Call[] memory calls = _getRegisterSettlementLayerCalls(); - Utils.executeCalls(Bridgehub(_gatewayGovernanceConfig.bridgehubProxy).owner(), bytes32(0), 0, calls); + Utils.executeCalls(L1Bridgehub(_gatewayGovernanceConfig.bridgehubProxy).owner(), bytes32(0), 0, calls); } function deployAndSetGatewayTransactionFilterer() public { @@ -79,7 +79,7 @@ contract GatewayPreparationForTests is Script, GatewayGovernanceUtils { address[] memory addressesToGrantWhitelist = new address[](2); addressesToGrantWhitelist[0] = _gatewayGovernanceConfig.ctmDeploymentTrackerProxy; - addressesToGrantWhitelist[1] = Bridgehub(_gatewayGovernanceConfig.bridgehubProxy).owner(); + addressesToGrantWhitelist[1] = L1Bridgehub(_gatewayGovernanceConfig.bridgehubProxy).owner(); adminScript.grantGatewayWhitelist( _gatewayGovernanceConfig.bridgehubProxy, @@ -116,10 +116,10 @@ contract GatewayPreparationForTests is Script, GatewayGovernanceUtils { // Some non-zero address _gatewayServerNotifier: address(uint160(1)), _refundRecipient: msg.sender, - _ctmChainId: 0 + _ctmRepresentativeChainId: 0 }) ); - Utils.executeCalls(Bridgehub(_gatewayGovernanceConfig.bridgehubProxy).owner(), bytes32(0), 0, calls); + Utils.executeCalls(L1Bridgehub(_gatewayGovernanceConfig.bridgehubProxy).owner(), bytes32(0), 0, calls); } function run() public { diff --git a/l1-contracts/test/foundry/l1/integration/_SharedGatewayDeployer.t.sol b/l1-contracts/test/foundry/l1/integration/_SharedGatewayDeployer.t.sol index 25a8ca1ed7..2ec3fc680e 100644 --- a/l1-contracts/test/foundry/l1/integration/_SharedGatewayDeployer.t.sol +++ b/l1-contracts/test/foundry/l1/integration/_SharedGatewayDeployer.t.sol @@ -3,7 +3,7 @@ pragma solidity 0.8.28; import {L1ContractDeployer} from "./_SharedL1ContractDeployer.t.sol"; import {GatewayPreparationForTests} from "./_GatewayPreparationForTests.sol"; -import {ETH_TOKEN_ADDRESS} from "contracts/common/Config.sol"; + import "@openzeppelin/contracts-v4/utils/Strings.sol"; contract GatewayDeployer is L1ContractDeployer { diff --git a/l1-contracts/test/foundry/l1/integration/_SharedL1ContractDeployer.t.sol b/l1-contracts/test/foundry/l1/integration/_SharedL1ContractDeployer.t.sol index ada0f99b33..4df736f1ae 100644 --- a/l1-contracts/test/foundry/l1/integration/_SharedL1ContractDeployer.t.sol +++ b/l1-contracts/test/foundry/l1/integration/_SharedL1ContractDeployer.t.sol @@ -1,12 +1,12 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.28; -import {StdStorage, Test, stdStorage, console} from "forge-std/Test.sol"; +import {StdStorage, Test, stdStorage} from "forge-std/Test.sol"; import {DeployL1CoreContractsIntegrationScript} from "./deploy-scripts/DeployL1CoreContractsIntegration.s.sol"; +import {L1Bridgehub} from "contracts/bridgehub/L1Bridgehub.sol"; import {DeployCTMIntegrationScript} from "./deploy-scripts/DeployCTMIntegration.s.sol"; import {RegisterCTM} from "deploy-scripts/RegisterCTM.s.sol"; -import {Bridgehub} from "contracts/bridgehub/Bridgehub.sol"; import {L1AssetRouter} from "contracts/bridge/asset-router/L1AssetRouter.sol"; import {L1Nullifier} from "contracts/bridge/L1Nullifier.sol"; import {L1NativeTokenVault} from "contracts/bridge/ntv/L1NativeTokenVault.sol"; @@ -25,7 +25,7 @@ contract L1ContractDeployer is Test { DeployedAddresses ecosystemAddresses; address bridgehubProxyAddress; address bridgehubOwnerAddress; - Bridgehub bridgehub; + L1Bridgehub bridgehub; CTMDeploymentTracker ctmDeploymentTracker; L1AssetRouter sharedBridge; L1Nullifier l1Nullifier; @@ -75,7 +75,7 @@ contract L1ContractDeployer is Test { ecosystemConfig = ctmScript.getConfig(); - addresses.bridgehub = Bridgehub(addresses.ecosystemAddresses.bridgehub.bridgehubProxy); + addresses.bridgehub = L1Bridgehub(addresses.ecosystemAddresses.bridgehub.bridgehubProxy); addresses.chainTypeManager = IChainTypeManager( addresses.ecosystemAddresses.stateTransition.chainTypeManagerProxy ); diff --git a/l1-contracts/test/foundry/l1/integration/_SharedL2TxMocker.t.sol b/l1-contracts/test/foundry/l1/integration/_SharedL2TxMocker.t.sol index 6aadf4a3aa..54cc22f1ea 100644 --- a/l1-contracts/test/foundry/l1/integration/_SharedL2TxMocker.t.sol +++ b/l1-contracts/test/foundry/l1/integration/_SharedL2TxMocker.t.sol @@ -2,7 +2,7 @@ pragma solidity 0.8.28; import {Test} from "forge-std/Test.sol"; -import {L2TransactionRequestDirect, L2TransactionRequestTwoBridgesOuter} from "contracts/bridgehub/IBridgehub.sol"; +import {L2TransactionRequestDirect, L2TransactionRequestTwoBridgesOuter} from "contracts/bridgehub/IBridgehubBase.sol"; import {REQUIRED_L2_GAS_PRICE_PER_PUBDATA} from "contracts/common/Config.sol"; contract L2TxMocker is Test { diff --git a/l1-contracts/test/foundry/l1/integration/_SharedZKChainDeployer.t.sol b/l1-contracts/test/foundry/l1/integration/_SharedZKChainDeployer.t.sol index 7f48792b6a..55d44678cd 100644 --- a/l1-contracts/test/foundry/l1/integration/_SharedZKChainDeployer.t.sol +++ b/l1-contracts/test/foundry/l1/integration/_SharedZKChainDeployer.t.sol @@ -6,7 +6,7 @@ import {StdStorage, stdStorage} from "forge-std/Test.sol"; import {L1ContractDeployer} from "./_SharedL1ContractDeployer.t.sol"; import {Config as ChainConfig, RegisterZKChainScript} from "deploy-scripts/RegisterZKChain.s.sol"; import {ETH_TOKEN_ADDRESS} from "contracts/common/Config.sol"; -import {DataEncoding} from "contracts/common/libraries/DataEncoding.sol"; + import "@openzeppelin/contracts-v4/utils/Strings.sol"; import {IZKChain} from "contracts/state-transition/chain-interfaces/IZKChain.sol"; import {Diamond} from "contracts/state-transition/libraries/Diamond.sol"; @@ -23,8 +23,10 @@ contract ZKChainDeployer is L1ContractDeployer { address baseToken; uint256 bridgehubCreateNewChainSalt; bool validiumMode; - address validatorSenderOperatorCommitEth; + address validatorSenderOperatorEth; address validatorSenderOperatorBlobsEth; + address validatorSenderOperatorProve; + address validatorSenderOperatorExecute; uint128 baseTokenGasPriceMultiplierNominator; uint128 baseTokenGasPriceMultiplierDenominator; bool allowEvmEmulator; @@ -86,8 +88,10 @@ contract ZKChainDeployer is L1ContractDeployer { baseToken: __baseToken, bridgehubCreateNewChainSalt: __salt, validiumMode: false, - validatorSenderOperatorCommitEth: address(0), + validatorSenderOperatorEth: address(0), validatorSenderOperatorBlobsEth: address(1), + validatorSenderOperatorProve: address(2), + validatorSenderOperatorExecute: address(3), baseTokenGasPriceMultiplierNominator: uint128(1), baseTokenGasPriceMultiplierDenominator: uint128(1), allowEvmEmulator: false @@ -109,16 +113,14 @@ contract ZKChainDeployer is L1ContractDeployer { } vm.serializeUint("chain", "validium_mode", validiumMode); - vm.serializeAddress( - "chain", - "validator_sender_operator_commit_eth", - description.validatorSenderOperatorCommitEth - ); + vm.serializeAddress("chain", "validator_sender_operator_eth", description.validatorSenderOperatorEth); vm.serializeAddress( "chain", "validator_sender_operator_blobs_eth", description.validatorSenderOperatorBlobsEth ); + vm.serializeAddress("chain", "validator_sender_operator_prove", description.validatorSenderOperatorProve); + vm.serializeAddress("chain", "validator_sender_operator_execute", description.validatorSenderOperatorExecute); vm.serializeUint( "chain", "base_token_gas_price_multiplier_nominator", diff --git a/l1-contracts/test/foundry/l1/integration/deploy-scripts/DeployL1CoreContractsIntegration.s.sol b/l1-contracts/test/foundry/l1/integration/deploy-scripts/DeployL1CoreContractsIntegration.s.sol index e11a5420cc..b64fc3a4b1 100644 --- a/l1-contracts/test/foundry/l1/integration/deploy-scripts/DeployL1CoreContractsIntegration.s.sol +++ b/l1-contracts/test/foundry/l1/integration/deploy-scripts/DeployL1CoreContractsIntegration.s.sol @@ -7,7 +7,6 @@ import {Script} from "forge-std/Script.sol"; import {stdToml} from "forge-std/StdToml.sol"; import {DeployL1CoreContractsScript} from "deploy-scripts/DeployL1CoreContracts.s.sol"; -import {StateTransitionDeployedAddresses} from "deploy-scripts/Utils.sol"; contract DeployL1CoreContractsIntegrationScript is Script, DeployL1CoreContractsScript { using stdToml for string; diff --git a/l1-contracts/test/foundry/l1/integration/deploy-scripts/script-config/config-deploy-l1.toml b/l1-contracts/test/foundry/l1/integration/deploy-scripts/script-config/config-deploy-l1.toml index 5dbd37b361..2fb9bb14b2 100644 --- a/l1-contracts/test/foundry/l1/integration/deploy-scripts/script-config/config-deploy-l1.toml +++ b/l1-contracts/test/foundry/l1/integration/deploy-scripts/script-config/config-deploy-l1.toml @@ -2,6 +2,7 @@ era_chain_id = 9 owner_address = "0x70997970C51812dc3A010C7d01b50e0d17dc79C8" testnet_verifier = true support_l2_legacy_shared_bridge_test = false +is_zk_sync_os = false [gateway] chain_id = 123 diff --git a/l1-contracts/test/foundry/l1/integration/l2-tests-abstract/L2Erc20TestAbstract.t.sol b/l1-contracts/test/foundry/l1/integration/l2-tests-abstract/L2Erc20TestAbstract.t.sol index b808277092..60d3b21cc0 100644 --- a/l1-contracts/test/foundry/l1/integration/l2-tests-abstract/L2Erc20TestAbstract.t.sol +++ b/l1-contracts/test/foundry/l1/integration/l2-tests-abstract/L2Erc20TestAbstract.t.sol @@ -10,26 +10,14 @@ import {BridgedStandardERC20} from "contracts/bridge/BridgedStandardERC20.sol"; import {L2AssetRouter} from "contracts/bridge/asset-router/L2AssetRouter.sol"; import {IL2NativeTokenVault} from "contracts/bridge/ntv/IL2NativeTokenVault.sol"; -import {UpgradeableBeacon} from "@openzeppelin/contracts-v4/proxy/beacon/UpgradeableBeacon.sol"; -import {BeaconProxy} from "@openzeppelin/contracts-v4/proxy/beacon/BeaconProxy.sol"; import {DataEncoding} from "contracts/common/libraries/DataEncoding.sol"; -import {L2_ASSET_ROUTER_ADDR, L2_BRIDGEHUB_ADDR, L2_NATIVE_TOKEN_VAULT_ADDR, L2_TO_L1_MESSENGER_SYSTEM_CONTRACT_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; -import {ETH_TOKEN_ADDRESS, SETTLEMENT_LAYER_RELAY_SENDER} from "contracts/common/Config.sol"; +import {L2_ASSET_ROUTER_ADDR, L2_NATIVE_TOKEN_VAULT_ADDR, L2_TO_L1_MESSENGER_SYSTEM_CONTRACT_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; -import {AddressAliasHelper} from "contracts/vendor/AddressAliasHelper.sol"; -import {BridgehubMintCTMAssetData, IBridgehub} from "contracts/bridgehub/IBridgehub.sol"; -import {IAdmin} from "contracts/state-transition/chain-interfaces/IAdmin.sol"; import {IL2AssetRouter} from "contracts/bridge/asset-router/IL2AssetRouter.sol"; -import {IL1Nullifier} from "contracts/bridge/interfaces/IL1Nullifier.sol"; -import {IL1AssetRouter} from "contracts/bridge/asset-router/IL1AssetRouter.sol"; import {SharedL2ContractDeployer} from "./_SharedL2ContractDeployer.sol"; -import {IChainTypeManager} from "contracts/state-transition/IChainTypeManager.sol"; -import {IZKChain} from "contracts/state-transition/chain-interfaces/IZKChain.sol"; -import {SystemContractsArgs} from "./Utils.sol"; -import {DeployUtils} from "deploy-scripts/DeployUtils.s.sol"; import {TestnetERC20Token} from "contracts/dev-contracts/TestnetERC20Token.sol"; abstract contract L2Erc20TestAbstract is Test, SharedL2ContractDeployer { diff --git a/l1-contracts/test/foundry/l1/integration/l2-tests-abstract/L2GatewayTestAbstract.t.sol b/l1-contracts/test/foundry/l1/integration/l2-tests-abstract/L2GatewayTestAbstract.t.sol index ed66a85cdc..f4d40a313a 100644 --- a/l1-contracts/test/foundry/l1/integration/l2-tests-abstract/L2GatewayTestAbstract.t.sol +++ b/l1-contracts/test/foundry/l1/integration/l2-tests-abstract/L2GatewayTestAbstract.t.sol @@ -4,34 +4,20 @@ pragma solidity ^0.8.20; // solhint-disable gas-custom-errors -import {StdStorage, Test, stdStorage, console2 as console} from "forge-std/Test.sol"; +import {StdStorage, Test, console2 as console, stdStorage} from "forge-std/Test.sol"; import "forge-std/console.sol"; -import {BridgedStandardERC20} from "contracts/bridge/BridgedStandardERC20.sol"; -import {L2AssetRouter} from "contracts/bridge/asset-router/L2AssetRouter.sol"; -import {IL2NativeTokenVault} from "contracts/bridge/ntv/IL2NativeTokenVault.sol"; +import {L2_ASSET_ROUTER_ADDR, L2_BRIDGEHUB_ADDR, L2_TO_L1_MESSENGER_SYSTEM_CONTRACT} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; +import {SETTLEMENT_LAYER_RELAY_SENDER, ZKChainCommitment} from "contracts/common/Config.sol"; -import {UpgradeableBeacon} from "@openzeppelin/contracts-v4/proxy/beacon/UpgradeableBeacon.sol"; -import {BeaconProxy} from "@openzeppelin/contracts-v4/proxy/beacon/BeaconProxy.sol"; +import {BridgehubBurnCTMAssetData, BridgehubMintCTMAssetData, IBridgehubBase} from "contracts/bridgehub/IBridgehubBase.sol"; +import {BridgehubBase} from "contracts/bridgehub/BridgehubBase.sol"; -import {L2_ASSET_ROUTER_ADDR, L2_BRIDGEHUB_ADDR, L2_NATIVE_TOKEN_VAULT_ADDR, L2_TO_L1_MESSENGER_SYSTEM_CONTRACT} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; -import {L1_SETTLEMENT_LAYER_VIRTUAL_ADDRESS} from "contracts/common/Config.sol"; -import {ETH_TOKEN_ADDRESS, SETTLEMENT_LAYER_RELAY_SENDER, ZKChainCommitment} from "contracts/common/Config.sol"; - -import {AddressAliasHelper} from "contracts/vendor/AddressAliasHelper.sol"; -import {BridgehubBurnCTMAssetData, BridgehubMintCTMAssetData, IBridgehub} from "contracts/bridgehub/IBridgehub.sol"; -import {IAdmin} from "contracts/state-transition/chain-interfaces/IAdmin.sol"; -import {IL2AssetRouter} from "contracts/bridge/asset-router/IL2AssetRouter.sol"; import {IAssetRouterBase} from "contracts/bridge/asset-router/IAssetRouterBase.sol"; -import {IL1Nullifier} from "contracts/bridge/interfaces/IL1Nullifier.sol"; -import {IL1AssetRouter} from "contracts/bridge/asset-router/IL1AssetRouter.sol"; +import {AssetRouterBase} from "contracts/bridge/asset-router/AssetRouterBase.sol"; import {SharedL2ContractDeployer} from "./_SharedL2ContractDeployer.sol"; -import {IChainTypeManager} from "contracts/state-transition/IChainTypeManager.sol"; -import {IZKChain} from "contracts/state-transition/chain-interfaces/IZKChain.sol"; -import {SystemContractsArgs} from "./Utils.sol"; -import {DeployUtils} from "deploy-scripts/DeployUtils.s.sol"; import {GettersFacet} from "contracts/state-transition/chain-deps/facets/Getters.sol"; abstract contract L2GatewayTestAbstract is Test, SharedL2ContractDeployer { @@ -64,7 +50,7 @@ abstract contract L2GatewayTestAbstract is Test, SharedL2ContractDeployer { // todo fix this test finalizeDeposit(); vm.prank(SETTLEMENT_LAYER_RELAY_SENDER); - l2Bridgehub.forwardTransactionOnGateway(mintChainId, bytes32(0), 0); + BridgehubBase(address(l2Bridgehub)).forwardTransactionOnGateway(mintChainId, bytes32(0), 0); } function test_withdrawFromGateway() public { @@ -105,7 +91,7 @@ abstract contract L2GatewayTestAbstract is Test, SharedL2ContractDeployer { chainData: chainData }); vm.prank(aliasedL1AssetRouter); - l2AssetRouter.finalizeDeposit(L1_CHAIN_ID, ctmAssetId, abi.encode(data)); + AssetRouterBase(address(l2AssetRouter)).finalizeDeposit(L1_CHAIN_ID, ctmAssetId, abi.encode(data)); } function test_finalizeDepositWithRealChainData() public { @@ -121,9 +107,11 @@ abstract contract L2GatewayTestAbstract is Test, SharedL2ContractDeployer { .with_key(assetId) .checked_write(L2_BRIDGEHUB_ADDR); - stdstore.target(L2_BRIDGEHUB_ADDR).sig(IBridgehub.ctmAssetIdToAddress.selector).with_key(assetId).checked_write( - address(chainTypeManager) - ); + stdstore + .target(L2_BRIDGEHUB_ADDR) + .sig(IBridgehubBase.ctmAssetIdToAddress.selector) + .with_key(assetId) + .checked_write(address(chainTypeManager)); (bool success, ) = recipient.call(data); } diff --git a/l1-contracts/test/foundry/l1/integration/l2-tests-abstract/L2NativeTokenVaultTestAbstract.t.sol b/l1-contracts/test/foundry/l1/integration/l2-tests-abstract/L2NativeTokenVaultTestAbstract.t.sol index 7bf6aece59..cb3170fb05 100644 --- a/l1-contracts/test/foundry/l1/integration/l2-tests-abstract/L2NativeTokenVaultTestAbstract.t.sol +++ b/l1-contracts/test/foundry/l1/integration/l2-tests-abstract/L2NativeTokenVaultTestAbstract.t.sol @@ -9,29 +9,19 @@ import "forge-std/console.sol"; // import {BridgedStandardERC20} from "contracts/bridge/BridgedStandardERC20.sol"; // import {L2AssetRouter} from "contracts/bridge/asset-router/L2AssetRouter.sol"; -import {IL2NativeTokenVault} from "contracts/bridge/ntv/IL2NativeTokenVault.sol"; -import {INativeTokenVault} from "contracts/bridge/ntv/INativeTokenVault.sol"; +import {L2NativeTokenVault} from "contracts/bridge/ntv/L2NativeTokenVault.sol"; +import {INativeTokenVaultBase} from "contracts/bridge/ntv/INativeTokenVaultBase.sol"; import {DataEncoding} from "contracts/common/libraries/DataEncoding.sol"; import {IBridgedStandardToken} from "contracts/bridge/interfaces/IBridgedStandardToken.sol"; // import {UpgradeableBeacon} from "@openzeppelin/contracts-v4/proxy/beacon/UpgradeableBeacon.sol"; // import {BeaconProxy} from "@openzeppelin/contracts-v4/proxy/beacon/BeaconProxy.sol"; -import {L2_ASSET_ROUTER_ADDR, L2_BRIDGEHUB_ADDR, L2_NATIVE_TOKEN_VAULT_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; -import {ETH_TOKEN_ADDRESS, SETTLEMENT_LAYER_RELAY_SENDER} from "contracts/common/Config.sol"; - // import {AddressAliasHelper} from "contracts/vendor/AddressAliasHelper.sol"; -import {BridgehubMintCTMAssetData, IBridgehub} from "contracts/bridgehub/IBridgehub.sol"; -import {IAdmin} from "contracts/state-transition/chain-interfaces/IAdmin.sol"; -import {IL2AssetRouter} from "contracts/bridge/asset-router/IL2AssetRouter.sol"; -import {IL1Nullifier} from "contracts/bridge/interfaces/IL1Nullifier.sol"; -import {IL1AssetRouter} from "contracts/bridge/asset-router/IL1AssetRouter.sol"; import {SharedL2ContractDeployer} from "./_SharedL2ContractDeployer.sol"; -import {IChainTypeManager} from "contracts/state-transition/IChainTypeManager.sol"; -import {IZKChain} from "contracts/state-transition/chain-interfaces/IZKChain.sol"; -import {BridgeMintNotImplemented, TokenIsLegacy, TokenNotLegacy, Unauthorized} from "contracts/common/L1ContractErrors.sol"; +import {TokenIsLegacy, TokenNotLegacy} from "contracts/common/L1ContractErrors.sol"; import {IL2SharedBridgeLegacy} from "contracts/bridge/interfaces/IL2SharedBridgeLegacy.sol"; import {IAssetHandler} from "contracts/bridge/interfaces/IAssetHandler.sol"; @@ -47,13 +37,13 @@ abstract contract L2NativeTokenVaultTestAbstract is Test, SharedL2ContractDeploy abi.encodeCall(IL2SharedBridgeLegacy.l1TokenAddress, (l2Token)), abi.encode(l1Token) ); - IL2NativeTokenVault(addresses.vaults.l1NativeTokenVaultProxy).setLegacyTokenAssetId(l2Token); + L2NativeTokenVault(addresses.vaults.l1NativeTokenVaultProxy).setLegacyTokenAssetId(l2Token); } function test_registerLegacyToken_IncorrectConfiguration() external { address l2Token = makeAddr("l2Token"); address l1Token = makeAddr("l1Token"); - INativeTokenVault l2NativeTokenVault = INativeTokenVault(addresses.vaults.l1NativeTokenVaultProxy); + L2NativeTokenVault l2NativeTokenVault = L2NativeTokenVault(addresses.vaults.l1NativeTokenVaultProxy); bytes32 assetId = DataEncoding.encodeNTVAssetId(L1_CHAIN_ID, l1Token); @@ -63,13 +53,13 @@ abstract contract L2NativeTokenVaultTestAbstract is Test, SharedL2ContractDeploy stdstore .target(address(addresses.vaults.l1NativeTokenVaultProxy)) - .sig(INativeTokenVault.tokenAddress.selector) + .sig(INativeTokenVaultBase.tokenAddress.selector) .with_key(assetId) .checked_write(l2Token); stdstore .target(address(addresses.vaults.l1NativeTokenVaultProxy)) - .sig(INativeTokenVault.assetId.selector) + .sig(INativeTokenVaultBase.assetId.selector) .with_key(l2Token) .checked_write(assetId); @@ -81,7 +71,7 @@ abstract contract L2NativeTokenVaultTestAbstract is Test, SharedL2ContractDeploy abi.encodeCall(IL2SharedBridgeLegacy.l1TokenAddress, (l2Token)), abi.encode(l1Token) ); - IL2NativeTokenVault(addresses.vaults.l1NativeTokenVaultProxy).setLegacyTokenAssetId(l2Token); + L2NativeTokenVault(addresses.vaults.l1NativeTokenVaultProxy).setLegacyTokenAssetId(l2Token); assertNotEq(l2NativeTokenVault.originChainId(assetId), 0); assertNotEq(l2NativeTokenVault.tokenAddress(assetId), address(0)); @@ -91,7 +81,7 @@ abstract contract L2NativeTokenVaultTestAbstract is Test, SharedL2ContractDeploy function test_registerLegacyTokenRevertNotLegacy() external { address l2Token = makeAddr("l2Token"); vm.expectRevert(TokenNotLegacy.selector); - IL2NativeTokenVault(addresses.vaults.l1NativeTokenVaultProxy).setLegacyTokenAssetId(l2Token); + L2NativeTokenVault(addresses.vaults.l1NativeTokenVaultProxy).setLegacyTokenAssetId(l2Token); } function test_registerTokenRevertIsLegacy() external { @@ -104,11 +94,11 @@ abstract contract L2NativeTokenVaultTestAbstract is Test, SharedL2ContractDeploy ); vm.expectRevert(TokenIsLegacy.selector); - INativeTokenVault(addresses.vaults.l1NativeTokenVaultProxy).registerToken(l2Token); + INativeTokenVaultBase(addresses.vaults.l1NativeTokenVaultProxy).registerToken(l2Token); } function test_bridgeMint_CorrectlyConfiguresL2LegacyToken() external { - INativeTokenVault l2NativeTokenVault = INativeTokenVault(addresses.vaults.l1NativeTokenVaultProxy); + L2NativeTokenVault l2NativeTokenVault = L2NativeTokenVault(addresses.vaults.l1NativeTokenVaultProxy); uint256 originChainId = L1_CHAIN_ID; address originToken = makeAddr("l1Token"); diff --git a/l1-contracts/test/foundry/l1/integration/l2-tests-abstract/L2WethTestAbstract.t.sol b/l1-contracts/test/foundry/l1/integration/l2-tests-abstract/L2WethTestAbstract.t.sol index c447dd9b58..a409837416 100644 --- a/l1-contracts/test/foundry/l1/integration/l2-tests-abstract/L2WethTestAbstract.t.sol +++ b/l1-contracts/test/foundry/l1/integration/l2-tests-abstract/L2WethTestAbstract.t.sol @@ -7,27 +7,10 @@ pragma solidity ^0.8.20; import {Test} from "forge-std/Test.sol"; import "forge-std/console.sol"; -import {BridgedStandardERC20} from "contracts/bridge/BridgedStandardERC20.sol"; -import {L2AssetRouter} from "contracts/bridge/asset-router/L2AssetRouter.sol"; -import {IL2NativeTokenVault} from "contracts/bridge/ntv/IL2NativeTokenVault.sol"; - import {BridgeMintNotImplemented, Unauthorized} from "contracts/common/L1ContractErrors.sol"; -import {L2_ASSET_ROUTER_ADDR, L2_BRIDGEHUB_ADDR, L2_NATIVE_TOKEN_VAULT_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; -import {ETH_TOKEN_ADDRESS, SETTLEMENT_LAYER_RELAY_SENDER} from "contracts/common/Config.sol"; - -import {AddressAliasHelper} from "contracts/vendor/AddressAliasHelper.sol"; -import {BridgehubMintCTMAssetData, IBridgehub} from "contracts/bridgehub/IBridgehub.sol"; -import {IAdmin} from "contracts/state-transition/chain-interfaces/IAdmin.sol"; -import {IL2AssetRouter} from "contracts/bridge/asset-router/IL2AssetRouter.sol"; -import {IL1Nullifier} from "contracts/bridge/interfaces/IL1Nullifier.sol"; -import {IL1AssetRouter} from "contracts/bridge/asset-router/IL1AssetRouter.sol"; +import {L2_ASSET_ROUTER_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; import {SharedL2ContractDeployer} from "./_SharedL2ContractDeployer.sol"; -import {IChainTypeManager} from "contracts/state-transition/IChainTypeManager.sol"; -import {IZKChain} from "contracts/state-transition/chain-interfaces/IZKChain.sol"; -import {SystemContractsArgs} from "./Utils.sol"; - -import {DeployUtils} from "deploy-scripts/DeployUtils.s.sol"; abstract contract L2WethTestAbstract is Test, SharedL2ContractDeployer { function test_shouldDepositWethByCallingDeposit() public { diff --git a/l1-contracts/test/foundry/l1/integration/l2-tests-abstract/Utils.sol b/l1-contracts/test/foundry/l1/integration/l2-tests-abstract/Utils.sol index 8fa69d7d7d..77e5f51ab4 100644 --- a/l1-contracts/test/foundry/l1/integration/l2-tests-abstract/Utils.sol +++ b/l1-contracts/test/foundry/l1/integration/l2-tests-abstract/Utils.sol @@ -14,4 +14,5 @@ struct SystemContractsArgs { address aliasedOwner; bool contractsDeployedAlready; address l1CtmDeployer; + uint256 maxNumberOfZKChains; } diff --git a/l1-contracts/test/foundry/l1/integration/l2-tests-abstract/_SharedL2ContractDeployer.sol b/l1-contracts/test/foundry/l1/integration/l2-tests-abstract/_SharedL2ContractDeployer.sol index a78b55dc6a..2e4b052329 100644 --- a/l1-contracts/test/foundry/l1/integration/l2-tests-abstract/_SharedL2ContractDeployer.sol +++ b/l1-contracts/test/foundry/l1/integration/l2-tests-abstract/_SharedL2ContractDeployer.sol @@ -15,11 +15,12 @@ import {UpgradeableBeacon} from "@openzeppelin/contracts-v4/proxy/beacon/Upgrade import {BeaconProxy} from "@openzeppelin/contracts-v4/proxy/beacon/BeaconProxy.sol"; import {L2_ASSET_ROUTER_ADDR, L2_BRIDGEHUB_ADDR, L2_CHAIN_ASSET_HANDLER_ADDR, L2_NATIVE_TOKEN_VAULT_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; -import {ETH_TOKEN_ADDRESS, SETTLEMENT_LAYER_RELAY_SENDER} from "contracts/common/Config.sol"; +import {ETH_TOKEN_ADDRESS} from "contracts/common/Config.sol"; import {AddressAliasHelper} from "contracts/vendor/AddressAliasHelper.sol"; -import {BridgehubMintCTMAssetData, IBridgehub} from "contracts/bridgehub/IBridgehub.sol"; -import {IAdmin} from "contracts/state-transition/chain-interfaces/IAdmin.sol"; +import {IL2Bridgehub} from "contracts/bridgehub/IL2Bridgehub.sol"; +import {IBridgehubBase} from "contracts/bridgehub/IBridgehubBase.sol"; + import {IL2AssetRouter} from "contracts/bridge/asset-router/IL2AssetRouter.sol"; import {IL1Nullifier} from "contracts/bridge/interfaces/IL1Nullifier.sol"; import {IL1AssetRouter} from "contracts/bridge/asset-router/IL1AssetRouter.sol"; @@ -34,7 +35,6 @@ import {IChainTypeManager} from "contracts/state-transition/IChainTypeManager.so import {IZKChain} from "contracts/state-transition/chain-interfaces/IZKChain.sol"; import {SystemContractsArgs} from "./Utils.sol"; -import {DeployUtils} from "deploy-scripts/DeployUtils.s.sol"; import {DeployIntegrationUtils} from "../deploy-scripts/DeployIntegrationUtils.s.sol"; abstract contract SharedL2ContractDeployer is Test, DeployIntegrationUtils { @@ -50,7 +50,7 @@ abstract contract SharedL2ContractDeployer is Test, DeployIntegrationUtils { BeaconProxy internal proxy; IL2AssetRouter l2AssetRouter = IL2AssetRouter(L2_ASSET_ROUTER_ADDR); - IBridgehub l2Bridgehub = IBridgehub(L2_BRIDGEHUB_ADDR); + IL2Bridgehub l2Bridgehub = IL2Bridgehub(L2_BRIDGEHUB_ADDR); uint256 internal constant L1_CHAIN_ID = 10; // it cannot be 9, the default block.chainid uint256 internal ERA_CHAIN_ID = 270; @@ -77,7 +77,7 @@ abstract contract SharedL2ContractDeployer is Test, DeployIntegrationUtils { IChainTypeManager internal chainTypeManager; - function setUp() public { + function setUp() public virtual { standardErc20Impl = new BridgedStandardERC20(); beacon = new UpgradeableBeacon(address(standardErc20Impl)); beacon.transferOwnership(ownerWallet); @@ -110,7 +110,8 @@ abstract contract SharedL2ContractDeployer is Test, DeployIntegrationUtils { l2TokenProxyBytecodeHash: beaconProxyBytecodeHash, aliasedOwner: ownerWallet, contractsDeployedAlready: false, - l1CtmDeployer: l1CTMDeployer + l1CtmDeployer: l1CTMDeployer, + maxNumberOfZKChains: 100 }) ); deployL2Contracts(L1_CHAIN_ID); @@ -143,7 +144,7 @@ abstract contract SharedL2ContractDeployer is Test, DeployIntegrationUtils { ); vm.mockCall( L2_BRIDGEHUB_ADDR, - abi.encodeWithSelector(IBridgehub.baseToken.selector, ERA_CHAIN_ID + 1), + abi.encodeWithSelector(IBridgehubBase.baseToken.selector, ERA_CHAIN_ID + 1), abi.encode(address(uint160(1))) ); diff --git a/l1-contracts/test/foundry/l1/integration/l2-tests-in-l1-context/L2Erc20L1Test.t.sol b/l1-contracts/test/foundry/l1/integration/l2-tests-in-l1-context/L2Erc20L1Test.t.sol index b886146e78..9a50a1cf6f 100644 --- a/l1-contracts/test/foundry/l1/integration/l2-tests-in-l1-context/L2Erc20L1Test.t.sol +++ b/l1-contracts/test/foundry/l1/integration/l2-tests-in-l1-context/L2Erc20L1Test.t.sol @@ -7,26 +7,8 @@ pragma solidity ^0.8.20; import {Test} from "forge-std/Test.sol"; import "forge-std/console.sol"; -import {BridgedStandardERC20} from "contracts/bridge/BridgedStandardERC20.sol"; -import {L2AssetRouter} from "contracts/bridge/asset-router/L2AssetRouter.sol"; -import {IL2NativeTokenVault} from "contracts/bridge/ntv/IL2NativeTokenVault.sol"; - -import {UpgradeableBeacon} from "@openzeppelin/contracts-v4/proxy/beacon/UpgradeableBeacon.sol"; -import {BeaconProxy} from "@openzeppelin/contracts-v4/proxy/beacon/BeaconProxy.sol"; - -import {L2_ASSET_ROUTER_ADDR, L2_BRIDGEHUB_ADDR, L2_NATIVE_TOKEN_VAULT_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; -import {ETH_TOKEN_ADDRESS, SETTLEMENT_LAYER_RELAY_SENDER} from "contracts/common/Config.sol"; - -import {AddressAliasHelper} from "contracts/vendor/AddressAliasHelper.sol"; -import {BridgehubMintCTMAssetData, IBridgehub} from "contracts/bridgehub/IBridgehub.sol"; -import {IAdmin} from "contracts/state-transition/chain-interfaces/IAdmin.sol"; -import {IL2AssetRouter} from "contracts/bridge/asset-router/IL2AssetRouter.sol"; -import {IL1Nullifier} from "contracts/bridge/interfaces/IL1Nullifier.sol"; -import {IL1AssetRouter} from "contracts/bridge/asset-router/IL1AssetRouter.sol"; - import {SharedL2ContractDeployer} from "../l2-tests-abstract/_SharedL2ContractDeployer.sol"; -import {IChainTypeManager} from "contracts/state-transition/IChainTypeManager.sol"; -import {IZKChain} from "contracts/state-transition/chain-interfaces/IZKChain.sol"; + import {SharedL2ContractL1Deployer, SystemContractsArgs} from "./_SharedL2ContractL1Deployer.sol"; import {DeployUtils} from "deploy-scripts/DeployUtils.s.sol"; diff --git a/l1-contracts/test/foundry/l1/integration/l2-tests-in-l1-context/L2GatewayL1Test.t.sol b/l1-contracts/test/foundry/l1/integration/l2-tests-in-l1-context/L2GatewayL1Test.t.sol index 5c1407f4af..b2026839d8 100644 --- a/l1-contracts/test/foundry/l1/integration/l2-tests-in-l1-context/L2GatewayL1Test.t.sol +++ b/l1-contracts/test/foundry/l1/integration/l2-tests-in-l1-context/L2GatewayL1Test.t.sol @@ -7,26 +7,8 @@ pragma solidity ^0.8.20; import {Test} from "forge-std/Test.sol"; import "forge-std/console.sol"; -import {BridgedStandardERC20} from "contracts/bridge/BridgedStandardERC20.sol"; -import {L2AssetRouter} from "contracts/bridge/asset-router/L2AssetRouter.sol"; -import {IL2NativeTokenVault} from "contracts/bridge/ntv/IL2NativeTokenVault.sol"; - -import {UpgradeableBeacon} from "@openzeppelin/contracts-v4/proxy/beacon/UpgradeableBeacon.sol"; -import {BeaconProxy} from "@openzeppelin/contracts-v4/proxy/beacon/BeaconProxy.sol"; - -import {L2_ASSET_ROUTER_ADDR, L2_BRIDGEHUB_ADDR, L2_NATIVE_TOKEN_VAULT_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; -import {ETH_TOKEN_ADDRESS, SETTLEMENT_LAYER_RELAY_SENDER} from "contracts/common/Config.sol"; - -import {AddressAliasHelper} from "contracts/vendor/AddressAliasHelper.sol"; -import {BridgehubMintCTMAssetData, IBridgehub} from "contracts/bridgehub/IBridgehub.sol"; -import {IAdmin} from "contracts/state-transition/chain-interfaces/IAdmin.sol"; -import {IL2AssetRouter} from "contracts/bridge/asset-router/IL2AssetRouter.sol"; -import {IL1Nullifier} from "contracts/bridge/interfaces/IL1Nullifier.sol"; -import {IL1AssetRouter} from "contracts/bridge/asset-router/IL1AssetRouter.sol"; - import {SharedL2ContractDeployer} from "../l2-tests-abstract/_SharedL2ContractDeployer.sol"; -import {IChainTypeManager} from "contracts/state-transition/IChainTypeManager.sol"; -import {IZKChain} from "contracts/state-transition/chain-interfaces/IZKChain.sol"; + import {SharedL2ContractL1Deployer, SystemContractsArgs} from "./_SharedL2ContractL1Deployer.sol"; import {DeployUtils} from "deploy-scripts/DeployUtils.s.sol"; diff --git a/l1-contracts/test/foundry/l1/integration/l2-tests-in-l1-context/L2NativeTokenVaultL1Test.t.sol b/l1-contracts/test/foundry/l1/integration/l2-tests-in-l1-context/L2NativeTokenVaultL1Test.t.sol index bd32e62380..9919808d21 100644 --- a/l1-contracts/test/foundry/l1/integration/l2-tests-in-l1-context/L2NativeTokenVaultL1Test.t.sol +++ b/l1-contracts/test/foundry/l1/integration/l2-tests-in-l1-context/L2NativeTokenVaultL1Test.t.sol @@ -7,26 +7,8 @@ pragma solidity ^0.8.20; import {Test} from "forge-std/Test.sol"; import "forge-std/console.sol"; -import {BridgedStandardERC20} from "contracts/bridge/BridgedStandardERC20.sol"; -import {L2AssetRouter} from "contracts/bridge/asset-router/L2AssetRouter.sol"; -import {IL2NativeTokenVault} from "contracts/bridge/ntv/IL2NativeTokenVault.sol"; - -import {UpgradeableBeacon} from "@openzeppelin/contracts-v4/proxy/beacon/UpgradeableBeacon.sol"; -import {BeaconProxy} from "@openzeppelin/contracts-v4/proxy/beacon/BeaconProxy.sol"; - -import {L2_ASSET_ROUTER_ADDR, L2_BRIDGEHUB_ADDR, L2_NATIVE_TOKEN_VAULT_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; -import {ETH_TOKEN_ADDRESS, SETTLEMENT_LAYER_RELAY_SENDER} from "contracts/common/Config.sol"; - -import {AddressAliasHelper} from "contracts/vendor/AddressAliasHelper.sol"; -import {BridgehubMintCTMAssetData, IBridgehub} from "contracts/bridgehub/IBridgehub.sol"; -import {IAdmin} from "contracts/state-transition/chain-interfaces/IAdmin.sol"; -import {IL2AssetRouter} from "contracts/bridge/asset-router/IL2AssetRouter.sol"; -import {IL1Nullifier} from "contracts/bridge/interfaces/IL1Nullifier.sol"; -import {IL1AssetRouter} from "contracts/bridge/asset-router/IL1AssetRouter.sol"; - import {SharedL2ContractDeployer} from "../l2-tests-abstract/_SharedL2ContractDeployer.sol"; -import {IChainTypeManager} from "contracts/state-transition/IChainTypeManager.sol"; -import {IZKChain} from "contracts/state-transition/chain-interfaces/IZKChain.sol"; + import {SharedL2ContractL1Deployer, SystemContractsArgs} from "./_SharedL2ContractL1Deployer.sol"; import {DeployUtils} from "deploy-scripts/DeployUtils.s.sol"; @@ -67,7 +49,7 @@ contract L2NativeTokenVaultL1Test is Test, SharedL2ContractL1Deployer, L2NativeT string memory contractName, bool isZKBytecode ) internal view virtual override(DeployUtils, SharedL2ContractL1Deployer) returns (bytes memory) { - return super.getCreationCode(contractName, false); + return super.getCreationCode(contractName, isZKBytecode); } function getInitializeCalldata( diff --git a/l1-contracts/test/foundry/l1/integration/l2-tests-in-l1-context/L2UtilsBase.sol b/l1-contracts/test/foundry/l1/integration/l2-tests-in-l1-context/L2UtilsBase.sol index 5eeb21c260..0bb9731f61 100644 --- a/l1-contracts/test/foundry/l1/integration/l2-tests-in-l1-context/L2UtilsBase.sol +++ b/l1-contracts/test/foundry/l1/integration/l2-tests-in-l1-context/L2UtilsBase.sol @@ -3,37 +3,30 @@ pragma solidity 0.8.28; import {Vm} from "forge-std/Vm.sol"; -import {StdStorage, Test, stdStorage, stdToml} from "forge-std/Test.sol"; -import {Script, console2 as console} from "forge-std/Script.sol"; +import {StdStorage, stdStorage, stdToml} from "forge-std/Test.sol"; +import {console2 as console} from "forge-std/Script.sol"; + +import {L2Bridgehub} from "contracts/bridgehub/L2Bridgehub.sol"; -import {Bridgehub} from "contracts/bridgehub/Bridgehub.sol"; -import {L1AssetRouter} from "contracts/bridge/asset-router/L1AssetRouter.sol"; -import {L1Nullifier} from "contracts/bridge/L1Nullifier.sol"; -import {L1NativeTokenVault} from "contracts/bridge/ntv/L1NativeTokenVault.sol"; import {DataEncoding} from "contracts/common/libraries/DataEncoding.sol"; import {CTMDeploymentTracker} from "contracts/bridgehub/CTMDeploymentTracker.sol"; -import {IChainTypeManager} from "contracts/state-transition/IChainTypeManager.sol"; -import {Config, DeployUtils, DeployedAddresses} from "deploy-scripts/DeployUtils.s.sol"; import {L2_ASSET_ROUTER_ADDR, L2_BRIDGEHUB_ADDR, L2_CHAIN_ASSET_HANDLER_ADDR, L2_INTEROP_ROOT_STORAGE, L2_MESSAGE_ROOT_ADDR, L2_MESSAGE_VERIFICATION, L2_NATIVE_TOKEN_VAULT_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; -import {MessageRoot} from "contracts/bridgehub/MessageRoot.sol"; -import {IBridgehub} from "contracts/bridgehub/IBridgehub.sol"; +import {L2MessageRoot} from "contracts/bridgehub/L2MessageRoot.sol"; + import {L2AssetRouter} from "contracts/bridge/asset-router/L2AssetRouter.sol"; import {L2NativeTokenVault} from "contracts/bridge/ntv/L2NativeTokenVault.sol"; -import {ChainAssetHandler} from "contracts/bridgehub/ChainAssetHandler.sol"; +import {L2ChainAssetHandler} from "contracts/bridgehub/L2ChainAssetHandler.sol"; import {L2NativeTokenVaultDev} from "contracts/dev-contracts/test/L2NativeTokenVaultDev.sol"; import {ETH_TOKEN_ADDRESS} from "contracts/common/Config.sol"; import {IMessageRoot} from "contracts/bridgehub/IMessageRoot.sol"; import {ICTMDeploymentTracker} from "contracts/bridgehub/ICTMDeploymentTracker.sol"; import {L2MessageVerification} from "../../../../../contracts/bridgehub/L2MessageVerification.sol"; import {DummyL2InteropRootStorage} from "../../../../../contracts/dev-contracts/test/DummyL2InteropRootStorage.sol"; +import {L2_COMPLEX_UPGRADER_ADDR} from "../../../../../contracts/common/l2-helpers/L2ContractAddresses.sol"; -import {DeployCTMIntegrationScript} from "../deploy-scripts/DeployCTMIntegration.s.sol"; - -import {SharedL2ContractDeployer, SystemContractsArgs} from "../l2-tests-abstract/_SharedL2ContractDeployer.sol"; - -import {DeployIntegrationUtils} from "../deploy-scripts/DeployIntegrationUtils.s.sol"; +import {SystemContractsArgs} from "../l2-tests-abstract/_SharedL2ContractDeployer.sol"; library L2UtilsBase { using stdToml for string; @@ -48,41 +41,24 @@ library L2UtilsBase { bytes32 baseTokenAssetId = DataEncoding.encodeNTVAssetId(_args.l1ChainId, ETH_TOKEN_ADDRESS); address wethToken = address(0x1); // we deploy the code to get the contract code with immutables which we then vm.etch - address messageRoot = address(new MessageRoot(IBridgehub(L2_BRIDGEHUB_ADDR), _args.l1ChainId)); - address bridgehub = address(new Bridgehub(_args.l1ChainId, _args.aliasedOwner, 100)); - address assetRouter = address( - new L2AssetRouter( - _args.l1ChainId, - _args.eraChainId, - _args.l1AssetRouter, - _args.legacySharedBridge, - baseTokenAssetId, - _args.aliasedOwner - ) - ); - address ntv = address( - new L2NativeTokenVaultDev( - _args.l1ChainId, - _args.aliasedOwner, - _args.l2TokenProxyBytecodeHash, - _args.legacySharedBridge, - _args.l2TokenBeacon, - _args.contractsDeployedAlready, - wethToken, - baseTokenAssetId - ) - ); + address messageRoot = address(new L2MessageRoot()); + address bridgehub = address(new L2Bridgehub()); + address assetRouter = address(new L2AssetRouter()); + address ntv = address(new L2NativeTokenVaultDev()); vm.etch(L2_MESSAGE_ROOT_ADDR, messageRoot.code); - MessageRoot(L2_MESSAGE_ROOT_ADDR).initialize(); + vm.prank(L2_COMPLEX_UPGRADER_ADDR); + L2MessageRoot(L2_MESSAGE_ROOT_ADDR).initL2(_args.l1ChainId); vm.etch(L2_BRIDGEHUB_ADDR, bridgehub.code); uint256 prevChainId = block.chainid; vm.chainId(_args.l1ChainId); - Bridgehub(L2_BRIDGEHUB_ADDR).initialize(_args.aliasedOwner); + + vm.prank(L2_COMPLEX_UPGRADER_ADDR); + L2Bridgehub(L2_BRIDGEHUB_ADDR).initL2(_args.l1ChainId, _args.aliasedOwner, _args.maxNumberOfZKChains); vm.chainId(prevChainId); vm.prank(_args.aliasedOwner); - Bridgehub(L2_BRIDGEHUB_ADDR).setAddresses( + L2Bridgehub(L2_BRIDGEHUB_ADDR).setAddresses( L2_ASSET_ROUTER_ADDR, ICTMDeploymentTracker(_args.l1CtmDeployer), IMessageRoot(L2_MESSAGE_ROOT_ADDR), @@ -94,19 +70,29 @@ library L2UtilsBase { vm.etch(address(L2_MESSAGE_VERIFICATION), l2messageVerification.code); address l2MessageRootStorage = address(new DummyL2InteropRootStorage()); vm.etch(address(L2_INTEROP_ROOT_STORAGE), l2MessageRootStorage.code); - address l2ChainAssetHandler = address( - new ChainAssetHandler( - _args.l1ChainId, - _args.aliasedOwner, - IBridgehub(L2_BRIDGEHUB_ADDR), - L2_ASSET_ROUTER_ADDR, - IMessageRoot(L2_MESSAGE_ROOT_ADDR) - ) - ); + address l2ChainAssetHandler = address(new L2ChainAssetHandler()); vm.etch(L2_CHAIN_ASSET_HANDLER_ADDR, l2ChainAssetHandler.code); + + vm.prank(L2_COMPLEX_UPGRADER_ADDR); + L2ChainAssetHandler(L2_CHAIN_ASSET_HANDLER_ADDR).initL2( + _args.l1ChainId, + _args.aliasedOwner, + L2_BRIDGEHUB_ADDR, + L2_ASSET_ROUTER_ADDR, + L2_MESSAGE_ROOT_ADDR + ); } vm.etch(L2_ASSET_ROUTER_ADDR, assetRouter.code); + vm.prank(L2_COMPLEX_UPGRADER_ADDR); + L2AssetRouter(L2_ASSET_ROUTER_ADDR).initL2( + _args.l1ChainId, + _args.eraChainId, + _args.l1AssetRouter, + _args.legacySharedBridge, + baseTokenAssetId, + _args.aliasedOwner + ); // Initializing reentrancy guard vm.store( L2_ASSET_ROUTER_ADDR, @@ -116,6 +102,17 @@ library L2UtilsBase { vm.etch(L2_NATIVE_TOKEN_VAULT_ADDR, ntv.code); + vm.prank(L2_COMPLEX_UPGRADER_ADDR); + L2NativeTokenVault(L2_NATIVE_TOKEN_VAULT_ADDR).initL2( + _args.l1ChainId, + _args.aliasedOwner, + _args.l2TokenProxyBytecodeHash, + _args.legacySharedBridge, + _args.l2TokenBeacon, + wethToken, + baseTokenAssetId + ); + vm.store(L2_NATIVE_TOKEN_VAULT_ADDR, bytes32(uint256(251)), bytes32(uint256(_args.l2TokenProxyBytecodeHash))); L2NativeTokenVaultDev(L2_NATIVE_TOKEN_VAULT_ADDR).deployBridgedStandardERC20(_args.aliasedOwner); } diff --git a/l1-contracts/test/foundry/l1/integration/l2-tests-in-l1-context/_SharedL2ContractL1Deployer.sol b/l1-contracts/test/foundry/l1/integration/l2-tests-in-l1-context/_SharedL2ContractL1Deployer.sol index 006101fe17..55c862938c 100644 --- a/l1-contracts/test/foundry/l1/integration/l2-tests-in-l1-context/_SharedL2ContractL1Deployer.sol +++ b/l1-contracts/test/foundry/l1/integration/l2-tests-in-l1-context/_SharedL2ContractL1Deployer.sol @@ -1,31 +1,12 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.28; -import {StdStorage, Test, stdStorage, stdToml} from "forge-std/Test.sol"; +import {StdStorage, stdStorage, stdToml} from "forge-std/Test.sol"; import {Script, console2 as console} from "forge-std/Script.sol"; -import {Bridgehub} from "contracts/bridgehub/Bridgehub.sol"; -import {L1AssetRouter} from "contracts/bridge/asset-router/L1AssetRouter.sol"; -import {L1Nullifier} from "contracts/bridge/L1Nullifier.sol"; -import {L1NativeTokenVault} from "contracts/bridge/ntv/L1NativeTokenVault.sol"; -import {DataEncoding} from "contracts/common/libraries/DataEncoding.sol"; -import {CTMDeploymentTracker} from "contracts/bridgehub/CTMDeploymentTracker.sol"; -import {IChainTypeManager} from "contracts/state-transition/IChainTypeManager.sol"; import {Config, DeployUtils, DeployedAddresses} from "deploy-scripts/DeployUtils.s.sol"; -import {L2_ASSET_ROUTER_ADDR, L2_BRIDGEHUB_ADDR, L2_CHAIN_ASSET_HANDLER_ADDR, L2_INTEROP_ROOT_STORAGE, L2_MESSAGE_ROOT_ADDR, L2_MESSAGE_VERIFICATION, L2_NATIVE_TOKEN_VAULT_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; - -import {MessageRoot} from "contracts/bridgehub/MessageRoot.sol"; -import {IBridgehub} from "contracts/bridgehub/IBridgehub.sol"; -import {L2AssetRouter} from "contracts/bridge/asset-router/L2AssetRouter.sol"; -import {L2NativeTokenVault} from "contracts/bridge/ntv/L2NativeTokenVault.sol"; -import {ChainAssetHandler} from "contracts/bridgehub/ChainAssetHandler.sol"; -import {L2NativeTokenVaultDev} from "contracts/dev-contracts/test/L2NativeTokenVaultDev.sol"; -import {ETH_TOKEN_ADDRESS} from "contracts/common/Config.sol"; -import {IMessageRoot} from "contracts/bridgehub/IMessageRoot.sol"; -import {ICTMDeploymentTracker} from "contracts/bridgehub/ICTMDeploymentTracker.sol"; -import {L2MessageVerification} from "../../../../../contracts/bridgehub/L2MessageVerification.sol"; -import {DummyL2InteropRootStorage} from "../../../../../contracts/dev-contracts/test/DummyL2InteropRootStorage.sol"; +import {L2_ASSET_ROUTER_ADDR, L2_BRIDGEHUB_ADDR, L2_NATIVE_TOKEN_VAULT_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; import {StateTransitionDeployedAddresses} from "deploy-scripts/Utils.sol"; import {Diamond} from "contracts/state-transition/libraries/Diamond.sol"; @@ -35,7 +16,7 @@ import {DeployCTMIntegrationScript} from "../deploy-scripts/DeployCTMIntegration import {SharedL2ContractDeployer, SystemContractsArgs} from "../l2-tests-abstract/_SharedL2ContractDeployer.sol"; import {DeployIntegrationUtils} from "../deploy-scripts/DeployIntegrationUtils.s.sol"; -import {DeployCTMScript} from "deploy-scripts/DeployCTM.s.sol"; + import {DeployL1HelperScript} from "deploy-scripts/DeployL1HelperScript.s.sol"; import {L2UtilsBase} from "./L2UtilsBase.sol"; diff --git a/l1-contracts/test/foundry/l1/integration/utils/_ConfigSemaphore.sol b/l1-contracts/test/foundry/l1/integration/utils/_ConfigSemaphore.sol index 850307a414..567c1fde90 100644 --- a/l1-contracts/test/foundry/l1/integration/utils/_ConfigSemaphore.sol +++ b/l1-contracts/test/foundry/l1/integration/utils/_ConfigSemaphore.sol @@ -2,7 +2,7 @@ pragma solidity 0.8.28; import {Script} from "forge-std/Script.sol"; -import {StdStorage, stdStorage} from "forge-std/Test.sol"; + import {stdToml} from "forge-std/StdToml.sol"; contract ConfigSemaphore is Script { diff --git a/l1-contracts/test/foundry/l1/unit/concrete/Bridgehub/Initialize.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/Bridgehub/Initialize.t.sol index a31095deae..f43f2a9b72 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/Bridgehub/Initialize.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/Bridgehub/Initialize.t.sol @@ -13,7 +13,7 @@ contract InitializeTest is BridgehubTest { uint256 internal priorityTxMaxGasLimit; function setUp() public { - bridgehubDiamondInit = new DiamondInit(); + bridgehubDiamondInit = new DiamondInit(false); governor = GOVERNOR; chainImplementation = makeAddr("chainImplementation"); diff --git a/l1-contracts/test/foundry/l1/unit/concrete/Bridgehub/L2MessageVerification.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/Bridgehub/L2MessageVerification.t.sol index 0b425b7b51..604bf0b32c 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/Bridgehub/L2MessageVerification.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/Bridgehub/L2MessageVerification.t.sol @@ -3,11 +3,10 @@ pragma solidity ^0.8.24; import {Test} from "forge-std/Test.sol"; -import {MessageRoot} from "contracts/bridgehub/MessageRoot.sol"; -import {IBridgehub} from "contracts/bridgehub/IBridgehub.sol"; -import {MessageRootNotRegistered, OnlyBridgehub} from "contracts/bridgehub/L1BridgehubErrors.sol"; +import {L2MessageRoot} from "contracts/bridgehub/L2MessageRoot.sol"; + import {Merkle} from "contracts/common/libraries/Merkle.sol"; -import {MessageHashing} from "contracts/common/libraries/MessageHashing.sol"; + import {L2MessageVerification} from "contracts/bridgehub/L2MessageVerification.sol"; import {L2Log, L2Message} from "contracts/common/Messaging.sol"; // import {IL2MessageRootStorage} from "contracts/common/interfaces/IL2MessageRootStorage.sol"; diff --git a/l1-contracts/test/foundry/l1/unit/concrete/Bridgehub/MessageRoot.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/Bridgehub/MessageRoot.t.sol index 12bea367d8..f88a71389f 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/Bridgehub/MessageRoot.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/Bridgehub/MessageRoot.t.sol @@ -3,10 +3,11 @@ pragma solidity 0.8.28; import {Test} from "forge-std/Test.sol"; -import {MessageRoot} from "contracts/bridgehub/MessageRoot.sol"; -import {IBridgehub} from "contracts/bridgehub/IBridgehub.sol"; -import {MessageRootNotRegistered, OnlyBridgehubOrChainAssetHandler, NotL2} from "contracts/bridgehub/L1BridgehubErrors.sol"; -import {Merkle} from "contracts/common/libraries/Merkle.sol"; +import {L1MessageRoot} from "contracts/bridgehub/L1MessageRoot.sol"; +import {MessageRootBase} from "contracts/bridgehub/MessageRootBase.sol"; +import {IBridgehubBase} from "contracts/bridgehub/IBridgehubBase.sol"; +import {MessageRootNotRegistered, OnlyBridgehubOrChainAssetHandler} from "contracts/bridgehub/L1BridgehubErrors.sol"; + import {MessageHashing} from "contracts/common/libraries/MessageHashing.sol"; // Chain tree consists of batch commitments as their leaves. We use hash of "new bytes(96)" as the hash of an empty leaf. @@ -21,13 +22,13 @@ bytes32 constant SHARED_ROOT_TREE_EMPTY_HASH = bytes32( contract MessageRootTest is Test { address bridgeHub; + L1MessageRoot messageRoot; uint256 L1_CHAIN_ID; - MessageRoot messageRoot; function setUp() public { bridgeHub = makeAddr("bridgeHub"); L1_CHAIN_ID = 5; - messageRoot = new MessageRoot(IBridgehub(bridgeHub), L1_CHAIN_ID); + messageRoot = new L1MessageRoot(bridgeHub); } function test_init() public { @@ -51,7 +52,7 @@ contract MessageRootTest is Test { ); vm.mockCall( bridgeHub, - abi.encodeWithSelector(IBridgehub.chainAssetHandler.selector), + abi.encodeWithSelector(IBridgehubBase.chainAssetHandler.selector), abi.encode(chainAssetHandler) ); messageRoot.addNewChain(alphaChainId); @@ -68,7 +69,7 @@ contract MessageRootTest is Test { vm.prank(bridgeHub); vm.expectEmit(true, false, false, false); - emit MessageRoot.AddedChain(alphaChainId, 0); + emit MessageRootBase.AddedChain(alphaChainId, 0); messageRoot.addNewChain(alphaChainId); assertTrue(messageRoot.chainRegistered(alphaChainId), "alpha chain 2"); @@ -77,71 +78,58 @@ contract MessageRootTest is Test { assertEq(messageRoot.getChainRoot(alphaChainId), bytes32(0)); } - function test_RevertWhen_ChainNotRegistered() public { - address alphaChainSender = makeAddr("alphaChainSender"); - uint256 alphaChainId = uint256(uint160(makeAddr("alphaChainId"))); - vm.mockCall( - bridgeHub, - abi.encodeWithSelector(IBridgehub.getZKChain.selector, alphaChainId), - abi.encode(alphaChainSender) - ); - - vm.prank(alphaChainSender); - vm.expectRevert(MessageRootNotRegistered.selector); - messageRoot.addChainBatchRoot(alphaChainId, 1, bytes32(alphaChainId)); - } - - function test_RevertWhen_ChainNotL2() public { - address alphaChainSender = makeAddr("alphaChainSender"); - vm.mockCall( - bridgeHub, - abi.encodeWithSelector(IBridgehub.getZKChain.selector, L1_CHAIN_ID), - abi.encode(alphaChainSender) - ); - - vm.chainId(L1_CHAIN_ID); - vm.prank(alphaChainSender); - vm.expectRevert(NotL2.selector); - messageRoot.addChainBatchRoot(L1_CHAIN_ID, 1, bytes32(L1_CHAIN_ID)); - } - - function test_addChainBatchRoot() public { - address alphaChainSender = makeAddr("alphaChainSender"); - uint256 alphaChainId = uint256(uint160(makeAddr("alphaChainId"))); - vm.mockCall( - bridgeHub, - abi.encodeWithSelector(IBridgehub.getZKChain.selector, alphaChainId), - abi.encode(alphaChainSender) - ); - - vm.prank(bridgeHub); - messageRoot.addNewChain(alphaChainId); - - vm.prank(alphaChainSender); - vm.expectEmit(true, false, false, false); - emit MessageRoot.AppendedChainBatchRoot(alphaChainId, 1, bytes32(alphaChainId)); - vm.expectEmit(true, false, false, false); - emit MessageRoot.NewChainRoot(alphaChainId, bytes32(0), bytes32(0)); - messageRoot.addChainBatchRoot(alphaChainId, 1, bytes32(alphaChainId)); - } - - function test_updateFullTree() public { - address alphaChainSender = makeAddr("alphaChainSender"); - uint256 alphaChainId = uint256(uint160(makeAddr("alphaChainId"))); - vm.mockCall( - bridgeHub, - abi.encodeWithSelector(IBridgehub.getZKChain.selector, alphaChainId), - abi.encode(alphaChainSender) - ); - - vm.prank(bridgeHub); - messageRoot.addNewChain(alphaChainId); - - vm.prank(alphaChainSender); - messageRoot.addChainBatchRoot(alphaChainId, 1, bytes32(alphaChainId)); - - messageRoot.updateFullTree(); - - assertEq(messageRoot.getAggregatedRoot(), 0x0ef1ac67d77f177a33449c47a8f05f0283300a81adca6f063c92c774beed140c); - } + // FIXME: amend the tests as appending chain batch roots is not allowed on L1. + // function test_RevertWhen_ChainNotRegistered() public { + // address alphaChainSender = makeAddr("alphaChainSender"); + // uint256 alphaChainId = uint256(uint160(makeAddr("alphaChainId"))); + // vm.mockCall( + // bridgeHub, + // abi.encodeWithSelector(IBridgehub.getZKChain.selector, alphaChainId), + // abi.encode(alphaChainSender) + // ); + + // vm.prank(alphaChainSender); + // vm.expectRevert(MessageRootNotRegistered.selector); + // messageRoot.addChainBatchRoot(alphaChainId, 1, bytes32(alphaChainId)); + // } + + // function test_addChainBatchRoot() public { + // address alphaChainSender = makeAddr("alphaChainSender"); + // uint256 alphaChainId = uint256(uint160(makeAddr("alphaChainId"))); + // vm.mockCall( + // bridgeHub, + // abi.encodeWithSelector(IBridgehub.getZKChain.selector, alphaChainId), + // abi.encode(alphaChainSender) + // ); + + // vm.prank(bridgeHub); + // messageRoot.addNewChain(alphaChainId); + + // vm.prank(alphaChainSender); + // vm.expectEmit(true, false, false, false); + // emit MessageRootBase.AppendedChainBatchRoot(alphaChainId, 1, bytes32(alphaChainId)); + // vm.expectEmit(true, false, false, false); + // emit MessageRootBase.NewChainRoot(alphaChainId, bytes32(0), bytes32(0)); + // messageRoot.addChainBatchRoot(alphaChainId, 1, bytes32(alphaChainId)); + // } + + // function test_updateFullTree() public { + // address alphaChainSender = makeAddr("alphaChainSender"); + // uint256 alphaChainId = uint256(uint160(makeAddr("alphaChainId"))); + // vm.mockCall( + // bridgeHub, + // abi.encodeWithSelector(IBridgehub.getZKChain.selector, alphaChainId), + // abi.encode(alphaChainSender) + // ); + + // vm.prank(bridgeHub); + // messageRoot.addNewChain(alphaChainId); + + // vm.prank(alphaChainSender); + // messageRoot.addChainBatchRoot(alphaChainId, 1, bytes32(alphaChainId)); + + // messageRoot.updateFullTree(); + + // assertEq(messageRoot.getAggregatedRoot(), 0x0ef1ac67d77f177a33449c47a8f05f0283300a81adca6f063c92c774beed140c); + // } } diff --git a/l1-contracts/test/foundry/l1/unit/concrete/Bridgehub/_Bridgehub_Shared.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/Bridgehub/_Bridgehub_Shared.t.sol index 54d264daa2..19cce9ba4d 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/Bridgehub/_Bridgehub_Shared.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/Bridgehub/_Bridgehub_Shared.t.sol @@ -17,7 +17,7 @@ contract BridgehubTest is Test { constructor() { vm.chainId(31337); - bridgehubDiamondInit = new DiamondInit(); + bridgehubDiamondInit = new DiamondInit(false); bridgehub = new DiamondProxy(block.chainid, getDiamondCutData(address(bridgehubDiamondInit))); } diff --git a/l1-contracts/test/foundry/l1/unit/concrete/Bridgehub/experimental_bridge.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/Bridgehub/experimental_bridge.t.sol index cde58ff6a0..bbb954bc56 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/Bridgehub/experimental_bridge.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/Bridgehub/experimental_bridge.t.sol @@ -7,9 +7,9 @@ import "forge-std/console.sol"; import {Diamond} from "contracts/state-transition/libraries/Diamond.sol"; import {TestnetERC20Token} from "contracts/dev-contracts/TestnetERC20Token.sol"; -import {Bridgehub} from "contracts/bridgehub/Bridgehub.sol"; +import {L1Bridgehub} from "contracts/bridgehub/L1Bridgehub.sol"; import {ChainCreationParams} from "contracts/state-transition/IChainTypeManager.sol"; -import {L2TransactionRequestDirect, L2TransactionRequestTwoBridgesInner, L2TransactionRequestTwoBridgesOuter} from "contracts/bridgehub/IBridgehub.sol"; +import {L2TransactionRequestDirect, L2TransactionRequestTwoBridgesInner, L2TransactionRequestTwoBridgesOuter} from "contracts/bridgehub/IBridgehubBase.sol"; import {DummyChainTypeManagerWBH} from "contracts/dev-contracts/test/DummyChainTypeManagerWithBridgeHubAddress.sol"; import {DummyZKChain} from "contracts/dev-contracts/test/DummyZKChain.sol"; import {DummySharedBridge} from "contracts/dev-contracts/test/DummySharedBridge.sol"; @@ -17,7 +17,7 @@ import {DummyBridgehubSetter} from "contracts/dev-contracts/test/DummyBridgehubS import {IL1AssetRouter} from "contracts/bridge/asset-router/IL1AssetRouter.sol"; import {L1AssetRouter} from "contracts/bridge/asset-router/L1AssetRouter.sol"; import {L1NativeTokenVault} from "contracts/bridge/ntv/L1NativeTokenVault.sol"; -import {IL1Nullifier, L1Nullifier} from "contracts/bridge/L1Nullifier.sol"; +import {L1Nullifier} from "contracts/bridge/L1Nullifier.sol"; import {BridgehubL2TransactionRequest, L2Log, L2Message, TxStatus} from "contracts/common/Messaging.sol"; import {L2_NATIVE_TOKEN_VAULT_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; @@ -25,19 +25,18 @@ import {DataEncoding} from "contracts/common/libraries/DataEncoding.sol"; import {ICTMDeploymentTracker} from "contracts/bridgehub/ICTMDeploymentTracker.sol"; import {IMessageRoot} from "contracts/bridgehub/IMessageRoot.sol"; -import {MessageRoot} from "contracts/bridgehub/MessageRoot.sol"; +import {L1MessageRoot} from "contracts/bridgehub/L1MessageRoot.sol"; import {BRIDGEHUB_MIN_SECOND_BRIDGE_ADDRESS, ETH_TOKEN_ADDRESS, MAX_NEW_FACTORY_DEPS, REQUIRED_L2_GAS_PRICE_PER_PUBDATA, TWO_BRIDGES_MAGIC_VALUE} from "contracts/common/Config.sol"; -import {L1ERC20Bridge} from "contracts/bridge/L1ERC20Bridge.sol"; -import {IAssetRouterBase} from "contracts/bridge/asset-router/IAssetRouterBase.sol"; + import {SecondBridgeAddressTooLow} from "contracts/bridgehub/L1BridgehubErrors.sol"; -import {AssetIdAlreadyRegistered, AssetIdNotSupported, BridgeHubAlreadyRegistered, CTMAlreadyRegistered, CTMNotRegistered, ChainIdTooBig, MsgValueMismatch, NonEmptyMsgValue, SharedBridgeNotSet, SlotOccupied, Unauthorized, WrongMagicValue, ZeroChainId} from "contracts/common/L1ContractErrors.sol"; +import {AssetIdAlreadyRegistered, AssetIdNotSupported, BridgeHubAlreadyRegistered, CTMAlreadyRegistered, CTMNotRegistered, ChainIdTooBig, MsgValueMismatch, SharedBridgeNotSet, SlotOccupied, Unauthorized, WrongMagicValue, ZeroChainId} from "contracts/common/L1ContractErrors.sol"; import {TransparentUpgradeableProxy} from "@openzeppelin/contracts-v4/proxy/transparent/TransparentUpgradeableProxy.sol"; contract ExperimentalBridgeTest is Test { using stdStorage for StdStorage; address weth; - Bridgehub bridgeHub; + L1Bridgehub bridgeHub; DummyBridgehubSetter dummyBridgehub; address public bridgeOwner; address public testTokenAddress; @@ -68,6 +67,7 @@ contract ExperimentalBridgeTest is Test { address mockL2Contract; + uint256 l1ChainId; uint256 eraChainId; address deployerAddress; @@ -95,12 +95,12 @@ contract ExperimentalBridgeTest is Test { } function setUp() public { - deployerAddress = makeAddr("DEPLOYER_ADDRESS"); + l1ChainId = 1; eraChainId = 320; - uint256 l1ChainId = block.chainid; + deployerAddress = makeAddr("DEPLOYER_ADDRESS"); bridgeOwner = makeAddr("BRIDGE_OWNER"); - dummyBridgehub = new DummyBridgehubSetter(l1ChainId, bridgeOwner, type(uint256).max); - bridgeHub = Bridgehub(address(dummyBridgehub)); + dummyBridgehub = new DummyBridgehubSetter(bridgeOwner, type(uint256).max); + bridgeHub = L1Bridgehub(address(dummyBridgehub)); weth = makeAddr("WETH"); mockCTM = new DummyChainTypeManagerWBH(address(bridgeHub)); mockChainContract = new DummyZKChain(address(bridgeHub), eraChainId, block.chainid); @@ -125,7 +125,7 @@ contract ExperimentalBridgeTest is Test { ntv.registerToken(address(testToken)); tokenAssetId = DataEncoding.encodeNTVAssetId(block.chainid, address(testToken)); - messageRoot = new MessageRoot(bridgeHub, l1ChainId); + messageRoot = new L1MessageRoot(address(bridgeHub)); sharedBridge = new L1AssetRouter( mockL1WethAddress, @@ -526,7 +526,7 @@ contract ExperimentalBridgeTest is Test { vm.assume(randomCaller != bridgeOwner); vm.prank(randomCaller); - vm.expectRevert(bytes("Ownable: caller is not the owner")); + vm.expectRevert(abi.encodeWithSelector(Unauthorized.selector, randomCaller)); bridgeHub.setAddresses( randomAssetRouter, ICTMDeploymentTracker(randomCTMDeployer), diff --git a/l1-contracts/test/foundry/l1/unit/concrete/Bridges/L1Erc20Bridge/ClaimFailedDeposit.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/Bridges/L1Erc20Bridge/ClaimFailedDeposit.t.sol index a11e1118e8..2f68485b7c 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/Bridges/L1Erc20Bridge/ClaimFailedDeposit.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/Bridges/L1Erc20Bridge/ClaimFailedDeposit.t.sol @@ -4,7 +4,7 @@ pragma solidity 0.8.28; import {L1Erc20BridgeTest} from "./_L1Erc20Bridge_Shared.t.sol"; import {StdStorage, stdStorage} from "forge-std/Test.sol"; -import {IL1AssetRouter} from "contracts/bridge/asset-router/IL1AssetRouter.sol"; + import {EmptyDeposit} from "contracts/common/L1ContractErrors.sol"; contract ClaimFailedDepositTest is L1Erc20BridgeTest { diff --git a/l1-contracts/test/foundry/l1/unit/concrete/Bridges/L1Erc20Bridge/Deposit.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/Bridges/L1Erc20Bridge/Deposit.t.sol index fcbe06524a..e91c1618de 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/Bridges/L1Erc20Bridge/Deposit.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/Bridges/L1Erc20Bridge/Deposit.t.sol @@ -4,8 +4,8 @@ pragma solidity 0.8.28; import {IERC20} from "@openzeppelin/contracts-v4/token/ERC20/IERC20.sol"; import {L1Erc20BridgeTest} from "./_L1Erc20Bridge_Shared.t.sol"; -import {IL1AssetRouter} from "contracts/bridge/asset-router/IL1AssetRouter.sol"; -import {EmptyDeposit, TokensWithFeesNotSupported, ValueMismatch} from "contracts/common/L1ContractErrors.sol"; + +import {EmptyDeposit, TokensWithFeesNotSupported} from "contracts/common/L1ContractErrors.sol"; contract DepositTest is L1Erc20BridgeTest { event DepositInitiated( diff --git a/l1-contracts/test/foundry/l1/unit/concrete/Bridges/L1Erc20Bridge/FinalizeWithdrawal.sol b/l1-contracts/test/foundry/l1/unit/concrete/Bridges/L1Erc20Bridge/FinalizeWithdrawal.sol index 81822da458..f8825fea7c 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/Bridges/L1Erc20Bridge/FinalizeWithdrawal.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/Bridges/L1Erc20Bridge/FinalizeWithdrawal.sol @@ -3,7 +3,7 @@ pragma solidity 0.8.28; import {L1Erc20BridgeTest} from "./_L1Erc20Bridge_Shared.t.sol"; -import {IL1AssetRouter} from "contracts/bridge/asset-router/IL1AssetRouter.sol"; + import {StdStorage, stdStorage} from "forge-std/Test.sol"; import {WithdrawalAlreadyFinalized} from "contracts/common/L1ContractErrors.sol"; import {IL1Nullifier} from "contracts/bridge/L1Nullifier.sol"; diff --git a/l1-contracts/test/foundry/l1/unit/concrete/Bridges/L1Erc20Bridge/Reentrancy.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/Bridges/L1Erc20Bridge/Reentrancy.t.sol index 9fb00ac54f..1030645f07 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/Bridges/L1Erc20Bridge/Reentrancy.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/Bridges/L1Erc20Bridge/Reentrancy.t.sol @@ -5,7 +5,7 @@ pragma solidity 0.8.28; import {StdStorage, stdStorage} from "forge-std/Test.sol"; import {L1Erc20BridgeTest} from "./_L1Erc20Bridge_Shared.t.sol"; import {ReenterL1ERC20Bridge} from "contracts/dev-contracts/test/ReenterL1ERC20Bridge.sol"; -import {Reentrancy, SlotOccupied} from "contracts/common/L1ContractErrors.sol"; +import {Reentrancy} from "contracts/common/L1ContractErrors.sol"; contract ReentrancyTest is L1Erc20BridgeTest { using stdStorage for StdStorage; diff --git a/l1-contracts/test/foundry/l1/unit/concrete/Bridges/L1Erc20Bridge/_L1Erc20Bridge_Shared.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/Bridges/L1Erc20Bridge/_L1Erc20Bridge_Shared.t.sol index 193919eda2..8d7a61e71e 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/Bridges/L1Erc20Bridge/_L1Erc20Bridge_Shared.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/Bridges/L1Erc20Bridge/_L1Erc20Bridge_Shared.t.sol @@ -2,7 +2,7 @@ pragma solidity ^0.8.21; -import {StdStorage, Test, stdStorage} from "forge-std/Test.sol"; +import {Test} from "forge-std/Test.sol"; import {L1ERC20Bridge} from "contracts/bridge/L1ERC20Bridge.sol"; import {L1NativeTokenVault} from "contracts/bridge/ntv/L1NativeTokenVault.sol"; @@ -12,7 +12,7 @@ import {FeeOnTransferToken} from "contracts/dev-contracts/FeeOnTransferToken.sol import {ReenterL1ERC20Bridge} from "contracts/dev-contracts/test/ReenterL1ERC20Bridge.sol"; import {DummySharedBridge} from "contracts/dev-contracts/test/DummySharedBridge.sol"; import {Utils} from "../../Utils/Utils.sol"; -import {ETH_TOKEN_ADDRESS} from "contracts/common/Config.sol"; + import {IL1NativeTokenVault} from "contracts/bridge/ntv/IL1NativeTokenVault.sol"; import {IL1Nullifier} from "contracts/bridge/L1Nullifier.sol"; diff --git a/l1-contracts/test/foundry/l1/unit/concrete/Bridges/L1SharedBridge/L1SharedBridgeBase.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/Bridges/L1SharedBridge/L1SharedBridgeBase.t.sol index 68096f2dba..4da88b6042 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/Bridges/L1SharedBridge/L1SharedBridgeBase.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/Bridges/L1SharedBridge/L1SharedBridgeBase.t.sol @@ -6,18 +6,18 @@ import {IERC20} from "@openzeppelin/contracts-v4/token/ERC20/IERC20.sol"; import {L1AssetRouterTest} from "./_L1SharedBridge_Shared.t.sol"; import {ETH_TOKEN_ADDRESS} from "contracts/common/Config.sol"; -import {IBridgehub, L2TransactionRequestTwoBridgesInner} from "contracts/bridgehub/IBridgehub.sol"; +import {IBridgehubBase, L2TransactionRequestTwoBridgesInner} from "contracts/bridgehub/IBridgehubBase.sol"; import {L2Message, TxStatus} from "contracts/common/Messaging.sol"; import {IMailboxImpl} from "contracts/state-transition/chain-interfaces/IMailboxImpl.sol"; -import {IL1AssetRouter} from "contracts/bridge/asset-router/IL1AssetRouter.sol"; + import {IAssetRouterBase, LEGACY_ENCODING_VERSION} from "contracts/bridge/asset-router/IAssetRouterBase.sol"; -import {IL1AssetHandler} from "contracts/bridge/interfaces/IL1AssetHandler.sol"; +import {AssetRouterBase} from "contracts/bridge/asset-router/AssetRouterBase.sol"; + import {IL1BaseTokenAssetHandler} from "contracts/bridge/interfaces/IL1BaseTokenAssetHandler.sol"; -import {L2_ASSET_ROUTER_ADDR, L2_BASE_TOKEN_SYSTEM_CONTRACT_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; -import {IGetters} from "contracts/state-transition/chain-interfaces/IGetters.sol"; -import {L1NativeTokenVault} from "contracts/bridge/ntv/L1NativeTokenVault.sol"; +import {L2_BASE_TOKEN_SYSTEM_CONTRACT_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; + import {StdStorage, stdStorage} from "forge-std/Test.sol"; -import {DepositNotSet} from "test/foundry/L1TestsErrors.sol"; + import {DataEncoding} from "contracts/common/libraries/DataEncoding.sol"; contract L1AssetRouterTestBase is L1AssetRouterTest { @@ -132,7 +132,7 @@ contract L1AssetRouterTestBase is L1AssetRouterTest { bridgehubAddress, // solhint-disable-next-line func-named-parameters abi.encodeWithSelector( - IBridgehub.proveL1ToL2TransactionStatus.selector, + IBridgehubBase.proveL1ToL2TransactionStatus.selector, chainId, txHash, l2BatchNumber, @@ -173,7 +173,7 @@ contract L1AssetRouterTestBase is L1AssetRouterTest { bridgehubAddress, // solhint-disable-next-line func-named-parameters abi.encodeWithSelector( - IBridgehub.proveL1ToL2TransactionStatus.selector, + IBridgehubBase.proveL1ToL2TransactionStatus.selector, chainId, txHash, l2BatchNumber, @@ -215,7 +215,7 @@ contract L1AssetRouterTestBase is L1AssetRouterTest { bridgehubAddress, // solhint-disable-next-line func-named-parameters abi.encodeWithSelector( - IBridgehub.proveL1ToL2TransactionStatus.selector, + IBridgehubBase.proveL1ToL2TransactionStatus.selector, chainId, txHash, l2BatchNumber, @@ -259,7 +259,7 @@ contract L1AssetRouterTestBase is L1AssetRouterTest { bridgehubAddress, // solhint-disable-next-line func-named-parameters abi.encodeWithSelector( - IBridgehub.proveL2MessageInclusion.selector, + IBridgehubBase.proveL2MessageInclusion.selector, chainId, l2BatchNumber, l2MessageIndex, @@ -285,7 +285,7 @@ contract L1AssetRouterTestBase is L1AssetRouterTest { function test_finalizeWithdrawal_ErcOnEth() public { _setNativeTokenVaultChainBalance(chainId, address(token), amount); bytes memory message = abi.encodePacked( - IAssetRouterBase.finalizeDeposit.selector, + AssetRouterBase.finalizeDeposit.selector, chainId, tokenAssetId, abi.encode(0, alice, 0, amount, new bytes(0)) @@ -300,7 +300,7 @@ contract L1AssetRouterTestBase is L1AssetRouterTest { bridgehubAddress, // solhint-disable-next-line func-named-parameters abi.encodeCall( - IBridgehub.proveL2MessageInclusion, + IBridgehubBase.proveL2MessageInclusion, (chainId, l2BatchNumber, l2MessageIndex, l2ToL1Message, merkleProof) ), abi.encode(true) @@ -327,7 +327,7 @@ contract L1AssetRouterTestBase is L1AssetRouterTest { vm.prank(bridgehubAddress); bytes memory message = abi.encodePacked( - IAssetRouterBase.finalizeDeposit.selector, + AssetRouterBase.finalizeDeposit.selector, chainId, ETH_TOKEN_ASSET_ID, abi.encode(0, alice, 0, amount, new bytes(0)) @@ -342,7 +342,7 @@ contract L1AssetRouterTestBase is L1AssetRouterTest { bridgehubAddress, // solhint-disable-next-line func-named-parameters abi.encodeWithSelector( - IBridgehub.proveL2MessageInclusion.selector, + IBridgehubBase.proveL2MessageInclusion.selector, chainId, l2BatchNumber, l2MessageIndex, @@ -370,7 +370,7 @@ contract L1AssetRouterTestBase is L1AssetRouterTest { vm.prank(bridgehubAddress); bytes memory message = abi.encodePacked( - IAssetRouterBase.finalizeDeposit.selector, + AssetRouterBase.finalizeDeposit.selector, chainId, tokenAssetId, abi.encode(0, alice, 0, amount, new bytes(0)) @@ -385,7 +385,7 @@ contract L1AssetRouterTestBase is L1AssetRouterTest { bridgehubAddress, // solhint-disable-next-line func-named-parameters abi.encodeWithSelector( - IBridgehub.proveL2MessageInclusion.selector, + IBridgehubBase.proveL2MessageInclusion.selector, chainId // l2BatchNumber, // l2MessageIndex, @@ -410,14 +410,14 @@ contract L1AssetRouterTestBase is L1AssetRouterTest { function test_finalizeWithdrawal_NonBaseErcOnErc() public { bytes memory message = abi.encodePacked( - IAssetRouterBase.finalizeDeposit.selector, + AssetRouterBase.finalizeDeposit.selector, chainId, tokenAssetId, abi.encode(0, alice, 0, amount, new bytes(0)) ); vm.mockCall( bridgehubAddress, - abi.encodeWithSelector(IBridgehub.baseTokenAssetId.selector), + abi.encodeWithSelector(IBridgehubBase.baseTokenAssetId.selector), abi.encode(bytes32(uint256(2))) ); //alt base token @@ -431,7 +431,7 @@ contract L1AssetRouterTestBase is L1AssetRouterTest { bridgehubAddress, // solhint-disable-next-line func-named-parameters abi.encodeWithSelector( - IBridgehub.proveL2MessageInclusion.selector, + IBridgehubBase.proveL2MessageInclusion.selector, chainId, l2BatchNumber, l2MessageIndex, @@ -482,7 +482,7 @@ contract L1AssetRouterTestBase is L1AssetRouterTest { vm.prank(bridgehubAddress); vm.mockCall( bridgehubAddress, - abi.encodeWithSelector(IBridgehub.baseTokenAssetId.selector), + abi.encodeWithSelector(IBridgehubBase.baseTokenAssetId.selector), abi.encode(tokenAssetId) ); // solhint-disable-next-line func-named-parameters diff --git a/l1-contracts/test/foundry/l1/unit/concrete/Bridges/L1SharedBridge/L1SharedBridgeFails.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/Bridges/L1SharedBridge/L1SharedBridgeFails.t.sol index c613f73a68..edeacc2732 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/Bridges/L1SharedBridge/L1SharedBridgeFails.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/Bridges/L1SharedBridge/L1SharedBridgeFails.t.sol @@ -12,17 +12,18 @@ import {SET_ASSET_HANDLER_COUNTERPART_ENCODING_VERSION} from "contracts/bridge/a import {L1AssetRouter} from "contracts/bridge/asset-router/L1AssetRouter.sol"; import {L1NativeTokenVault} from "contracts/bridge/ntv/L1NativeTokenVault.sol"; import {ETH_TOKEN_ADDRESS} from "contracts/common/Config.sol"; -import {IBridgehub} from "contracts/bridgehub/IBridgehub.sol"; +import {IBridgehubBase} from "contracts/bridgehub/IBridgehubBase.sol"; +import {IL1Bridgehub} from "contracts/bridgehub/IL1Bridgehub.sol"; import {L2Message, TxStatus} from "contracts/common/Messaging.sol"; import {IMailboxImpl} from "contracts/state-transition/chain-interfaces/IMailboxImpl.sol"; import {IL1ERC20Bridge} from "contracts/bridge/interfaces/IL1ERC20Bridge.sol"; -import {IL1NativeTokenVault} from "contracts/bridge/ntv/IL1NativeTokenVault.sol"; -import {INativeTokenVault} from "contracts/bridge/ntv/INativeTokenVault.sol"; + +import {INativeTokenVaultBase} from "contracts/bridge/ntv/INativeTokenVaultBase.sol"; import {L2_BASE_TOKEN_SYSTEM_CONTRACT_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; -import {IGetters} from "contracts/state-transition/chain-interfaces/IGetters.sol"; + import {AddressAlreadySet, AssetIdNotSupported, BurningNativeWETHNotSupported, DepositDoesNotExist, DepositExists, EmptyDeposit, InsufficientChainBalance, InvalidProof, InvalidSelector, L2WithdrawalMessageWrongLength, NoFundsTransferred, NonEmptyMsgValue, SharedBridgeKey, SharedBridgeValueNotSet, TokenNotSupported, TokensWithFeesNotSupported, Unauthorized, ValueMismatch, WithdrawFailed, WithdrawalAlreadyFinalized, ZeroAddress} from "contracts/common/L1ContractErrors.sol"; import {StdStorage, stdStorage} from "forge-std/Test.sol"; -import {DepositNotSet} from "test/foundry/L1TestsErrors.sol"; + import {ClaimFailedDepositFailed, EmptyToken, EthTransferFailed, NativeTokenVaultAlreadySet, WrongAmountTransferred, WrongCounterpart, ZeroAmountToTransfer} from "contracts/bridge/L1BridgeContractErrors.sol"; /// We are testing all the specified revert and require cases. @@ -88,14 +89,14 @@ contract L1AssetRouterFailTest is L1AssetRouterTest { function test_setNativeTokenVault_alreadySet() public { vm.prank(owner); vm.expectRevert(NativeTokenVaultAlreadySet.selector); - sharedBridge.setNativeTokenVault(INativeTokenVault(address(0))); + sharedBridge.setNativeTokenVault(INativeTokenVaultBase(address(0))); } function test_setNativeTokenVault_emptyAddressProvided() public { stdstore.target(address(sharedBridge)).sig(sharedBridge.nativeTokenVault.selector).checked_write(address(0)); vm.prank(owner); vm.expectRevert(ZeroAddress.selector); - sharedBridge.setNativeTokenVault(INativeTokenVault(address(0))); + sharedBridge.setNativeTokenVault(INativeTokenVaultBase(address(0))); } function test_setAssetHandlerAddressOnCounterpart_wrongCounterPartAddress() public { @@ -179,7 +180,7 @@ contract L1AssetRouterFailTest is L1AssetRouterTest { vm.prank(bridgehubAddress); vm.mockCall( bridgehubAddress, - abi.encodeWithSelector(IBridgehub.baseTokenAssetId.selector), + abi.encodeWithSelector(IBridgehubBase.baseTokenAssetId.selector), abi.encode(ETH_TOKEN_ASSET_ID) ); vm.expectRevert(abi.encodeWithSelector(AssetIdNotSupported.selector, ETH_TOKEN_ASSET_ID)); @@ -192,7 +193,7 @@ contract L1AssetRouterFailTest is L1AssetRouterTest { vm.prank(bridgehubAddress); vm.mockCall( bridgehubAddress, - abi.encodeWithSelector(IBridgehub.baseTokenAssetId.selector), + abi.encodeWithSelector(IBridgehubBase.baseTokenAssetId.selector), abi.encode(tokenAssetId) ); vm.expectRevert(abi.encodeWithSelector(ValueMismatch.selector, amount, 0)); @@ -204,7 +205,7 @@ contract L1AssetRouterFailTest is L1AssetRouterTest { vm.prank(bridgehubAddress); vm.mockCall( bridgehubAddress, - abi.encodeWithSelector(IBridgehub.baseTokenAssetId.selector), + abi.encodeWithSelector(IBridgehubBase.baseTokenAssetId.selector), abi.encode(ETH_TOKEN_ASSET_ID) ); vm.expectRevert(NonEmptyMsgValue.selector); @@ -225,7 +226,7 @@ contract L1AssetRouterFailTest is L1AssetRouterTest { vm.prank(bridgehubAddress); vm.mockCall( bridgehubAddress, - abi.encodeWithSelector(IBridgehub.baseToken.selector), + abi.encodeWithSelector(IBridgehubBase.baseToken.selector), abi.encode(address(token)) ); vm.expectRevert(EmptyDeposit.selector); @@ -254,7 +255,7 @@ contract L1AssetRouterFailTest is L1AssetRouterTest { bridgehubAddress, // solhint-disable-next-line func-named-parameters abi.encodeWithSelector( - IBridgehub.proveL2MessageInclusion.selector, + IBridgehubBase.proveL2MessageInclusion.selector, chainId, l2BatchNumber, l2MessageIndex, @@ -286,7 +287,7 @@ contract L1AssetRouterFailTest is L1AssetRouterTest { bridgehubAddress, // solhint-disable-next-line func-named-parameters abi.encodeWithSelector( - IBridgehub.proveL1ToL2TransactionStatus.selector, + IBridgehubBase.proveL1ToL2TransactionStatus.selector, chainId, txHash, l2BatchNumber, @@ -324,7 +325,7 @@ contract L1AssetRouterFailTest is L1AssetRouterTest { bridgehubAddress, // solhint-disable-next-line func-named-parameters abi.encodeWithSelector( - IBridgehub.proveL1ToL2TransactionStatus.selector, + IBridgehubBase.proveL1ToL2TransactionStatus.selector, eraChainId, txHash, l2BatchNumber, @@ -366,7 +367,7 @@ contract L1AssetRouterFailTest is L1AssetRouterTest { bridgehubAddress, // solhint-disable-next-line func-named-parameters abi.encodeWithSelector( - IBridgehub.proveL1ToL2TransactionStatus.selector, + IBridgehubBase.proveL1ToL2TransactionStatus.selector, eraChainId, txHash, l2BatchNumber, @@ -381,7 +382,7 @@ contract L1AssetRouterFailTest is L1AssetRouterTest { vm.expectRevert(InsufficientChainBalance.selector); vm.mockCall( address(bridgehubAddress), - abi.encodeWithSelector(IBridgehub.proveL1ToL2TransactionStatus.selector), + abi.encodeWithSelector(IBridgehubBase.proveL1ToL2TransactionStatus.selector), abi.encode(true) ); l1Nullifier.bridgeRecoverFailedTransfer({ @@ -400,7 +401,7 @@ contract L1AssetRouterFailTest is L1AssetRouterTest { function test_claimFailedDeposit_proofInvalid() public { vm.mockCall( bridgehubAddress, - abi.encodeWithSelector(IBridgehub.proveL1ToL2TransactionStatus.selector), + abi.encodeWithSelector(IBridgehubBase.proveL1ToL2TransactionStatus.selector), abi.encode(address(0)) ); vm.prank(bridgehubAddress); @@ -423,7 +424,7 @@ contract L1AssetRouterFailTest is L1AssetRouterTest { bridgehubAddress, // solhint-disable-next-line func-named-parameters abi.encodeWithSelector( - IBridgehub.proveL1ToL2TransactionStatus.selector, + IBridgehubBase.proveL1ToL2TransactionStatus.selector, chainId, txHash, l2BatchNumber, @@ -458,7 +459,7 @@ contract L1AssetRouterFailTest is L1AssetRouterTest { bridgehubAddress, // solhint-disable-next-line func-named-parameters abi.encodeWithSelector( - IBridgehub.proveL1ToL2TransactionStatus.selector, + IBridgehubBase.proveL1ToL2TransactionStatus.selector, chainId, txHash, l2BatchNumber, @@ -495,7 +496,7 @@ contract L1AssetRouterFailTest is L1AssetRouterTest { bridgehubAddress, // solhint-disable-next-line func-named-parameters abi.encodeWithSelector( - IBridgehub.proveL1ToL2TransactionStatus.selector, + IBridgehubBase.proveL1ToL2TransactionStatus.selector, chainId, txHash, l2BatchNumber, @@ -622,7 +623,7 @@ contract L1AssetRouterFailTest is L1AssetRouterTest { amount ); - vm.mockCall(bridgehubAddress, abi.encode(IBridgehub.proveL2MessageInclusion.selector), abi.encode(true)); + vm.mockCall(bridgehubAddress, abi.encode(IBridgehubBase.proveL2MessageInclusion.selector), abi.encode(true)); vm.expectRevert( abi.encodeWithSelector(SharedBridgeValueNotSet.selector, SharedBridgeKey.PostUpgradeFirstBatch) @@ -649,7 +650,7 @@ contract L1AssetRouterFailTest is L1AssetRouterTest { bridgehubAddress, // solhint-disable-next-line func-named-parameters abi.encodeWithSelector( - IBridgehub.proveL2MessageInclusion.selector, + IBridgehubBase.proveL2MessageInclusion.selector, chainId, l2BatchNumber, l2MessageIndex, @@ -683,7 +684,7 @@ contract L1AssetRouterFailTest is L1AssetRouterTest { bridgehubAddress, // solhint-disable-next-line func-named-parameters abi.encodeWithSelector( - IBridgehub.proveL2MessageInclusion.selector, + IBridgehubBase.proveL2MessageInclusion.selector, chainId, l2BatchNumber, l2MessageIndex, @@ -723,7 +724,7 @@ contract L1AssetRouterFailTest is L1AssetRouterTest { vm.mockCall( bridgehubAddress, - abi.encodeWithSelector(IBridgehub.baseToken.selector, alice, amount), + abi.encodeWithSelector(IBridgehubBase.baseToken.selector, alice, amount), abi.encode(ETH_TOKEN_ADDRESS) ); @@ -792,7 +793,7 @@ contract L1AssetRouterFailTest is L1AssetRouterTest { vm.mockCall( bridgehubAddress, - abi.encodeWithSelector(IBridgehub.requestL2TransactionDirect.selector), + abi.encodeWithSelector(IL1Bridgehub.requestL2TransactionDirect.selector), abi.encode(txHash) ); diff --git a/l1-contracts/test/foundry/l1/unit/concrete/Bridges/L1SharedBridge/L1SharedBridgeHyperEnabled.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/Bridges/L1SharedBridge/L1SharedBridgeHyperEnabled.t.sol index e205b2446a..44020e9577 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/Bridges/L1SharedBridge/L1SharedBridgeHyperEnabled.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/Bridges/L1SharedBridge/L1SharedBridgeHyperEnabled.t.sol @@ -4,13 +4,13 @@ pragma solidity 0.8.28; import {L1AssetRouterTest} from "./_L1SharedBridge_Shared.t.sol"; import {ETH_TOKEN_ADDRESS} from "contracts/common/Config.sol"; -import {IBridgehub} from "contracts/bridgehub/IBridgehub.sol"; +import {IBridgehubBase} from "contracts/bridgehub/IBridgehubBase.sol"; import {L2Message, TxStatus} from "contracts/common/Messaging.sol"; import {IMailboxImpl} from "contracts/state-transition/chain-interfaces/IMailboxImpl.sol"; -import {IL1AssetRouter} from "contracts/bridge/asset-router/IL1AssetRouter.sol"; + import {IAssetRouterBase} from "contracts/bridge/asset-router/IAssetRouterBase.sol"; +import {AssetRouterBase} from "contracts/bridge/asset-router/AssetRouterBase.sol"; import {L2_BASE_TOKEN_SYSTEM_CONTRACT_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; -import {DepositNotSet} from "test/foundry/L1TestsErrors.sol"; // note, this should be the same as where hyper is disabled contract L1AssetRouterHyperEnabledTest is L1AssetRouterTest { @@ -106,7 +106,7 @@ contract L1AssetRouterHyperEnabledTest is L1AssetRouterTest { bridgehubAddress, // solhint-disable-next-line func-named-parameters abi.encodeWithSelector( - IBridgehub.proveL1ToL2TransactionStatus.selector, + IBridgehubBase.proveL1ToL2TransactionStatus.selector, chainId, txHash, l2BatchNumber, @@ -149,7 +149,7 @@ contract L1AssetRouterHyperEnabledTest is L1AssetRouterTest { bridgehubAddress, // solhint-disable-next-line func-named-parameters abi.encodeWithSelector( - IBridgehub.proveL1ToL2TransactionStatus.selector, + IBridgehubBase.proveL1ToL2TransactionStatus.selector, chainId, txHash, l2BatchNumber, @@ -192,7 +192,7 @@ contract L1AssetRouterHyperEnabledTest is L1AssetRouterTest { bridgehubAddress, // solhint-disable-next-line func-named-parameters abi.encodeWithSelector( - IBridgehub.proveL2MessageInclusion.selector, + IBridgehubBase.proveL2MessageInclusion.selector, chainId, l2BatchNumber, l2MessageIndex, @@ -219,7 +219,7 @@ contract L1AssetRouterHyperEnabledTest is L1AssetRouterTest { _setBaseTokenAssetId(ETH_TOKEN_ASSET_ID); bytes memory message = abi.encodePacked( - IAssetRouterBase.finalizeDeposit.selector, + AssetRouterBase.finalizeDeposit.selector, chainId, tokenAssetId, abi.encode(0, alice, 0, amount, new bytes(0)) @@ -234,7 +234,7 @@ contract L1AssetRouterHyperEnabledTest is L1AssetRouterTest { bridgehubAddress, // solhint-disable-next-line func-named-parameters abi.encodeWithSelector( - IBridgehub.proveL2MessageInclusion.selector, + IBridgehubBase.proveL2MessageInclusion.selector, chainId, l2BatchNumber, l2MessageIndex, @@ -261,7 +261,7 @@ contract L1AssetRouterHyperEnabledTest is L1AssetRouterTest { _setBaseTokenAssetId(tokenAssetId); bytes memory message = abi.encodePacked( - IAssetRouterBase.finalizeDeposit.selector, + AssetRouterBase.finalizeDeposit.selector, chainId, ETH_TOKEN_ASSET_ID, abi.encode(0, alice, 0, amount, new bytes(0)) @@ -276,7 +276,7 @@ contract L1AssetRouterHyperEnabledTest is L1AssetRouterTest { bridgehubAddress, // solhint-disable-next-line func-named-parameters abi.encodeWithSelector( - IBridgehub.proveL2MessageInclusion.selector, + IBridgehubBase.proveL2MessageInclusion.selector, chainId, l2BatchNumber, l2MessageIndex, @@ -303,7 +303,7 @@ contract L1AssetRouterHyperEnabledTest is L1AssetRouterTest { _setBaseTokenAssetId(tokenAssetId); bytes memory message = abi.encodePacked( - IAssetRouterBase.finalizeDeposit.selector, + AssetRouterBase.finalizeDeposit.selector, chainId, tokenAssetId, abi.encode(0, alice, 0, amount, new bytes(0)) @@ -318,7 +318,7 @@ contract L1AssetRouterHyperEnabledTest is L1AssetRouterTest { bridgehubAddress, // solhint-disable-next-line func-named-parameters abi.encodeWithSelector( - IBridgehub.proveL2MessageInclusion.selector, + IBridgehubBase.proveL2MessageInclusion.selector, chainId // l2BatchNumber, // l2MessageIndex, @@ -343,7 +343,7 @@ contract L1AssetRouterHyperEnabledTest is L1AssetRouterTest { function test_finalizeWithdrawal_NonBaseErcOnErc2() public { bytes memory message = abi.encodePacked( - IAssetRouterBase.finalizeDeposit.selector, + AssetRouterBase.finalizeDeposit.selector, chainId, tokenAssetId, abi.encode(0, alice, 0, amount, new bytes(0)) @@ -359,7 +359,7 @@ contract L1AssetRouterHyperEnabledTest is L1AssetRouterTest { bridgehubAddress, // solhint-disable-next-line func-named-parameters abi.encodeWithSelector( - IBridgehub.proveL2MessageInclusion.selector, + IBridgehubBase.proveL2MessageInclusion.selector, chainId, l2BatchNumber, l2MessageIndex, diff --git a/l1-contracts/test/foundry/l1/unit/concrete/Bridges/L1SharedBridge/L1SharedBridgeLegacy.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/Bridges/L1SharedBridge/L1SharedBridgeLegacy.t.sol index fb8cead68b..daeded9ff5 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/Bridges/L1SharedBridge/L1SharedBridgeLegacy.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/Bridges/L1SharedBridge/L1SharedBridgeLegacy.t.sol @@ -6,8 +6,9 @@ import "forge-std/console.sol"; import {L1AssetRouterTest} from "./_L1SharedBridge_Shared.t.sol"; import {ETH_TOKEN_ADDRESS} from "contracts/common/Config.sol"; -import {IBridgehub} from "contracts/bridgehub/IBridgehub.sol"; -import {L2Message, TxStatus} from "contracts/common/Messaging.sol"; +import {IL1Bridgehub} from "contracts/bridgehub/IL1Bridgehub.sol"; +import {IBridgehubBase} from "contracts/bridgehub/IBridgehubBase.sol"; +import {L2Message} from "contracts/common/Messaging.sol"; import {IMailboxImpl} from "contracts/state-transition/chain-interfaces/IMailboxImpl.sol"; import {IL1ERC20Bridge} from "contracts/bridge/interfaces/IL1ERC20Bridge.sol"; import {L2_ASSET_ROUTER_ADDR, L2_BASE_TOKEN_SYSTEM_CONTRACT_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; @@ -32,7 +33,7 @@ contract L1AssetRouterLegacyTest is L1AssetRouterTest { vm.mockCall( bridgehubAddress, - abi.encodeWithSelector(IBridgehub.requestL2TransactionDirect.selector), + abi.encodeWithSelector(IL1Bridgehub.requestL2TransactionDirect.selector), abi.encode(txHash) ); @@ -56,7 +57,7 @@ contract L1AssetRouterLegacyTest is L1AssetRouterTest { _setNativeTokenVaultChainBalance(eraChainId, ETH_TOKEN_ADDRESS, amount); vm.mockCall( bridgehubAddress, - abi.encodeWithSelector(IBridgehub.baseToken.selector), + abi.encodeWithSelector(IBridgehubBase.baseToken.selector), abi.encode(ETH_TOKEN_ADDRESS) ); @@ -71,7 +72,7 @@ contract L1AssetRouterLegacyTest is L1AssetRouterTest { bridgehubAddress, // solhint-disable-next-line func-named-parameters abi.encodeWithSelector( - IBridgehub.proveL2MessageInclusion.selector, + IBridgehubBase.proveL2MessageInclusion.selector, eraChainId, l2BatchNumber, l2MessageIndex, @@ -118,7 +119,7 @@ contract L1AssetRouterLegacyTest is L1AssetRouterTest { bridgehubAddress, // solhint-disable-next-line func-named-parameters abi.encodeWithSelector( - IBridgehub.proveL2MessageInclusion.selector, + IBridgehubBase.proveL2MessageInclusion.selector, eraChainId, l2BatchNumber, l2MessageIndex, diff --git a/l1-contracts/test/foundry/l1/unit/concrete/Bridges/L1SharedBridge/_L1SharedBridge_Shared.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/Bridges/L1SharedBridge/_L1SharedBridge_Shared.t.sol index cc294096bb..ba09aec715 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/Bridges/L1SharedBridge/_L1SharedBridge_Shared.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/Bridges/L1SharedBridge/_L1SharedBridge_Shared.t.sol @@ -8,19 +8,20 @@ import {TransparentUpgradeableProxy} from "@openzeppelin/contracts-v4/proxy/tran import {ERC20} from "@openzeppelin/contracts-v4/token/ERC20/ERC20.sol"; import {L1AssetRouter} from "contracts/bridge/asset-router/L1AssetRouter.sol"; -import {IL1AssetRouter} from "contracts/bridge/asset-router/IL1AssetRouter.sol"; -import {IBridgehub} from "contracts/bridgehub/IBridgehub.sol"; + +import {IBridgehubBase} from "contracts/bridgehub/IBridgehubBase.sol"; +import {IL1Bridgehub} from "contracts/bridgehub/IL1Bridgehub.sol"; import {TestnetERC20Token} from "contracts/dev-contracts/TestnetERC20Token.sol"; import {L1NativeTokenVault} from "contracts/bridge/ntv/L1NativeTokenVault.sol"; import {L1Nullifier} from "contracts/bridge/L1Nullifier.sol"; import {L1NullifierDev} from "contracts/dev-contracts/L1NullifierDev.sol"; -import {IL1NativeTokenVault} from "contracts/bridge/ntv/IL1NativeTokenVault.sol"; -import {INativeTokenVault} from "contracts/bridge/ntv/INativeTokenVault.sol"; -import {IL1AssetHandler} from "contracts/bridge/interfaces/IL1AssetHandler.sol"; + +import {INativeTokenVaultBase} from "contracts/bridge/ntv/INativeTokenVaultBase.sol"; + import {IL1BaseTokenAssetHandler} from "contracts/bridge/interfaces/IL1BaseTokenAssetHandler.sol"; import {IL1ERC20Bridge} from "contracts/bridge/interfaces/IL1ERC20Bridge.sol"; import {ETH_TOKEN_ADDRESS} from "contracts/common/Config.sol"; -import {L2_ASSET_ROUTER_ADDR, L2_NATIVE_TOKEN_VAULT_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; +import {L2_NATIVE_TOKEN_VAULT_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; import {DataEncoding} from "contracts/common/libraries/DataEncoding.sol"; contract L1AssetRouterTest is Test { @@ -130,7 +131,7 @@ contract L1AssetRouterTest is Test { token = new TestnetERC20Token("TestnetERC20Token", "TET", 18); l1NullifierImpl = new L1NullifierDev({ - _bridgehub: IBridgehub(bridgehubAddress), + _bridgehub: IL1Bridgehub(bridgehubAddress), _eraChainId: eraChainId, _eraDiamondProxy: eraDiamondProxy }); @@ -144,7 +145,7 @@ contract L1AssetRouterTest is Test { l1Nullifier = L1Nullifier(payable(l1NullifierProxy)); sharedBridgeImpl = new L1AssetRouter({ - _l1WethAddress: l1WethAddress, + _l1WethToken: l1WethAddress, _bridgehub: bridgehubAddress, _l1Nullifier: address(l1Nullifier), _eraChainId: eraChainId, @@ -157,8 +158,8 @@ contract L1AssetRouterTest is Test { ); sharedBridge = L1AssetRouter(payable(sharedBridgeProxy)); nativeTokenVaultImpl = new L1NativeTokenVault({ - _l1WethAddress: l1WethAddress, - _l1AssetRouter: address(sharedBridge), + _wethToken: l1WethAddress, + _assetRouter: address(sharedBridge), _l1Nullifier: l1Nullifier }); address tokenBeacon = makeAddr("tokenBeacon"); @@ -179,7 +180,7 @@ contract L1AssetRouterTest is Test { sharedBridge.setL1Erc20Bridge(IL1ERC20Bridge(l1ERC20BridgeAddress)); tokenAssetId = DataEncoding.encodeNTVAssetId(block.chainid, address(token)); vm.prank(owner); - sharedBridge.setNativeTokenVault(INativeTokenVault(address(nativeTokenVault))); + sharedBridge.setNativeTokenVault(INativeTokenVaultBase(address(nativeTokenVault))); vm.prank(address(nativeTokenVault)); nativeTokenVault.registerToken(address(token)); nativeTokenVault.registerEthToken(); @@ -200,17 +201,17 @@ contract L1AssetRouterTest is Test { vm.mockCall( bridgehubAddress, - abi.encodeWithSelector(IBridgehub.baseTokenAssetId.selector), + abi.encodeWithSelector(IBridgehubBase.baseTokenAssetId.selector), abi.encode(ETH_TOKEN_ASSET_ID) ); vm.mockCall( bridgehubAddress, - abi.encodeWithSelector(IBridgehub.baseTokenAssetId.selector, chainId), + abi.encodeWithSelector(IBridgehubBase.baseTokenAssetId.selector, chainId), abi.encode(ETH_TOKEN_ASSET_ID) ); vm.mockCall( bridgehubAddress, - abi.encodeWithSelector(IBridgehub.requestL2TransactionDirect.selector), + abi.encodeWithSelector(IL1Bridgehub.requestL2TransactionDirect.selector), abi.encode(txHash) ); @@ -254,7 +255,7 @@ contract L1AssetRouterTest is Test { vm.mockCall( bridgehubAddress, // solhint-disable-next-line func-named-parameters - abi.encodeWithSelector(IBridgehub.baseToken.selector, chainId), + abi.encodeWithSelector(IBridgehubBase.baseToken.selector, chainId), abi.encode(ETH_TOKEN_ADDRESS) ); } @@ -291,7 +292,7 @@ contract L1AssetRouterTest is Test { // vm.prank(bridgehubAddress); vm.mockCall( bridgehubAddress, - abi.encodeWithSelector(IBridgehub.baseTokenAssetId.selector, chainId), + abi.encodeWithSelector(IBridgehubBase.baseTokenAssetId.selector, chainId), abi.encode(_assetId) ); } diff --git a/l1-contracts/test/foundry/l1/unit/concrete/Bridges/NativeTokenVault/L1NativeTokenVault.sol b/l1-contracts/test/foundry/l1/unit/concrete/Bridges/NativeTokenVault/L1NativeTokenVault.sol index f54ee963d7..6e7f8018f2 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/Bridges/NativeTokenVault/L1NativeTokenVault.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/Bridges/NativeTokenVault/L1NativeTokenVault.sol @@ -1,5 +1,4 @@ -import {StdStorage, Test, stdStorage} from "forge-std/Test.sol"; -import {Vm} from "forge-std/Vm.sol"; +import {Test} from "forge-std/Test.sol"; import {L1NativeTokenVault} from "contracts/bridge/ntv/L1NativeTokenVault.sol"; import {L1AssetRouter} from "contracts/bridge/asset-router/L1AssetRouter.sol"; diff --git a/l1-contracts/test/foundry/l1/unit/concrete/DiamondCut/Initialization.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/DiamondCut/Initialization.t.sol index 4c4d4b56c5..3d3016f996 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/DiamondCut/Initialization.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/DiamondCut/Initialization.t.sol @@ -36,7 +36,7 @@ contract InitializationTest is DiamondCutTest { } function test_RevertWhen_DelegateCallWithWrongInitializeData() public { - DiamondInit diamondInit = new DiamondInit(); + DiamondInit diamondInit = new DiamondInit(false); bytes memory diamondInitData = abi.encodeWithSelector( diamondInit.initialize.selector, Utils.makeInitializeData(address(0)) diff --git a/l1-contracts/test/foundry/l1/unit/concrete/DiamondCut/UpgradeLogic.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/DiamondCut/UpgradeLogic.t.sol index 7c42daa568..da5fc15024 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/DiamondCut/UpgradeLogic.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/DiamondCut/UpgradeLogic.t.sol @@ -52,7 +52,7 @@ contract UpgradeLogicTest is DiamondCutTest { DummyBridgehub dummyBridgehub = new DummyBridgehub(); diamondCutTestContract = new DiamondCutTestContract(); - diamondInit = new DiamondInit(); + diamondInit = new DiamondInit(false); adminFacet = new AdminFacet(block.chainid, RollupDAManager(address(0))); gettersFacet = new GettersFacet(); diff --git a/l1-contracts/test/foundry/l1/unit/concrete/Executor/Committing.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/Executor/Committing.t.sol index e0470686e2..88196bb592 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/Executor/Committing.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/Executor/Committing.t.sol @@ -3,15 +3,14 @@ pragma solidity 0.8.28; import "forge-std/console.sol"; import {Vm} from "forge-std/Test.sol"; -import {L2_BOOTLOADER_ADDRESS, L2_SYSTEM_CONTEXT_ADDRESS, L2_TO_L1_MESSENGER, Utils} from "../Utils/Utils.sol"; +import {L2_BOOTLOADER_ADDRESS, L2_SYSTEM_CONTEXT_ADDRESS, Utils} from "../Utils/Utils.sol"; import {EMPTY_PREPUBLISHED_COMMITMENT, ExecutorTest, POINT_EVALUATION_PRECOMPILE_RESULT} from "./_Executor_Shared.t.sol"; import {IExecutor, SystemLogKey, TOTAL_BLOBS_IN_COMMITMENT} from "contracts/state-transition/chain-interfaces/IExecutor.sol"; import {POINT_EVALUATION_PRECOMPILE_ADDR} from "contracts/common/Config.sol"; -import {L2_PUBDATA_CHUNK_PUBLISHER_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; -import {BLS_MODULUS} from "../../../da-contracts-imports/DAUtils.sol"; + import {BLOB_DATA_OFFSET} from "../../../da-contracts-imports/CalldataDA.sol"; -import {BlobHashCommitmentError, EmptyBlobVersionHash, InvalidPubdataCommitmentsSize, NonEmptyBlobVersionHash, OperatorDAInputTooSmall, PubdataCommitmentsEmpty} from "../../../da-contracts-imports/DAContractsErrors.sol"; +import {BlobHashCommitmentError, EmptyBlobVersionHash, InvalidPubdataCommitmentsSize, NonEmptyBlobVersionHash, OperatorDAInputTooSmall} from "../../../da-contracts-imports/DAContractsErrors.sol"; import {BatchHashMismatch, BatchNumberMismatch, CanOnlyProcessOneBatch, HashMismatch, InvalidLogSender, L2TimestampTooBig, LogAlreadyProcessed, MissingSystemLogs, TimeNotReached, TimestampError, UnexpectedSystemLog, ValueMismatch} from "contracts/common/L1ContractErrors.sol"; contract CommittingTest is ExecutorTest { diff --git a/l1-contracts/test/foundry/l1/unit/concrete/Executor/Executing.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/Executor/Executing.t.sol index 314d80ffdd..bf5062765c 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/Executor/Executing.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/Executor/Executing.t.sol @@ -9,7 +9,7 @@ import {EMPTY_PREPUBLISHED_COMMITMENT, ExecutorTest, POINT_EVALUATION_PRECOMPILE import {POINT_EVALUATION_PRECOMPILE_ADDR, REQUIRED_L2_GAS_PRICE_PER_PUBDATA, TESTNET_COMMIT_TIMESTAMP_NOT_OLDER} from "contracts/common/Config.sol"; import {L2_BOOTLOADER_ADDRESS} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; import {IExecutor, SystemLogKey} from "contracts/state-transition/chain-interfaces/IExecutor.sol"; -import {BatchHashMismatch, CantExecuteUnprovenBatches, NonSequentialBatch, PriorityOperationsRollingHashMismatch, QueueIsEmpty, TxHashMismatch} from "contracts/common/L1ContractErrors.sol"; +import {BatchHashMismatch, CantExecuteUnprovenBatches, NonSequentialBatch, PriorityOperationsRollingHashMismatch, QueueIsEmpty} from "contracts/common/L1ContractErrors.sol"; contract ExecutingTest is ExecutorTest { bytes32 l2DAValidatorOutputHash; diff --git a/l1-contracts/test/foundry/l1/unit/concrete/Executor/ExecutorProof.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/Executor/ExecutorProof.t.sol index 6fae1abb70..e43b14e231 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/Executor/ExecutorProof.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/Executor/ExecutorProof.t.sol @@ -47,7 +47,8 @@ contract TestExecutorFacet is ExecutorFacet { contract ExecutorProofTest is Test { UtilsFacet internal utilsFacet; TestExecutorFacet internal executor; - address internal testnetVerifier = address(new TestnetVerifier(IVerifierV2(address(0)), IVerifier(address(0)))); + address internal testnetVerifier = + address(new TestnetVerifier(IVerifierV2(address(0)), IVerifier(address(0)), address(0), false)); function getTestExecutorFacetSelectors() private pure returns (bytes4[] memory) { bytes4[] memory selectors = new bytes4[](3); @@ -88,7 +89,7 @@ contract ExecutorProofTest is Test { utilsFacet.util_setL2BootloaderBytecodeHash(0x010008ddde4acc465cde1c420883701caadb41954567c0b4e3a0d1093a7afde7); utilsFacet.util_setZkPorterAvailability(false); - bytes[] memory mockSystemLogs = Utils.createSystemLogsWithEmptyDAValidator(); + bytes[] memory mockSystemLogs = Utils.createSystemLogsWithNoneDAValidator(); IExecutor.CommitBatchInfo memory nextBatch = IExecutor.CommitBatchInfo({ // ignored diff --git a/l1-contracts/test/foundry/l1/unit/concrete/Executor/Precommitting.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/Executor/Precommitting.t.sol index 164a315de6..a5536cb290 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/Executor/Precommitting.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/Executor/Precommitting.t.sol @@ -3,7 +3,7 @@ pragma solidity 0.8.28; import "forge-std/console.sol"; import {Vm} from "forge-std/Test.sol"; -import {Utils} from "../Utils/Utils.sol"; + import {ExecutorTest} from "./_Executor_Shared.t.sol"; import {BatchDecoder} from "contracts/state-transition/libraries/BatchDecoder.sol"; diff --git a/l1-contracts/test/foundry/l1/unit/concrete/Executor/_Executor_Shared.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/Executor/_Executor_Shared.t.sol index 548af3ef57..1fd7bbd913 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/Executor/_Executor_Shared.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/Executor/_Executor_Shared.t.sol @@ -7,8 +7,8 @@ import {Test} from "forge-std/Test.sol"; import {ProxyAdmin} from "@openzeppelin/contracts-v4/proxy/transparent/ProxyAdmin.sol"; import {TransparentUpgradeableProxy} from "@openzeppelin/contracts-v4/proxy/transparent/TransparentUpgradeableProxy.sol"; import {ValidatorTimelock} from "contracts/state-transition/ValidatorTimelock.sol"; -import {Utils, DEFAULT_L2_LOGS_TREE_ROOT_HASH, L2_DA_VALIDATOR_ADDRESS} from "../Utils/Utils.sol"; -import {TESTNET_COMMIT_TIMESTAMP_NOT_OLDER, ETH_TOKEN_ADDRESS} from "contracts/common/Config.sol"; +import {DEFAULT_L2_LOGS_TREE_ROOT_HASH, L2_DA_COMMITMENT_SCHEME, Utils} from "../Utils/Utils.sol"; +import {ETH_TOKEN_ADDRESS, TESTNET_COMMIT_TIMESTAMP_NOT_OLDER} from "contracts/common/Config.sol"; import {DummyEraBaseTokenBridge} from "contracts/dev-contracts/test/DummyEraBaseTokenBridge.sol"; import {DummyChainTypeManagerForValidatorTimelock as DummyCTM} from "contracts/dev-contracts/test/DummyChainTypeManagerForValidatorTimelock.sol"; import {IChainTypeManager} from "contracts/state-transition/IChainTypeManager.sol"; @@ -16,26 +16,28 @@ import {DiamondInit} from "contracts/state-transition/chain-deps/DiamondInit.sol import {DiamondProxy} from "contracts/state-transition/chain-deps/DiamondProxy.sol"; import {FeeParams, PubdataPricingMode, VerifierParams} from "contracts/state-transition/chain-deps/ZKChainStorage.sol"; import {TestExecutor} from "contracts/dev-contracts/test/TestExecutor.sol"; -import {ExecutorFacet} from "contracts/state-transition/chain-deps/facets/Executor.sol"; + import {GettersFacet} from "contracts/state-transition/chain-deps/facets/Getters.sol"; import {AdminFacet} from "contracts/state-transition/chain-deps/facets/Admin.sol"; import {MailboxFacet} from "contracts/state-transition/chain-deps/facets/Mailbox.sol"; import {InitializeData} from "contracts/state-transition/chain-interfaces/IDiamondInit.sol"; -import {IExecutor, TOTAL_BLOBS_IN_COMMITMENT} from "contracts/state-transition/chain-interfaces/IExecutor.sol"; +import {IExecutor} from "contracts/state-transition/chain-interfaces/IExecutor.sol"; import {IVerifierV2} from "contracts/state-transition/chain-interfaces/IVerifierV2.sol"; import {IVerifier} from "contracts/state-transition/chain-interfaces/IVerifier.sol"; -import {IL1DAValidator} from "contracts/state-transition/chain-interfaces/IL1DAValidator.sol"; + import {Diamond} from "contracts/state-transition/libraries/Diamond.sol"; import {TestnetVerifier} from "contracts/state-transition/verifiers/TestnetVerifier.sol"; import {DummyBridgehub} from "contracts/dev-contracts/test/DummyBridgehub.sol"; -import {MessageRoot} from "contracts/bridgehub/MessageRoot.sol"; -import {IBridgehub} from "contracts/bridgehub/IBridgehub.sol"; +import {L1MessageRoot} from "contracts/bridgehub/L1MessageRoot.sol"; +import {IBridgehubBase} from "contracts/bridgehub/IBridgehubBase.sol"; import {IL1AssetRouter} from "contracts/bridge/asset-router/IL1AssetRouter.sol"; -import {IAssetRouterBase} from "contracts/bridge/asset-router/IAssetRouterBase.sol"; + import {DataEncoding} from "contracts/common/libraries/DataEncoding.sol"; import {RollupDAManager} from "contracts/state-transition/data-availability/RollupDAManager.sol"; +import {MessageRootBase} from "contracts/bridgehub/MessageRootBase.sol"; + bytes32 constant EMPTY_PREPUBLISHED_COMMITMENT = 0x0000000000000000000000000000000000000000000000000000000000000000; bytes constant POINT_EVALUATION_PRECOMPILE_RESULT = hex"000000000000000000000000000000000000000000000000000000000000100073eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000001"; @@ -56,7 +58,7 @@ contract ExecutorTest is Test { DummyEraBaseTokenBridge internal sharedBridge; ValidatorTimelock internal validatorTimelock; address internal rollupL1DAValidator; - MessageRoot internal messageRoot; + L1MessageRoot internal messageRoot; uint256 eraChainId; @@ -179,17 +181,18 @@ contract ExecutorTest is Test { validator = makeAddr("validator"); randomSigner = makeAddr("randomSigner"); DummyBridgehub dummyBridgehub = new DummyBridgehub(); - messageRoot = new MessageRoot(IBridgehub(address(dummyBridgehub)), l1ChainID); + messageRoot = new L1MessageRoot(address(dummyBridgehub)); dummyBridgehub.setMessageRoot(address(messageRoot)); sharedBridge = new DummyEraBaseTokenBridge(); dummyBridgehub.setSharedBridge(address(sharedBridge)); - vm.mockCall( - address(messageRoot), - abi.encodeWithSelector(MessageRoot.addChainBatchRoot.selector, 9, 1, bytes32(0)), - abi.encode() - ); + // FIXME: amend the tests as appending chain batch roots is not allowed on L1. + // vm.mockCall( + // address(messageRoot), + // abi.encodeWithSelector(MessageRootBase.addChainBatchRoot.selector, 9, 1, bytes32(0)), + // abi.encode() + // ); eraChainId = 9; @@ -206,11 +209,9 @@ contract ExecutorTest is Test { abi.encodeWithSelector(IChainTypeManager.protocolVersionIsActive.selector), abi.encode(bool(true)) ); - + DiamondInit diamondInit = new DiamondInit(false); validatorTimelock = ValidatorTimelock(deployValidatorTimelock(address(dummyBridgehub), owner, 0)); - DiamondInit diamondInit = new DiamondInit(); - bytes8 dummyHash = 0x1234567890123456; genesisStoredBatchInfo = IExecutor.StoredBatchInfo({ @@ -224,7 +225,12 @@ contract ExecutorTest is Test { timestamp: 0, commitment: bytes32("") }); - TestnetVerifier testnetVerifier = new TestnetVerifier(IVerifierV2(address(0)), IVerifier(address(0))); + TestnetVerifier testnetVerifier = new TestnetVerifier( + IVerifierV2(address(0)), + IVerifier(address(0)), + address(0), + false + ); InitializeData memory params = InitializeData({ // TODO REVIEW @@ -296,7 +302,7 @@ contract ExecutorTest is Test { vm.prank(address(chainTypeManager)); admin.setTokenMultiplier(1, 1); vm.prank(address(owner)); - admin.setDAValidatorPair(address(rollupL1DAValidator), L2_DA_VALIDATOR_ADDRESS); + admin.setDAValidatorPair(address(rollupL1DAValidator), L2_DA_COMMITMENT_SCHEME); // Allow to call executor directly, without going through ValidatorTimelock vm.prank(address(chainTypeManager)); diff --git a/l1-contracts/test/foundry/l1/unit/concrete/Governance/AccessControlRestriction.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/Governance/AccessControlRestriction.t.sol index 818fe9e890..8a9d0acb72 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/Governance/AccessControlRestriction.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/Governance/AccessControlRestriction.t.sol @@ -9,8 +9,8 @@ import {IChainAdmin} from "contracts/governance/IChainAdmin.sol"; import {ChainAdmin} from "contracts/governance/ChainAdmin.sol"; import {AccessControlRestriction} from "contracts/governance/AccessControlRestriction.sol"; import {IAccessControlRestriction} from "contracts/governance/IAccessControlRestriction.sol"; -import {Utils} from "test/foundry/l1/unit/concrete/Utils/Utils.sol"; -import {AccessToFallbackDenied, AccessToFunctionDenied, NoCallsProvided, ZeroAddress} from "contracts/common/L1ContractErrors.sol"; + +import {AccessToFallbackDenied, AccessToFunctionDenied, ZeroAddress} from "contracts/common/L1ContractErrors.sol"; import {Call} from "contracts/governance/Common.sol"; contract AccessRestrictionTest is Test { diff --git a/l1-contracts/test/foundry/l1/unit/concrete/Governance/ChainAdmin.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/Governance/ChainAdmin.t.sol index c91627964b..2170e12045 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/Governance/ChainAdmin.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/Governance/ChainAdmin.t.sol @@ -11,7 +11,6 @@ import {GettersFacet} from "contracts/state-transition/chain-deps/facets/Getters import {Call} from "contracts/governance/Common.sol"; import {DummyRestriction} from "contracts/dev-contracts/DummyRestriction.sol"; import {AccessToFallbackDenied, AccessToFunctionDenied, NoCallsProvided, NotARestriction, RestrictionWasAlreadyPresent, RestrictionWasNotPresent} from "contracts/common/L1ContractErrors.sol"; -import {Utils} from "test/foundry/l1/unit/concrete/Utils/Utils.sol"; contract ChainAdminTest is Test { ChainAdmin internal chainAdmin; diff --git a/l1-contracts/test/foundry/l1/unit/concrete/Governance/PermanentRestriction.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/Governance/PermanentRestriction.t.sol index d67cb1a821..ffcbc092ba 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/Governance/PermanentRestriction.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/Governance/PermanentRestriction.t.sol @@ -2,34 +2,35 @@ pragma solidity 0.8.28; import "@openzeppelin/contracts-v4/utils/Strings.sol"; import {TransparentUpgradeableProxy} from "@openzeppelin/contracts-v4/proxy/transparent/TransparentUpgradeableProxy.sol"; -import {Bridgehub} from "contracts/bridgehub/Bridgehub.sol"; -import {BridgehubBurnCTMAssetData, IBridgehub, L2TransactionRequestTwoBridgesOuter} from "contracts/bridgehub/IBridgehub.sol"; -import {Diamond} from "contracts/state-transition/libraries/Diamond.sol"; + +import {BridgehubBurnCTMAssetData, IBridgehubBase, L2TransactionRequestTwoBridgesOuter} from "contracts/bridgehub/IBridgehubBase.sol"; +import {IL1Bridgehub} from "contracts/bridgehub/IL1Bridgehub.sol"; + import {ChainTypeManager} from "contracts/state-transition/ChainTypeManager.sol"; -import {DiamondInit} from "contracts/state-transition/chain-deps/DiamondInit.sol"; + import {PermanentRestriction} from "contracts/governance/PermanentRestriction.sol"; import {IPermanentRestriction} from "contracts/governance/IPermanentRestriction.sol"; -import {CallNotAllowed, InvalidSelector, NotAllowed, RemovingPermanentRestriction, UnallowedImplementation, UnsupportedEncodingVersion, ZeroAddress} from "contracts/common/L1ContractErrors.sol"; +import {CallNotAllowed, InvalidSelector, NotAllowed, RemovingPermanentRestriction, UnallowedImplementation, ZeroAddress} from "contracts/common/L1ContractErrors.sol"; import {Call} from "contracts/governance/Common.sol"; import {IZKChain} from "contracts/state-transition/chain-interfaces/IZKChain.sol"; -import {FeeParams, PubdataPricingMode, VerifierParams} from "contracts/state-transition/chain-deps/ZKChainStorage.sol"; + import {IAdmin} from "contracts/state-transition/chain-interfaces/IAdmin.sol"; import {AccessControlRestriction} from "contracts/governance/AccessControlRestriction.sol"; import {ChainAdmin} from "contracts/governance/ChainAdmin.sol"; -import {IChainAdmin} from "contracts/governance/IChainAdmin.sol"; + import {ChainTypeManagerTest} from "test/foundry/l1/unit/concrete/state-transition/ChainTypeManager/_ChainTypeManager_Shared.t.sol"; import {DataEncoding} from "contracts/common/libraries/DataEncoding.sol"; import {ICTMDeploymentTracker} from "contracts/bridgehub/ICTMDeploymentTracker.sol"; -import {IMessageRoot} from "contracts/bridgehub/IMessageRoot.sol"; -import {MessageRoot} from "contracts/bridgehub/MessageRoot.sol"; + +import {L1MessageRoot} from "contracts/bridgehub/L1MessageRoot.sol"; import {IL1AssetRouter} from "contracts/bridge/asset-router/IL1AssetRouter.sol"; -import {IL1Nullifier} from "contracts/bridge/interfaces/IL1Nullifier.sol"; + import {L2ContractHelper} from "contracts/common/l2-helpers/L2ContractHelper.sol"; import {IAssetRouterBase} from "contracts/bridge/asset-router/IAssetRouterBase.sol"; import {IERC20Metadata} from "@openzeppelin/contracts-v4/token/ERC20/extensions/IERC20Metadata.sol"; contract TestPermanentRestriction is PermanentRestriction { - constructor(IBridgehub _bridgehub, address _l2AdminFactory) PermanentRestriction(_bridgehub, _l2AdminFactory) {} + constructor(IL1Bridgehub _bridgehub, address _l2AdminFactory) PermanentRestriction(_bridgehub, _l2AdminFactory) {} function isAdminOfAChain(address _chain) external view returns (bool) { return _isAdminOfAChain(_chain); @@ -41,6 +42,7 @@ contract TestPermanentRestriction is PermanentRestriction { } contract PermanentRestrictionTest is ChainTypeManagerTest { + uint256 internal L1_CHAIN_ID; ChainAdmin internal chainAdmin; AccessControlRestriction internal restriction; TestPermanentRestriction internal permRestriction; @@ -62,10 +64,11 @@ contract PermanentRestrictionTest is ChainTypeManagerTest { address[] memory restrictions = new address[](1); restrictions[0] = address(restriction); chainAdmin = new ChainAdmin(restrictions); + L1_CHAIN_ID = 5; } function _deployPermRestriction( - IBridgehub _bridgehub, + IL1Bridgehub _bridgehub, address _l2AdminFactory, address _owner ) internal returns (TestPermanentRestriction proxy, TestPermanentRestriction impl) { @@ -269,7 +272,7 @@ contract PermanentRestrictionTest is ChainTypeManagerTest { secondBridgeCalldata: hex"" }); if (!correctSecondBridge) { - call.data = abi.encodeCall(Bridgehub.requestL2TransactionTwoBridges, (outer)); + call.data = abi.encodeCall(IL1Bridgehub.requestL2TransactionTwoBridges, (outer)); // 0 is not correct second bridge return call; } @@ -284,12 +287,12 @@ contract PermanentRestrictionTest is ChainTypeManagerTest { // Gateway chain id, we do not need it chainId: 0, ctmData: abi.encode(l2Admin, hex""), - chainData: abi.encode(IZKChain(IBridgehub(bridgehub).getZKChain(chainId)).getProtocolVersion()) + chainData: abi.encode(IZKChain(IBridgehubBase(bridgehub).getZKChain(chainId)).getProtocolVersion()) }) ); outer.secondBridgeCalldata = abi.encodePacked(bytes1(encoding), abi.encode(chainAssetId, bridgehubData)); - call.data = abi.encodeCall(Bridgehub.requestL2TransactionTwoBridges, (outer)); + call.data = abi.encodeCall(IL1Bridgehub.requestL2TransactionTwoBridges, (outer)); } function assertInvalidMigrationCall(Call memory call) public { @@ -366,7 +369,7 @@ contract PermanentRestrictionTest is ChainTypeManagerTest { bridgehub.setAddresses( sharedBridge, ICTMDeploymentTracker(address(0)), - new MessageRoot(bridgehub, block.chainid), + new L1MessageRoot(address(bridgehub)), address(0) ); vm.stopPrank(); @@ -392,7 +395,7 @@ contract PermanentRestrictionTest is ChainTypeManagerTest { ); vm.mockCall( address(bridgehub), - abi.encodeWithSelector(Bridgehub.baseToken.selector, chainId), + abi.encodeWithSelector(IBridgehubBase.baseToken.selector, chainId), abi.encode(baseToken) ); vm.mockCall(address(baseToken), abi.encodeWithSelector(IERC20Metadata.name.selector), abi.encode("TestToken")); diff --git a/l1-contracts/test/foundry/l1/unit/concrete/Utils/Utils.sol b/l1-contracts/test/foundry/l1/unit/concrete/Utils/Utils.sol index 6555e0234e..3ae1713108 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/Utils/Utils.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/Utils/Utils.sol @@ -20,6 +20,8 @@ import {InteropRoot, L2CanonicalTransaction} from "contracts/common/Messaging.so import {DummyBridgehub} from "contracts/dev-contracts/test/DummyBridgehub.sol"; import {PriorityOpsBatchInfo} from "contracts/state-transition/libraries/PriorityTree.sol"; import {InvalidBlobCommitmentsLength, InvalidBlobHashesLength} from "test/foundry/L1TestsErrors.sol"; +import {Utils as DeployUtils} from "deploy-scripts/Utils.sol"; +import {L2DACommitmentScheme} from "contracts/common/Config.sol"; import {ContractsBytecodesLib} from "deploy-scripts/ContractsBytecodesLib.sol"; bytes32 constant DEFAULT_L2_LOGS_TREE_ROOT_HASH = 0x0000000000000000000000000000000000000000000000000000000000000000; @@ -28,7 +30,7 @@ address constant L2_BOOTLOADER_ADDRESS = 0x0000000000000000000000000000000000008 address constant L2_KNOWN_CODE_STORAGE_ADDRESS = 0x0000000000000000000000000000000000008004; address constant L2_TO_L1_MESSENGER = 0x0000000000000000000000000000000000008008; // constant in tests, but can be arbitrary address in real environments -address constant L2_DA_VALIDATOR_ADDRESS = 0x2f3Bc0cB46C9780990afbf86A60bdf6439DE991C; +L2DACommitmentScheme constant L2_DA_COMMITMENT_SCHEME = L2DACommitmentScheme.PUBDATA_KECCAK256; uint256 constant MAX_NUMBER_OF_BLOBS = 6; uint256 constant TOTAL_BLOBS_IN_COMMITMENT = 16; @@ -103,7 +105,7 @@ library Utils { true, L2_TO_L1_MESSENGER, uint256(SystemLogKey.USED_L2_DA_VALIDATOR_ADDRESS_KEY), - bytes32(uint256(uint160(L2_DA_VALIDATOR_ADDRESS))) + bytes32(uint256(L2_DA_COMMITMENT_SCHEME)) ); logs[7] = constructL2Log( true, @@ -121,13 +123,13 @@ library Utils { return logs; } - function createSystemLogsWithEmptyDAValidator() public returns (bytes[] memory) { + function createSystemLogsWithNoneDAValidator() public returns (bytes[] memory) { bytes[] memory systemLogs = createSystemLogs(bytes32(0)); systemLogs[uint256(SystemLogKey.USED_L2_DA_VALIDATOR_ADDRESS_KEY)] = constructL2Log( true, L2_TO_L1_MESSENGER, uint256(SystemLogKey.USED_L2_DA_VALIDATOR_ADDRESS_KEY), - bytes32(uint256(0)) + bytes32(uint256(L2DACommitmentScheme.NONE)) ); return systemLogs; @@ -342,7 +344,7 @@ library Utils { } function getUtilsFacetSelectors() public pure returns (bytes4[] memory) { - bytes4[] memory selectors = new bytes4[](44); + bytes4[] memory selectors = new bytes4[](46); uint256 i = 0; selectors[i++] = UtilsFacet.util_setChainId.selector; @@ -389,6 +391,7 @@ library Utils { selectors[i++] = UtilsFacet.util_setTotalBatchesCommitted.selector; selectors[i++] = UtilsFacet.util_getBaseTokenGasPriceMultiplierDenominator.selector; selectors[i++] = UtilsFacet.util_getBaseTokenGasPriceMultiplierNominator.selector; + selectors[i++] = UtilsFacet.util_getL2DACommimentScheme.selector; return selectors; } @@ -453,7 +456,7 @@ library Utils { } function makeDiamondProxy(Diamond.FacetCut[] memory facetCuts, address testnetVerifier) public returns (address) { - DiamondInit diamondInit = new DiamondInit(); + DiamondInit diamondInit = new DiamondInit(false); bytes memory diamondInitData = abi.encodeWithSelector( diamondInit.initialize.selector, makeInitializeData(testnetVerifier) diff --git a/l1-contracts/test/foundry/l1/unit/concrete/Utils/Utils.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/Utils/Utils.t.sol index d55aa3e673..8918ef5cb7 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/Utils/Utils.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/Utils/Utils.t.sol @@ -3,7 +3,7 @@ pragma solidity 0.8.28; import {Test} from "forge-std/Test.sol"; -import {L2_BOOTLOADER_ADDRESS, L2_DA_VALIDATOR_ADDRESS, L2_SYSTEM_CONTEXT_ADDRESS, L2_TO_L1_MESSENGER, SystemLogKey, Utils} from "./Utils.sol"; +import {L2_BOOTLOADER_ADDRESS, L2_DA_COMMITMENT_SCHEME, L2_SYSTEM_CONTEXT_ADDRESS, L2_TO_L1_MESSENGER, SystemLogKey, Utils} from "./Utils.sol"; // solhint-enable max-line-length @@ -118,7 +118,7 @@ contract UtilsTest is Test { true, L2_TO_L1_MESSENGER, uint256(SystemLogKey.USED_L2_DA_VALIDATOR_ADDRESS_KEY), - bytes32(uint256(uint160(L2_DA_VALIDATOR_ADDRESS))) + bytes32(uint256(L2_DA_COMMITMENT_SCHEME)) ), "log[6] should be correct" ); diff --git a/l1-contracts/test/foundry/l1/unit/concrete/Utils/UtilsFacet.sol b/l1-contracts/test/foundry/l1/unit/concrete/Utils/UtilsFacet.sol index 29d2b34b23..ecb18791f2 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/Utils/UtilsFacet.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/Utils/UtilsFacet.sol @@ -5,6 +5,7 @@ pragma solidity 0.8.28; import {FeeParams, IVerifier, VerifierParams} from "contracts/state-transition/chain-deps/ZKChainStorage.sol"; import {ZKChainBase} from "contracts/state-transition/chain-deps/facets/ZKChainBase.sol"; import {Diamond} from "contracts/state-transition/libraries/Diamond.sol"; +import {L2DACommitmentScheme} from "contracts/common/Config.sol"; contract UtilsFacet is ZKChainBase { function util_setChainId(uint256 _chainId) external { @@ -185,6 +186,10 @@ contract UtilsFacet is ZKChainBase { return s.baseTokenGasPriceMultiplierNominator; } + function util_getL2DACommimentScheme() external view returns (L2DACommitmentScheme) { + return s.l2DACommitmentScheme; + } + // add this to be excluded from coverage report function test() internal virtual {} } diff --git a/l1-contracts/test/foundry/l1/unit/concrete/ValidatorTimelock/ValidatorTimelock.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/ValidatorTimelock/ValidatorTimelock.t.sol index dbc85a55f4..c3eb223f8f 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/ValidatorTimelock/ValidatorTimelock.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/ValidatorTimelock/ValidatorTimelock.t.sol @@ -9,10 +9,10 @@ import {ValidatorTimelock} from "contracts/state-transition/ValidatorTimelock.so import {IExecutor} from "contracts/state-transition/chain-interfaces/IExecutor.sol"; import {IGetters} from "contracts/state-transition/chain-interfaces/IGetters.sol"; import {DummyChainTypeManagerForValidatorTimelock} from "contracts/dev-contracts/test/DummyChainTypeManagerForValidatorTimelock.sol"; -import {IChainTypeManager} from "contracts/state-transition/IChainTypeManager.sol"; -import {Unauthorized, TimeNotReached, RoleAccessDenied} from "contracts/common/L1ContractErrors.sol"; + +import {RoleAccessDenied, TimeNotReached} from "contracts/common/L1ContractErrors.sol"; import {DummyBridgehub} from "contracts/dev-contracts/test/DummyBridgehub.sol"; -import {IBridgehub} from "contracts/bridgehub/IBridgehub.sol"; + import {AccessControlEnumerablePerChainAddressUpgradeable} from "contracts/state-transition/AccessControlEnumerablePerChainAddressUpgradeable.sol"; contract ValidatorTimelockTest is Test { diff --git a/l1-contracts/test/foundry/l1/unit/concrete/Verifier/PlonkVerifier.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/Verifier/PlonkVerifier.t.sol index c84aaed50d..cf22e19e64 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/Verifier/PlonkVerifier.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/Verifier/PlonkVerifier.t.sol @@ -3,7 +3,7 @@ pragma solidity 0.8.28; import {Test} from "forge-std/Test.sol"; -import {L1VerifierPlonk} from "contracts/state-transition/verifiers/L1VerifierPlonk.sol"; +import {EraVerifierPlonk} from "contracts/state-transition/verifiers/EraVerifierPlonk.sol"; import {PlonkVerifierTest} from "contracts/dev-contracts/test/PlonkVerifierTest.sol"; contract PlonkVerifierTestTest is Test { @@ -14,7 +14,7 @@ contract PlonkVerifierTestTest is Test { uint256[] public serializedProof; uint256[] public recursiveAggregationInput; - L1VerifierPlonk public verifier; + EraVerifierPlonk public verifier; function setUp() public virtual { publicInputs.push(17257057577815541751225964212897374444694342989384539141520877492729); diff --git a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/AccessControlEnumerablePerChainAddressUpgradeable.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/AccessControlEnumerablePerChainAddressUpgradeable.t.sol index 96cfce4d9c..df11354937 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/AccessControlEnumerablePerChainAddressUpgradeable.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/AccessControlEnumerablePerChainAddressUpgradeable.t.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.28; import {Test} from "forge-std/Test.sol"; import {AccessControlEnumerablePerChainAddressUpgradeable} from "contracts/state-transition/AccessControlEnumerablePerChainAddressUpgradeable.sol"; -import {RoleAccessDenied, DefaultAdminTransferNotAllowed} from "contracts/common/L1ContractErrors.sol"; +import {DefaultAdminTransferNotAllowed, RoleAccessDenied} from "contracts/common/L1ContractErrors.sol"; // Mock implementation for testing contract MockAccessControlEnumerable is AccessControlEnumerablePerChainAddressUpgradeable { diff --git a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/ChainTypeManager/ChainTypeManagerSetters.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/ChainTypeManager/ChainTypeManagerSetters.t.sol index 8b0b5036ea..0b7ec66df2 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/ChainTypeManager/ChainTypeManagerSetters.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/ChainTypeManager/ChainTypeManagerSetters.t.sol @@ -5,7 +5,6 @@ import {ChainTypeManagerTest} from "./_ChainTypeManager_Shared.t.sol"; import {GettersFacet} from "contracts/state-transition/chain-deps/facets/Getters.sol"; import {UtilsFacet} from "foundry-test/l1/unit/concrete/Utils/UtilsFacet.sol"; import {FeeParams, PubdataPricingMode} from "contracts/state-transition/chain-deps/ZKChainStorage.sol"; -import {Bridgehub} from "contracts/bridgehub/Bridgehub.sol"; contract ChainTypeManagerSetters is ChainTypeManagerTest { function setUp() public { diff --git a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/ChainTypeManager/CreateNewChain.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/ChainTypeManager/CreateNewChain.t.sol index a147ab7547..7f99c46a35 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/ChainTypeManager/CreateNewChain.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/ChainTypeManager/CreateNewChain.t.sol @@ -4,13 +4,12 @@ pragma solidity 0.8.28; import {ChainTypeManagerTest} from "./_ChainTypeManager_Shared.t.sol"; import {Diamond} from "contracts/state-transition/libraries/Diamond.sol"; import {DataEncoding} from "contracts/common/libraries/DataEncoding.sol"; -import {HashMismatch, Unauthorized, ZKChainLimitReached, ZeroAddress} from "contracts/common/L1ContractErrors.sol"; +import {HashMismatch, Unauthorized} from "contracts/common/L1ContractErrors.sol"; import {IZKChain} from "contracts/state-transition/chain-interfaces/IZKChain.sol"; import {ChainTypeManager} from "contracts/state-transition/ChainTypeManager.sol"; -import {Bridgehub} from "contracts/bridgehub/Bridgehub.sol"; -import {console} from "forge-std/console.sol"; -import {L1GenesisUpgrade} from "contracts/upgrades/L1GenesisUpgrade.sol"; +import {IL1Bridgehub} from "contracts/bridgehub/IL1Bridgehub.sol"; +import {IBridgehubBase} from "contracts/bridgehub/IBridgehubBase.sol"; contract createNewChainTest is ChainTypeManagerTest { function setUp() public { @@ -59,7 +58,7 @@ contract createNewChainTest is ChainTypeManagerTest { uint256[] memory mockData = new uint256[](1); mockData[0] = chainId; - vm.mockCall(address(bridgehub), abi.encodeCall(Bridgehub.getAllZKChainChainIDs, ()), abi.encode(mockData)); + vm.mockCall(address(bridgehub), abi.encodeCall(IBridgehubBase.getAllZKChainChainIDs, ()), abi.encode(mockData)); uint256[] memory chainIds = _getAllZKChainIDs(); assertEq(chainIds.length, 1); diff --git a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/ChainTypeManager/FreezeChain.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/ChainTypeManager/FreezeChain.t.sol index 461d3b2b1c..41ceeed98b 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/ChainTypeManager/FreezeChain.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/ChainTypeManager/FreezeChain.t.sol @@ -3,8 +3,8 @@ pragma solidity 0.8.28; import {ChainTypeManagerTest} from "./_ChainTypeManager_Shared.t.sol"; import {GettersFacet} from "contracts/state-transition/chain-deps/facets/Getters.sol"; -import {IAdmin} from "contracts/state-transition/chain-interfaces/IAdmin.sol"; -import {IBridgehub} from "contracts/bridgehub/IBridgehub.sol"; + +import {IBridgehubBase} from "contracts/bridgehub/IBridgehubBase.sol"; import {DiamondAlreadyFrozen} from "contracts/common/L1ContractErrors.sol"; contract freezeChainTest is ChainTypeManagerTest { @@ -17,7 +17,7 @@ contract freezeChainTest is ChainTypeManagerTest { vm.mockCall( address(bridgehub), - abi.encodeWithSelector(IBridgehub.getZKChain.selector), + abi.encodeWithSelector(IBridgehubBase.getZKChain.selector), abi.encode(newChainAddress) ); @@ -45,7 +45,7 @@ contract freezeChainTest is ChainTypeManagerTest { vm.mockCall( address(bridgehub), - abi.encodeWithSelector(IBridgehub.getZKChain.selector), + abi.encodeWithSelector(IBridgehubBase.getZKChain.selector), abi.encode(newChainAddress) ); diff --git a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/ChainTypeManager/Initialize.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/ChainTypeManager/Initialize.t.sol index ab0ea23a85..6acccc074c 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/ChainTypeManager/Initialize.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/ChainTypeManager/Initialize.t.sol @@ -4,7 +4,7 @@ pragma solidity 0.8.28; import {TransparentUpgradeableProxy} from "@openzeppelin/contracts-v4/proxy/transparent/TransparentUpgradeableProxy.sol"; import {ChainTypeManager} from "contracts/state-transition/ChainTypeManager.sol"; import {ChainCreationParams, ChainTypeManagerInitializeData} from "contracts/state-transition/IChainTypeManager.sol"; -import {GenesisBatchCommitmentZero, GenesisBatchHashZero, GenesisIndexStorageZero, GenesisUpgradeZero} from "contracts/common/L1ContractErrors.sol"; +import {GenesisBatchCommitmentZero, GenesisBatchHashZero, GenesisUpgradeZero} from "contracts/common/L1ContractErrors.sol"; import {ChainTypeManagerTest} from "./_ChainTypeManager_Shared.t.sol"; contract ChainTypeManagerInitializeTest is ChainTypeManagerTest { @@ -64,19 +64,6 @@ contract ChainTypeManagerInitializeTest is ChainTypeManagerTest { _deployCtmWithParams(chainCreationParams, GenesisBatchHashZero.selector); } - function test_RevertWhen_genesisIndexRepeatedStorageChangesIsZero() public asBridgeHub { - ChainCreationParams memory chainCreationParams = ChainCreationParams({ - genesisUpgrade: address(genesisUpgradeContract), - genesisBatchHash: bytes32(uint256(0x01)), - genesisIndexRepeatedStorageChanges: 0, - genesisBatchCommitment: bytes32(uint256(0x01)), - diamondCut: getDiamondCutData(address(diamondInit)), - forceDeploymentsData: bytes("") - }); - - _deployCtmWithParams(chainCreationParams, GenesisIndexStorageZero.selector); - } - function test_RevertWhen_genesisBatchCommitmentIsZero() public asBridgeHub { ChainCreationParams memory chainCreationParams = ChainCreationParams({ genesisUpgrade: address(genesisUpgradeContract), diff --git a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/ChainTypeManager/ProtocolVersion.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/ChainTypeManager/ProtocolVersion.t.sol index bd36ea94ba..3a9c319563 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/ChainTypeManager/ProtocolVersion.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/ChainTypeManager/ProtocolVersion.t.sol @@ -5,7 +5,6 @@ import {ChainTypeManagerTest} from "./_ChainTypeManager_Shared.t.sol"; import {Diamond} from "contracts/state-transition/libraries/Diamond.sol"; import {ProtocolIdNotGreater} from "contracts/common/L1ContractErrors.sol"; import {SemVer} from "contracts/common/libraries/SemVer.sol"; -import {Bridgehub} from "contracts/bridgehub/Bridgehub.sol"; contract ProtocolVersion is ChainTypeManagerTest { function setUp() public { diff --git a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/ChainTypeManager/RevertBatches.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/ChainTypeManager/RevertBatches.t.sol index ee379e5a6a..b9421cd96e 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/ChainTypeManager/RevertBatches.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/ChainTypeManager/RevertBatches.t.sol @@ -5,21 +5,20 @@ import {Vm} from "forge-std/Test.sol"; import {SafeCast} from "@openzeppelin/contracts-v4/utils/math/SafeCast.sol"; -import {L2_DA_VALIDATOR_ADDRESS, L2_SYSTEM_CONTEXT_ADDRESS, Utils} from "../../Utils/Utils.sol"; +import {L2_DA_COMMITMENT_SCHEME, L2_SYSTEM_CONTEXT_ADDRESS, Utils} from "../../Utils/Utils.sol"; import {ChainTypeManagerTest} from "./_ChainTypeManager_Shared.t.sol"; -import {DEFAULT_L2_LOGS_TREE_ROOT_HASH, EMPTY_STRING_KECCAK, POINT_EVALUATION_PRECOMPILE_ADDR, PRIORITY_TX_MAX_GAS_LIMIT, REQUIRED_L2_GAS_PRICE_PER_PUBDATA, SYSTEM_UPGRADE_L2_TX_TYPE, TESTNET_COMMIT_TIMESTAMP_NOT_OLDER} from "contracts/common/Config.sol"; -import {L2_COMPLEX_UPGRADER_ADDR, L2_FORCE_DEPLOYER_ADDR, L2_GENESIS_UPGRADE_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; +import {DEFAULT_L2_LOGS_TREE_ROOT_HASH, POINT_EVALUATION_PRECOMPILE_ADDR, TESTNET_COMMIT_TIMESTAMP_NOT_OLDER} from "contracts/common/Config.sol"; +import {L2_GENESIS_UPGRADE_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; import {SemVer} from "contracts/common/libraries/SemVer.sol"; -import {L2ContractHelper} from "contracts/common/l2-helpers/L2ContractHelper.sol"; -import {L2CanonicalTransaction} from "contracts/common/Messaging.sol"; + import {IExecutor, SystemLogKey, TOTAL_BLOBS_IN_COMMITMENT} from "contracts/state-transition/chain-interfaces/IExecutor.sol"; import {GettersFacet} from "contracts/state-transition/chain-deps/facets/Getters.sol"; import {AdminFacet} from "contracts/state-transition/chain-deps/facets/Admin.sol"; import {ExecutorFacet} from "contracts/state-transition/chain-deps/facets/Executor.sol"; import {IL2GenesisUpgrade} from "contracts/state-transition/l2-deps/IL2GenesisUpgrade.sol"; import {IComplexUpgrader} from "contracts/state-transition/l2-deps/IComplexUpgrader.sol"; -import {IBridgehub} from "contracts/bridgehub/IBridgehub.sol"; +import {IBridgehubBase} from "contracts/bridgehub/IBridgehubBase.sol"; contract revertBatchesTest is ChainTypeManagerTest { // Items for logs & commits @@ -89,7 +88,7 @@ contract revertBatchesTest is ChainTypeManagerTest { { bytes memory l2GenesisUpgradeCalldata = abi.encodeCall( IL2GenesisUpgrade.genesisUpgrade, - (chainId, l1CtmDeployer, forceDeploymentsData, "0x") + (false, chainId, l1CtmDeployer, forceDeploymentsData, "0x") ); complexUpgraderCalldata = abi.encodeCall( IComplexUpgrader.upgrade, @@ -104,7 +103,7 @@ contract revertBatchesTest is ChainTypeManagerTest { newChainAddress = createNewChain(getDiamondCutData(diamondInit)); vm.mockCall( address(bridgehub), - abi.encodeWithSelector(IBridgehub.getZKChain.selector), + abi.encodeWithSelector(IBridgehubBase.getZKChain.selector), abi.encode(newChainAddress) ); @@ -114,7 +113,7 @@ contract revertBatchesTest is ChainTypeManagerTest { vm.stopPrank(); vm.prank(newChainAdmin); - adminFacet.setDAValidatorPair(address(rollupL1DAValidator), L2_DA_VALIDATOR_ADDRESS); + adminFacet.setDAValidatorPair(address(rollupL1DAValidator), L2_DA_COMMITMENT_SCHEME); } function test_SuccessfulBatchReverting() public { diff --git a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/ChainTypeManager/SetValidatorTimelock.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/ChainTypeManager/SetValidatorTimelock.t.sol index 471e5b7ac8..353d318df6 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/ChainTypeManager/SetValidatorTimelock.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/ChainTypeManager/SetValidatorTimelock.t.sol @@ -3,8 +3,6 @@ pragma solidity 0.8.28; import {ChainTypeManagerTest} from "./_ChainTypeManager_Shared.t.sol"; -import {Unauthorized} from "contracts/common/L1ContractErrors.sol"; - contract setValidatorTimelockTest is ChainTypeManagerTest { function setUp() public { deploy(); diff --git a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/ChainTypeManager/_ChainTypeManager_Shared.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/ChainTypeManager/_ChainTypeManager_Shared.t.sol index 881f32b330..4d81cf0c29 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/ChainTypeManager/_ChainTypeManager_Shared.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/ChainTypeManager/_ChainTypeManager_Shared.t.sol @@ -7,10 +7,10 @@ import {console2 as console} from "forge-std/Script.sol"; import {TransparentUpgradeableProxy} from "@openzeppelin/contracts-v4/proxy/transparent/TransparentUpgradeableProxy.sol"; -import {IBridgehub} from "contracts/bridgehub/IBridgehub.sol"; +import {IBridgehubBase} from "contracts/bridgehub/IBridgehubBase.sol"; import {Utils} from "foundry-test/l1/unit/concrete/Utils/Utils.sol"; -import {Bridgehub} from "contracts/bridgehub/Bridgehub.sol"; +import {L1Bridgehub} from "contracts/bridgehub/L1Bridgehub.sol"; import {IL1AssetRouter} from "contracts/bridge/asset-router/IL1AssetRouter.sol"; import {IL1Nullifier} from "contracts/bridge/interfaces/IL1Nullifier.sol"; import {UtilsFacet} from "foundry-test/l1/unit/concrete/Utils/UtilsFacet.sol"; @@ -24,12 +24,12 @@ import {InitializeDataNewChain} from "contracts/state-transition/chain-interface import {ChainTypeManager} from "contracts/state-transition/ChainTypeManager.sol"; import {ChainCreationParams, ChainTypeManagerInitializeData} from "contracts/state-transition/IChainTypeManager.sol"; import {TestnetVerifier} from "contracts/state-transition/verifiers/TestnetVerifier.sol"; -import {DummyBridgehub} from "contracts/dev-contracts/test/DummyBridgehub.sol"; + import {DataEncoding} from "contracts/common/libraries/DataEncoding.sol"; import {ZeroAddress} from "contracts/common/L1ContractErrors.sol"; import {ICTMDeploymentTracker} from "contracts/bridgehub/ICTMDeploymentTracker.sol"; -import {MessageRoot} from "contracts/bridgehub/MessageRoot.sol"; -import {IMessageRoot} from "contracts/bridgehub/IMessageRoot.sol"; +import {L1MessageRoot} from "contracts/bridgehub/L1MessageRoot.sol"; + import {L1AssetRouter} from "contracts/bridge/asset-router/L1AssetRouter.sol"; import {RollupDAManager} from "contracts/state-transition/data-availability/RollupDAManager.sol"; import {IERC20Metadata} from "@openzeppelin/contracts-v4/token/ERC20/extensions/IERC20Metadata.sol"; @@ -41,8 +41,8 @@ contract ChainTypeManagerTest is Test { ChainTypeManager internal chainTypeManager; ChainTypeManager internal chainContractAddress; L1GenesisUpgrade internal genesisUpgradeContract; - Bridgehub internal bridgehub; - MessageRoot internal messageroot; + L1Bridgehub internal bridgehub; + L1MessageRoot internal messageRoot; address internal rollupL1DAValidator; address internal diamondInit; address internal constant governor = address(0x1010101); @@ -53,8 +53,10 @@ contract ChainTypeManagerTest is Test { address internal constant l1Nullifier = address(0x6060606); address internal constant serverNotifier = address(0x7070707); address internal newChainAdmin; + uint256 l1ChainId = 5; uint256 chainId = 112; - address internal testnetVerifier = address(new TestnetVerifier(IVerifierV2(address(0)), IVerifier(address(0)))); + address internal testnetVerifier = + address(new TestnetVerifier(IVerifierV2(address(0)), IVerifier(address(0)), address(0), false)); bytes internal forceDeploymentsData = hex""; uint256 eraChainId = 9; @@ -63,10 +65,10 @@ contract ChainTypeManagerTest is Test { Diamond.FacetCut[] internal facetCuts; function deploy() public { - bridgehub = new Bridgehub(block.chainid, governor, MAX_NUMBER_OF_ZK_CHAINS); - messageroot = new MessageRoot(bridgehub, block.chainid); + bridgehub = new L1Bridgehub(governor, MAX_NUMBER_OF_ZK_CHAINS); + L1MessageRoot messageroot = new L1MessageRoot(address(bridgehub)); vm.prank(governor); - bridgehub.setAddresses(sharedBridge, ICTMDeploymentTracker(address(0)), messageroot, address(0)); + bridgehub.setAddresses(sharedBridge, ICTMDeploymentTracker(address(0)), messageRoot, address(0)); vm.mockCall( address(sharedBridge), @@ -77,8 +79,8 @@ contract ChainTypeManagerTest is Test { newChainAdmin = makeAddr("chainadmin"); vm.startPrank(address(bridgehub)); - chainTypeManager = new ChainTypeManager(address(IBridgehub(address(bridgehub)))); - diamondInit = address(new DiamondInit()); + chainTypeManager = new ChainTypeManager(address(IBridgehubBase(address(bridgehub)))); + diamondInit = address(new DiamondInit(false)); genesisUpgradeContract = new L1GenesisUpgrade(); facetCuts.push( @@ -196,7 +198,7 @@ contract ChainTypeManagerTest is Test { vm.mockCall( address(bridgehub), - abi.encodeWithSelector(Bridgehub.baseToken.selector, chainId), + abi.encodeWithSelector(IBridgehubBase.baseToken.selector, chainId), abi.encode(baseToken) ); vm.mockCall(address(baseToken), abi.encodeWithSelector(IERC20Metadata.name.selector), abi.encode("TestToken")); @@ -232,7 +234,7 @@ contract ChainTypeManagerTest is Test { vm.mockCall( address(bridgehub), - abi.encodeWithSelector(Bridgehub.baseToken.selector, chainId), + abi.encodeWithSelector(IBridgehubBase.baseToken.selector, chainId), abi.encode(baseToken) ); vm.mockCall(address(baseToken), abi.encodeWithSelector(IERC20Metadata.name.selector), abi.encode("TestToken")); @@ -253,7 +255,7 @@ contract ChainTypeManagerTest is Test { // We have to mock the call to the bridgehub's getZKChain since we are mocking calls in the ChainTypeManagerTest.createNewChain() as well... // So, although ideally the bridgehub SHOULD have responded with the correct address for the chain when we call getZKChain(chainId), in our case it will not // So, we mock that behavior again. - vm.mockCall(address(bridgehub), abi.encodeCall(Bridgehub.getZKChain, chainId), abi.encode(_chainAddress)); + vm.mockCall(address(bridgehub), abi.encodeCall(IBridgehubBase.getZKChain, chainId), abi.encode(_chainAddress)); } function _mockMigrationPausedFromBridgehub() internal { diff --git a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/DiamondInit/Initialize.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/DiamondInit/Initialize.t.sol index 50b2ef3dc8..e326008866 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/DiamondInit/Initialize.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/DiamondInit/Initialize.t.sol @@ -20,7 +20,7 @@ contract InitializeTest is DiamondInitTest { Diamond.DiamondCutData memory diamondCutData = Diamond.DiamondCutData({ facetCuts: facetCuts, - initAddress: address(new DiamondInit()), + initAddress: address(new DiamondInit(false)), initCalldata: abi.encodeWithSelector(DiamondInit.initialize.selector, initializeData) }); @@ -34,7 +34,7 @@ contract InitializeTest is DiamondInitTest { Diamond.DiamondCutData memory diamondCutData = Diamond.DiamondCutData({ facetCuts: facetCuts, - initAddress: address(new DiamondInit()), + initAddress: address(new DiamondInit(false)), initCalldata: abi.encodeWithSelector(DiamondInit.initialize.selector, initializeData) }); @@ -48,7 +48,7 @@ contract InitializeTest is DiamondInitTest { Diamond.DiamondCutData memory diamondCutData = Diamond.DiamondCutData({ facetCuts: facetCuts, - initAddress: address(new DiamondInit()), + initAddress: address(new DiamondInit(false)), initCalldata: abi.encodeWithSelector(DiamondInit.initialize.selector, initializeData) }); @@ -62,7 +62,7 @@ contract InitializeTest is DiamondInitTest { Diamond.DiamondCutData memory diamondCutData = Diamond.DiamondCutData({ facetCuts: facetCuts, - initAddress: address(new DiamondInit()), + initAddress: address(new DiamondInit(false)), initCalldata: abi.encodeWithSelector(DiamondInit.initialize.selector, initializeData) }); @@ -76,7 +76,7 @@ contract InitializeTest is DiamondInitTest { Diamond.DiamondCutData memory diamondCutData = Diamond.DiamondCutData({ facetCuts: facetCuts, - initAddress: address(new DiamondInit()), + initAddress: address(new DiamondInit(false)), initCalldata: abi.encodeWithSelector(DiamondInit.initialize.selector, initializeData) }); @@ -90,7 +90,7 @@ contract InitializeTest is DiamondInitTest { Diamond.DiamondCutData memory diamondCutData = Diamond.DiamondCutData({ facetCuts: facetCuts, - initAddress: address(new DiamondInit()), + initAddress: address(new DiamondInit(false)), initCalldata: abi.encodeWithSelector(DiamondInit.initialize.selector, initializeData) }); @@ -104,7 +104,7 @@ contract InitializeTest is DiamondInitTest { Diamond.DiamondCutData memory diamondCutData = Diamond.DiamondCutData({ facetCuts: facetCuts, - initAddress: address(new DiamondInit()), + initAddress: address(new DiamondInit(false)), initCalldata: abi.encodeWithSelector(DiamondInit.initialize.selector, initializeData) }); @@ -117,7 +117,7 @@ contract InitializeTest is DiamondInitTest { Diamond.DiamondCutData memory diamondCutData = Diamond.DiamondCutData({ facetCuts: facetCuts, - initAddress: address(new DiamondInit()), + initAddress: address(new DiamondInit(false)), initCalldata: abi.encodeWithSelector(DiamondInit.initialize.selector, initializeData) }); diff --git a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/DiamondInit/_DiamondInit_Shared.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/DiamondInit/_DiamondInit_Shared.t.sol index 85a7ef3ccd..83fd329197 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/DiamondInit/_DiamondInit_Shared.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/DiamondInit/_DiamondInit_Shared.t.sol @@ -13,7 +13,8 @@ import {IVerifier} from "contracts/state-transition/chain-interfaces/IVerifier.s contract DiamondInitTest is Test { Diamond.FacetCut[] internal facetCuts; - address internal testnetVerifier = address(new TestnetVerifier(IVerifierV2(address(0)), IVerifier(address(0)))); + address internal testnetVerifier = + address(new TestnetVerifier(IVerifierV2(address(0)), IVerifier(address(0)), address(0), false)); function setUp() public virtual { facetCuts.push( diff --git a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/DiamondProxy/DiamondProxy.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/DiamondProxy/DiamondProxy.t.sol index feff8ef81c..651fee6c54 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/DiamondProxy/DiamondProxy.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/DiamondProxy/DiamondProxy.t.sol @@ -12,7 +12,7 @@ import {Diamond} from "contracts/state-transition/libraries/Diamond.sol"; import {DiamondProxy} from "contracts/state-transition/chain-deps/DiamondProxy.sol"; import {ZKChainBase} from "contracts/state-transition/chain-deps/facets/ZKChainBase.sol"; import {TestnetVerifier} from "contracts/state-transition/verifiers/TestnetVerifier.sol"; -import {InvalidSelector, ValueMismatch} from "contracts/common/L1ContractErrors.sol"; + import {IVerifierV2} from "contracts/state-transition/chain-interfaces/IVerifierV2.sol"; import {IVerifier} from "contracts/state-transition/chain-interfaces/IVerifier.sol"; @@ -27,7 +27,8 @@ contract TestFacet is ZKChainBase { contract DiamondProxyTest is Test { Diamond.FacetCut[] internal facetCuts; - address internal testnetVerifier = address(new TestnetVerifier(IVerifierV2(address(0)), IVerifier(address(0)))); + address internal testnetVerifier = + address(new TestnetVerifier(IVerifierV2(address(0)), IVerifier(address(0)), address(0), false)); function getTestFacetSelectors() public pure returns (bytes4[] memory selectors) { selectors = new bytes4[](1); @@ -58,7 +59,7 @@ contract DiamondProxyTest is Test { Diamond.DiamondCutData memory diamondCutData = Diamond.DiamondCutData({ facetCuts: facetCuts, - initAddress: address(new DiamondInit()), + initAddress: address(new DiamondInit(false)), initCalldata: abi.encodeWithSelector(DiamondInit.initialize.selector, initializeData) }); @@ -71,7 +72,7 @@ contract DiamondProxyTest is Test { Diamond.DiamondCutData memory diamondCutData = Diamond.DiamondCutData({ facetCuts: facetCuts, - initAddress: address(new DiamondInit()), + initAddress: address(new DiamondInit(false)), initCalldata: abi.encodeWithSelector(DiamondInit.initialize.selector, initializeData) }); @@ -87,7 +88,7 @@ contract DiamondProxyTest is Test { Diamond.DiamondCutData memory diamondCutData = Diamond.DiamondCutData({ facetCuts: facetCuts, - initAddress: address(new DiamondInit()), + initAddress: address(new DiamondInit(false)), initCalldata: abi.encodeWithSelector(DiamondInit.initialize.selector, initializeData) }); @@ -103,7 +104,7 @@ contract DiamondProxyTest is Test { Diamond.DiamondCutData memory diamondCutData = Diamond.DiamondCutData({ facetCuts: new Diamond.FacetCut[](0), - initAddress: address(new DiamondInit()), + initAddress: address(new DiamondInit(false)), initCalldata: abi.encodeWithSelector(DiamondInit.initialize.selector, initializeData) }); @@ -119,7 +120,7 @@ contract DiamondProxyTest is Test { Diamond.DiamondCutData memory diamondCutData = Diamond.DiamondCutData({ facetCuts: facetCuts, - initAddress: address(new DiamondInit()), + initAddress: address(new DiamondInit(false)), initCalldata: abi.encodeWithSelector(DiamondInit.initialize.selector, initializeData) }); @@ -138,7 +139,7 @@ contract DiamondProxyTest is Test { Diamond.DiamondCutData memory diamondCutData = Diamond.DiamondCutData({ facetCuts: facetCuts, - initAddress: address(new DiamondInit()), + initAddress: address(new DiamondInit(false)), initCalldata: abi.encodeWithSelector(DiamondInit.initialize.selector, initializeData) }); @@ -163,7 +164,7 @@ contract DiamondProxyTest is Test { Diamond.DiamondCutData memory diamondCutData = Diamond.DiamondCutData({ facetCuts: cuts, - initAddress: address(new DiamondInit()), + initAddress: address(new DiamondInit(false)), initCalldata: abi.encodeWithSelector(DiamondInit.initialize.selector, initializeData) }); diff --git a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/facets/Admin/SetDAValidatorPair.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/facets/Admin/SetDAValidatorPair.t.sol new file mode 100644 index 0000000000..eacfce7cc3 --- /dev/null +++ b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/facets/Admin/SetDAValidatorPair.t.sol @@ -0,0 +1,55 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.28; + +import {AdminTest} from "./_Admin_Shared.t.sol"; +import {InvalidL2DACommitmentScheme, Unauthorized} from "contracts/common/L1ContractErrors.sol"; +import {L1DAValidatorAddressIsZero} from "contracts/state-transition/L1StateTransitionErrors.sol"; +import {L2DACommitmentScheme} from "contracts/common/Config.sol"; +import {IAdmin} from "contracts/state-transition/chain-interfaces/IAdmin.sol"; + +contract SetDAValidatorPair is AdminTest { + function test_revertWhen_calledByNonAdmin() public { + address nonAdmin = makeAddr("nonAdmin"); + + vm.startPrank(nonAdmin); + + vm.expectRevert(abi.encodeWithSelector(Unauthorized.selector, nonAdmin)); + adminFacet.setDAValidatorPair(address(1), L2DACommitmentScheme.EMPTY_NO_DA); + + vm.stopPrank(); + } + + function test_SuccessfulSet() public { + address admin = utilsFacet.util_getAdmin(); + + vm.expectEmit(true, true, true, true, address(adminFacet)); + emit IAdmin.NewL1DAValidator(address(0), address(1)); + vm.expectEmit(true, true, true, true, address(adminFacet)); + emit IAdmin.NewL2DACommitmentScheme(L2DACommitmentScheme.NONE, L2DACommitmentScheme.EMPTY_NO_DA); + + vm.startPrank(admin); + adminFacet.setDAValidatorPair(address(1), L2DACommitmentScheme.EMPTY_NO_DA); + + assert(utilsFacet.util_getL2DACommimentScheme() == L2DACommitmentScheme.EMPTY_NO_DA); + } + + function test_revertWhen_validatorAddressIsZero() public { + address admin = utilsFacet.util_getAdmin(); + + vm.startPrank(admin); + vm.expectRevert(L1DAValidatorAddressIsZero.selector); + adminFacet.setDAValidatorPair(address(0), L2DACommitmentScheme.EMPTY_NO_DA); + + vm.stopPrank(); + } + + function test_revertWhen_l2CommitmentSchemeIsNone() public { + address admin = utilsFacet.util_getAdmin(); + + vm.startPrank(admin); + vm.expectRevert(abi.encodeWithSelector(InvalidL2DACommitmentScheme.selector, L2DACommitmentScheme.NONE)); + adminFacet.setDAValidatorPair(address(1), L2DACommitmentScheme.NONE); + + vm.stopPrank(); + } +} diff --git a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/facets/Admin/SetPubdataPricingMode.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/facets/Admin/SetPubdataPricingMode.t.sol index b0d02651a6..aa3098bb5e 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/facets/Admin/SetPubdataPricingMode.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/facets/Admin/SetPubdataPricingMode.t.sol @@ -2,7 +2,7 @@ pragma solidity 0.8.28; import {AdminTest} from "./_Admin_Shared.t.sol"; -import {ChainAlreadyLive, Unauthorized} from "contracts/common/L1ContractErrors.sol"; +import {Unauthorized} from "contracts/common/L1ContractErrors.sol"; import {PubdataPricingMode} from "contracts/state-transition/chain-deps/ZKChainStorage.sol"; contract SetPubdataPricingModeTest is AdminTest { diff --git a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/facets/Admin/UpgradeChainFromVersion.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/facets/Admin/UpgradeChainFromVersion.t.sol index 8b78677b04..dddf527f23 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/facets/Admin/UpgradeChainFromVersion.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/facets/Admin/UpgradeChainFromVersion.t.sol @@ -6,7 +6,7 @@ import {AdminTest} from "./_Admin_Shared.t.sol"; import {Diamond} from "contracts/state-transition/libraries/Diamond.sol"; import {IChainTypeManager} from "contracts/state-transition/IChainTypeManager.sol"; -import {HashMismatch, InvalidProtocolVersion, ProtocolIdMismatch, ProtocolIdNotGreater, Unauthorized, ValueMismatch} from "contracts/common/L1ContractErrors.sol"; +import {HashMismatch, ProtocolIdMismatch, ProtocolIdNotGreater, Unauthorized} from "contracts/common/L1ContractErrors.sol"; contract UpgradeChainFromVersionTest is AdminTest { event ExecuteUpgrade(Diamond.DiamondCutData diamondCut); diff --git a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/facets/Admin/_Admin_Shared.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/facets/Admin/_Admin_Shared.t.sol index 406691a502..22e574d85e 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/facets/Admin/_Admin_Shared.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/facets/Admin/_Admin_Shared.t.sol @@ -17,10 +17,11 @@ import {IVerifier} from "contracts/state-transition/chain-interfaces/IVerifier.s contract AdminTest is Test { IAdmin internal adminFacet; UtilsFacet internal utilsFacet; - address internal testnetVerifier = address(new TestnetVerifier(IVerifierV2(address(0)), IVerifier(address(0)))); + address internal testnetVerifier = + address(new TestnetVerifier(IVerifierV2(address(0)), IVerifier(address(0)), address(0), false)); function getAdminSelectors() public pure returns (bytes4[] memory) { - bytes4[] memory selectors = new bytes4[](13); + bytes4[] memory selectors = new bytes4[](14); uint256 i = 0; selectors[i++] = IAdmin.setPendingAdmin.selector; selectors[i++] = IAdmin.acceptAdmin.selector; @@ -35,6 +36,7 @@ contract AdminTest is Test { selectors[i++] = IAdmin.unfreezeDiamond.selector; selectors[i++] = IAdmin.setTransactionFilterer.selector; selectors[i++] = IAdmin.setPubdataPricingMode.selector; + selectors[i++] = IAdmin.setDAValidatorPair.selector; return selectors; } diff --git a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/facets/Base/_Base_Shared.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/facets/Base/_Base_Shared.t.sol index 9692a9c2b2..4c14b3ab01 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/facets/Base/_Base_Shared.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/facets/Base/_Base_Shared.t.sol @@ -39,7 +39,8 @@ bytes constant ERROR_ONLY_VALIDATOR_OR_STATE_TRANSITION_MANAGER = "ZKChain: Only contract ZKChainBaseTest is Test { TestBaseFacet internal testBaseFacet; UtilsFacet internal utilsFacet; - address internal testnetVerifier = address(new TestnetVerifier(IVerifierV2(address(0)), IVerifier(address(0)))); + address internal testnetVerifier = + address(new TestnetVerifier(IVerifierV2(address(0)), IVerifier(address(0)), address(0), false)); function getTestBaseFacetSelectors() public pure returns (bytes4[] memory selectors) { selectors = new bytes4[](6); diff --git a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/facets/Getters/IsFunctionFreezable.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/facets/Getters/IsFunctionFreezable.t.sol index be4ce65ca0..5d3032388e 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/facets/Getters/IsFunctionFreezable.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/facets/Getters/IsFunctionFreezable.t.sol @@ -3,7 +3,6 @@ pragma solidity 0.8.28; import {GettersFacetTest} from "./_Getters_Shared.t.sol"; -import {InvalidSelector} from "contracts/common/L1ContractErrors.sol"; contract IsFunctionFreezableTest is GettersFacetTest { function test_when_facetAddressIzZero() public { diff --git a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/facets/Getters/_Getters_Shared.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/facets/Getters/_Getters_Shared.t.sol index da6cd7eeba..8c3270d0bc 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/facets/Getters/_Getters_Shared.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/facets/Getters/_Getters_Shared.t.sol @@ -8,7 +8,6 @@ import {GettersFacet} from "contracts/state-transition/chain-deps/facets/Getters import {IGetters} from "contracts/state-transition/chain-interfaces/IGetters.sol"; import {ILegacyGetters} from "contracts/state-transition/chain-interfaces/ILegacyGetters.sol"; import {IVerifier, VerifierParams} from "contracts/state-transition/chain-interfaces/IVerifier.sol"; -import {PriorityOperation} from "contracts/state-transition/libraries/PriorityQueue.sol"; contract GettersFacetWrapper is GettersFacet, Test { function util_setVerifier(address _verifier) external { diff --git a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/facets/Mailbox/BridgehubRequestL2Transaction.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/facets/Mailbox/BridgehubRequestL2Transaction.t.sol index 19e8146526..fdde928276 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/facets/Mailbox/BridgehubRequestL2Transaction.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/facets/Mailbox/BridgehubRequestL2Transaction.t.sol @@ -4,7 +4,7 @@ pragma solidity 0.8.28; import {MailboxTest} from "./_Mailbox_Shared.t.sol"; import {BridgehubL2TransactionRequest} from "contracts/common/Messaging.sol"; -import {MAX_NEW_FACTORY_DEPS, REQUIRED_L2_GAS_PRICE_PER_PUBDATA} from "contracts/common/Config.sol"; +import {REQUIRED_L2_GAS_PRICE_PER_PUBDATA} from "contracts/common/Config.sol"; import {TransactionFiltererTrue} from "contracts/dev-contracts/test/DummyTransactionFiltererTrue.sol"; import {TransactionFiltererFalse} from "contracts/dev-contracts/test/DummyTransactionFiltererFalse.sol"; import {TransactionNotAllowed, Unauthorized} from "contracts/common/L1ContractErrors.sol"; diff --git a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/facets/Mailbox/FinalizeWithdrawal.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/facets/Mailbox/FinalizeWithdrawal.t.sol index 397a5691c5..17626578ab 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/facets/Mailbox/FinalizeWithdrawal.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/facets/Mailbox/FinalizeWithdrawal.t.sol @@ -3,13 +3,12 @@ pragma solidity 0.8.28; import {MailboxTest} from "./_Mailbox_Shared.t.sol"; -import {DummyBridgehub} from "contracts/dev-contracts/test/DummyBridgehub.sol"; + import {L1AssetRouter} from "contracts/bridge/asset-router/L1AssetRouter.sol"; -import {IBridgehub} from "contracts/bridgehub/IBridgehub.sol"; -import {IL1AssetRouter} from "contracts/bridge/asset-router/IL1AssetRouter.sol"; +import {IBridgehubBase} from "contracts/bridgehub/IBridgehubBase.sol"; + import {DummySharedBridge} from "contracts/dev-contracts/test/DummySharedBridge.sol"; import {OnlyEraSupported} from "contracts/common/L1ContractErrors.sol"; -import {Bridgehub, IBridgehub} from "contracts/bridgehub/Bridgehub.sol"; contract MailboxFinalizeWithdrawal is MailboxTest { bytes32[] proof; @@ -23,7 +22,7 @@ contract MailboxFinalizeWithdrawal is MailboxTest { L1AssetRouter = new DummySharedBridge(keccak256("dummyDepositHash")); baseTokenBridgeAddress = address(L1AssetRouter); - vm.mockCall(bridgehub, abi.encodeCall(IBridgehub.assetRouter, ()), abi.encode(baseTokenBridgeAddress)); + vm.mockCall(bridgehub, abi.encodeCall(IBridgehubBase.assetRouter, ()), abi.encode(baseTokenBridgeAddress)); proof = new bytes32[](0); message = "message"; diff --git a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/facets/Mailbox/ProvingL2LogsInclusion.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/facets/Mailbox/ProvingL2LogsInclusion.t.sol index d7839449cb..e1f4db715a 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/facets/Mailbox/ProvingL2LogsInclusion.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/facets/Mailbox/ProvingL2LogsInclusion.t.sol @@ -5,15 +5,15 @@ pragma solidity 0.8.28; import {MailboxTest} from "./_Mailbox_Shared.t.sol"; import {L2Log, L2Message} from "contracts/common/Messaging.sol"; import "forge-std/Test.sol"; -import {L1_GAS_PER_PUBDATA_BYTE, L2_L1_LOGS_TREE_DEFAULT_LEAF_HASH, L2_TO_L1_LOG_SERIALIZE_SIZE} from "contracts/common/Config.sol"; +import {L2_TO_L1_LOG_SERIALIZE_SIZE} from "contracts/common/Config.sol"; import {L2_BOOTLOADER_ADDRESS, L2_TO_L1_MESSENGER_SYSTEM_CONTRACT_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; import {Merkle} from "contracts/common/libraries/Merkle.sol"; import {BatchNotExecuted, HashedLogIsDefault} from "contracts/common/L1ContractErrors.sol"; -import {MurkyBase} from "murky/common/MurkyBase.sol"; + import {MerkleTest} from "contracts/dev-contracts/test/MerkleTest.sol"; import {TxStatus} from "contracts/state-transition/chain-deps/facets/Mailbox.sol"; -import {Bridgehub} from "contracts/bridgehub/Bridgehub.sol"; -import {IBridgehub} from "contracts/bridgehub/IBridgehub.sol"; + +import {IBridgehubBase} from "contracts/bridgehub/IBridgehubBase.sol"; import {MerkleTreeNoSort} from "test/foundry/l1/unit/concrete/common/libraries/Merkle/MerkleTreeNoSort.sol"; import {MessageHashing} from "contracts/common/libraries/MessageHashing.sol"; import {IMailbox} from "contracts/state-transition/chain-interfaces/IMailbox.sol"; @@ -319,12 +319,12 @@ contract MailboxL2LogsProve is MailboxTest { vm.mockCall( address(bridgehub), - abi.encodeCall(IBridgehub.whitelistedSettlementLayers, (proofInfo.settlementLayerChainId)), + abi.encodeCall(IBridgehubBase.whitelistedSettlementLayers, (proofInfo.settlementLayerChainId)), abi.encode(true) ); vm.mockCall( address(bridgehub), - abi.encodeCall(IBridgehub.getZKChain, (proofInfo.settlementLayerChainId)), + abi.encodeCall(IBridgehubBase.getZKChain, (proofInfo.settlementLayerChainId)), abi.encode(secondDiamondProxy) ); diff --git a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/facets/Mailbox/RequestL2Transaction.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/facets/Mailbox/RequestL2Transaction.t.sol index d99071d0f0..80ac8163e1 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/facets/Mailbox/RequestL2Transaction.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/facets/Mailbox/RequestL2Transaction.t.sol @@ -3,15 +3,12 @@ pragma solidity 0.8.28; import {MailboxTest} from "./_Mailbox_Shared.t.sol"; -import {BridgehubL2TransactionRequest} from "contracts/common/Messaging.sol"; + import {ETH_TOKEN_ADDRESS, MAX_NEW_FACTORY_DEPS, REQUIRED_L2_GAS_PRICE_PER_PUBDATA} from "contracts/common/Config.sol"; -import {TransactionFiltererTrue} from "contracts/dev-contracts/test/DummyTransactionFiltererTrue.sol"; -import {TransactionFiltererFalse} from "contracts/dev-contracts/test/DummyTransactionFiltererFalse.sol"; -import {FeeParams, PubdataPricingMode} from "contracts/state-transition/chain-deps/ZKChainStorage.sol"; -import {IL1AssetRouter} from "contracts/bridge/asset-router/IL1AssetRouter.sol"; + import {DummySharedBridge} from "contracts/dev-contracts/test/DummySharedBridge.sol"; import {GasPerPubdataMismatch, MsgValueTooLow, OnlyEraSupported, TooManyFactoryDeps} from "contracts/common/L1ContractErrors.sol"; -import {Bridgehub, IBridgehub} from "contracts/bridgehub/Bridgehub.sol"; +import {IBridgehubBase} from "contracts/bridgehub/IBridgehubBase.sol"; contract MailboxRequestL2TransactionTest is MailboxTest { address tempAddress; @@ -25,7 +22,7 @@ contract MailboxRequestL2TransactionTest is MailboxTest { l1SharedBridge = new DummySharedBridge(keccak256("dummyDepositHash")); baseTokenBridgeAddress = address(l1SharedBridge); - vm.mockCall(bridgehub, abi.encodeCall(IBridgehub.assetRouter, ()), abi.encode(baseTokenBridgeAddress)); + vm.mockCall(bridgehub, abi.encodeCall(IBridgehubBase.assetRouter, ()), abi.encode(baseTokenBridgeAddress)); tempAddress = makeAddr("temp"); tempBytesArr = new bytes[](0); diff --git a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/facets/Mailbox/_Mailbox_Shared.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/facets/Mailbox/_Mailbox_Shared.t.sol index 3dd1153e6a..befff06bef 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/facets/Mailbox/_Mailbox_Shared.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/chain-deps/facets/Mailbox/_Mailbox_Shared.t.sol @@ -20,7 +20,8 @@ contract MailboxTest is Test { IGetters internal gettersFacet; address sender; uint256 constant eraChainId = 9; - address internal testnetVerifier = address(new TestnetVerifier(IVerifierV2(address(0)), IVerifier(address(0)))); + address internal testnetVerifier = + address(new TestnetVerifier(IVerifierV2(address(0)), IVerifier(address(0)), address(0), false)); address diamondProxy; address bridgehub; diff --git a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/data-availability/RelayedSLDAValidator.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/data-availability/RelayedSLDAValidator.t.sol index ce59ca8c65..a8ddbb608e 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/data-availability/RelayedSLDAValidator.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/data-availability/RelayedSLDAValidator.t.sol @@ -8,7 +8,7 @@ import {RelayedSLDAValidator} from "contracts/state-transition/data-availability import {L1DAValidatorOutput, PubdataSource} from "contracts/state-transition/chain-interfaces/IL1DAValidator.sol"; import {L2_BRIDGEHUB_ADDR, L2_TO_L1_MESSENGER_SYSTEM_CONTRACT_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; import {IL2ToL1Messenger} from "contracts/common/l2-helpers/IL2ToL1Messenger.sol"; -import {IBridgehub} from "contracts/bridgehub/IBridgehub.sol"; +import {IBridgehubBase} from "contracts/bridgehub/IBridgehubBase.sol"; import {InvalidPubdataSource, L1DAValidatorInvalidSender, PubdataInputTooSmall} from "contracts/state-transition/L1StateTransitionErrors.sol"; contract RelayedSLDAValidatorTest is Test { @@ -26,7 +26,7 @@ contract RelayedSLDAValidatorTest is Test { ); vm.mockCall( L2_BRIDGEHUB_ADDR, - abi.encodeWithSelector(IBridgehub.getZKChain.selector, (CHAIN_ID)), + abi.encodeWithSelector(IBridgehubBase.getZKChain.selector, (CHAIN_ID)), abi.encode(CHAIN_ADDRESS) ); } diff --git a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/data-availability/RollupDAManager.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/data-availability/RollupDAManager.t.sol index d16c33a915..fcf94e573e 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/data-availability/RollupDAManager.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/data-availability/RollupDAManager.t.sol @@ -6,8 +6,9 @@ import {Test} from "forge-std/Test.sol"; // Import the RollupDAManager contract import {RollupDAManager} from "contracts/state-transition/data-availability/RollupDAManager.sol"; +import {L2DACommitmentScheme} from "contracts/common/Config.sol"; -import {ZeroAddress} from "contracts/common/L1ContractErrors.sol"; +import {InvalidL2DACommitmentScheme, ZeroAddress} from "contracts/common/L1ContractErrors.sol"; contract RollupDAManagerTest is Test { // Instance of the contract under test @@ -18,13 +19,11 @@ contract RollupDAManagerTest is Test { address newOwner = address(0x2); address nonOwner = address(0x3); address l1DAValidator1 = address(0x4); - address l2DAValidator1 = address(0x5); address l1DAValidator2 = address(0x6); - address l2DAValidator2 = address(0x7); address zeroAddress = address(0); // Events from the RollupDAManager contract - event DAPairUpdated(address indexed l1DAValidator, address indexed l2DAValidator, bool status); + event DAPairUpdated(address indexed l1DAValidator, L2DACommitmentScheme indexed l2DACommitmentScheme, bool status); // setUp is run before each test function setUp() public { @@ -36,7 +35,7 @@ contract RollupDAManagerTest is Test { /* ========== Deployment Tests ========== */ - function testOwnerIsSetCorrectly() public { + function testOwnerIsSetCorrectly() public view { assertEq(rollupDAManager.owner(), owner, "Owner should be set correctly"); } @@ -46,31 +45,31 @@ contract RollupDAManagerTest is Test { // Attempt to update DA pair as owner vm.startPrank(owner); vm.expectEmit(true, true, false, true); - emit DAPairUpdated(l1DAValidator1, l2DAValidator1, true); - rollupDAManager.updateDAPair(l1DAValidator1, l2DAValidator1, true); + emit DAPairUpdated(l1DAValidator1, L2DACommitmentScheme.EMPTY_NO_DA, true); + rollupDAManager.updateDAPair(l1DAValidator1, L2DACommitmentScheme.EMPTY_NO_DA, true); vm.stopPrank(); // Attempt to update DA pair as non-owner vm.startPrank(nonOwner); vm.expectRevert("Ownable: caller is not the owner"); - rollupDAManager.updateDAPair(l1DAValidator2, l2DAValidator2, true); + rollupDAManager.updateDAPair(l1DAValidator2, L2DACommitmentScheme.EMPTY_NO_DA, true); vm.stopPrank(); } - function testUpdateDAPairRevertsOnZeroAddresses() public { + function testUpdateDAPairRevertsOnInvalidInput() public { vm.startPrank(owner); - // Both addresses zero - vm.expectRevert(ZeroAddress.selector); - rollupDAManager.updateDAPair(zeroAddress, zeroAddress, true); - // L1DAValidator zero vm.expectRevert(ZeroAddress.selector); - rollupDAManager.updateDAPair(zeroAddress, l2DAValidator1, true); + rollupDAManager.updateDAPair(zeroAddress, L2DACommitmentScheme.EMPTY_NO_DA, true); + + // L2DACommitmentScheme NONE + vm.expectRevert(abi.encodeWithSelector(InvalidL2DACommitmentScheme.selector, uint8(L2DACommitmentScheme.NONE))); + rollupDAManager.updateDAPair(l1DAValidator1, L2DACommitmentScheme.NONE, true); - // L2DAValidator zero + // Both inputs are invalid vm.expectRevert(ZeroAddress.selector); - rollupDAManager.updateDAPair(l1DAValidator1, zeroAddress, true); + rollupDAManager.updateDAPair(zeroAddress, L2DACommitmentScheme.NONE, true); vm.stopPrank(); } @@ -81,21 +80,21 @@ contract RollupDAManagerTest is Test { vm.startPrank(owner); // Initially, the pair should not be allowed - bool allowed = rollupDAManager.isPairAllowed(l1DAValidator1, l2DAValidator1); + bool allowed = rollupDAManager.isPairAllowed(l1DAValidator1, L2DACommitmentScheme.EMPTY_NO_DA); assertFalse(allowed, "DA pair should initially be disallowed"); // Update the DA pair to allowed vm.expectEmit(true, true, false, true); - emit DAPairUpdated(l1DAValidator1, l2DAValidator1, true); - rollupDAManager.updateDAPair(l1DAValidator1, l2DAValidator1, true); - allowed = rollupDAManager.isPairAllowed(l1DAValidator1, l2DAValidator1); + emit DAPairUpdated(l1DAValidator1, L2DACommitmentScheme.EMPTY_NO_DA, true); + rollupDAManager.updateDAPair(l1DAValidator1, L2DACommitmentScheme.EMPTY_NO_DA, true); + allowed = rollupDAManager.isPairAllowed(l1DAValidator1, L2DACommitmentScheme.EMPTY_NO_DA); assertTrue(allowed, "DA pair should be allowed after update"); // Update the DA pair to disallowed vm.expectEmit(true, true, false, true); - emit DAPairUpdated(l1DAValidator1, l2DAValidator1, false); - rollupDAManager.updateDAPair(l1DAValidator1, l2DAValidator1, false); - allowed = rollupDAManager.isPairAllowed(l1DAValidator1, l2DAValidator1); + emit DAPairUpdated(l1DAValidator1, L2DACommitmentScheme.EMPTY_NO_DA, false); + rollupDAManager.updateDAPair(l1DAValidator1, L2DACommitmentScheme.EMPTY_NO_DA, false); + allowed = rollupDAManager.isPairAllowed(l1DAValidator1, L2DACommitmentScheme.EMPTY_NO_DA); assertFalse(allowed, "DA pair should be disallowed after update"); vm.stopPrank(); @@ -105,12 +104,12 @@ contract RollupDAManagerTest is Test { vm.startPrank(owner); // Update multiple DA pairs - rollupDAManager.updateDAPair(l1DAValidator1, l2DAValidator1, true); - rollupDAManager.updateDAPair(l1DAValidator2, l2DAValidator2, true); + rollupDAManager.updateDAPair(l1DAValidator1, L2DACommitmentScheme.EMPTY_NO_DA, true); + rollupDAManager.updateDAPair(l1DAValidator2, L2DACommitmentScheme.PUBDATA_KECCAK256, true); // Check both pairs - bool allowed1 = rollupDAManager.isPairAllowed(l1DAValidator1, l2DAValidator1); - bool allowed2 = rollupDAManager.isPairAllowed(l1DAValidator2, l2DAValidator2); + bool allowed1 = rollupDAManager.isPairAllowed(l1DAValidator1, L2DACommitmentScheme.EMPTY_NO_DA); + bool allowed2 = rollupDAManager.isPairAllowed(l1DAValidator2, L2DACommitmentScheme.PUBDATA_KECCAK256); assertTrue(allowed1, "First DA pair should be allowed"); assertTrue(allowed2, "Second DA pair should be allowed"); diff --git a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/libraries/PriorityTree/PriorityTree.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/libraries/PriorityTree/PriorityTree.t.sol index d7bffbfd44..c094a19cb9 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/libraries/PriorityTree/PriorityTree.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/libraries/PriorityTree/PriorityTree.t.sol @@ -2,7 +2,8 @@ pragma solidity 0.8.28; -import {PriorityOpsBatchInfo, PriorityTreeSharedTest} from "./_PriorityTree_Shared.t.sol"; +import {PriorityTreeSharedTest} from "./_PriorityTree_Shared.t.sol"; +import {PriorityOpsBatchInfo} from "contracts/dev-contracts/test/PriorityTreeTest.sol"; import {PriorityTreeCommitment} from "contracts/common/Config.sol"; import {NotHistoricalRoot} from "contracts/state-transition/L1StateTransitionErrors.sol"; diff --git a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/libraries/PriorityTree/_PriorityTree_Shared.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/libraries/PriorityTree/_PriorityTree_Shared.t.sol index f050396961..f158a168a5 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/libraries/PriorityTree/_PriorityTree_Shared.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/libraries/PriorityTree/_PriorityTree_Shared.t.sol @@ -3,7 +3,7 @@ pragma solidity 0.8.28; import {Test} from "forge-std/Test.sol"; -import {PriorityOpsBatchInfo, PriorityTreeTest} from "contracts/dev-contracts/test/PriorityTreeTest.sol"; +import {PriorityTreeTest} from "contracts/dev-contracts/test/PriorityTreeTest.sol"; contract PriorityTreeSharedTest is Test { PriorityTreeTest internal priorityTree; diff --git a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/libraries/TransactionValidator/ValidateL1L2Tx.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/libraries/TransactionValidator/ValidateL1L2Tx.t.sol index 4817b1c482..c59da927c2 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/libraries/TransactionValidator/ValidateL1L2Tx.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/libraries/TransactionValidator/ValidateL1L2Tx.t.sol @@ -11,7 +11,7 @@ contract ValidateL1L2TxTest is TransactionValidatorSharedTest { function test_BasicRequestL1L2() public pure { L2CanonicalTransaction memory testTx = createTestTransaction(); testTx.gasLimit = 500000; - validateL1ToL2Transaction(testTx, 500000, 100000); + validateL1ToL2Transaction(testTx, 500000, 100000, false); } function test_RevertWhen_GasLimitdoesntCoverOverhead() public { @@ -19,7 +19,7 @@ contract ValidateL1L2TxTest is TransactionValidatorSharedTest { // The limit is so low, that it doesn't even cover the overhead testTx.gasLimit = 0; vm.expectRevert(TxnBodyGasLimitNotEnoughGas.selector); - validateL1ToL2Transaction(testTx, 500000, 100000); + validateL1ToL2Transaction(testTx, 500000, 100000, false); } function test_RevertWhen_GasLimitHigherThanMax() public { @@ -30,7 +30,7 @@ contract ValidateL1L2TxTest is TransactionValidatorSharedTest { uint256 priorityTxMaxGasLimit = 500000; testTx.gasLimit = priorityTxMaxGasLimit + 1000000; vm.expectRevert(TooMuchGas.selector); - validateL1ToL2Transaction(testTx, priorityTxMaxGasLimit, 100000); + validateL1ToL2Transaction(testTx, priorityTxMaxGasLimit, 100000, false); } function test_RevertWhen_TooMuchPubdata() public { @@ -44,7 +44,7 @@ contract ValidateL1L2TxTest is TransactionValidatorSharedTest { // (hypothetically, assuming all the gas was spent on writing). testTx.gasPerPubdataByteLimit = 1; vm.expectRevert(abi.encodeWithSelector(PubdataGreaterThanLimit.selector, 100000, 490000)); - validateL1ToL2Transaction(testTx, priorityTxMaxGasLimit, 100000); + validateL1ToL2Transaction(testTx, priorityTxMaxGasLimit, 100000, false); } function test_RevertWhen_BelowMinimumCost() public { @@ -52,7 +52,7 @@ contract ValidateL1L2TxTest is TransactionValidatorSharedTest { uint256 priorityTxMaxGasLimit = 500000; testTx.gasLimit = 200000; vm.expectRevert(ValidateTxnNotEnoughGas.selector); - validateL1ToL2Transaction(testTx, priorityTxMaxGasLimit, 100000); + validateL1ToL2Transaction(testTx, priorityTxMaxGasLimit, 100000, false); } function test_RevertWhen_HugePubdata() public { @@ -62,7 +62,7 @@ contract ValidateL1L2TxTest is TransactionValidatorSharedTest { // Setting huge pubdata limit should cause the panic. testTx.gasPerPubdataByteLimit = type(uint256).max; vm.expectRevert(); - validateL1ToL2Transaction(testTx, priorityTxMaxGasLimit, 100000); + validateL1ToL2Transaction(testTx, priorityTxMaxGasLimit, 100000, false); } function test_ShouldAllowLargeTransactions() public pure { @@ -76,7 +76,7 @@ contract ValidateL1L2TxTest is TransactionValidatorSharedTest { // This transaction could publish 2B bytes of pubdata & has 2B gas, which is more than would be typically // allowed in the production system - validateL1ToL2Transaction(testTx, largeGasLimit, largeGasLimit); + validateL1ToL2Transaction(testTx, largeGasLimit, largeGasLimit, false); } function test_ShouldReturnCorrectOverhead_ShortTx() public pure { @@ -90,4 +90,20 @@ contract ValidateL1L2TxTest is TransactionValidatorSharedTest { revert OverheadForTransactionMustBeEqualToTxSlotOverhead(getOverheadForTransaction(1000000)); } } + + function test_BasicRequestL1L2_ZKsyncOS() public pure { + L2CanonicalTransaction memory testTx = createTestTransaction(); + testTx.maxFeePerGas = 100000; + testTx.gasLimit = 500000; + validateL1ToL2Transaction(testTx, 500000, 100000, true); + } + + function test_RevertWhen_BelowMinimumCost_ZKsyncOS() public { + L2CanonicalTransaction memory testTx = createTestTransaction(); + uint256 priorityTxMaxGasLimit = 500000; + testTx.maxFeePerGas = 1; + testTx.gasLimit = 199999; + vm.expectRevert(ValidateTxnNotEnoughGas.selector); + validateL1ToL2Transaction(testTx, priorityTxMaxGasLimit, 100000, true); + } } diff --git a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/libraries/TransactionValidator/_TransactionValidator_Shared.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/libraries/TransactionValidator/_TransactionValidator_Shared.t.sol index 037cadcb2d..b53baedeb6 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/state-transition/libraries/TransactionValidator/_TransactionValidator_Shared.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/state-transition/libraries/TransactionValidator/_TransactionValidator_Shared.t.sol @@ -40,13 +40,15 @@ contract TransactionValidatorSharedTest is Test { function validateL1ToL2Transaction( L2CanonicalTransaction memory _transaction, uint256 _priorityTxMaxGasLimit, - uint256 _priorityTxMaxPubdata + uint256 _priorityTxMaxPubdata, + bool zksyncOS ) public pure { TransactionValidator.validateL1ToL2Transaction( _transaction, abi.encode(_transaction), _priorityTxMaxGasLimit, - _priorityTxMaxPubdata + _priorityTxMaxPubdata, + zksyncOS ); } diff --git a/l1-contracts/test/foundry/l1/unit/concrete/upgrades/L1GatewayBase.t.sol b/l1-contracts/test/foundry/l1/unit/concrete/upgrades/L1GatewayBase.t.sol index 97be3cca27..2602643dad 100644 --- a/l1-contracts/test/foundry/l1/unit/concrete/upgrades/L1GatewayBase.t.sol +++ b/l1-contracts/test/foundry/l1/unit/concrete/upgrades/L1GatewayBase.t.sol @@ -4,7 +4,7 @@ pragma solidity 0.8.28; import "forge-std/Test.sol"; import {L1FixedForceDeploymentsHelper} from "contracts/upgrades/L1FixedForceDeploymentsHelper.sol"; // Adjust the import path accordingly import {ZKChainStorage} from "contracts/state-transition/chain-deps/ZKChainStorage.sol"; -import {IBridgehub} from "contracts/bridgehub/IBridgehub.sol"; +import {IBridgehubBase} from "contracts/bridgehub/IBridgehubBase.sol"; import {IL1SharedBridgeLegacy} from "contracts/bridge/interfaces/IL1SharedBridgeLegacy.sol"; import {ETH_TOKEN_ADDRESS} from "contracts/common/Config.sol"; import {ZKChainSpecificForceDeploymentsData} from "contracts/state-transition/l2-deps/IL2GenesisUpgrade.sol"; @@ -83,7 +83,7 @@ contract L1FixedForceDeploymentsHelperTest is Test { // Set base token asset ID testGateway.setBaseTokenAssetId(baseTokenAssetId); - vm.mockCall(bridgehubMock, abi.encodeCall(IBridgehub.assetRouter, ()), abi.encode(sharedBridgeMock)); + vm.mockCall(bridgehubMock, abi.encodeCall(IBridgehubBase.assetRouter, ()), abi.encode(sharedBridgeMock)); vm.mockCall( sharedBridgeMock, abi.encodeCall(IL1SharedBridgeLegacy.l2BridgeAddress, (chainId)), diff --git a/l1-contracts/test/foundry/l1/upgrades/DefaultUpgrade.t.sol b/l1-contracts/test/foundry/l1/upgrades/DefaultUpgrade.t.sol index 3943cdbd74..d4603b4110 100644 --- a/l1-contracts/test/foundry/l1/upgrades/DefaultUpgrade.t.sol +++ b/l1-contracts/test/foundry/l1/upgrades/DefaultUpgrade.t.sol @@ -3,7 +3,7 @@ pragma solidity 0.8.28; import {Test} from "forge-std/Test.sol"; import {DefaultUpgrade} from "contracts/upgrades/DefaultUpgrade.sol"; -import {FeeParams, PubdataPricingMode} from "contracts/state-transition/chain-deps/ZKChainStorage.sol"; + import {Diamond} from "contracts/state-transition/libraries/Diamond.sol"; import {BaseUpgrade} from "./_SharedBaseUpgrade.t.sol"; diff --git a/l1-contracts/test/foundry/l2/integration/L2ComplexUpgrader.t.sol b/l1-contracts/test/foundry/l2/integration/L2ComplexUpgrader.t.sol new file mode 100644 index 0000000000..1a0b754168 --- /dev/null +++ b/l1-contracts/test/foundry/l2/integration/L2ComplexUpgrader.t.sol @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: MIT + +pragma solidity 0.8.28; + +import {Test} from "forge-std/Test.sol"; + +import {L2ComplexUpgrader} from "contracts/l2-upgrades/L2ComplexUpgrader.sol"; +import {L2_COMPLEX_UPGRADER_ADDR, L2_FORCE_DEPLOYER_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; +import {MockContract} from "contracts/dev-contracts/MockContract.sol"; +import {Unauthorized} from "contracts/common/L1ContractErrors.sol"; +import {Utils} from "deploy-scripts/Utils.sol"; + +contract L2ComplexUpgraderTest is Test { + MockContract public dummyUpgrade; + + function setUp() public { + bytes memory code = Utils.readZKFoundryBytecodeL1("L2ComplexUpgrader.sol", "L2ComplexUpgrader"); + vm.etch(L2_COMPLEX_UPGRADER_ADDR, code); + dummyUpgrade = new MockContract(); + } + + function test_RevertWhen_NonForceDeployerCallsUpgrade() public { + vm.expectRevert(abi.encodeWithSelector(Unauthorized.selector, address(this))); + L2ComplexUpgrader(L2_COMPLEX_UPGRADER_ADDR).upgrade(address(dummyUpgrade), hex"deadbeef"); + } + + function test_SuccessfulUpgrade() public { + vm.expectEmit(true, true, false, true, L2_COMPLEX_UPGRADER_ADDR); + emit MockContract.Called(0, hex"deadbeef"); + + vm.prank(L2_FORCE_DEPLOYER_ADDR); + L2ComplexUpgrader(L2_COMPLEX_UPGRADER_ADDR).upgrade(address(dummyUpgrade), hex"deadbeef"); + } +} diff --git a/l1-contracts/test/foundry/l2/integration/L2ERC20BridgeTest.t.sol b/l1-contracts/test/foundry/l2/integration/L2ERC20BridgeTest.t.sol index 518ecf895e..8a5ab13e51 100644 --- a/l1-contracts/test/foundry/l2/integration/L2ERC20BridgeTest.t.sol +++ b/l1-contracts/test/foundry/l2/integration/L2ERC20BridgeTest.t.sol @@ -7,20 +7,11 @@ pragma solidity ^0.8.20; import {Test} from "forge-std/Test.sol"; import "forge-std/console.sol"; -import {BridgedStandardERC20} from "contracts/bridge/BridgedStandardERC20.sol"; -import {L2AssetRouter} from "contracts/bridge/asset-router/L2AssetRouter.sol"; -import {IL2NativeTokenVault} from "contracts/bridge/ntv/IL2NativeTokenVault.sol"; - -import {L2_ASSET_ROUTER_ADDR, L2_NATIVE_TOKEN_VAULT_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; - -import {AddressAliasHelper} from "contracts/vendor/AddressAliasHelper.sol"; - -import {DeployUtils} from "deploy-scripts/DeployUtils.s.sol"; -import {L2Utils, SystemContractsArgs} from "./L2Utils.sol"; +import {SystemContractsArgs} from "./L2Utils.sol"; import {SharedL2ContractL2Deployer} from "./_SharedL2ContractL2Deployer.sol"; import {L2Erc20TestAbstract} from "../../l1/integration/l2-tests-abstract/L2Erc20TestAbstract.t.sol"; import {SharedL2ContractDeployer} from "../../l1/integration/l2-tests-abstract/_SharedL2ContractDeployer.sol"; -import {DeployIntegrationUtils} from "../../l1/integration/deploy-scripts/DeployIntegrationUtils.s.sol"; + import {Create2FactoryUtils} from "deploy-scripts/Create2FactoryUtils.s.sol"; contract L2Erc20Test is Test, L2Erc20TestAbstract, SharedL2ContractL2Deployer { diff --git a/l1-contracts/test/foundry/l2/integration/L2GatewayTests.t.sol b/l1-contracts/test/foundry/l2/integration/L2GatewayTests.t.sol index d9d7f66eb8..440b617bda 100644 --- a/l1-contracts/test/foundry/l2/integration/L2GatewayTests.t.sol +++ b/l1-contracts/test/foundry/l2/integration/L2GatewayTests.t.sol @@ -7,31 +7,13 @@ pragma solidity ^0.8.20; import {Test} from "forge-std/Test.sol"; import "forge-std/console.sol"; -import {L2AssetRouter} from "contracts/bridge/asset-router/L2AssetRouter.sol"; -import {IL2NativeTokenVault} from "contracts/bridge/ntv/IL2NativeTokenVault.sol"; - -import {UpgradeableBeacon} from "@openzeppelin/contracts-v4/proxy/beacon/UpgradeableBeacon.sol"; - -import {L2_ASSET_ROUTER_ADDR, L2_BRIDGEHUB_ADDR, L2_NATIVE_TOKEN_VAULT_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; -import {ETH_TOKEN_ADDRESS, SETTLEMENT_LAYER_RELAY_SENDER} from "contracts/common/Config.sol"; - -import {AddressAliasHelper} from "contracts/vendor/AddressAliasHelper.sol"; -import {BridgehubMintCTMAssetData, IBridgehub} from "contracts/bridgehub/IBridgehub.sol"; -import {IAdmin} from "contracts/state-transition/chain-interfaces/IAdmin.sol"; -import {IL2AssetRouter} from "contracts/bridge/asset-router/IL2AssetRouter.sol"; -import {IL1Nullifier} from "contracts/bridge/interfaces/IL1Nullifier.sol"; -import {IL1AssetRouter} from "contracts/bridge/asset-router/IL1AssetRouter.sol"; - -import {L2Utils, SystemContractsArgs} from "./L2Utils.sol"; +import {SystemContractsArgs} from "./L2Utils.sol"; import {SharedL2ContractL2Deployer} from "./_SharedL2ContractL2Deployer.sol"; -import {IChainTypeManager} from "contracts/state-transition/IChainTypeManager.sol"; -import {IZKChain} from "contracts/state-transition/chain-interfaces/IZKChain.sol"; -import {DeployUtils} from "deploy-scripts/DeployUtils.s.sol"; import {L2GatewayTestAbstract} from "../../l1/integration/l2-tests-abstract/L2GatewayTestAbstract.t.sol"; import {SharedL2ContractDeployer} from "../../l1/integration/l2-tests-abstract/_SharedL2ContractDeployer.sol"; -import {DeployIntegrationUtils} from "../../l1/integration/deploy-scripts/DeployIntegrationUtils.s.sol"; + import {Create2FactoryUtils} from "deploy-scripts/Create2FactoryUtils.s.sol"; contract L2GatewayTests is Test, L2GatewayTestAbstract, SharedL2ContractL2Deployer { diff --git a/l1-contracts/test/foundry/l2/integration/L2GenesisUpgrade.t.sol b/l1-contracts/test/foundry/l2/integration/L2GenesisUpgrade.t.sol new file mode 100644 index 0000000000..c1bd67365e --- /dev/null +++ b/l1-contracts/test/foundry/l2/integration/L2GenesisUpgrade.t.sol @@ -0,0 +1,183 @@ +// SPDX-License-Identifier: MIT + +pragma solidity 0.8.28; + +import {Test} from "forge-std/Test.sol"; + +import {L2ComplexUpgrader} from "contracts/l2-upgrades/L2ComplexUpgrader.sol"; +import {L2GenesisUpgrade} from "contracts/l2-upgrades/L2GenesisUpgrade.sol"; +import {IL2GenesisUpgrade} from "contracts/state-transition/l2-deps/IL2GenesisUpgrade.sol"; +import {L2_COMPLEX_UPGRADER_ADDR, L2_FORCE_DEPLOYER_ADDR, L2_GENESIS_UPGRADE_ADDR, L2_SYSTEM_CONTEXT_SYSTEM_CONTRACT_ADDR, L2_MESSAGE_ROOT_ADDR, L2_BRIDGEHUB_ADDR, L2_ASSET_ROUTER_ADDR, L2_WRAPPED_BASE_TOKEN_IMPL_ADDR, L2_NTV_BEACON_DEPLOYER_ADDR, L2_KNOWN_CODE_STORAGE_SYSTEM_CONTRACT_ADDR, L2_CHAIN_ASSET_HANDLER_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; +import {Utils} from "deploy-scripts/Utils.sol"; +import {L2ContractHelper} from "contracts/common/l2-helpers/L2ContractHelper.sol"; +import {FixedForceDeploymentsData, ZKChainSpecificForceDeploymentsData} from "contracts/state-transition/l2-deps/IL2GenesisUpgrade.sol"; +import {L2WrappedBaseToken} from "contracts/bridge/L2WrappedBaseToken.sol"; +import {L2MessageRoot} from "contracts/bridgehub/L2MessageRoot.sol"; +import {L2Bridgehub} from "contracts/bridgehub/L2Bridgehub.sol"; +import {L2AssetRouter} from "contracts/bridge/asset-router/L2AssetRouter.sol"; +import {L2ChainAssetHandler} from "contracts/bridgehub/L2ChainAssetHandler.sol"; +import {UpgradeableBeaconDeployer} from "contracts/bridge/ntv/UpgradeableBeaconDeployer.sol"; +import {SharedL2ContractDeployer} from "../../l1/integration/l2-tests-abstract/_SharedL2ContractDeployer.sol"; +import {SharedL2ContractL2Deployer} from "./_SharedL2ContractL2Deployer.sol"; +import {SystemContractsArgs} from "./L2Utils.sol"; +import {SharedL2ContractL2Deployer} from "./_SharedL2ContractL2Deployer.sol"; +import {ISystemContext} from "contracts/state-transition/l2-deps/ISystemContext.sol"; +import {L2GatewayTestAbstract} from "../../l1/integration/l2-tests-abstract/L2GatewayTestAbstract.t.sol"; +import {SharedL2ContractDeployer} from "../../l1/integration/l2-tests-abstract/_SharedL2ContractDeployer.sol"; +import {Create2FactoryUtils} from "deploy-scripts/Create2FactoryUtils.s.sol"; + +contract L2GenesisUpgradeTest is Test, SharedL2ContractDeployer, SharedL2ContractL2Deployer { + uint256 constant CHAIN_ID = 270; + address ctmDeployerAddress = makeAddr("ctmDeployer"); + address bridgehubOwnerAddress = makeAddr("bridgehubOwner"); + + bytes fixedForceDeploymentsData; + bytes additionalForceDeploymentsData; + + function test() internal virtual override(SharedL2ContractDeployer, SharedL2ContractL2Deployer) {} + + function initSystemContracts( + SystemContractsArgs memory _args + ) internal override(SharedL2ContractDeployer, SharedL2ContractL2Deployer) { + super.initSystemContracts(_args); + } + + function deployViaCreate2( + bytes memory creationCode, + bytes memory constructorArgs + ) internal override(Create2FactoryUtils, SharedL2ContractL2Deployer) returns (address) { + return super.deployViaCreate2(creationCode, constructorArgs); + } + + function deployL2Contracts( + uint256 _l1ChainId + ) public override(SharedL2ContractL2Deployer, SharedL2ContractDeployer) { + super.deployL2Contracts(_l1ChainId); + } + + function setUp() public override { + super.setUp(); + + // Deploy and etch L2ComplexUpgrader + bytes memory complexUpgraderCode = Utils.readZKFoundryBytecodeL1("L2ComplexUpgrader.sol", "L2ComplexUpgrader"); + vm.etch(L2_COMPLEX_UPGRADER_ADDR, complexUpgraderCode); + + // Deploy and etch L2GenesisUpgrade + bytes memory genesisUpgradeCode = Utils.readZKFoundryBytecodeL1("L2GenesisUpgrade.sol", "L2GenesisUpgrade"); + vm.etch(L2_GENESIS_UPGRADE_ADDR, genesisUpgradeCode); + + // Deploy and etch SystemContext + bytes memory systemContextCode = Utils.readZKFoundryBytecodeSystemContracts( + "SystemContext.sol", + "SystemContext" + ); + vm.etch(L2_SYSTEM_CONTEXT_SYSTEM_CONTRACT_ADDR, systemContextCode); + + // Deploy and etch L2WrappedBaseToken + bytes memory wrappedBaseTokenCode = Utils.readZKFoundryBytecodeL1( + "L2WrappedBaseToken.sol", + "L2WrappedBaseToken" + ); + vm.etch(L2_WRAPPED_BASE_TOKEN_IMPL_ADDR, wrappedBaseTokenCode); + + // Deploy and etch UpgradeableBeaconDeployer + new UpgradeableBeaconDeployer(); + bytes memory upgradeableBeaconDeployerCode = Utils.readZKFoundryBytecodeL1( + "UpgradeableBeaconDeployer.sol", + "UpgradeableBeaconDeployer" + ); + vm.etch(L2_NTV_BEACON_DEPLOYER_ADDR, upgradeableBeaconDeployerCode); + + additionalForceDeploymentsData = abi.encode( + ZKChainSpecificForceDeploymentsData({ + baseTokenAssetId: bytes32(0x0100056f53fd9e940906d998a80ed53392e5c50a8eb198baf9f78fd84ce7ec70), + l2LegacySharedBridge: address(0), + predeployedL2WethAddress: address(1), + baseTokenL1Address: address(1), + baseTokenName: "Ether", + baseTokenSymbol: "ETH" + }) + ); + + bytes memory messageRootBytecode = Utils.readZKFoundryBytecodeL1("L2MessageRoot.sol", "L2MessageRoot"); + bytes memory messageRootBytecodeInfo = abi.encode(L2ContractHelper.hashL2Bytecode(messageRootBytecode)); + + bytes memory l2NativeTokenVaultBytecode = Utils.readZKFoundryBytecodeL1( + "L2NativeTokenVault.sol", + "L2NativeTokenVault" + ); + bytes memory l2NtvBytecodeInfo = abi.encode(L2ContractHelper.hashL2Bytecode(l2NativeTokenVaultBytecode)); + + bytes memory l2AssetRouterBytecode = Utils.readZKFoundryBytecodeL1("L2AssetRouter.sol", "L2AssetRouter"); + bytes memory l2AssetRouterBytecodeInfo = abi.encode(L2ContractHelper.hashL2Bytecode(l2AssetRouterBytecode)); + + bytes memory bridgehubBytecode = Utils.readZKFoundryBytecodeL1("L2Bridgehub.sol", "L2Bridgehub"); + bytes memory bridgehubBytecodeInfo = abi.encode(L2ContractHelper.hashL2Bytecode(bridgehubBytecode)); + + bytes memory chainAssetHandlerBytecode = Utils.readZKFoundryBytecodeL1( + "L2ChainAssetHandler.sol", + "L2ChainAssetHandler" + ); + bytes memory chainAssetHandlerBytecodeInfo = abi.encode( + L2ContractHelper.hashL2Bytecode(chainAssetHandlerBytecode) + ); + + bytes memory beaconDeployerBytecode = Utils.readZKFoundryBytecodeL1( + "UpgradeableBeaconDeployer.sol", + "UpgradeableBeaconDeployer" + ); + bytes memory beaconDeployerBytecodeInfo = abi.encode(L2ContractHelper.hashL2Bytecode(beaconDeployerBytecode)); + + fixedForceDeploymentsData = abi.encode( + FixedForceDeploymentsData({ + l1ChainId: 1, + eraChainId: CHAIN_ID, + l1AssetRouter: address(1), + l2TokenProxyBytecodeHash: bytes32(0x0100056f53fd9e940906d998a80ed53392e5c50a8eb198baf9f78fd84ce7ec70), + aliasedL1Governance: address(1), + maxNumberOfZKChains: 100, + bridgehubBytecodeInfo: bridgehubBytecodeInfo, + l2AssetRouterBytecodeInfo: l2AssetRouterBytecodeInfo, + l2NtvBytecodeInfo: l2NtvBytecodeInfo, + messageRootBytecodeInfo: messageRootBytecodeInfo, + chainAssetHandlerBytecodeInfo: chainAssetHandlerBytecodeInfo, + beaconDeployerInfo: beaconDeployerBytecodeInfo, + // For genesis upgrade these values will always be zero + l2SharedBridgeLegacyImpl: address(0), + l2BridgedStandardERC20Impl: address(0), + dangerousTestOnlyForcedBeacon: address(0) + }) + ); + + vm.mockCall( + L2_SYSTEM_CONTEXT_SYSTEM_CONTRACT_ADDR, + abi.encodeWithSelector(ISystemContext.setChainId.selector), + "" + ); + vm.mockCall(L2_BRIDGEHUB_ADDR, abi.encodeWithSelector(L2Bridgehub.initL2.selector), ""); + vm.mockCall(L2_ASSET_ROUTER_ADDR, abi.encodeWithSelector(L2AssetRouter.initL2.selector), ""); + vm.mockCall(L2_CHAIN_ASSET_HANDLER_ADDR, abi.encodeWithSelector(L2ChainAssetHandler.initL2.selector), ""); + vm.mockCall( + L2_KNOWN_CODE_STORAGE_SYSTEM_CONTRACT_ADDR, + abi.encodeWithSelector(bytes4(keccak256("getMarker(bytes32)"))), + abi.encode(1) + ); + } + + function test_SuccessfulGenesisUpgrade() public { + bytes memory genesisUpgradeCalldata = abi.encodeWithSelector( + IL2GenesisUpgrade.genesisUpgrade.selector, + false, // _isZKsyncOS + CHAIN_ID, + ctmDeployerAddress, + fixedForceDeploymentsData, + additionalForceDeploymentsData + ); + + vm.expectEmit(true, false, false, true, L2_COMPLEX_UPGRADER_ADDR); + emit IL2GenesisUpgrade.UpgradeComplete(CHAIN_ID); + + vm.prank(L2_FORCE_DEPLOYER_ADDR); + L2ComplexUpgrader(L2_COMPLEX_UPGRADER_ADDR).upgrade(L2_GENESIS_UPGRADE_ADDR, genesisUpgradeCalldata); + } +} diff --git a/l1-contracts/test/foundry/l2/integration/L2NativeTokenVault.t.sol b/l1-contracts/test/foundry/l2/integration/L2NativeTokenVault.t.sol index 406fa7ab57..6611622126 100644 --- a/l1-contracts/test/foundry/l2/integration/L2NativeTokenVault.t.sol +++ b/l1-contracts/test/foundry/l2/integration/L2NativeTokenVault.t.sol @@ -9,11 +9,10 @@ import {Test} from "forge-std/Test.sol"; import {SystemContractsArgs} from "./L2Utils.sol"; -import {DeployUtils} from "deploy-scripts/DeployUtils.s.sol"; import {L2NativeTokenVaultTestAbstract} from "../../l1/integration/l2-tests-abstract/L2NativeTokenVaultTestAbstract.t.sol"; import {SharedL2ContractL2Deployer} from "./_SharedL2ContractL2Deployer.sol"; import {SharedL2ContractDeployer} from "../../l1/integration/l2-tests-abstract/_SharedL2ContractDeployer.sol"; -import {DeployIntegrationUtils} from "../../l1/integration/deploy-scripts/DeployIntegrationUtils.s.sol"; + import {Create2FactoryUtils} from "deploy-scripts/Create2FactoryUtils.s.sol"; contract L2NativeTokenVaultTest is Test, SharedL2ContractL2Deployer, L2NativeTokenVaultTestAbstract { diff --git a/l1-contracts/test/foundry/l2/integration/L2Utils.sol b/l1-contracts/test/foundry/l2/integration/L2Utils.sol index d2850c560c..612038bdd0 100644 --- a/l1-contracts/test/foundry/l2/integration/L2Utils.sol +++ b/l1-contracts/test/foundry/l2/integration/L2Utils.sol @@ -3,29 +3,29 @@ pragma solidity ^0.8.20; import {Vm} from "forge-std/Vm.sol"; -import {StdStorage, Test, stdStorage, stdToml} from "forge-std/Test.sol"; + import "forge-std/console.sol"; -import {L2_ASSET_ROUTER_ADDR, L2_BRIDGEHUB_ADDR, L2_CHAIN_ASSET_HANDLER_ADDR, L2_DEPLOYER_SYSTEM_CONTRACT_ADDR, L2_MESSAGE_ROOT_ADDR, L2_NATIVE_TOKEN_VAULT_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; +import {L2_ASSET_ROUTER_ADDR, L2_BRIDGEHUB_ADDR, L2_CHAIN_ASSET_HANDLER_ADDR, L2_COMPLEX_UPGRADER_ADDR, L2_DEPLOYER_SYSTEM_CONTRACT_ADDR, L2_MESSAGE_ROOT_ADDR, L2_NATIVE_TOKEN_VAULT_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; import {IContractDeployer, L2ContractHelper} from "contracts/common/l2-helpers/L2ContractHelper.sol"; import {L2AssetRouter} from "contracts/bridge/asset-router/L2AssetRouter.sol"; import {L2NativeTokenVault} from "contracts/bridge/ntv/L2NativeTokenVault.sol"; import {IMessageRoot} from "contracts/bridgehub/IMessageRoot.sol"; import {ICTMDeploymentTracker} from "contracts/bridgehub/ICTMDeploymentTracker.sol"; -import {Bridgehub, IBridgehub} from "contracts/bridgehub/Bridgehub.sol"; -import {ChainAssetHandler} from "contracts/bridgehub/ChainAssetHandler.sol"; -import {MessageRoot} from "contracts/bridgehub/MessageRoot.sol"; +import {L2Bridgehub} from "contracts/bridgehub/L2Bridgehub.sol"; +import {IL2Bridgehub} from "contracts/bridgehub/IL2Bridgehub.sol"; +import {L2MessageRoot} from "contracts/bridgehub/L2MessageRoot.sol"; import {ETH_TOKEN_ADDRESS} from "contracts/common/Config.sol"; import {DataEncoding} from "contracts/common/libraries/DataEncoding.sol"; -import {SystemContractsCaller} from "contracts/common/l2-helpers/SystemContractsCaller.sol"; import {DeployFailed} from "contracts/common/L1ContractErrors.sol"; import {SystemContractsArgs} from "../../l1/integration/l2-tests-abstract/_SharedL2ContractDeployer.sol"; -import {ContractsBytecodesLib} from "deploy-scripts/ContractsBytecodesLib.sol"; + import {Utils} from "deploy-scripts/Utils.sol"; +import {L2ChainAssetHandler} from "contracts/bridgehub/L2ChainAssetHandler.sol"; library L2Utils { address internal constant VM_ADDRESS = address(uint160(uint256(keccak256("hevm cheat code")))); @@ -45,26 +45,26 @@ library L2Utils { } function forceDeploySystemContracts(SystemContractsArgs memory _args) internal { - forceDeployMessageRoot(); + forceDeployMessageRoot(_args); forceDeployBridgehub(_args); forceDeployChainAssetHandler(_args); forceDeployAssetRouter(_args); forceDeployNativeTokenVault(_args); } - function forceDeployMessageRoot() internal { - new MessageRoot(IBridgehub(L2_BRIDGEHUB_ADDR), L1_CHAIN_ID); - forceDeployWithConstructor("MessageRoot", L2_MESSAGE_ROOT_ADDR, abi.encode(L2_BRIDGEHUB_ADDR, L1_CHAIN_ID)); + function forceDeployMessageRoot(SystemContractsArgs memory _args) internal { + new L2MessageRoot(); + forceDeployWithoutConstructor("L2MessageRoot", L2_MESSAGE_ROOT_ADDR); + vm.prank(L2_COMPLEX_UPGRADER_ADDR); + L2MessageRoot(L2_MESSAGE_ROOT_ADDR).initL2(_args.l1ChainId); } function forceDeployBridgehub(SystemContractsArgs memory _args) internal { - new Bridgehub(_args.l1ChainId, _args.aliasedOwner, 100); - forceDeployWithConstructor( - "Bridgehub", - L2_BRIDGEHUB_ADDR, - abi.encode(_args.l1ChainId, _args.aliasedOwner, 100) - ); - Bridgehub bridgehub = Bridgehub(L2_BRIDGEHUB_ADDR); + new L2Bridgehub(); + forceDeployWithoutConstructor("L2Bridgehub", L2_BRIDGEHUB_ADDR); + L2Bridgehub bridgehub = L2Bridgehub(L2_BRIDGEHUB_ADDR); + vm.prank(L2_COMPLEX_UPGRADER_ADDR); + bridgehub.initL2(_args.l1ChainId, _args.aliasedOwner, 100); vm.prank(_args.aliasedOwner); bridgehub.setAddresses( L2_ASSET_ROUTER_ADDR, @@ -75,23 +75,16 @@ library L2Utils { } function forceDeployChainAssetHandler(SystemContractsArgs memory _args) internal { - new ChainAssetHandler( + new L2ChainAssetHandler(); + forceDeployWithoutConstructor("L2ChainAssetHandler", L2_CHAIN_ASSET_HANDLER_ADDR); + L2ChainAssetHandler chainAssetHandler = L2ChainAssetHandler(L2_CHAIN_ASSET_HANDLER_ADDR); + vm.prank(L2_COMPLEX_UPGRADER_ADDR); + chainAssetHandler.initL2( _args.l1ChainId, _args.aliasedOwner, - IBridgehub(L2_BRIDGEHUB_ADDR), + L2_BRIDGEHUB_ADDR, L2_ASSET_ROUTER_ADDR, - IMessageRoot(L2_MESSAGE_ROOT_ADDR) - ); - forceDeployWithConstructor( - "ChainAssetHandler", - L2_CHAIN_ASSET_HANDLER_ADDR, - abi.encode( - _args.l1ChainId, - _args.aliasedOwner, - L2_BRIDGEHUB_ADDR, - L2_ASSET_ROUTER_ADDR, - L2_MESSAGE_ROOT_ADDR - ) + L2_MESSAGE_ROOT_ADDR ); } @@ -100,26 +93,18 @@ library L2Utils { // to ensure that the bytecode is known bytes32 ethAssetId = DataEncoding.encodeNTVAssetId(_args.l1ChainId, ETH_TOKEN_ADDRESS); { - new L2AssetRouter( - _args.l1ChainId, - _args.eraChainId, - _args.l1AssetRouter, - _args.legacySharedBridge, - ethAssetId, - _args.aliasedOwner - ); + new L2AssetRouter(); } - forceDeployWithConstructor( - "L2AssetRouter", - L2_ASSET_ROUTER_ADDR, - abi.encode( - _args.l1ChainId, - _args.eraChainId, - _args.l1AssetRouter, - _args.legacySharedBridge, - ethAssetId, - _args.aliasedOwner - ) + forceDeployWithoutConstructor("L2AssetRouter", L2_ASSET_ROUTER_ADDR); + L2AssetRouter assetRouter = L2AssetRouter(L2_ASSET_ROUTER_ADDR); + vm.prank(L2_COMPLEX_UPGRADER_ADDR); + assetRouter.initL2( + _args.l1ChainId, + _args.eraChainId, + _args.l1AssetRouter, + _args.legacySharedBridge, + ethAssetId, + _args.aliasedOwner ); } @@ -128,38 +113,23 @@ library L2Utils { // to ensure that the bytecode is known bytes32 ethAssetId = DataEncoding.encodeNTVAssetId(_args.l1ChainId, ETH_TOKEN_ADDRESS); { - new L2NativeTokenVault({ - _l1ChainId: _args.l1ChainId, - _aliasedOwner: _args.aliasedOwner, - _l2TokenProxyBytecodeHash: _args.l2TokenProxyBytecodeHash, - _legacySharedBridge: _args.legacySharedBridge, - _bridgedTokenBeacon: _args.l2TokenBeacon, - _contractsDeployedAlready: _args.contractsDeployedAlready, - _wethToken: address(0), - _baseTokenAssetId: ethAssetId - }); + new L2NativeTokenVault(); } - forceDeployWithConstructor( - "L2NativeTokenVault", - L2_NATIVE_TOKEN_VAULT_ADDR, - abi.encode( - _args.l1ChainId, - _args.aliasedOwner, - _args.l2TokenProxyBytecodeHash, - _args.legacySharedBridge, - _args.l2TokenBeacon, - _args.contractsDeployedAlready, - address(0), - ethAssetId - ) + forceDeployWithoutConstructor("L2NativeTokenVault", L2_NATIVE_TOKEN_VAULT_ADDR); + L2NativeTokenVault nativeTokenVault = L2NativeTokenVault(L2_NATIVE_TOKEN_VAULT_ADDR); + vm.prank(L2_COMPLEX_UPGRADER_ADDR); + nativeTokenVault.initL2( + _args.l1ChainId, + _args.aliasedOwner, + _args.l2TokenProxyBytecodeHash, + _args.legacySharedBridge, + _args.l2TokenBeacon, + address(0), + ethAssetId ); } - function forceDeployWithConstructor( - string memory _contractName, - address _address, - bytes memory _constructorArgs - ) public { + function forceDeployWithoutConstructor(string memory _contractName, address _address) public { bytes memory bytecode = Utils.readZKFoundryBytecodeL1(string.concat(_contractName, ".sol"), _contractName); bytes32 bytecodehash = L2ContractHelper.hashL2Bytecode(bytecode); @@ -168,9 +138,9 @@ library L2Utils { deployments[0] = IContractDeployer.ForceDeployment({ bytecodeHash: bytecodehash, newAddress: _address, - callConstructor: true, + callConstructor: false, value: 0, - input: _constructorArgs + input: "" }); vm.prank(L2_FORCE_DEPLOYER_ADDR); diff --git a/l1-contracts/test/foundry/l2/integration/WETH.t.sol b/l1-contracts/test/foundry/l2/integration/WETH.t.sol index ad4119eefa..221de3d61d 100644 --- a/l1-contracts/test/foundry/l2/integration/WETH.t.sol +++ b/l1-contracts/test/foundry/l2/integration/WETH.t.sol @@ -4,10 +4,6 @@ pragma solidity ^0.8.20; import {Test} from "forge-std/Test.sol"; -import {DeployUtils} from "deploy-scripts/DeployUtils.s.sol"; - -import {DeployIntegrationUtils} from "../../l1/integration/deploy-scripts/DeployIntegrationUtils.s.sol"; - import {SharedL2ContractDeployer} from "../../l1/integration/l2-tests-abstract/_SharedL2ContractDeployer.sol"; import {L2WethTestAbstract} from "../../l1/integration/l2-tests-abstract/L2WethTestAbstract.t.sol"; diff --git a/l1-contracts/test/foundry/l2/integration/_SharedL2ContractL2Deployer.sol b/l1-contracts/test/foundry/l2/integration/_SharedL2ContractL2Deployer.sol index 99c1889217..43800bc834 100644 --- a/l1-contracts/test/foundry/l2/integration/_SharedL2ContractL2Deployer.sol +++ b/l1-contracts/test/foundry/l2/integration/_SharedL2ContractL2Deployer.sol @@ -1,10 +1,9 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import {StdStorage, Test, stdStorage, stdToml} from "forge-std/Test.sol"; +import {Test, stdToml} from "forge-std/Test.sol"; import {Script, console2 as console} from "forge-std/Script.sol"; -import {DeployUtils} from "deploy-scripts/DeployUtils.s.sol"; import {L2_ASSET_ROUTER_ADDR, L2_BRIDGEHUB_ADDR, L2_NATIVE_TOKEN_VAULT_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; import {TransparentUpgradeableProxy} from "@openzeppelin/contracts-v4/proxy/transparent/TransparentUpgradeableProxy.sol"; @@ -19,7 +18,7 @@ import {GettersFacet} from "contracts/state-transition/chain-deps/facets/Getters import {DiamondInit} from "contracts/state-transition/chain-deps/DiamondInit.sol"; import {ChainTypeManager} from "contracts/state-transition/ChainTypeManager.sol"; import {L1GenesisUpgrade} from "contracts/upgrades/L1GenesisUpgrade.sol"; -import {DualVerifier} from "contracts/state-transition/verifiers/DualVerifier.sol"; + import {TestnetVerifier} from "contracts/state-transition/verifiers/TestnetVerifier.sol"; import {ValidatorTimelock} from "contracts/state-transition/ValidatorTimelock.sol"; import {RollupDAManager} from "contracts/state-transition/data-availability/RollupDAManager.sol"; @@ -53,7 +52,7 @@ contract SharedL2ContractL2Deployer is SharedL2ContractDeployer { instantiateCreate2Factory(); addresses.stateTransition.genesisUpgrade = address(new L1GenesisUpgrade()); addresses.stateTransition.verifier = address( - new TestnetVerifier(IVerifierV2(ADDRESS_ONE), IVerifier(ADDRESS_ONE)) + new TestnetVerifier(IVerifierV2(ADDRESS_ONE), IVerifier(ADDRESS_ONE), address(0), false) ); uint32 executionDelay = uint32(config.contracts.validatorTimelockExecutionDelay); addresses.stateTransition.validatorTimelock = address( @@ -69,7 +68,7 @@ contract SharedL2ContractL2Deployer is SharedL2ContractDeployer { ); addresses.stateTransition.mailboxFacet = address(new MailboxFacet(config.eraChainId, config.l1ChainId)); addresses.stateTransition.gettersFacet = address(new GettersFacet()); - addresses.stateTransition.diamondInit = address(new DiamondInit()); + addresses.stateTransition.diamondInit = address(new DiamondInit(false)); // Deploy ChainTypeManager implementation addresses.stateTransition.chainTypeManagerImplementation = address( new ChainTypeManager(addresses.bridgehub.bridgehubProxy) diff --git a/l1-contracts/test/foundry/l2/unit/GatewayCTMDeployer/GatewayCTMDeployer.t.sol b/l1-contracts/test/foundry/l2/unit/GatewayCTMDeployer/GatewayCTMDeployer.t.sol index d21987f84e..7068e44f17 100644 --- a/l1-contracts/test/foundry/l2/unit/GatewayCTMDeployer/GatewayCTMDeployer.t.sol +++ b/l1-contracts/test/foundry/l2/unit/GatewayCTMDeployer/GatewayCTMDeployer.t.sol @@ -6,7 +6,7 @@ import {Test} from "forge-std/Test.sol"; import {console2 as console} from "forge-std/Script.sol"; import {DAContracts, DeployedContracts, GatewayCTMDeployer, GatewayCTMDeployerConfig, StateTransitionContracts} from "contracts/state-transition/chain-deps/GatewayCTMDeployer.sol"; -import {IVerifier, VerifierParams} from "contracts/state-transition/chain-interfaces/IVerifier.sol"; +import {VerifierParams} from "contracts/state-transition/chain-interfaces/IVerifier.sol"; import {FeeParams, PubdataPricingMode} from "contracts/state-transition/chain-deps/ZKChainStorage.sol"; import {ServerNotifier} from "contracts/governance/ServerNotifier.sol"; @@ -19,9 +19,10 @@ import {RollupDAManager} from "contracts/state-transition/data-availability/Roll import {RelayedSLDAValidator} from "contracts/state-transition/data-availability/RelayedSLDAValidator.sol"; import {ValidiumL1DAValidator} from "contracts/state-transition/data-availability/ValidiumL1DAValidator.sol"; -import {DualVerifier} from "contracts/state-transition/verifiers/DualVerifier.sol"; -import {L1VerifierFflonk} from "contracts/state-transition/verifiers/L1VerifierFflonk.sol"; -import {L1VerifierPlonk} from "contracts/state-transition/verifiers/L1VerifierPlonk.sol"; +import {EraVerifierFflonk} from "contracts/state-transition/verifiers/EraVerifierFflonk.sol"; +import {EraVerifierPlonk} from "contracts/state-transition/verifiers/EraVerifierPlonk.sol"; +import {ZKsyncOSVerifierFflonk} from "contracts/state-transition/verifiers/ZKsyncOSVerifierFflonk.sol"; +import {ZKsyncOSVerifierPlonk} from "contracts/state-transition/verifiers/ZKsyncOSVerifierPlonk.sol"; import {TestnetVerifier} from "contracts/state-transition/verifiers/TestnetVerifier.sol"; import {ValidatorTimelock} from "contracts/state-transition/ValidatorTimelock.sol"; @@ -63,7 +64,7 @@ contract GatewayCTMDeployerTest is Test { new GettersFacet(); new AdminFacet(1, RollupDAManager(address(0))); - new DiamondInit(); + new DiamondInit(false); new L1GenesisUpgrade(); new RollupDAManager(); new ValidiumL1DAValidator(); @@ -71,11 +72,10 @@ contract GatewayCTMDeployerTest is Test { new ChainTypeManager(address(0)); new ProxyAdmin(); - new L1VerifierFflonk(); - new L1VerifierPlonk(); + new EraVerifierFflonk(); + new EraVerifierPlonk(); - new TestnetVerifier(L1VerifierFflonk(address(0)), L1VerifierPlonk(address(0))); - new DualVerifier(L1VerifierFflonk(address(0)), L1VerifierPlonk(address(0))); + new TestnetVerifier(EraVerifierFflonk(address(0)), EraVerifierPlonk(address(0)), address(0), false); new ValidatorTimelock(L2_BRIDGEHUB_ADDR); new ServerNotifier(); @@ -91,8 +91,8 @@ contract GatewayCTMDeployerTest is Test { salt: keccak256("test-salt"), eraChainId: 1001, l1ChainId: 1, - rollupL2DAValidatorAddress: address(0x456), testnetVerifier: true, + isZKsyncOS: false, adminSelectors: new bytes4[](2), executorSelectors: new bytes4[](2), mailboxSelectors: new bytes4[](2), diff --git a/l1-contracts/test/foundry/l2/unit/L2AdminFactory/L2AdminFactory.t.sol b/l1-contracts/test/foundry/l2/unit/L2AdminFactory/L2AdminFactory.t.sol index 7da200111b..6bc3b5a669 100644 --- a/l1-contracts/test/foundry/l2/unit/L2AdminFactory/L2AdminFactory.t.sol +++ b/l1-contracts/test/foundry/l2/unit/L2AdminFactory/L2AdminFactory.t.sol @@ -4,7 +4,7 @@ pragma solidity ^0.8.20; import {Test} from "forge-std/Test.sol"; -import {IBridgehub} from "contracts/bridgehub/IBridgehub.sol"; +import {IL1Bridgehub} from "contracts/bridgehub/IL1Bridgehub.sol"; import {L2AdminFactory} from "contracts/governance/L2AdminFactory.sol"; import {PermanentRestriction} from "contracts/governance/PermanentRestriction.sol"; import {IPermanentRestriction} from "contracts/governance/IPermanentRestriction.sol"; @@ -61,7 +61,7 @@ contract L2AdminFactoryTest is Test { address admin = factory.deployAdmin(additionalRestrictions); // Now, we need to check whether it would be able to accept such an admin - PermanentRestriction restriction = new PermanentRestriction(IBridgehub(address(0)), address(factory)); + PermanentRestriction restriction = new PermanentRestriction(IL1Bridgehub(address(0)), address(factory)); bytes32 codeHash; assembly { diff --git a/l1-contracts/test/foundry/l2/unit/Verifier/L2PlonkVerifier.t.sol b/l1-contracts/test/foundry/l2/unit/Verifier/L2PlonkVerifier.t.sol deleted file mode 100644 index 6b7de69f35..0000000000 --- a/l1-contracts/test/foundry/l2/unit/Verifier/L2PlonkVerifier.t.sol +++ /dev/null @@ -1,200 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.28; - -import {Test} from "forge-std/Test.sol"; - -import {Script, console2 as console} from "forge-std/Script.sol"; - -import {L2VerifierPlonk} from "contracts/state-transition/verifiers/L2VerifierPlonk.sol"; -import {L2PlonkVerifierTest} from "contracts/dev-contracts/test/L2PlonkVerifierTest.sol"; - -contract L2VerifierPlonkCaller { - L2VerifierPlonk public verifier; - - constructor(L2VerifierPlonk _verifier) { - verifier = _verifier; - } - - function verify( - uint256[] memory publicInputs, - uint256[] memory serializedProof - ) public view returns (bool result, uint256 gasUsed) { - uint256 gasBefore = gasleft(); - result = verifier.verify(publicInputs, serializedProof); - gasUsed = gasBefore - gasleft(); - } -} - -contract L2PlonkVerifierTestTest is Test { - uint256 Q_MOD = 21888242871839275222246405745257275088696311157297823662689037894645226208583; - uint256 R_MOD = 21888242871839275222246405745257275088548364400416034343698204186575808495617; - - uint256[] public publicInputs; - uint256[] public serializedProof; - uint256[] public recursiveAggregationInput; - - L2VerifierPlonk public verifier; - - function setUp() public virtual { - publicInputs.push(17257057577815541751225964212897374444694342989384539141520877492729); - - serializedProof.push(10032255692304426541958487424837706541667730769782503366592797609781788557424); - serializedProof.push(11856023086316274558845067687080284266010851703055534566998849536424959073766); - serializedProof.push(1946976494418613232642071265529572704802622739887191787991738703483400525159); - serializedProof.push(1328106069458824013351862477593422369726189688844441245167676630500797673929); - serializedProof.push(15488976127650523079605218040232167291115155239002840072043251018873550258833); - serializedProof.push(4352460820258659596860226525221943504756149602617718032378962471842121872064); - serializedProof.push(10499239305859992443759785453270906003243074359959242371675950941500942473773); - serializedProof.push(21347231097799123231227724221565041889687686131480556177475242020711996173235); - serializedProof.push(21448274562455512652922184359722637546669181231038098300951155169465175447933); - serializedProof.push(5224615512030263722410009061780530125927659699046094954022444377569738464640); - serializedProof.push(457781538876079938778845275495204146302569607395268192839148474821758081582); - serializedProof.push(18861735728246155975127314860333796285284072325207684293054713266899263027595); - serializedProof.push(16303944945368742900183889655415585360236645961122617249176044814801835577336); - serializedProof.push(13035945439947210396602249585896632733250124877036427100939804737514358838409); - serializedProof.push(5344210729159253547334947774998425118220137275601995670629358314205854915831); - serializedProof.push(5798533246034358556434877465898581616792677631188370022078168611592512620805); - serializedProof.push(17389657286129893116489015409587246992530648956814855147744210777822507444908); - serializedProof.push(2287244647342394712608648573347732257083870498255199596324312699868511383792); - serializedProof.push(4008043766112513713076111464601725311991199944328610186851424132679188418647); - serializedProof.push(1192776719848445147414966176395169615865534126881763324071908049917030138759); - serializedProof.push(21297794452895123333253856666749932934399762330444876027734824957603009458926); - serializedProof.push(17125994169200693606182326100834606153690416627082476471630567824088261322122); - serializedProof.push(13696978282153979214307382954559709118587582183649354744253374201589715565327); - serializedProof.push(19885518441500677676836488338931187143852666523909650686513498826535451677070); - serializedProof.push(1205434280320863211046275554464591162919269140938371417889032165323835178587); - serializedProof.push(17633172995805911347980792921300006225132501482343225088847242025756974009163); - serializedProof.push(16438080406761371143473961144300947125022788905488819913014533292593141026205); - serializedProof.push(5069081552536259237104332491140391551180511112980430307676595350165020188468); - serializedProof.push(21217317205917200275887696442048162383709998732382676029165079037795626916156); - serializedProof.push(19474466610515117278975027596198570980840609656738255347763182823792179771539); - serializedProof.push(9744176601826774967534277982058590459006781888895542911226406188087317156914); - serializedProof.push(13171230402193025939763214267878900142876558410430734782028402821166810894141); - serializedProof.push(11775403006142607980192261369108550982244126464568678337528680604943636677964); - serializedProof.push(6903612341636669639883555213872265187697278660090786759295896380793937349335); - serializedProof.push(10197105415769290664169006387603164525075746474380469980600306405504981186043); - serializedProof.push(10143152486514437388737642096964118742712576889537781270260677795662183637771); - serializedProof.push(7662095231333811948165764727904932118187491073896301295018543320499906824310); - serializedProof.push(929422796511992741418500336817719055655694499787310043166783539202506987065); - serializedProof.push(13837024938095280064325737989251964639823205065380219552242839155123572433059); - serializedProof.push(11738888513780631372636453609299803548810759208935038785934252961078387526204); - serializedProof.push(16528875312985292109940444015943812939751717229020635856725059316776921546668); - serializedProof.push(17525167117689648878398809303253004706004801107861280044640132822626802938868); - serializedProof.push(7419167499813234488108910149511390953153207250610705609008080038658070088540); - serializedProof.push(11628425014048216611195735618191126626331446742771562481735017471681943914146); - - verifier = new L2PlonkVerifierTest(); - } - - function testShouldVerify() public view { - bool success = verifier.verify(publicInputs, serializedProof); - assert(success); - } - - function testShouldVerifyWithGas() public { - // `gas snapshot` does not work well with zksync setup, so in order to obtain the amount of - // zkevm gas consumed we do the following: - // - Deploy a L2VerifierPlonkCaller contract, which would execute in zkevm context - // - Call the verify function from the L2VerifierPlonkCaller contract and return the gas used - - L2VerifierPlonkCaller caller = new L2VerifierPlonkCaller(verifier); - (bool success, uint256 gasUsed) = caller.verify(publicInputs, serializedProof); - assert(success); - - console.log("Gas used: %d", gasUsed); - } - - function testShouldVerifyWithDirtyBits() public view { - uint256[] memory newPublicInputs = publicInputs; - newPublicInputs[0] += uint256(bytes32(0xe000000000000000000000000000000000000000000000000000000000000000)); - - bool success = verifier.verify(newPublicInputs, serializedProof); - assert(success); - } - - function testEllipticCurvePointsOverModulo() public view { - uint256[] memory newSerializedProof = serializedProof; - newSerializedProof[0] += Q_MOD; - newSerializedProof[1] += Q_MOD; - newSerializedProof[1] += Q_MOD; - - bool success = verifier.verify(publicInputs, newSerializedProof); - assert(success); - } - - function testFrOverModulo() public view { - uint256[] memory newSerializedProof = serializedProof; - newSerializedProof[22] += R_MOD; - - bool success = verifier.verify(publicInputs, newSerializedProof); - assert(success); - } - - function testMoreThanOnePublicInput_shouldRevert() public { - uint256[] memory newPublicInputs = new uint256[](2); - newPublicInputs[0] = publicInputs[0]; - newPublicInputs[1] = publicInputs[0]; - - vm.expectRevert(bytes("loadProof: Proof is invalid")); - verifier.verify(newPublicInputs, serializedProof); - } - - function testEmptyPublicInput_shouldRevert() public { - uint256[] memory newPublicInputs; - - vm.expectRevert(bytes("loadProof: Proof is invalid")); - verifier.verify(newPublicInputs, serializedProof); - } - - function testMoreThan44WordsProof_shouldRevert() public { - uint256[] memory newSerializedProof = new uint256[](serializedProof.length + 1); - - for (uint256 i = 0; i < serializedProof.length; i++) { - newSerializedProof[i] = serializedProof[i]; - } - newSerializedProof[newSerializedProof.length - 1] = serializedProof[serializedProof.length - 1]; - - vm.expectRevert(bytes("loadProof: Proof is invalid")); - verifier.verify(publicInputs, newSerializedProof); - } - - function testEmptyProof_shouldRevert() public { - uint256[] memory newSerializedProof; - - vm.expectRevert(bytes("loadProof: Proof is invalid")); - verifier.verify(publicInputs, newSerializedProof); - } - - function testLongerProofInput_shouldRevert() public { - uint256[] memory newSerializedProof = new uint256[](serializedProof.length + 1); - for (uint256 i = 0; i < serializedProof.length; i++) { - newSerializedProof[i] = serializedProof[i]; - } - newSerializedProof[newSerializedProof.length - 1] = publicInputs[0]; - - vm.expectRevert(bytes("loadProof: Proof is invalid")); - verifier.verify(publicInputs, newSerializedProof); - } - - function testEllipticCurvePointAtInfinity_shouldRevert() public { - uint256[] memory newSerializedProof = serializedProof; - newSerializedProof[0] = 0; - newSerializedProof[1] = 0; - - vm.expectRevert(bytes("loadProof: Proof is invalid")); - verifier.verify(publicInputs, newSerializedProof); - } - - function testInvalidPublicInput_shouldRevert() public { - uint256[] memory newPublicInputs = publicInputs; - newPublicInputs[0] = 0; - - vm.expectRevert(bytes("invalid quotient evaluation")); - verifier.verify(newPublicInputs, serializedProof); - } - - function testVerificationKeyHash() public virtual { - bytes32 verificationKeyHash = verifier.verificationKeyHash(); - assertEq(verificationKeyHash, 0x6625fa96781746787b58306d414b1e25bd706d37d883a9b3acf57b2bd5e0de52); - } -} diff --git a/l1-contracts/test/foundry/l2/unit/Verifier/L2Verifier.t.sol b/l1-contracts/test/foundry/l2/unit/Verifier/L2Verifier.t.sol deleted file mode 100644 index 4b88e96a3e..0000000000 --- a/l1-contracts/test/foundry/l2/unit/Verifier/L2Verifier.t.sol +++ /dev/null @@ -1,201 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.28; - -import {Test} from "forge-std/Test.sol"; - -import {Script, console2 as console} from "forge-std/Script.sol"; - -import {L2VerifierPlonk} from "contracts/state-transition/verifiers/L2VerifierPlonk.sol"; -import {L2PlonkVerifierTest} from "contracts/dev-contracts/test/L2PlonkVerifierTest.sol"; - -contract L2VerifierPlonkCaller { - L2VerifierPlonk public verifier; - - constructor(L2VerifierPlonk _verifier) { - verifier = _verifier; - } - - function verify( - uint256[] memory publicInputs, - uint256[] memory serializedProof - ) public view returns (bool result, uint256 gasUsed) { - uint256 gasBefore = gasleft(); - result = verifier.verify(publicInputs, serializedProof); - gasUsed = gasBefore - gasleft(); - } -} - -contract L2PlonkVerifierTestTest is Test { - uint256 Q_MOD = 21888242871839275222246405745257275088696311157297823662689037894645226208583; - uint256 R_MOD = 21888242871839275222246405745257275088548364400416034343698204186575808495617; - - uint256[] public publicInputs; - uint256[] public serializedProof; - uint256[] public recursiveAggregationInput; - - L2VerifierPlonk public verifier; - - function setUp() public virtual { - publicInputs.push(17257057577815541751225964212897374444694342989384539141520877492729); - - serializedProof.push(10032255692304426541958487424837706541667730769782503366592797609781788557424); - serializedProof.push(11856023086316274558845067687080284266010851703055534566998849536424959073766); - serializedProof.push(1946976494418613232642071265529572704802622739887191787991738703483400525159); - serializedProof.push(1328106069458824013351862477593422369726189688844441245167676630500797673929); - serializedProof.push(15488976127650523079605218040232167291115155239002840072043251018873550258833); - serializedProof.push(4352460820258659596860226525221943504756149602617718032378962471842121872064); - serializedProof.push(10499239305859992443759785453270906003243074359959242371675950941500942473773); - serializedProof.push(21347231097799123231227724221565041889687686131480556177475242020711996173235); - serializedProof.push(21448274562455512652922184359722637546669181231038098300951155169465175447933); - serializedProof.push(5224615512030263722410009061780530125927659699046094954022444377569738464640); - serializedProof.push(457781538876079938778845275495204146302569607395268192839148474821758081582); - serializedProof.push(18861735728246155975127314860333796285284072325207684293054713266899263027595); - serializedProof.push(16303944945368742900183889655415585360236645961122617249176044814801835577336); - serializedProof.push(13035945439947210396602249585896632733250124877036427100939804737514358838409); - serializedProof.push(5344210729159253547334947774998425118220137275601995670629358314205854915831); - serializedProof.push(5798533246034358556434877465898581616792677631188370022078168611592512620805); - serializedProof.push(17389657286129893116489015409587246992530648956814855147744210777822507444908); - serializedProof.push(2287244647342394712608648573347732257083870498255199596324312699868511383792); - serializedProof.push(4008043766112513713076111464601725311991199944328610186851424132679188418647); - serializedProof.push(1192776719848445147414966176395169615865534126881763324071908049917030138759); - serializedProof.push(21297794452895123333253856666749932934399762330444876027734824957603009458926); - serializedProof.push(17125994169200693606182326100834606153690416627082476471630567824088261322122); - serializedProof.push(13696978282153979214307382954559709118587582183649354744253374201589715565327); - serializedProof.push(19885518441500677676836488338931187143852666523909650686513498826535451677070); - serializedProof.push(1205434280320863211046275554464591162919269140938371417889032165323835178587); - serializedProof.push(17633172995805911347980792921300006225132501482343225088847242025756974009163); - serializedProof.push(16438080406761371143473961144300947125022788905488819913014533292593141026205); - serializedProof.push(5069081552536259237104332491140391551180511112980430307676595350165020188468); - serializedProof.push(21217317205917200275887696442048162383709998732382676029165079037795626916156); - serializedProof.push(19474466610515117278975027596198570980840609656738255347763182823792179771539); - serializedProof.push(9744176601826774967534277982058590459006781888895542911226406188087317156914); - serializedProof.push(13171230402193025939763214267878900142876558410430734782028402821166810894141); - serializedProof.push(11775403006142607980192261369108550982244126464568678337528680604943636677964); - serializedProof.push(6903612341636669639883555213872265187697278660090786759295896380793937349335); - serializedProof.push(10197105415769290664169006387603164525075746474380469980600306405504981186043); - serializedProof.push(10143152486514437388737642096964118742712576889537781270260677795662183637771); - serializedProof.push(7662095231333811948165764727904932118187491073896301295018543320499906824310); - serializedProof.push(929422796511992741418500336817719055655694499787310043166783539202506987065); - serializedProof.push(13837024938095280064325737989251964639823205065380219552242839155123572433059); - serializedProof.push(11738888513780631372636453609299803548810759208935038785934252961078387526204); - serializedProof.push(16528875312985292109940444015943812939751717229020635856725059316776921546668); - serializedProof.push(17525167117689648878398809303253004706004801107861280044640132822626802938868); - serializedProof.push(7419167499813234488108910149511390953153207250610705609008080038658070088540); - serializedProof.push(11628425014048216611195735618191126626331446742771562481735017471681943914146); - - verifier = new L2PlonkVerifierTest(); - } - - function testShouldVerify() public view { - bool success = verifier.verify(publicInputs, serializedProof); - assert(success); - } - - function testShouldVerifyWithGas() public { - // `gas snapshot` does not work well with zksync setup, so in order to obtain the amount of - // zkevm gas consumed we do the following: - // - Deploy a L2VerifierPlonkCaller contract, which would execute in zkevm context - // - Call the verify function from the L2VerifierPlonkCaller contract and return the gas used - - L2VerifierPlonkCaller caller = new L2VerifierPlonkCaller(verifier); - - (bool success, uint256 gasUsed) = caller.verify(publicInputs, serializedProof); - assert(success); - - console.log("Gas used: %d", gasUsed); - } - - function testShouldVerifyWithDirtyBits() public view { - uint256[] memory newPublicInputs = publicInputs; - newPublicInputs[0] += uint256(bytes32(0xe000000000000000000000000000000000000000000000000000000000000000)); - - bool success = verifier.verify(newPublicInputs, serializedProof); - assert(success); - } - - function testEllipticCurvePointsOverModulo() public view { - uint256[] memory newSerializedProof = serializedProof; - newSerializedProof[0] += Q_MOD; - newSerializedProof[1] += Q_MOD; - newSerializedProof[1] += Q_MOD; - - bool success = verifier.verify(publicInputs, newSerializedProof); - assert(success); - } - - function testFrOverModulo() public view { - uint256[] memory newSerializedProof = serializedProof; - newSerializedProof[22] += R_MOD; - - bool success = verifier.verify(publicInputs, newSerializedProof); - assert(success); - } - - function testMoreThanOnePublicInput_shouldRevert() public { - uint256[] memory newPublicInputs = new uint256[](2); - newPublicInputs[0] = publicInputs[0]; - newPublicInputs[1] = publicInputs[0]; - - vm.expectRevert(bytes("loadProof: Proof is invalid")); - verifier.verify(newPublicInputs, serializedProof); - } - - function testEmptyPublicInput_shouldRevert() public { - uint256[] memory newPublicInputs; - - vm.expectRevert(bytes("loadProof: Proof is invalid")); - verifier.verify(newPublicInputs, serializedProof); - } - - function testMoreThan44WordsProof_shouldRevert() public { - uint256[] memory newSerializedProof = new uint256[](serializedProof.length + 1); - - for (uint256 i = 0; i < serializedProof.length; i++) { - newSerializedProof[i] = serializedProof[i]; - } - newSerializedProof[newSerializedProof.length - 1] = serializedProof[serializedProof.length - 1]; - - vm.expectRevert(bytes("loadProof: Proof is invalid")); - verifier.verify(publicInputs, newSerializedProof); - } - - function testEmptyProof_shouldRevert() public { - uint256[] memory newSerializedProof; - - vm.expectRevert(bytes("loadProof: Proof is invalid")); - verifier.verify(publicInputs, newSerializedProof); - } - - function testLongerProofInput_shouldRevert() public { - uint256[] memory newSerializedProof = new uint256[](serializedProof.length + 1); - for (uint256 i = 0; i < serializedProof.length; i++) { - newSerializedProof[i] = serializedProof[i]; - } - newSerializedProof[newSerializedProof.length - 1] = publicInputs[0]; - - vm.expectRevert(bytes("loadProof: Proof is invalid")); - verifier.verify(publicInputs, newSerializedProof); - } - - function testEllipticCurvePointAtInfinity_shouldRevert() public { - uint256[] memory newSerializedProof = serializedProof; - newSerializedProof[0] = 0; - newSerializedProof[1] = 0; - - vm.expectRevert(bytes("loadProof: Proof is invalid")); - verifier.verify(publicInputs, newSerializedProof); - } - - function testInvalidPublicInput_shouldRevert() public { - uint256[] memory newPublicInputs = publicInputs; - newPublicInputs[0] = 0; - - vm.expectRevert(bytes("invalid quotient evaluation")); - verifier.verify(newPublicInputs, serializedProof); - } - - function testVerificationKeyHash() public virtual { - bytes32 verificationKeyHash = verifier.verificationKeyHash(); - assertEq(verificationKeyHash, 0x6625fa96781746787b58306d414b1e25bd706d37d883a9b3acf57b2bd5e0de52); - } -} diff --git a/l1-contracts/test/foundry/l2/unit/Verifier/L2VerifierRecursive.t.sol b/l1-contracts/test/foundry/l2/unit/Verifier/L2VerifierRecursive.t.sol deleted file mode 100644 index 5902d4c3c8..0000000000 --- a/l1-contracts/test/foundry/l2/unit/Verifier/L2VerifierRecursive.t.sol +++ /dev/null @@ -1,55 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.28; - -import {L2PlonkVerifierTestTest} from "./L2PlonkVerifier.t.sol"; -import {L2PlonkVerifierRecursiveTest} from "contracts/dev-contracts/test/L2PlonkVerifierRecursiveTest.sol"; -contract L2PlonkVerifierRecursiveTestTest is L2PlonkVerifierTestTest { - function setUp() public override { - super.setUp(); - - serializedProof.push(2257920826825449939414463854743099397427742128922725774525544832270890253504); - serializedProof.push(9091218701914748532331969127001446391756173432977615061129552313204917562530); - serializedProof.push(16188304989094043810949359833767911976672882599560690320245309499206765021563); - serializedProof.push(3201093556796962656759050531176732990872300033146738631772984017549903765305); - - verifier = new L2PlonkVerifierRecursiveTest(); - } - - function testMoreThan4WordsRecursiveInput_shouldRevert() public { - uint256[] memory newSerializedProof = new uint256[](serializedProof.length + 1); - - for (uint256 i = 0; i < serializedProof.length; i++) { - newSerializedProof[i] = serializedProof[i]; - } - newSerializedProof[newSerializedProof.length - 1] = serializedProof[serializedProof.length - 1]; - - vm.expectRevert(bytes("loadProof: Proof is invalid")); - verifier.verify(publicInputs, newSerializedProof); - } - - function testEmptyRecursiveInput_shouldRevert() public { - uint256[] memory newSerializedProof = new uint256[](serializedProof.length - 4); - for (uint256 i = 0; i < newSerializedProof.length; i++) { - newSerializedProof[i] = serializedProof[i]; - } - - vm.expectRevert(bytes("loadProof: Proof is invalid")); - verifier.verify(publicInputs, newSerializedProof); - } - - function testInvalidRecursiveInput_shouldRevert() public { - uint256[] memory newSerializedProof = serializedProof; - newSerializedProof[newSerializedProof.length - 4] = 1; - newSerializedProof[newSerializedProof.length - 3] = 2; - newSerializedProof[newSerializedProof.length - 2] = 1; - newSerializedProof[newSerializedProof.length - 1] = 2; - - vm.expectRevert(bytes("finalPairing: pairing failure")); - verifier.verify(publicInputs, newSerializedProof); - } - - function testVerificationKeyHash() public override { - bytes32 verificationKeyHash = verifier.verificationKeyHash(); - assertEq(verificationKeyHash, 0x88b3ddc4ed85974c7e14297dcad4097169440305c05fdb6441ca8dfd77cd7fa7); - } -} diff --git a/l1-contracts/test/foundry/unit/concrete/GatewayTransactionFilterer/CheckTransaction.sol b/l1-contracts/test/foundry/unit/concrete/GatewayTransactionFilterer/CheckTransaction.sol index 65022129b7..cb03c783ae 100644 --- a/l1-contracts/test/foundry/unit/concrete/GatewayTransactionFilterer/CheckTransaction.sol +++ b/l1-contracts/test/foundry/unit/concrete/GatewayTransactionFilterer/CheckTransaction.sol @@ -3,21 +3,21 @@ pragma solidity 0.8.28; import {GatewayTransactionFiltererTest} from "./_GatewayTransactionFilterer_Shared.t.sol"; -import {IGetters} from "contracts/state-transition/chain-interfaces/IGetters.sol"; -import {IBridgehub} from "contracts/bridgehub/IBridgehub.sol"; +import {IBridgehubBase} from "contracts/bridgehub/IBridgehubBase.sol"; import {IAssetRouterBase} from "contracts/bridge/asset-router/IAssetRouterBase.sol"; -import {AlreadyWhitelisted, InvalidSelector, NotWhitelisted} from "contracts/common/L1ContractErrors.sol"; +import {AssetRouterBase} from "contracts/bridge/asset-router/AssetRouterBase.sol"; +import {InvalidSelector} from "contracts/common/L1ContractErrors.sol"; contract CheckTransactionTest is GatewayTransactionFiltererTest { function test_TransactionAllowedOnlyFromWhitelistedSenderWhichIsNotAssetRouter() public { bytes memory txCalladata = abi.encodeCall( - IAssetRouterBase.finalizeDeposit, + AssetRouterBase.finalizeDeposit, (uint256(10), bytes32("0x12345"), bytes("0x23456")) ); vm.startPrank(owner); vm.mockCall( bridgehub, - abi.encodeWithSelector(IBridgehub.ctmAssetIdToAddress.selector), + abi.encodeWithSelector(IBridgehubBase.ctmAssetIdToAddress.selector), abi.encode(address(0)) // Return any address ); bool isTxAllowed = transactionFiltererProxy.isTransactionAllowed( @@ -54,13 +54,13 @@ contract CheckTransactionTest is GatewayTransactionFiltererTest { function test_TransactionAllowedFromWhitelistedSenderForChainBridging() public { address stm = address(0x6060606); bytes memory txCalladata = abi.encodeCall( - IAssetRouterBase.finalizeDeposit, + AssetRouterBase.finalizeDeposit, (uint256(10), bytes32("0x12345"), bytes("0x23456")) ); vm.startPrank(owner); vm.mockCall( bridgehub, - abi.encodeWithSelector(IBridgehub.ctmAssetIdToAddress.selector), + abi.encodeWithSelector(IBridgehubBase.ctmAssetIdToAddress.selector), abi.encode(stm) // Return random address ); @@ -81,12 +81,12 @@ contract CheckTransactionTest is GatewayTransactionFiltererTest { function test_TransactionFailsWithInvalidSelectorEvenIfTheSenderIsAR() public { bytes memory txCalladata = abi.encodeCall( - IAssetRouterBase.setAssetHandlerAddressThisChain, + AssetRouterBase.setAssetHandlerAddressThisChain, (bytes32("0x12345"), address(0x01234567890123456789)) ); vm.prank(owner); vm.expectRevert( - abi.encodeWithSelector(InvalidSelector.selector, IAssetRouterBase.setAssetHandlerAddressThisChain.selector) + abi.encodeWithSelector(InvalidSelector.selector, AssetRouterBase.setAssetHandlerAddressThisChain.selector) ); bool isTxAllowed = transactionFiltererProxy.isTransactionAllowed( assetRouter, diff --git a/l1-contracts/test/foundry/unit/concrete/GatewayTransactionFilterer/_GatewayTransactionFilterer_Shared.t.sol b/l1-contracts/test/foundry/unit/concrete/GatewayTransactionFilterer/_GatewayTransactionFilterer_Shared.t.sol index 1b3646ccb8..899dcd17d5 100644 --- a/l1-contracts/test/foundry/unit/concrete/GatewayTransactionFilterer/_GatewayTransactionFilterer_Shared.t.sol +++ b/l1-contracts/test/foundry/unit/concrete/GatewayTransactionFilterer/_GatewayTransactionFilterer_Shared.t.sol @@ -6,7 +6,7 @@ import {Test} from "forge-std/Test.sol"; import {TransparentUpgradeableProxy} from "@openzeppelin/contracts-v4/proxy/transparent/TransparentUpgradeableProxy.sol"; -import {IBridgehub} from "contracts/bridgehub/IBridgehub.sol"; +import {IBridgehubBase} from "contracts/bridgehub/IBridgehubBase.sol"; import {GatewayTransactionFilterer} from "contracts/transactionFilterer/GatewayTransactionFilterer.sol"; @@ -20,7 +20,7 @@ contract GatewayTransactionFiltererTest is Test { address internal constant assetRouter = address(0x4040404); constructor() { - transactionFiltererImplementation = new GatewayTransactionFilterer(IBridgehub(bridgehub), assetRouter); + transactionFiltererImplementation = new GatewayTransactionFilterer(IBridgehubBase(bridgehub), assetRouter); transactionFiltererProxy = GatewayTransactionFilterer( address( diff --git a/l1-contracts/test/foundry/unit/concrete/chain-registrator/ChainRegistrar.t.sol b/l1-contracts/test/foundry/unit/concrete/chain-registrator/ChainRegistrar.t.sol index 2e928ce17f..340c645429 100644 --- a/l1-contracts/test/foundry/unit/concrete/chain-registrator/ChainRegistrar.t.sol +++ b/l1-contracts/test/foundry/unit/concrete/chain-registrator/ChainRegistrar.t.sol @@ -2,12 +2,11 @@ pragma solidity ^0.8.0; import {Test} from "forge-std/Test.sol"; -import {Vm} from "forge-std/Vm.sol"; + import {DummyChainTypeManagerWBH} from "contracts/dev-contracts/test/DummyChainTypeManagerWithBridgeHubAddress.sol"; import {IVerifier, VerifierParams} from "contracts/state-transition/chain-interfaces/IVerifier.sol"; -import {GettersFacet} from "contracts/state-transition/chain-deps/facets/Getters.sol"; -import "contracts/bridgehub/Bridgehub.sol"; +import "contracts/bridgehub/L1Bridgehub.sol"; import "contracts/chain-registrar/ChainRegistrar.sol"; import {FeeParams, PubdataPricingMode} from "contracts/state-transition/chain-deps/ZKChainStorage.sol"; import {InitializeDataNewChain as DiamondInitializeDataNewChain} from "contracts/state-transition/chain-interfaces/IDiamondInit.sol"; @@ -45,13 +44,13 @@ contract ChainRegistrarTest is Test { vm.prank(admin); l1NullifierImpl = new L1NullifierDev({ - _bridgehub: IBridgehub(address(bridgeHub)), + _bridgehub: IL1Bridgehub(address(bridgeHub)), _eraChainId: 270, _eraDiamondProxy: makeAddr("era") }); assetRouter = new L1AssetRouter({ - _l1WethAddress: makeAddr("weth"), + _l1WethToken: makeAddr("weth"), _bridgehub: address(bridgeHub), _l1Nullifier: address(l1NullifierImpl), _eraChainId: 270, diff --git a/l1-contracts/test/foundry/unit/concrete/script-utils/ScriptUtils.t.sol b/l1-contracts/test/foundry/unit/concrete/script-utils/ScriptUtils.t.sol new file mode 100644 index 0000000000..cb6ccbe580 --- /dev/null +++ b/l1-contracts/test/foundry/unit/concrete/script-utils/ScriptUtils.t.sol @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: MIT + +pragma solidity 0.8.28; + +import {Test} from "forge-std/Test.sol"; +import {Utils as ScriptUtils} from "deploy-scripts/Utils.sol"; + +contract ScriptUtilsTest is Test { + function test_Blake2s256Hash() public { + bytes32 testHash = ScriptUtils.blakeHashBytecode(bytes("hello world")); + + assert(testHash == 0x9aec6806794561107e594b1f6a8a6b0c92a0cba9acf5e5e93cca06f781813b0b); + } + + // add this to be excluded from coverage report + function test() internal virtual {} +} diff --git a/l1-contracts/test/invariant/handlers/L1AssetRouterActorHandler.sol b/l1-contracts/test/invariant/handlers/L1AssetRouterActorHandler.sol index 8128631d84..a77e964356 100644 --- a/l1-contracts/test/invariant/handlers/L1AssetRouterActorHandler.sol +++ b/l1-contracts/test/invariant/handlers/L1AssetRouterActorHandler.sol @@ -5,9 +5,8 @@ import {Test} from "forge-std/Test.sol"; import {L2_ASSET_ROUTER_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; import {DataEncoding} from "contracts/common/libraries/DataEncoding.sol"; -import {AddressAliasHelper} from "contracts/vendor/AddressAliasHelper.sol"; + import {L2AssetRouter} from "contracts/bridge/asset-router/L2AssetRouter.sol"; -import {BridgedStandardERC20} from "contracts/bridge/BridgedStandardERC20.sol"; import {AMOUNT_UPPER_BOUND, L1_TOKEN_ADDRESS, TOKEN_DEFAULT_DECIMALS, TOKEN_DEFAULT_NAME, TOKEN_DEFAULT_SYMBOL} from "../common/Constants.sol"; import {UserActorHandler} from "./UserActorHandler.sol"; diff --git a/l1-contracts/test/invariant/handlers/UserActorHandler.sol b/l1-contracts/test/invariant/handlers/UserActorHandler.sol index dee7c06ffa..6565c78fd9 100644 --- a/l1-contracts/test/invariant/handlers/UserActorHandler.sol +++ b/l1-contracts/test/invariant/handlers/UserActorHandler.sol @@ -5,10 +5,10 @@ import {Test} from "forge-std/Test.sol"; import {L2_ASSET_ROUTER_ADDR, L2_NATIVE_TOKEN_VAULT_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; import {DataEncoding} from "contracts/common/libraries/DataEncoding.sol"; -import {AddressAliasHelper} from "contracts/vendor/AddressAliasHelper.sol"; + import {L2AssetRouter} from "contracts/bridge/asset-router/L2AssetRouter.sol"; import {BridgedStandardERC20} from "contracts/bridge/BridgedStandardERC20.sol"; -import {IL2SharedBridgeLegacy} from "contracts/bridge/interfaces/IL2SharedBridgeLegacy.sol"; + import {L2NativeTokenVault} from "contracts/bridge/ntv/L2NativeTokenVault.sol"; import {L1_TOKEN_ADDRESS} from "../common/Constants.sol"; diff --git a/l1-contracts/test/invariant/l1-context/AssetRouterTest.t.sol b/l1-contracts/test/invariant/l1-context/AssetRouterTest.t.sol index caed988aa6..5928556fea 100644 --- a/l1-contracts/test/invariant/l1-context/AssetRouterTest.t.sol +++ b/l1-contracts/test/invariant/l1-context/AssetRouterTest.t.sol @@ -6,8 +6,6 @@ import {Test} from "forge-std/Test.sol"; import {DeployUtils} from "deploy-scripts/DeployUtils.s.sol"; -import {L1AssetRouterActorHandler} from "../handlers/L1AssetRouterActorHandler.sol"; -import {UserActorHandler} from "../handlers/UserActorHandler.sol"; import {AssetRouter_ActorHandler_Deployer} from "../deployers/AssetRouter_ActorHandler_Deployer.sol"; import {AssetRouterProperties} from "../properties/AssetRouterProperties.sol"; diff --git a/l1-contracts/test/invariant/l2-context/AssetRouterTest.t.sol b/l1-contracts/test/invariant/l2-context/AssetRouterTest.t.sol index 4c1ca5f1c5..c1d16f9ab1 100644 --- a/l1-contracts/test/invariant/l2-context/AssetRouterTest.t.sol +++ b/l1-contracts/test/invariant/l2-context/AssetRouterTest.t.sol @@ -6,8 +6,6 @@ import {Test} from "forge-std/Test.sol"; import {DeployUtils} from "deploy-scripts/DeployUtils.s.sol"; -import {L1AssetRouterActorHandler} from "../handlers/L1AssetRouterActorHandler.sol"; -import {UserActorHandler} from "../handlers/UserActorHandler.sol"; import {AssetRouter_ActorHandler_Deployer} from "../deployers/AssetRouter_ActorHandler_Deployer.sol"; import {AssetRouterProperties} from "../properties/AssetRouterProperties.sol"; diff --git a/l1-contracts/test/invariant/properties/AssetRouterProperties.sol b/l1-contracts/test/invariant/properties/AssetRouterProperties.sol index 7b1069060b..5990be233a 100644 --- a/l1-contracts/test/invariant/properties/AssetRouterProperties.sol +++ b/l1-contracts/test/invariant/properties/AssetRouterProperties.sol @@ -9,7 +9,7 @@ import {UserActorHandler} from "../handlers/UserActorHandler.sol"; import {L1_TOKEN_ADDRESS} from "../common/Constants.sol"; import {BridgedStandardERC20} from "contracts/bridge/BridgedStandardERC20.sol"; -import {L2AssetRouter} from "contracts/bridge/asset-router/L2AssetRouter.sol"; + import {IL2NativeTokenVault} from "contracts/bridge/ntv/IL2NativeTokenVault.sol"; import {L2_NATIVE_TOKEN_VAULT_ADDR} from "contracts/common/l2-helpers/L2ContractAddresses.sol"; diff --git a/l1-contracts/upgrade-envs/v0.28.0-precompiles/output/mainnet/run-latest.json b/l1-contracts/upgrade-envs/v0.28.0-precompiles/output/mainnet/run-latest.json index c865e1c515..655f05eb42 100644 --- a/l1-contracts/upgrade-envs/v0.28.0-precompiles/output/mainnet/run-latest.json +++ b/l1-contracts/upgrade-envs/v0.28.0-precompiles/output/mainnet/run-latest.json @@ -2749,7 +2749,7 @@ "address": "0xc9f20fc268fc3e0e597660550033bf2c24218fd8", "topics": [ "0x00e403ec52d56843d21d3a103d6e0df67a220869cea503706fcd690e61bce9ca", - "0x010005f72e443c94460f4583fb38ef5d0c5cd9897021c41df840f91465c0392e" + "0x010005f76ff9047aa9a0caabf27b4d40c44bafa64cbcda4bb85104a46fc6210c" ], "data": "0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000bee00012000000000002001100000000000200000060071002700000059b06700197000100000061035500020000006103550003000000610355000400000061035500050000006103550006000000610355000700000061035500080000006103550009000000610355000a000000610355000b000000610355000c000000610355000d000000610355000e000000610355000f000000610355001000000061035500110000000103550000059b0070019d0000008003000039000000400030043f0000000100200190000000330000c13d000000040060008c0000003b0000413d000000000201043b000000e0022002700000059d0020009c0000004b0000a13d0000059e0020009c0000008f0000613d0000059f0020009c000000af0000613d000005a00020009c0000003d0000c13d000000240060008c000000de0000413d0000000401100370000000000101043b000005a30010009c000000de0000213d0000000001160049000000040110008a000005a40010009c000000de0000213d000002600010008c000006b30000813d000000de0000013d0000000001000416000000000001004b000000de0000c13d0000002001000039000001000010044300000120000004430000059c01000041000016670001042e000000000006004b000006b30000613d0000000001000412000005a5011001970000000002000410000000000021004b000006b30000c13d0000000001000411000080010010008c000006b30000c13d000005f101000041000000000010043f0000000101000039000000040010043f000005f2010000410000166800010430000005a10020009c000000d70000613d000f00000003001d000005a20020009c0000003d0000c13d000000640060008c000000de0000413d0000004402100370000000000302043b000005a30030009c000000de0000213d00000004043000390000000005460049000005a40050009c000000de0000213d000002600050008c000000de0000413d0000000002000411000080010020008c000006b30000c13d0000000002000412000005a5072001970000000002000410000000000027004b000006b30000c13d0000022403300039000000000731034f000000000707043b0000001f0550008a000005aa08700197000005aa09500197000000000a98013f000000000098004b0000000008000019000005aa08004041000000000057004b0000000005000019000005aa05008041000005aa00a0009c000000000805c019000000000008004b000000de0000c13d0000000005470019000000000451034f000000000404043b000005a30040009c000000de0000213d00000000064600490000002005500039000005aa07600197000005aa08500197000000000978013f000000000078004b0000000007000019000005aa07004041000000000065004b0000000006000019000005aa06002041000005aa0090009c000000000706c019000000000007004b000000de0000c13d000000030040008c000004160000213d000005cf01000041000000000010043f000005a8010000410000166800010430000000640060008c000000de0000413d0000004402100370000000000302043b000005a30030009c000000de0000213d00000004023000390000000008260049000005a40080009c000000de0000213d000002600080008c000000de0000413d0000000004000411000080010040008c000006b30000c13d0000000004000412000005a5044001970000000005000410000000000054004b000006b30000c13d0000004404300039000000000441034f0000012405300039000000000351034f000000000404043b000000000303043b000005a90030009c000001930000a13d000005e801000041000000000010043f000005a8010000410000166800010430000000640060008c000000de0000413d0000004402100370000000000202043b000005a30020009c000000de0000213d0000000003260049000000040330008a000005a40030009c000000de0000213d000002600030008c000000de0000413d0000000003000411000080010030008c000006b30000c13d0000000003000412000005a5033001970000000004000410000000000043004b000006b30000c13d000000a403200039000000000331034f0000006402200039000000000121034f000000000101043b000000000203043b000000000002004b000002020000c13d00000000010004140000059b0010009c0000059b01008041000000c0011002100000800102000039166616520000040f0000000100200190000006b30000c13d000005a701000041000000000010043f000005a8010000410000166800010430000000640060008c000000de0000413d0000004402100370000000000202043b000f00000002001d000005a30020009c000000e00000a13d000000000100001900001668000104300000000f02000029000e00040020003d0000000e0260006a000005a40020009c000000de0000213d000002600020008c000000de0000413d0000002402100370000000000202043b000d00000002001d0000000002000411000080010020008c000006b30000c13d0000000002000412000005a5022001970000000003000410000000000032004b000006b30000c13d0000000f02000029000c01040020003d0000000c01100360001100000000003d0000000002000414000000000101043b000005d003000041000000a00030043f000000a40010043f0000002401000039000000800010043f000000e001000039000000400010043f000000c001200210000005b101100197000005d1011001c700008003020000390000000003000019000000000400001900000000050000190000000006000019166616520000040f00000060031002700000059b083001970000001f03800039000005ba093001970000003f03900039000005bb04300197000000400600043d0000000003640019000000000043004b00000000040000390000000104004039000005a30030009c0000159c0000213d00000001004001900000159c0000c13d000000400030043f000000000786043600000011030003670000000004000031000000000543034f000000000009004b000001250000613d0000000009970019000000000a05034f000000000b07001900000000ac0a043c000000000bcb043600000000009b004b000001210000c13d0000001f0980018f000005b40a8001980000000008a700190000012f0000613d000000000b01034f000000000c07001900000000bd0b043c000000000cdc043600000000008c004b0000012b0000c13d000000000009004b0000013c0000613d0000000001a1034f0000000309900210000000000a080433000000000a9a01cf000000000a9a022f000000000101043b0000010009900089000000000191022f00000000019101cf0000000001a1019f00000000001804350000000100200190000002140000613d0000000d0000006b000014ee0000c13d0000000c01000029000001000110008a000000000113034f000000000101043b000000010010008c0000021d0000213d000000000001004b000004b30000613d000000010010008c000004ae0000c13d000005d201000041000000000010044300000000010004140000059b0010009c0000059b01008041000000c001100210000005d3011001c70000800b02000039166616570000040f0000000100200190000015320000613d000000400300043d000000000401043b000000800040008c0000059f0000413d000005a90040009c0000000001040019000000800110227000000000050000390000001005002039000005a30010009c00000008055021bf00000040011022700000059b0010009c00000004055021bf00000020011022700000ffff0010008c00000002055021bf0000001001102270000000ff0010008c00000001055020390000002102500039000005f4072001970000003f02700039000005f4012001970000000001130019000000000031004b00000000020000390000000102004039000005a30010009c0000159c0000213d00000001002001900000159c0000c13d000000400010043f0000000201500039000000000613043600000011010003670000000002000031000000000007004b000001830000613d0000000007760019000000000821034f0000000009060019000000008a08043c0000000009a90436000000000079004b0000017f0000c13d0000000007030433000000000007004b00000b600000613d0000000007060433000005d507700197000000f808500210000000000778019f000005d60770009a00000000007604350000000305500210000000f80550008900000000045401cf000000ff0050008c00000000040020190000002105300039000005ae0000013d000000a005500039000000000951034f000000000909043b0000001f0880008a000005aa0a900197000005aa0b800197000000000cba013f0000000000ba004b000000000a000019000005aa0a004041000000000089004b0000000008000019000005aa08008041000005aa00c0009c000000000a08c01900000000000a004b000000de0000c13d0000000002290019000000000821034f000000000808043b000005a30080009c000000de0000213d000000000a8600490000002009200039000005aa02a00197000005aa0b900197000000000c2b013f00000000002b004b0000000002000019000005aa020040410000000000a9004b000000000a000019000005aa0a002041000005aa00c0009c00000000020ac019000000000002004b000000de0000c13d00000000020004140000059b0020009c000000ab0000213d000005a504400198000005410000c13d000001c00a50008a0000000005a1034f000000000505043b000000710050008c000006890000613d000000ff0050008c00000000050000190000068a0000613d0000016005a00039000000000551034f000000000505043b000000010050008c000006890000c13d000005b504000041000000a00040043f0000002004000039000000a40040043f000000000591034f000000c40080043f000005f4068001980000001f0780018f000000e404600039000001da0000613d000000e409000039000000000a05034f00000000ab0a043c0000000009b90436000000000049004b000001d60000c13d000000000007004b000001e70000613d000000000565034f0000000306700210000000000704043300000000076701cf000000000767022f000000000505043b0000010006600089000000000565022f00000000056501cf000000000575019f0000000000540435000000e40480003900000000000404350000001f04800039000005f4044001970000008305400039000005f4055001970000004401400039000000800010043f000005b60050009c0000159c0000213d0000008005500039000000400050043f000005b70040009c000000ab0000213d000000c002200210000005b1022001970000006001100210000005b801100197000000000121019f000005b9011001c7000000000003004b000009810000c13d0000800602000039000000000300001900000000040000190000000005000019000009840000013d00000000032100a900000000022300d9000000000012004b000015080000c13d0000000001000414000000000003004b000000cc0000613d0000059b0010009c0000059b01008041000000c001100210000005a6011001c7000080090200003900008001040000390000000005000019166616520000040f0000000100200190000000d30000613d000006b30000013d0000059b0070009c0000059b07008041000000400170021000000000020604330000059b0020009c0000059b020080410000006002200210000000000112019f0000166800010430000000020010008c000004f40000613d000000710010008c000004ae0000c13d0000000f0c000029000d01c400c0003d0000000d01300360000000000101043b0000000002c40049000000230520008a000005aa02500197000005aa06100197000000000726013f000000000026004b0000000002000019000005aa02004041000000000051004b0000000005000019000005aa05008041000005aa0070009c000000000205c0190000012405c00039000000000553034f000000e406c00039000000c407c00039000000a408c000390000008409c00039000000640ac00039000000440bc00039000000240cc00039000000000cc3034f000000000bb3034f000000000aa3034f000000000993034f000000000883034f000000000773034f000000000663034f0000000c0d300360000000000505043b000400000005001d00000000050d043b000500000005001d000000000506043b000600000005001d000000000507043b000700000005001d000000000508043b000800000005001d000000000509043b000900000005001d00000000050a043b000a00000005001d00000000050b043b000b00000005001d00000000050c043b000c00000005001d000000000002004b000000de0000c13d0000000e02100029000000000123034f000000000101043b000005a30010009c000000de0000213d00000000051400490000002002200039000005aa06500197000005aa07200197000000000867013f000000000067004b0000000006000019000005aa06004041000000000052004b0000000005000019000005aa05002041000005aa0080009c000000000605c019000000000006004b000000de0000c13d0000059b0620019700000000050004140001000000630355000000000021001a000015080000413d0000000001210019000000000214004b000015080000413d000000000163034f0000059b0220019700010000002103e5000005de0050009c000000ab0000813d00000000012103df000000c002500210000005b102200197000005b3022001c700010000002103b500000000012103af0000801002000039166616610000040f00000060031002700000059b043001970000000100200190000008ab0000613d0000001f02400039000005ba072001970000003f02700039000005bb02200197000000400600043d0000000002260019000000000062004b00000000030000390000000103004039000005a30020009c0000159c0000213d00000001003001900000159c0000c13d000000400020043f000000000546043600000011020003670000000003000031000000000007004b0000029e0000613d0000000007750019000000000832034f0000000009050019000000008a08043c0000000009a90436000000000079004b0000029a0000c13d0000001f0740018f000005b4084001980000000004850019000002a80000613d000000000901034f000000000a050019000000009b09043c000000000aba043600000000004a004b000002a40000c13d000000000007004b000002b50000613d000000000181034f0000000307700210000000000804043300000000087801cf000000000878022f000000000101043b0000010007700089000000000171022f00000000017101cf000000000181019f00000000001404350000000001060433000000200010008c00000acb0000c13d0000000f0430006a0000000d01000029000d00400010003d0000000d01200360000000000101043b000000230440008a000005aa06400197000005aa07100197000000000867013f000000000067004b0000000006000019000005aa06004041000000000041004b0000000004000019000005aa04008041000005aa0080009c000000000604c019000000000006004b000000de0000c13d0000000004050433000300000004001d0000000e04100029000000000142034f000000000101043b000005a30010009c000000de0000213d000000050110021000000000031300490000002006400039000005aa04300197000005aa05600197000000000745013f000000000045004b0000000004000019000005aa04004041000000000036004b0000000003000019000005aa03002041000005aa0070009c000000000403c019000000000004004b000000de0000c13d0000001f0510018f000000400300043d0000002004300039000000000001004b000002ee0000613d000000000262034f00000000061400190000000007040019000000002802043c0000000007870436000000000067004b000002ea0000c13d000000000005004b00000000001304350000003f01100039000005df011001970000000001130019000000000031004b00000000020000390000000102004039000005a30010009c0000159c0000213d00000001002001900000159c0000c13d000000400010043f0000059b0040009c0000059b04008041000000400140021000000000020304330000059b0020009c0000059b020080410000006002200210000000000112019f00000000020004140000059b0020009c0000059b02008041000000c002200210000000000112019f000005a6011001c70000801002000039166616570000040f0000000100200190000000de0000613d0000000d0200002900000020032000390000001102000367000000000332034f000000000403043b00000000030000310000000f0530006a000000230550008a000005aa06500197000005aa07400197000000000867013f000000000067004b0000000006000019000005aa06004041000000000054004b0000000005000019000005aa05008041000005aa0080009c000000000605c019000000000101043b000d00000001001d000000000006004b000000de0000c13d0000000e04400029000000000142034f000000000101043b000005a30010009c000000de0000213d00000000051300490000002004400039000005aa06500197000005aa07400197000000000867013f000000000067004b0000000006000019000005aa06004041000000000054004b0000000005000019000005aa05002041000005aa0080009c000000000605c019000000000006004b000000de0000c13d0000059b0640019700000000050004140001000000620355000000000041001a000015080000413d0000000001410019000000000313004b000015080000413d000000000162034f0000059b0230019700010000002103e50000059b0050009c000000ab0000213d00000000012103df000000c002500210000005b102200197000005b3022001c700010000002103b500000000012103af0000801002000039166616610000040f00000060031002700000059b033001970000000100200190000016100000613d0000001f02300039000005ba052001970000003f02500039000005bb04200197000000400200043d0000000004420019000000000024004b00000000060000390000000106004039000005a30040009c0000159c0000213d00000001006001900000159c0000c13d000000400040043f0000000004320436000000000005004b0000036a0000613d0000000005540019000000000600003100000011066003670000000007040019000000006806043c0000000007870436000000000057004b000003660000c13d0000001f0530018f000005b4063001980000000003640019000003740000613d000000000701034f0000000008040019000000007907043c0000000008980436000000000038004b000003700000c13d000000000005004b000003810000613d000000000161034f0000000305500210000000000603043300000000065601cf000000000656022f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001304350000000001020433000000200010008c00000acb0000c13d0000000002040433000000400100043d000001c0031000390000000000230435000001a0021000390000000d030000290000000000320435000001800210003900000003030000290000000000320435000001600210003900000004030000290000000000320435000001400210003900000005030000290000000000320435000001200210003900000006030000290000000000320435000001000210003900000007030000290000000000320435000000e00210003900000008030000290000000000320435000000c00210003900000009030000290000000000320435000000a0021000390000000a03000029000000000032043500000080021000390000000b03000029000000000032043500000060021000390000000c0300002900000000003204350000004002100039000000710300003900000000003204350000002002100039000005e1030000410000000000320435000001c0030000390000000000310435000005e20010009c0000159c0000213d000001e003100039000000400030043f0000059b0020009c0000059b02008041000000400220021000000000010104330000059b0010009c0000059b010080410000006001100210000000000121019f00000000020004140000059b0020009c0000059b02008041000000c002200210000000000112019f000005a6011001c70000801002000039166616570000040f0000000100200190000000de0000613d000000000101043b000c00000001001d000000400100043d000d00000001001d000005d201000041000000000010044300000000010004140000059b0010009c0000059b01008041000000c001100210000005d3011001c70000800b02000039166616570000040f0000000100200190000015320000613d0000000d040000290000002002400039000000000101043b000005e3030000410000000000320435000000800340003900000000001304350000006001400039000005e40300004100000000003104350000004001400039000005e503000041000000000031043500000080010000390000000000140435000005e60040009c0000159c0000213d0000000d03000029000000a001300039000000400010043f0000059b0020009c0000059b02008041000000400120021000000000020304330000059b0020009c0000059b020080410000006002200210000000000112019f00000000020004140000059b0020009c0000059b02008041000000c002200210000000000112019f000005a6011001c70000801002000039166616570000040f0000000100200190000000de0000613d000000000301043b000000400100043d00000042021000390000000c0400002900000000004204350000002002100039000005e70400004100000000004204350000002204100039000000000034043500000042030000390000000000310435000005b60010009c0000159c0000213d0000008003100039000000400030043f0000059b0020009c0000059b02008041000000400220021000000000010104330000059b0010009c0000059b010080410000006001100210000000000121019f0000000002000414000014e20000013d000000000651034f000000000606043b000005ab06600197000005bc0060009c000006b30000613d000005bd0060009c0000053d0000c13d000000440040008c0000008b0000413d0000000404500039000000000541034f000000000505043b000e00000005001d000005a50050009c000000de0000213d000001400330008a000000000331034f0000002004400039000000000141034f000000000101043b000d00000001001d000000000103043b000005be03000041000000800030043f000005a502200197000b00000002001d000000840020043f000005a501100197000c00000001001d000000a40010043f00000000010004140000059b0010009c0000059b01008041000000c001100210000005bf011001c70000000e02000029166616570000040f00000060031002700000059b03300197000000200030008c000000200400003900000000040340190000001f0640018f000000200740019000000080057001bf0000044a0000613d0000008008000039000000000901034f000000009a09043c0000000008a80436000000000058004b000004460000c13d000000000006004b000004570000613d000000000771034f0000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f00000000006504350000000100200190000006cf0000613d0000001f01400039000000600210018f00000080012001bf000000400010043f000000200030008c000000de0000413d000000800300043d0000000d0030006c000006b30000813d000000a003200039000005c0040000410000000000430435000000a4042000390000000c050000290000000000540435000000c4042000390000000000040435000000440400003900000000004104350000014004200039000000400040043f0000012005200039000005c104000041000900000005001d000000000045043500000100042001bf0000002002000039000800000004001d0000000000240435000000400230021000000000010104330000059b0010009c0000059b010080410000006001100210000000000121019f00000000020004140000059b0020009c0000059b02008041000000c002200210000000000121019f0000000e02000029166616520000040f00000060031002700000059b03300198000009bf0000c13d000a00600000003d0000000a0100002900000000010104330000000100200190000009e90000613d000000000001004b00000b6a0000c13d000005c30100004100000000001004430000000e01000029000000040010044300000000010004140000059b0010009c0000059b01008041000000c001100210000005c4011001c70000800202000039166616570000040f0000000100200190000015320000613d000000000101043b000000000001004b00000b660000c13d000000400100043d0000004402100039000005cc03000041000000000032043500000024021000390000001d030000390000000000320435000005c20200004100000000002104350000000402100039000000200300003900000000003204350000059b0010009c0000059b010080410000004001100210000005cd011001c70000166800010430000005f302000041000000000020043f000000040010043f000005f20100004100001668000104300000000c01300360000000400200043d000d00000002001d000000000101043b000000800010008c000005510000413d000005a90010009c0000000006010019000000800660227000000000020000390000001002002039000005a30060009c00000008022021bf00000040066022700000059b0060009c00000004022021bf00000020066022700000ffff0060008c00000002022021bf0000001006602270000000ff0060008c00000001022020390000002107200039000005f4077001970000003f08700039000005f4068001970000000d066000290000000d0060006c00000000080000390000000108004039000005a30060009c0000159c0000213d00000001008001900000159c0000c13d000000400060043f00000002062000390000000d080000290000000006680436000000000007004b000004e20000613d0000000007760019000000000805034f0000000009060019000000008a08043c0000000009a90436000000000079004b000004de0000c13d0000000d070000290000000007070433000000000007004b00000b600000613d0000000007060433000005d507700197000000f808200210000000000778019f000005d60770009a00000000007604350000000302200210000000f80220008900000000012101cf000000ff0020008c00000000010020190000000d0200002900000021022000390000055f0000013d000005d201000041000000000010044300000000010004140000059b0010009c0000059b01008041000000c001100210000005d3011001c70000800b02000039166616570000040f0000000100200190000015320000613d000000400300043d000000000401043b000000800040008c000005ec0000413d000005a90040009c0000000001040019000000800110227000000000050000390000001005002039000005a30010009c00000008055021bf00000040011022700000059b0010009c00000004055021bf00000020011022700000ffff0010008c00000002055021bf0000001001102270000000ff0010008c00000001055020390000002102500039000005f4072001970000003f02700039000005f4012001970000000001130019000000000031004b00000000020000390000000102004039000005a30010009c0000159c0000213d00000001002001900000159c0000c13d000000400010043f0000000201500039000000000613043600000011010003670000000002000031000000000007004b0000052d0000613d0000000007760019000000000821034f0000000009060019000000008a08043c0000000009a90436000000000079004b000005290000c13d0000000007030433000000000007004b00000b600000613d0000000007060433000005d507700197000000f808500210000000000778019f000005d60770009a00000000007604350000000305500210000000f80550008900000000045401cf000000ff0050008c00000000040020190000002105300039000005fb0000013d000005ce01000041000000000010043f000005a8010000410000166800010430000080060040008c000006890000c13d000000030080008c00000000050000190000068a0000a13d000000000a91034f0000000105000039000000000a0a043b000005ab0aa00197000005ac00a0009c000006850000213d000005af00a0009c0000068a0000613d000005b000a0009c0000068a0000613d000006890000013d0000000d02000029000005d40020009c0000159c0000213d0000000d060000290000004002600039000000400020043f00000001020000390000000002260436000000f806100210000000000001004b000005aa06006041000000000105043b000005d501100197000000000161019f0000000000120435000000400100043d0000000c02000029000000600220008a000000000623034f000000000606043b000000800060008c000006390000413d000005a90060009c0000000008060019000000800880227000000000070000390000001007002039000005a30080009c00000008077021bf00000040088022700000059b0080009c00000004077021bf00000020088022700000ffff0080008c00000002077021bf0000001008802270000000ff0080008c00000001077020390000002109700039000005f4099001970000003f0a900039000005f408a001970000000008810019000000000018004b000000000a000039000000010a004039000005a30080009c0000159c0000213d0000000100a001900000159c0000c13d000000400080043f00000002087000390000000008810436000000000009004b0000058f0000613d0000000009980019000000000a05034f000000000b08001900000000ac0a043c000000000bcb043600000000009b004b0000058b0000c13d0000000009010433000000000009004b00000b600000613d0000000009080433000005d509900197000000f80a70021000000000099a019f000005d60990009a00000000009804350000000307700210000000f80770008900000000067601cf000000ff0070008c00000000060020190000002107100039000006450000013d000005d40030009c0000159c0000213d0000004001300039000000400010043f00000001010000390000000005130436000000f806400210000000000004004b000005aa0600604100000000020000310000001101000367000000000421034f000000000404043b000005d504400197000000000464019f00000000004504350000000c04100360000000400600043d000000000404043b000000800040008c000006ed0000413d000005a90040009c0000000007040019000000800770227000000000050000390000001005002039000005a30070009c00000008055021bf00000040077022700000059b0070009c00000004055021bf00000020077022700000ffff0070008c00000002055021bf0000001007702270000000ff0070008c00000001055020390000002108500039000005f4088001970000003f09800039000005f4079001970000000007760019000000000067004b00000000090000390000000109004039000005a30070009c0000159c0000213d00000001009001900000159c0000c13d000000400070043f00000002075000390000000007760436000000000008004b000005dc0000613d000000000921034f0000000008870019000000000a070019000000009b09043c000000000aba043600000000008a004b000005d80000c13d0000000008060433000000000008004b00000b600000613d0000000008070433000005d508800197000000f809500210000000000889019f000005d60880009a00000000008704350000000305500210000000f80550008900000000045401cf000000ff0050008c00000000040020190000002105600039000006fa0000013d000005d40030009c0000159c0000213d0000004001300039000000400010043f00000001010000390000000005130436000000f806400210000000000004004b000005aa0600604100000000020000310000001101000367000000000421034f000000000404043b000005d504400197000000000464019f00000000004504350000000c04100360000000400600043d000000000404043b000000800040008c0000073a0000413d000005a90040009c0000000007040019000000800770227000000000050000390000001005002039000005a30070009c00000008055021bf00000040077022700000059b0070009c00000004055021bf00000020077022700000ffff0070008c00000002055021bf0000001007702270000000ff0070008c00000001055020390000002108500039000005f4088001970000003f09800039000005f4079001970000000007760019000000000067004b00000000090000390000000109004039000005a30070009c0000159c0000213d00000001009001900000159c0000c13d000000400070043f00000002075000390000000007760436000000000008004b000006290000613d000000000921034f0000000008870019000000000a070019000000009b09043c000000000aba043600000000008a004b000006250000c13d0000000008060433000000000008004b00000b600000613d0000000008070433000005d508800197000000f809500210000000000889019f000005d60880009a00000000008704350000000305500210000000f80550008900000000045401cf000000ff0050008c00000000040020190000002105600039000007470000013d000005d40010009c0000159c0000213d0000004007100039000000400070043f00000001070000390000000007710436000000f808600210000000000006004b000005aa08006041000000000605043b000005d506600197000000000686019f0000000000670435000000400220008a000000000223034f000000400600043d000000000702043b000000800070008c000007870000413d000005a90070009c0000000002070019000000800220227000000000080000390000001008002039000005a30020009c00000008088021bf00000040022022700000059b0020009c00000004088021bf00000020022022700000ffff0020008c00000002088021bf0000001002202270000000ff0020008c00000001088020390000002109800039000005f4099001970000003f0a900039000005f402a001970000000002260019000000000062004b000000000a000039000000010a004039000005a30020009c0000159c0000213d0000000100a001900000159c0000c13d000000400020043f00000002028000390000000002260436000000000009004b000006740000613d0000000009920019000000000a05034f000000000b02001900000000ac0a043c000000000bcb043600000000009b004b000006700000c13d0000000009060433000000000009004b00000b600000613d0000000009020433000005d509900197000000f80a80021000000000099a019f000005d60990009a00000000009204350000000308800210000000f80880008900000000078701cf000000ff0080008c000000000700201900000021086000390000000000780435000007940000013d000005ad00a0009c0000068a0000613d000005ae00a0009c0000068a0000613d0000000005000019000000000a98001900000000006a004b0000000006000039000000010600203900000000008a004b00000001066041bf0000059b089001970001000000810355000000000181034f000000000003004b000006a40000c13d0000000100600190000015080000c13d000000000005004b000005b203000041000005b303006041000000c002200210000005b102200197000000000223019f0000000003a700490000059b0330019700000000013103df00010000002103b500000000012103af0000000002040019000006b00000013d0000000100600190000015080000c13d0000000006a700490000059b0660019700000000016103df000000c002200210000005b102200197000005b2022001c700010000002103b500000000012103af000080090200003900000000060000191666165c0000040f0000000100200190000006b50000613d0000000001000019000016670001042e00000060041002700000001f0340018f000005b402400198000006bf0000613d000000000501034f0000000006000019000000005705043c0000000006760436000000000026004b000006bb0000c13d0000059b04400197000000000003004b000006cd0000613d000000000121034f0000000303300210000000000502043300000000053501cf000000000535022f000000000101043b0000010003300089000000000131022f00000000013101cf000000000151019f0000000000120435000000600140021000001668000104300000001f0530018f000005b406300198000000400200043d0000000004620019000006da0000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b000006d60000c13d000000000005004b000006e70000613d000000000161034f0000000305500210000000000604043300000000065601cf000000000656022f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f000000000014043500000060013002100000059b0020009c0000059b020080410000004002200210000000000112019f0000166800010430000005d40060009c0000159c0000213d0000004005600039000000400050043f00000001050000390000000005560436000000f807400210000000000004004b000005aa07006041000000000421034f000000000404043b000005d504400197000000000474019f0000000000450435000000400700043d0000000c04000029000000600440008a000000000541034f000000000505043b000000800050008c000007ac0000413d000005a90050009c0000000009050019000000800990227000000000080000390000001008002039000005a30090009c00000008088021bf00000040099022700000059b0090009c00000004088021bf00000020099022700000ffff0090008c00000002088021bf0000001009902270000000ff0090008c0000000108802039000000210a800039000005f40aa001970000003f0ba00039000005f409b001970000000009970019000000000079004b000000000b000039000000010b004039000005a30090009c0000159c0000213d0000000100b001900000159c0000c13d000000400090043f0000000209800039000000000997043600000000000a004b0000072a0000613d000000000b21034f000000000aa90019000000000c09001900000000bd0b043c000000000cdc04360000000000ac004b000007260000c13d000000000a07043300000000000a004b00000b600000613d000000000a090433000005d50aa00197000000f80b800210000000000aab019f000005d60aa0009a0000000000a904350000000308800210000000f80880008900000000058501cf000000ff0080008c00000000050020190000002108700039000007b90000013d000005d40060009c0000159c0000213d0000004005600039000000400050043f00000001050000390000000005560436000000f807400210000000000004004b000005aa07006041000000000421034f000000000404043b000005d504400197000000000474019f0000000000450435000000400700043d0000000c04000029000000400440008a000000000541034f000000000505043b000000800050008c000007f80000413d000005a90050009c0000000009050019000000800990227000000000080000390000001008002039000005a30090009c00000008088021bf00000040099022700000059b0090009c00000004088021bf00000020099022700000ffff0090008c00000002088021bf0000001009902270000000ff0090008c0000000108802039000000210a800039000005f40aa001970000003f0ba00039000005f409b001970000000009970019000000000079004b000000000b000039000000010b004039000005a30090009c0000159c0000213d0000000100b001900000159c0000c13d000000400090043f0000000209800039000000000997043600000000000a004b000007770000613d000000000b21034f000000000aa90019000000000c09001900000000bd0b043c000000000cdc04360000000000ac004b000007730000c13d000000000a07043300000000000a004b00000b600000613d000000000a090433000005d50aa00197000000f80b800210000000000aab019f000005d60aa0009a0000000000a904350000000308800210000000f80880008900000000058501cf000000ff0080008c00000000050020190000002108700039000008050000013d000005d40060009c0000159c0000213d0000004002600039000000400020043f00000001020000390000000002260436000000f808700210000000000007004b000005aa08006041000000000705043b000005d507700197000000000787019f00000000007204350000000071010434000005f4091001970000001f0810018f000000400a00043d000a0000000a001d000c002000a0003d0000000c0070006c000008440000813d000000000009004b000007a80000613d000000000b8700190000000c0a800029000000200aa0008a000000200bb0008a000000000c9a0019000000000d9b0019000000000d0d04330000000000dc0435000000200990008c000007a20000c13d000000000008004b0000085a0000613d0000000c0a000029000008500000013d000005d40070009c0000159c0000213d0000004008700039000000400080043f00000001080000390000000008870436000000f809500210000000000005004b000005aa09006041000000000521034f000000000505043b000005d505500197000000000595019f0000000000580435000000400a00043d000000400440008a000000000541034f000000000505043b000000800050008c000008c30000413d000005a90050009c0000000009050019000000800990227000000000080000390000001008002039000005a30090009c00000008088021bf00000040099022700000059b0090009c00000004088021bf00000020099022700000ffff0090008c00000002088021bf0000001009902270000000ff0090008c0000000108802039000000210b800039000005f40bb001970000003f0cb00039000005f409c0019700000000099a00190000000000a9004b000000000c000039000000010c004039000005a30090009c0000159c0000213d0000000100c001900000159c0000c13d000000400090043f000000020980003900000000099a043600000000000b004b000007e80000613d000000000c21034f000000000bb90019000000000d09001900000000ce0c043c000000000ded04360000000000bd004b000007e40000c13d000000000b0a043300000000000b004b00000b600000613d000000000b090433000005d50bb00197000000f80c800210000000000bbc019f000005d60bb0009a0000000000b904350000000308800210000000f80880008900000000058501cf000000ff0080008c00000000050020190000002108a00039000008d00000013d000005d40070009c0000159c0000213d0000004008700039000000400080043f00000001080000390000000008870436000000f809500210000000000005004b000005aa09006041000000000521034f000000000505043b000005d505500197000000000595019f0000000000580435000000400800043d000000200440008a000000000541034f000000000505043b000000800050008c000008e00000413d000005a90050009c000000000a050019000000800aa0227000000000090000390000001009002039000005a300a0009c00000008099021bf000000400aa022700000059b00a0009c00000004099021bf000000200aa022700000ffff00a0008c00000002099021bf000000100aa02270000000ff00a0008c0000000109902039000000210b900039000005f40bb001970000003f0cb00039000005f40ac00197000000000aa8001900000000008a004b000000000c000039000000010c004039000005a300a0009c0000159c0000213d0000000100c001900000159c0000c13d0000004000a0043f000000020a900039000000000aa8043600000000000b004b000008340000613d000000000c21034f000000000bba0019000000000d0a001900000000ce0c043c000000000ded04360000000000bd004b000008300000c13d000000000b08043300000000000b004b00000b600000613d000000000b0a0433000005d50bb00197000000f80c900210000000000bbc019f000005d60bb0009a0000000000ba04350000000309900210000000f80990008900000000059501cf000000ff0090008c00000000050020190000002109800039000008ed0000013d0000000c0a900029000000000009004b0000084d0000613d000000000b0700190000000c0c00002900000000bd0b0434000000000cdc04360000000000ac004b000008490000c13d000000000008004b0000085a0000613d0000000007970019000000030880021000000000090a043300000000098901cf000000000989022f00000000070704330000010008800089000000000787022f00000000078701cf000000000797019f00000000007a04350000000c0110002900000000000104350000000006060433000005f4086001970000001f0760018f000000000012004b000008710000813d000000000008004b0000086d0000613d000000000a7200190000000009710019000000200990008a000000200aa0008a000000000b890019000000000c8a0019000000000c0c04330000000000cb0435000000200880008c000008670000c13d000000000007004b00000000090100190000087d0000c13d000008870000013d0000000009810019000000000008004b0000087a0000613d000000000a020019000000000b01001900000000ac0a0434000000000bcb043600000000009b004b000008760000c13d000000000007004b000008870000613d00000000028200190000000307700210000000000809043300000000087801cf000000000878022f00000000020204330000010007700089000000000272022f00000000027201cf000000000282019f0000000000290435000000000116001900000000000104350000000a060000290000000001610049000000200210008a00000000002604350000001f01100039000005f4011001970000000002610019000000000012004b00000000010000390000000101004039000b00000002001d000005a30020009c0000159c0000213d00000001001001900000159c0000c13d0000000b01000029000000400010043f0000000f010000290000016401100039000000000213034f000000000202043b000000010020008c0000092c0000c13d0000000b02000029000005d40020009c0000159c0000213d0000000b060000290000004002600039000000400020043f00000001020000390000000000260435000005aa0200004100000020060000390000093d0000013d0000001f0340018f000005b402400198000008b40000613d000000000501034f0000000006000019000000005705043c0000000006760436000000000026004b000008b00000c13d000000000003004b000008c10000613d000000000121034f0000000303300210000000000502043300000000053501cf000000000535022f000000000101043b0000010003300089000000000131022f00000000013101cf000000000151019f000000000012043500000060014002100000166800010430000005d400a0009c0000159c0000213d0000004008a00039000000400080043f000000010800003900000000088a0436000000f809500210000000000005004b000005aa09006041000000000521034f000000000505043b000005d505500197000000000595019f0000000000580435000000400b00043d0000010004400039000000000541034f000000000505043b000000010050008c00000a530000c13d000005d400b0009c0000159c0000213d0000004005b00039000000400050043f000000010500003900000000005b0435000005aa05000041000000200800003900000a620000013d000005d40080009c0000159c0000213d0000004009800039000000400090043f00000001090000390000000009980436000000f80a500210000000000005004b000005aa0a006041000000000521034f000000000505043b000005d5055001970000000005a5019f0000000000590435000000400b00043d000000400440008a000000000541034f000000000505043b000000800050008c00000aa50000413d000005a90050009c000000000a050019000000800aa0227000000000090000390000001009002039000005a300a0009c00000008099021bf000000400aa022700000059b00a0009c00000004099021bf000000200aa022700000ffff00a0008c00000002099021bf000000100aa02270000000ff00a0008c0000000109902039000000210c900039000005f40cc001970000003f0dc00039000005f40ad00197000000000aab00190000000000ba004b000000000d000039000000010d004039000005a300a0009c0000159c0000213d0000000100d001900000159c0000c13d0000004000a0043f000000020a900039000000000aab043600000000000c004b0000091c0000613d000000000d21034f000000000cca0019000000000e0a001900000000df0d043c000000000efe04360000000000ce004b000009180000c13d000000000c0b043300000000000c004b00000b600000613d000000000c0a0433000005d50cc00197000000f80d900210000000000ccd019f000005d60cc0009a0000000000ca04350000000309900210000000f80990008900000000059501cf000000ff0090008c00000000050020190000002109b0003900000ab20000013d0000000b02000029000005d40020009c0000159c0000213d0000000f020000290000004402200039000000000223034f000000000202043b0000000b080000290000004006800039000000400060043f0000002006800039000005d707000041000000000076043500000015060000390000000000680435000000210600003900000060022002100000000b066000290000000000260435000000400110008a000000000213034f000000400600043d000900000006001d000000000202043b000000800020008c00000a0b0000413d000005a90020009c0000000007020019000000800770227000000000060000390000001006002039000005a30070009c00000008066021bf00000040077022700000059b0070009c00000004066021bf00000020077022700000ffff0070008c00000002066021bf0000001007702270000000ff0070008c00000001066020390000002107600039000005f4087001970000003f07800039000005f4077001970000000907700029000000090070006c00000000090000390000000109004039000005a30070009c0000159c0000213d00000001009001900000159c0000c13d000000400070043f000000020760003900000009090000290000000007790436000000000008004b0000096f0000613d0000000008870019000000000905034f000000000a070019000000009b09043c000000000aba043600000000008a004b0000096b0000c13d00000009080000290000000008080433000000000008004b00000b600000613d0000000008070433000005d508800197000000f809600210000000000889019f000005d60880009a00000000008704350000000306600210000000f80660008900000000026201cf000000ff0060008c00000000020020190000000906000029000000210660003900000a190000013d0000800902000039000080060400003900000001050000390000000006000019166616520000040f00000060031002700000059b053001970000001f03500039000005ba063001970000003f03600039000005bb07300197000000400300043d0000000004370019000000000074004b00000000070000390000000107004039000005a30040009c0000159c0000213d00000001007001900000159c0000c13d000000400040043f0000000004530436000000000006004b000009a10000613d0000000006640019000000000700003100000011077003670000000008040019000000007907043c0000000008980436000000000068004b0000099d0000c13d0000001f0650018f000005b4075001980000000005740019000009ab0000613d000000000801034f0000000009040019000000008a08043c0000000009a90436000000000059004b000009a70000c13d000000000006004b000009b80000613d000000000171034f0000000306600210000000000705043300000000076701cf000000000767022f000000000101043b0000010006600089000000000161022f00000000016101cf000000000171019f00000000001504350000000100200190000006b30000c13d0000059b0040009c0000059b0400804100000040014002100000000002030433000002180000013d0000001f04300039000005ba044001970000003f04400039000005bb04400197000000400500043d0000000004450019000a00000005001d000000000054004b00000000050000390000000105004039000005a30040009c0000159c0000213d00000001005001900000159c0000c13d000000400040043f0000001f0430018f0000000a050000290000000006350436000005b405300198000f00000006001d0000000003560019000009db0000613d000000000601034f0000000f07000029000000006806043c0000000007870436000000000037004b000009d70000c13d000000000004004b000004870000613d000000000151034f0000000304400210000000000503043300000000054501cf000000000545022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000130435000004870000013d000000000001004b00000ac20000c13d000000400100043d000005c20200004100000000002104350000000402100039000000200300003900000000003204350000000802000029000000000202043300000024031000390000000000230435000000200300008a000000000632016f0000001f0520018f0000004404100039000000090040006b00000af60000813d000000000006004b00000a070000613d00000009085000290000000007540019000000200770008a000000200880008a0000000009670019000000000a680019000000000a0a04330000000000a90435000000200660008c00000a010000c13d000000000005004b00000b0d0000613d000000000704001900000b020000013d0000000906000029000005d40060009c0000159c0000213d00000009070000290000004006700039000000400060043f00000001060000390000000006670436000000f807200210000000000002004b000005aa07006041000000000205043b000005d502200197000000000272019f00000000002604350000000e0240006a000000a001100039000000000613034f000000000606043b0000001f0720008a000005aa02700197000005aa08600197000000000928013f000000000028004b0000000002000019000005aa02004041000000000076004b0000000008000019000005aa08008041000005aa0090009c000000000208c019000000000002004b000000de0000c13d0000000e08600029000000000283034f000000000202043b000005a30020009c000000de0000213d00000000092400490000002008800039000005aa0a900197000005aa0b800197000000000cab013f0000000000ab004b000000000a000019000005aa0a004041000000000098004b0000000009000019000005aa09002041000005aa00c0009c000000000a09c01900000000000a004b000000de0000c13d000000010020008c00000d5c0000c13d000000000283034f000000000202043b000005aa0020009c00000f120000413d000000400200043d000800000002001d000005d40020009c0000159c0000213d00000008050000290000004002500039000000400020043f00000001020000390000000005250436000005d902000041000700000005001d000000000025043500000f240000013d000005d400b0009c0000159c0000213d0000000f050000290000004405500039000000000551034f000000000505043b0000004008b00039000000400080043f0000002008b00039000005d7090000410000000000980435000000150800003900000000008b0435000000210800003900000060055002100000000008b800190000000000580435000000400440008a000000000441034f000000400900043d000000000404043b000000800040008c00000acf0000413d000005a90040009c0000000008040019000000800880227000000000050000390000001005002039000005a30080009c00000008055021bf00000040088022700000059b0080009c00000004055021bf00000020088022700000ffff0080008c00000002055021bf0000001008802270000000ff0080008c0000000105502039000000210c500039000005f40cc001970000003f0dc00039000005f408d001970000000008890019000000000098004b000000000d000039000000010d004039000005a30080009c0000159c0000213d0000000100d001900000159c0000c13d000000400080043f00000002085000390000000008890436000d00000008001d00000000000c004b00000a930000613d000000000d21034f0000000d0e000029000000000cce001900000000df0d043c000000000efe04360000000000ce004b00000a8f0000c13d000000000c09043300000000000c004b00000b600000613d0000000d08000029000000000c080433000005d50cc00197000000f80d500210000000000ccd019f000005d60cc0009a0000000000c804350000000305500210000000f80550008900000000045401cf000000ff0050008c00000000040020190000002105900039000000000045043500000ade0000013d000005d400b0009c0000159c0000213d0000004009b00039000000400090043f000000010900003900000000099b0436000000f80a500210000000000005004b000005aa0a006041000000000521034f000000000505043b000005d5055001970000000005a5019f0000000000590435000000400c00043d0000010004400039000000000541034f000000000505043b000000010050008c00000b1a0000c13d000005d400c0009c0000159c0000213d0000004005c00039000000400050043f000000010500003900000000005c0435000005aa05000041000000200900003900000b290000013d0000000f020000290000059b0020009c0000059b0200804100000040022002100000059b0010009c0000059b010080410000006001100210000000000121019f0000166800010430000005e001000041000000000010043f000005a8010000410000166800010430000005d40090009c0000159c0000213d0000004005900039000000400050043f00000001050000390000000008590436000000f805400210000000000004004b000005aa05006041000000000421034f000000000404043b000005d504400197000000000454019f000d00000008001d000000000048043500000000dc030434000005f40fc001970000001f0ec0018f000000400300043d000b00000003001d000c00200030003d0000000c00d0006c00000c000000813d00000000000f004b00000af20000613d0000000003ed00190000000c04e00029000000200440008a000000200330008a0000000005f400190000000008f3001900000000080804330000000000850435000000200ff0008c00000aec0000c13d00000000000e004b00000c160000613d0000000c0400002900000c0c0000013d0000000007640019000000000006004b00000aff0000613d00000009080000290000000009040019000000008a0804340000000009a90436000000000079004b00000afb0000c13d000000000005004b00000b0d0000613d000900090060002d0000000305500210000000000607043300000000065601cf000000000656022f000000090800002900000000080804330000010005500089000000000858022f00000000055801cf000000000565019f00000000005704350000001f05200039000000000335016f0000000002420019000000000002043500000044023000390000059b0020009c0000059b0200804100000060022002100000059b0010009c0000059b010080410000004001100210000000000112019f0000166800010430000005d400c0009c0000159c0000213d0000000f050000290000004405500039000000000551034f000000000505043b0000004009c00039000000400090043f0000002009c00039000005d70a0000410000000000a90435000000150900003900000000009c0435000000210900003900000060055002100000000009c900190000000000590435000000400440008a000000000441034f000000400500043d000d00000005001d000000000404043b000000800040008c00000c2d0000413d000005a90040009c0000000009040019000000800990227000000000050000390000001005002039000005a30090009c00000008055021bf00000040099022700000059b0090009c00000004055021bf00000020099022700000ffff0090008c00000002055021bf0000001009902270000000ff0090008c0000000105502039000000210d500039000005f40dd001970000003f0ed00039000005f409e001970000000d099000290000000d0090006c000000000e000039000000010e004039000005a30090009c0000159c0000213d0000000100e001900000159c0000c13d000000400090043f00000002095000390000000d0a00002900000000099a0436000c00000009001d00000000000d004b00000b5c0000613d000000000e21034f0000000c0f000029000000000ddf001900000000e90e043c000000000f9f04360000000000df004b00000b580000c13d0000000d090000290000000009090433000000000009004b00000d7f0000c13d000005f101000041000000000010043f0000003201000039000000040010043f000005f20100004100001668000104300000000a010000290000000001010433000000000001004b00000b8b0000613d000005a40010009c000000de0000213d000000200010008c000000de0000413d0000000f010000290000000001010433000000000001004b0000000002000039000000010200c039000000000021004b000000de0000c13d000000000001004b00000b8b0000c13d000000400100043d0000006402100039000005ca0300004100000000003204350000004402100039000005cb03000041000000000032043500000024021000390000002a030000390000000000320435000005c20200004100000000002104350000000402100039000000200300003900000000003204350000059b0010009c0000059b010080410000004001100210000005c8011001c70000166800010430000000400300043d000f00000003001d00000024013000390000000c020000290000000000210435000005be01000041000000000013043500000004013000390000000b0200002900000000002104350000059b0030009c0000059b010000410000000001034019000000400110021000000000020004140000059b0020009c0000059b02008041000000c002200210000000000112019f000005c5011001c70000000e02000029166616570000040f00000060031002700000059b03300197000000200030008c000000200400003900000000040340190000001f0640018f00000020074001900000000f0b0000290000000f0570002900000bb10000613d000000000801034f00000000090b0019000000008a08043c0000000009a90436000000000059004b00000bad0000c13d000000000006004b00000bbe0000613d000000000771034f0000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000010020019000000d500000613d0000001f01400039000000600210018f0000000001b20019000000000021004b00000000020000390000000102004039000005a30010009c0000159c0000213d00000001002001900000159c0000c13d000000400010043f000000200030008c000000de0000413d0000004403100039000000240410003900000000020b0433000000000002004b00000fcb0000c13d0000002002100039000005c00500004100000000005204350000000c0500002900000000005404350000000d04000029000000000043043500000044030000390000000000310435000005b60010009c0000159c0000213d0000008003100039000f00000003001d000000400030043f000005c90010009c0000159c0000213d000000c003100039000000400030043f00000020030000390000000f040000290000000000340435000000a004100039000005c103000041000c00000004001d00000000003404350000059b0020009c0000059b02008041000000400220021000000000010104330000059b0010009c0000059b010080410000006001100210000000000121019f00000000020004140000059b0020009c0000059b02008041000000c002200210000000000121019f0000000e02000029166616520000040f00000060031002700000059b03300198000011360000c13d000d00600000003d000b00800000003d0000115f0000013d0000000c04f0002900000000000f004b00000c090000613d00000000030d00190000000c0500002900000000380304340000000005850436000000000045004b00000c050000c13d00000000000e004b00000c160000613d000000000dfd00190000000303e00210000000000504043300000000053501cf000000000535022f00000000080d04330000010003300089000000000838022f00000000033801cf000000000353019f00000000003404350000000c0cc0002900000000000c043500000000d6060434000005f40f6001970000001f0e60018f0000000000cd004b00000c3f0000813d00000000000f004b00000c290000613d0000000003ed00190000000004ec0019000000200440008a000000200330008a0000000005f400190000000008f3001900000000080804330000000000850435000000200ff0008c00000c230000c13d00000000000e004b00000c550000613d00000000040c001900000c4b0000013d0000000d05000029000005d40050009c0000159c0000213d0000000d090000290000004005900039000000400050043f00000001050000390000000009590436000000f805400210000000000004004b000005aa05006041000000000421034f000000000404043b000005d504400197000000000454019f000c00000009001d000000000049043500000d8e0000013d0000000004fc001900000000000f004b00000c480000613d00000000030d001900000000050c001900000000380304340000000005850436000000000045004b00000c440000c13d00000000000e004b00000c550000613d000000000dfd00190000000303e00210000000000504043300000000053501cf000000000535022f00000000080d04330000010003300089000000000838022f00000000033801cf000000000353019f00000000003404350000000006c60019000000000006043500000000c7070434000005f40e7001970000001f0d70018f00000000006c004b00000c6c0000813d00000000000e004b00000c680000613d0000000003dc00190000000004d60019000000200440008a000000200330008a0000000005e400190000000008e3001900000000080804330000000000850435000000200ee0008c00000c620000c13d00000000000d004b00000c820000613d000000000406001900000c780000013d0000000004e6001900000000000e004b00000c750000613d00000000030c0019000000000506001900000000380304340000000005850436000000000045004b00000c710000c13d00000000000d004b00000c820000613d000000000cec00190000000303d00210000000000504043300000000053501cf000000000535022f00000000080c04330000010003300089000000000838022f00000000033801cf000000000353019f00000000003404350000000006670019000000000006043500000000a70a0434000005f40d7001970000001f0c70018f00000000006a004b00000c990000813d00000000000d004b00000c950000613d0000000003ca00190000000004c60019000000200440008a000000200330008a0000000005d400190000000008d3001900000000080804330000000000850435000000200dd0008c00000c8f0000c13d00000000000c004b00000caf0000613d000000000406001900000ca50000013d0000000004d6001900000000000d004b00000ca20000613d00000000030a0019000000000506001900000000380304340000000005850436000000000045004b00000c9e0000c13d00000000000c004b00000caf0000613d000000000ada00190000000303c00210000000000504043300000000053501cf000000000535022f00000000080a04330000010003300089000000000838022f00000000033801cf000000000353019f00000000003404350000000006670019000000000006043500000000a70b0434000005f40c7001970000001f0b70018f00000000006a004b00000cc60000813d00000000000c004b00000cc20000613d0000000003ba00190000000004b60019000000200440008a000000200330008a0000000005c400190000000008c3001900000000080804330000000000850435000000200cc0008c00000cbc0000c13d00000000000b004b00000cdc0000613d000000000406001900000cd20000013d0000000004c6001900000000000c004b00000ccf0000613d00000000030a0019000000000506001900000000380304340000000005850436000000000045004b00000ccb0000c13d00000000000b004b00000cdc0000613d000000000aca00190000000303b00210000000000504043300000000053501cf000000000535022f00000000080a04330000010003300089000000000838022f00000000033801cf000000000353019f0000000000340435000000000667001900000000000604350000000007090433000005f40a7001970000001f0970018f0000000d0060006b00000cf30000813d00000000000a004b00000cef0000613d0000000d039000290000000004960019000000200440008a000000200330008a0000000005a400190000000008a3001900000000080804330000000000850435000000200aa0008c00000ce90000c13d000000000009004b000000000406001900000cff0000c13d00000d0a0000013d0000000004a6001900000000000a004b00000cfc0000613d0000000d03000029000000000506001900000000380304340000000005850436000000000045004b00000cf80000c13d000000000009004b00000d0a0000613d000d000d00a0002d0000000303900210000000000504043300000000053501cf000000000535022f0000000d0800002900000000080804330000010003300089000000000838022f00000000033801cf000000000353019f0000000000340435000000000367001900000000000304350000000b050000290000000003530049000000200430008a00000000004504350000001f03300039000005f403300197000000000a53001900000000003a004b00000000030000390000000103004039000005a300a0009c0000159c0000213d00000001003001900000159c0000c13d0000004000a0043f0000000f040000290000000003420049000001c404400039000000000441034f000000000404043b000000230330008a000005aa05300197000005aa06400197000000000756013f000000000056004b0000000005000019000005aa05004041000000000034004b0000000003000019000005aa03008041000005aa0070009c000000000503c019000000000005004b000000de0000c13d0000000e03400029000000000431034f000000000604043b000005a30060009c000000de0000213d00000000046200490000002007300039000005aa03400197000005aa05700197000000000835013f000000000035004b0000000003000019000005aa03004041000000000047004b0000000004000019000005aa04002041000005aa0080009c000000000304c019000000000003004b000000de0000c13d000000010060008c00000fd70000c13d000000000371034f000000000303043b000005aa0030009c0000101c0000413d000005d400a0009c0000159c0000213d0000004003a00039000000400030043f0000000103000039000000000c3a0436000005d9030000410000102b0000013d0000001f0530018f000005b406300198000000400200043d0000000004620019000006da0000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b00000d570000c13d000006da0000013d000000400800043d000800000008001d000000380020008c00000f150000413d0000000808000029000005d40080009c0000159c0000213d000000080b0000290000004008b00039000000400080043f0000059b0020009c00000000080200190000002008802270000000000900003900000004090020390000ffff0080008c00000002099021bf0000001008802270000000ff0080008c00000001099021bf0000000208900039000000000a8b0436000000000505043b000005d505500197000000f808900210000000000558019f000005d8055001c700070000000a001d00000000005a04350000000305900210000000f80550015f00000000025201cf0000002105b00039000000000025043500000f240000013d0000000c0a00002900000000090a0433000005d509900197000000f80d50021000000000099d019f000005d60990009a00000000009a04350000000305500210000000f80550008900000000045401cf000000ff0050008c00000000040020190000000d050000290000002105500039000000000045043500000000ed030434000005f403d001970000001f0fd0018f000000400400043d000a00000004001d000b00200040003d0000000b00e0006c00000da60000813d000000000003004b00000da20000613d0000000005fe00190000000b04f00029000000200440008a000000200550008a0000000009340019000000000a350019000000000a0a04330000000000a90435000000200330008c00000d9c0000c13d00000000000f004b00000dbc0000613d0000000b0400002900000db20000013d0000000b04300029000000000003004b00000daf0000613d00000000050e00190000000b09000029000000005a0504340000000009a90436000000000049004b00000dab0000c13d00000000000f004b00000dbc0000613d000000000e3e00190000000303f00210000000000504043300000000053501cf000000000535022f00000000090e04330000010003300089000000000939022f00000000033901cf000000000353019f00000000003404350000000b0dd0002900000000000d043500000000e6060434000005f4036001970000001f0f60018f0000000000de004b00000dd30000813d000000000003004b00000dcf0000613d0000000005fe00190000000004fd0019000000200440008a000000200550008a0000000009340019000000000a350019000000000a0a04330000000000a90435000000200330008c00000dc90000c13d00000000000f004b00000de90000613d00000000040d001900000ddf0000013d00000000043d0019000000000003004b00000ddc0000613d00000000050e001900000000090d0019000000005a0504340000000009a90436000000000049004b00000dd80000c13d00000000000f004b00000de90000613d000000000e3e00190000000303f00210000000000504043300000000053501cf000000000535022f00000000090e04330000010003300089000000000939022f00000000033901cf000000000353019f00000000003404350000000006d60019000000000006043500000000d7070434000005f4037001970000001f0e70018f00000000006d004b00000e000000813d000000000003004b00000dfc0000613d0000000005ed00190000000004e60019000000200440008a000000200550008a0000000009340019000000000a350019000000000a0a04330000000000a90435000000200330008c00000df60000c13d00000000000e004b00000e160000613d000000000406001900000e0c0000013d0000000004360019000000000003004b00000e090000613d00000000050d00190000000009060019000000005a0504340000000009a90436000000000049004b00000e050000c13d00000000000e004b00000e160000613d000000000d3d00190000000303e00210000000000504043300000000053501cf000000000535022f00000000090d04330000010003300089000000000939022f00000000033901cf000000000353019f0000000000340435000000000667001900000000000604350000000087080434000005f4037001970000001f0d70018f000000000068004b00000e2d0000813d000000000003004b00000e290000613d0000000005d800190000000004d60019000000200440008a000000200550008a0000000009340019000000000a350019000000000a0a04330000000000a90435000000200330008c00000e230000c13d00000000000d004b00000e430000613d000000000406001900000e390000013d0000000004360019000000000003004b00000e360000613d00000000050800190000000009060019000000005a0504340000000009a90436000000000049004b00000e320000c13d00000000000d004b00000e430000613d00000000083800190000000303d00210000000000504043300000000053501cf000000000535022f00000000080804330000010003300089000000000838022f00000000033801cf000000000353019f00000000003404350000000006670019000000000006043500000000870b0434000005f4037001970000001f0b70018f000000000068004b00000e5a0000813d000000000003004b00000e560000613d0000000005b800190000000004b60019000000200440008a000000200550008a0000000009340019000000000a350019000000000a0a04330000000000a90435000000200330008c00000e500000c13d00000000000b004b00000e700000613d000000000406001900000e660000013d0000000004360019000000000003004b00000e630000613d00000000050800190000000009060019000000005a0504340000000009a90436000000000049004b00000e5f0000c13d00000000000b004b00000e700000613d00000000083800190000000303b00210000000000504043300000000053501cf000000000535022f00000000080804330000010003300089000000000838022f00000000033801cf000000000353019f00000000003404350000000006670019000000000006043500000000870c0434000005f4037001970000001f0b70018f000000000068004b00000e870000813d000000000003004b00000e830000613d0000000005b800190000000004b60019000000200440008a000000200550008a0000000009340019000000000a350019000000000a0a04330000000000a90435000000200330008c00000e7d0000c13d00000000000b004b00000e9d0000613d000000000406001900000e930000013d0000000004360019000000000003004b00000e900000613d00000000050800190000000009060019000000005a0504340000000009a90436000000000049004b00000e8c0000c13d00000000000b004b00000e9d0000613d00000000083800190000000303b00210000000000504043300000000053501cf000000000535022f00000000080804330000010003300089000000000838022f00000000033801cf000000000353019f0000000000340435000000000667001900000000000604350000000d030000290000000007030433000005f4037001970000001f0870018f0000000c0060006b00000eb50000813d000000000003004b00000eb10000613d0000000c058000290000000004860019000000200440008a000000200550008a0000000009340019000000000a350019000000000a0a04330000000000a90435000000200330008c00000eab0000c13d000000000008004b000000000406001900000ec10000c13d00000ecc0000013d0000000004360019000000000003004b00000ebe0000613d0000000c050000290000000009060019000000005a0504340000000009a90436000000000049004b00000eba0000c13d000000000008004b00000ecc0000613d000c000c0030002d0000000303800210000000000504043300000000053501cf000000000535022f0000000c0800002900000000080804330000010003300089000000000838022f00000000033801cf000000000353019f0000000000340435000000000367001900000000000304350000000a050000290000000003530049000000200430008a00000000004504350000001f03300039000005f403300197000000000a53001900000000003a004b00000000030000390000000103004039000005a300a0009c0000159c0000213d00000001003001900000159c0000c13d0000004000a0043f0000000f030000290000000004320049000001c403300039000000000331034f000000000303043b000000230440008a000005aa05400197000005aa06300197000000000756013f000000000056004b0000000005000019000005aa05004041000000000043004b0000000004000019000005aa04008041000005aa0070009c000000000504c019000000000005004b000000de0000c13d0000000e03300029000000000431034f000000000604043b000005a30060009c000000de0000213d00000000046200490000002007300039000005aa03400197000005aa05700197000000000835013f000000000035004b0000000003000019000005aa03004041000000000047004b0000000004000019000005aa04002041000005aa0080009c000000000304c019000000000003004b000000de0000c13d000000010060008c0000105e0000c13d000000000371034f000000000303043b000005aa0030009c000010f40000413d000005d400a0009c0000159c0000213d0000004003a00039000000400030043f0000000103000039000000000c3a0436000005d903000041000011030000013d000800600000003d000700800000003d00000f240000013d0000000808000029000005d40080009c0000159c0000213d00000008090000290000004008900039000000400080043f00000001080000390000000008890436000000f802200210000000000505043b000005d505500197000000000225019f000005aa022001c7000700000008001d0000000000280435000000800110008a000000000113034f000000000101043b000000000001004b00000f810000c13d0000006002000039000600800000003d000000000076004b0000000005000019000005aa05008041000005aa07700197000005aa08600197000000000978013f000000000078004b0000000007000019000005aa07004041000005aa0090009c000000000705c019000000000007004b000000de0000c13d0000000d0500002900000000a50504340000000a07000029000000000b0704330000000b07000029000000001c070434000400000001001d0000000907000029000000001d070434000500000001001d0000000807000029000000000e0704330000000e07600029000000000673034f000000000606043b000005a30060009c000000de0000213d000000000f6400490000002001700039000005aa08f00197000005aa07100197000000000987013f000000000087004b0000000007000019000005aa07004041000300000001001d0000000000f1004b0000000008000019000005aa08002041000005aa0090009c000000000708c019000000000007004b000000de0000c13d00000000055b00190000000005c500190000000005d500190000000005e50019000000000565001900000000070204330000000005750019000000400d00043d000005a305500197000000380050008c000010d00000413d000005d400d0009c0000159c0000213d0000004007d00039000000400070043f0000059b0050009c00000000070500190000002007702270000000000800003900000004080020390000ffff0070008c00000002088021bf0000001007702270000000ff0070008c00000001088021bf000000000443034f000000020b800039000000000cbd0436000000000404043b000005d504400197000000f807800210000000000447019f000005dc044001c700000000004c04350000000304800210000000f80440015f00000000044501cf0000002105d000390000000000450435000010dd0000013d000005d201000041000000000010044300000000010004140000059b0010009c0000059b01008041000000c001100210000005d3011001c70000800b02000039166616570000040f0000000100200190000015320000613d000000400200043d000000000101043b000000800010008c00000ff60000413d000005a90010009c0000000003010019000000800330227000000000070000390000001007002039000005a30030009c00000008077021bf00000040033022700000059b0030009c00000004077021bf00000020033022700000ffff0030008c00000002077021bf0000001003302270000000ff0030008c00000001077020390000002103700039000005f4063001970000003f03600039000005f4033001970000000003320019000000000023004b00000000040000390000000104004039000005a30030009c0000159c0000213d00000001004001900000159c0000c13d000000400030043f0000000203700039000000000532043600000011030003670000000004000031000000000006004b00000fba0000613d0000000006650019000000000843034f0000000009050019000000008a08043c0000000009a90436000000000069004b00000fb60000c13d0000000006020433000000000006004b00000b600000613d0000000008050433000005d508800197000000f809700210000000000889019f000005d60880009a00000000008504350000000307700210000000f80770008900000000017101cf000000ff0070008c000000000100201900000021022000390000000000120435000010060000013d000005c202000041000000000021043500000004021000390000002005000039000000000052043500000036020000390000000000240435000005c60200004100000000002304350000006402100039000005c70300004100000b850000013d000000380060008c0000101f0000413d000005d400a0009c0000159c0000213d0000004003a00039000000400030043f0000059b0060009c00000000030600190000002003302270000000000400003900000004040020390000ffff0030008c00000002044021bf0000001003302270000000ff0030008c00000001044021bf000000000321034f0000000205400039000000000c5a0436000000000303043b000005d503300197000000f805400210000000000335019f000005d8033001c700000000003c04350000000303400210000000f80330015f00000000033601cf0000002104a0003900000000003404350000102c0000013d000005d40020009c0000159c0000213d0000004003200039000000400030043f000000f807100210000000000001004b000005aa070060410000000106000039000000000562043600000000040000310000001103000367000000000143034f000000000101043b000005d501100197000000000171019f0000000000150435000005f4086001970000001f0760018f000000400200043d000600200020003d000000060050006c0000107d0000813d000000000008004b000010180000613d000000000a7500190000000609700029000000200990008a000000200aa0008a000000000b890019000000000c8a0019000000000c0c04330000000000cb0435000000200880008c000010120000c13d000000000007004b0000000609000029000010890000c13d000010930000013d000000600a000039000000800c0000390000102c0000013d000005d400a0009c0000159c0000213d0000004003a00039000000400030043f0000000103000039000000000c3a0436000000000321034f000000000303043b000005d503300197000000f804600210000000000343019f000005aa033001c700000000003c0435000000400b00043d000005d400b0009c0000159c0000213d0000004003b00039000000400030043f000000010800003900000000048b0436000000000221034f000000000202043b000005d502200197000005da032001c7000d00000004001d00000000003404350000000b030000290000000003030433000000000336001900000000040a04330000000003430019000000400900043d0000000103300039000005a304300197000000380040008c000010ab0000413d000005d40090009c0000159c0000213d0000059b0040009c00000000030400190000002003302270000000000500003900000004050020390000ffff0030008c00000002055021bf00000010033022700000004008900039000000400080043f000000ff0030008c00000001055021bf000000f803500210000000000223019f000005dc022001c7000000200d90003900000000002d04350000000302500210000000f80220015f00000000022401cf0000002103900039000000000023043500000002025000390000000000290435000010b40000013d000000380060008c000010f70000413d000005d400a0009c0000159c0000213d0000004003a00039000000400030043f0000059b0060009c00000000030600190000002003302270000000000400003900000004040020390000ffff0030008c00000002044021bf0000001003302270000000ff0030008c00000001044021bf000000000321034f0000000205400039000000000c5a0436000000000303043b000005d503300197000000f805400210000000000335019f000005d8033001c700000000003c04350000000303400210000000f80330015f00000000033601cf0000002104a000390000000000340435000011040000013d0000000609800029000000000008004b000010860000613d000000000a050019000000060b00002900000000ac0a0434000000000bcb043600000000009b004b000010820000c13d000000000007004b000010930000613d00000000058500190000000307700210000000000809043300000000087801cf000000000878022f00000000050504330000010007700089000000000575022f00000000057501cf000000000585019f00000000005904350000000605600029000005e906000041000000000065043500000000052500490000001e0650008a00000000006204350000002105500039000005f4065001970000000005260019000000000065004b00000000060000390000000106004039000005a30050009c0000159c0000213d00000001006001900000159c0000c13d0000000f07000029000001c406700039000000400050043f000000000563034f0000000006740049000000230760008a000000000605043b00000f2b0000013d000005d40090009c0000159c0000213d0000004003900039000000400030043f000000000d890436000000f803400210000000000223019f000005db0220009a00000000002d0435000000400400043d0000002002400039000005dd03000041000900000002001d0000000000320435000000000e090433000005f408e001970000001f09e0018f000a00000004001d000000210f4000390000000000fd004b000011870000813d000000000008004b000010cc0000613d00000000039d001900000000049f0019000000200440008a000000200330008a0000000005840019000000000283001900000000020204330000000000250435000000200880008c000010c60000c13d000000000009004b00000000040f0019000011930000c13d0000119d0000013d000005d400d0009c0000159c0000213d0000004007d00039000000400070043f000000000443034f000000010b000039000000000cbd0436000000000404043b000005d504400197000000f805500210000000000445019f000005db0440009a00000000004c0435000005f40eb001970000001f0db0018f000000400400043d000100000004001d000200200040003d0000000200c0006c000012a50000813d00000000000e004b000010f00000613d0000000004dc00190000000205d00029000000200f50008a000000200440008a0000000005ef00190000000007e4001900000000070704330000000000750435000000200ee0008c000010ea0000c13d00000000000d004b000000020f000029000012b10000c13d000012bb0000013d000000600a000039000000800c000039000011040000013d000005d400a0009c0000159c0000213d0000004003a00039000000400030043f0000000103000039000000000c3a0436000000000321034f000000000303043b000005d503300197000000f804600210000000000343019f000005aa033001c700000000003c0435000000400b00043d000005d400b0009c0000159c0000213d0000004003b00039000000400030043f000000010400003900000000054b0436000000000221034f000000000202043b000005d502200197000005da032001c7000d00000005001d00000000003504350000000a030000290000000003030433000000000336001900000000050a04330000000003530019000000400900043d0000000103300039000005a303300197000000380030008c000012800000413d000005d40090009c0000159c0000213d0000059b0030009c00000000040300190000002004402270000000000500003900000004050020390000ffff0040008c00000002055021bf00000010044022700000004008900039000000400080043f000000ff0040008c00000001055021bf000000f804500210000000000224019f000005dc022001c7000000200d90003900000000002d04350000000302500210000000f80220015f00000000022301cf0000002103900039000000000023043500000002025000390000000000290435000012890000013d0000001f04300039000005ba044001970000003f04400039000005bb04400197000000400500043d0000000004450019000d00000005001d000000000054004b00000000050000390000000105004039000005a30040009c0000159c0000213d00000001005001900000159c0000c13d000000400040043f0000001f0430018f0000000d050000290000000006350436000005b405300198000b00000006001d0000000003560019000011520000613d000000000601034f0000000b07000029000000006806043c0000000007870436000000000037004b0000114e0000c13d000000000004004b0000115f0000613d000000000151034f0000000304400210000000000503043300000000054501cf000000000545022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f00000000001304350000000d01000029000000000101043300000001002001900000125e0000613d000000000001004b000011790000c13d000005c30100004100000000001004430000000e01000029000000040010044300000000010004140000059b0010009c0000059b01008041000000c001100210000005c4011001c70000800202000039166616570000040f0000000100200190000015320000613d000000000101043b000000000001004b0000049d0000613d0000000d010000290000000001010433000000000001004b000006b30000613d000005a40010009c000000de0000213d000000200010008c000000de0000413d0000000b010000290000000001010433000000000001004b0000000002000039000000010200c039000000000021004b000000de0000c13d000000000001004b00000b770000613d000006b30000013d00000000048f0019000000000008004b000011900000613d00000000030d001900000000050f001900000000320304340000000005250436000000000045004b0000118c0000c13d000000000009004b0000119d0000613d000000000d8d00190000000302900210000000000304043300000000032301cf000000000323022f00000000050d04330000010002200089000000000525022f00000000022501cf000000000232019f0000000000240435000000000dfe001900000000000d04350000000b020000290000000005020433000005f4085001970000001f0e50018f0000000c00d0006b000011b50000813d000000000008004b000011b10000613d0000000c02e000290000000003ed0019000000200430008a000000200320008a0000000002840019000000000983001900000000090904330000000000920435000000200880008c000011ab0000c13d00000000000e004b000011cc0000613d00000000040d0019000011c10000013d00000000048d0019000000000008004b000011be0000613d0000000c0300002900000000090d001900000000320304340000000009290436000000000049004b000011ba0000c13d00000000000e004b000011cc0000613d000c000c0080002d0000000302e00210000000000304043300000000032301cf000000000323022f0000000c0800002900000000080804330000010002200089000000000828022f00000000022801cf000000000232019f00000000002404350000000004d50019000000000004043500000000050a0433000005f4085001970000001f0a50018f00000000004c004b000011e30000813d000000000008004b000011df0000613d0000000002ac00190000000003a40019000000200330008a000000200920008a0000000002830019000000000d890019000000000d0d04330000000000d20435000000200880008c000011d90000c13d00000000000a004b000011f90000613d0000000003040019000011ef0000013d0000000003840019000000000008004b000011ec0000613d00000000090c0019000000000d0400190000000092090434000000000d2d043600000000003d004b000011e80000c13d00000000000a004b000011f90000613d000000000c8c00190000000302a00210000000000803043300000000082801cf000000000828022f00000000090c04330000010002200089000000000929022f00000000022901cf000000000282019f0000000000230435000000000771034f0000000001450019000005f4046001980000001f0560018f00000000000104350000000003410019000012060000613d000000000807034f0000000009010019000000008208043c0000000009290436000000000039004b000012020000c13d000000000005004b000012130000613d000000000247034f0000000304500210000000000503043300000000054501cf000000000545022f000000000202043b0000010004400089000000000242022f00000000024201cf000000000252019f00000000002304350000000001610019000000000001043500000000040b0433000005f4064001970000001f0540018f0000000d0010006b0000122a0000813d000000000006004b000012260000613d0000000d025000290000000003510019000000200330008a000000200720008a0000000002630019000000000867001900000000080804330000000000820435000000200660008c000012200000c13d000000000005004b000012410000613d0000000003010019000012360000013d0000000003610019000000000006004b000012330000613d0000000d07000029000000000801001900000000720704340000000008280436000000000038004b0000122f0000c13d000000000005004b000012410000613d000d000d0060002d0000000302500210000000000503043300000000052501cf000000000525022f0000000d0600002900000000060604330000010002200089000000000626022f00000000022601cf000000000252019f0000000000230435000000000114001900000000000104350000000a030000290000000001310049000000200210008a00000000002304350000001f01100039000005f4021001970000000001320019000000000021004b00000000030000390000000103004039000005a30010009c0000159c0000213d00000001003001900000159c0000c13d000000400010043f00000009010000290000059b0010009c0000059b0100804100000040011002100000000a0200002900000000020204330000059b0020009c0000059b020080410000006002200210000000000112019f0000000002000414000014e20000013d000000000001004b0000140a0000c13d000000400100043d000005c20200004100000000002104350000000402100039000000200300003900000000003204350000000f02000029000000000202043300000024031000390000000000230435000000200300008a000000000632016f0000001f0520018f00000044041000390000000c0040006b000016280000813d000000000006004b0000127c0000613d0000000c085000290000000007540019000000200770008a000000200880008a0000000009670019000000000a680019000000000a0a04330000000000a90435000000200660008c000012760000c13d000000000005004b00000b0d0000613d0000000007040019000016340000013d000005d40090009c0000159c0000213d0000004005900039000000400050043f000000000d490436000000f803300210000000000223019f000005db0220009a00000000002d0435000000400400043d0000002002400039000005a603000041000900000002001d0000000000320435000000000e090433000005f403e001970000001f09e0018f000c00000004001d000000210840003900000000008d004b0000140c0000813d000000000003004b000012a10000613d00000000059d00190000000004980019000000200440008a000000200550008a000000000f3400190000000002350019000000000202043300000000002f0435000000200330008c0000129b0000c13d000000000009004b0000000004080019000014180000c13d000014220000013d000000020fe0002900000000000e004b000012ae0000613d00000000040c00190000000205000029000000004704043400000000057504360000000000f5004b000012aa0000c13d00000000000d004b000012bb0000613d000000000cec00190000000304d0021000000000050f043300000000054501cf000000000545022f00000000070c04330000010004400089000000000747022f00000000044701cf000000000454019f00000000004f0435000000020bb0002900000000000b04350000000d04000029000000000c040433000005f40ec001970000001f0dc0018f0000000000ba004b000012d30000813d00000000000e004b000012cf0000613d0000000004da00190000000005db0019000000200f50008a000000200440008a0000000005ef00190000000007e4001900000000070704330000000000750435000000200ee0008c000012c90000c13d00000000000d004b000012e90000613d000000000f0b0019000012df0000013d000000000feb001900000000000e004b000012dc0000613d00000000040a001900000000050b0019000000004704043400000000057504360000000000f5004b000012d80000c13d00000000000d004b000012e90000613d000000000aea00190000000304d0021000000000050f043300000000054501cf000000000545022f00000000070a04330000010004400089000000000747022f00000000044701cf000000000454019f00000000004f0435000000000abc001900000000000a04350000000a04000029000000000b040433000005f40db001970000001f0cb0018f0000000c00a0006b000013010000813d00000000000d004b000012fd0000613d0000000c04c000290000000005ca0019000000200e50008a000000200440008a0000000005de00190000000007d4001900000000070704330000000000750435000000200dd0008c000012f70000c13d00000000000c004b000013180000613d000000000e0a00190000130d0000013d000000000eda001900000000000d004b0000130a0000613d0000000c0400002900000000050a0019000000004704043400000000057504360000000000e5004b000013060000c13d00000000000c004b000013180000613d000c000c00d0002d0000000304c0021000000000050e043300000000054501cf000000000545022f0000000c0700002900000000070704330000010004400089000000000747022f00000000044701cf000000000454019f00000000004e0435000000000aab001900000000000a04350000000b04000029000000000b040433000005f40db001970000001f0cb0018f0000000400a0006b000013300000813d00000000000d004b0000132c0000613d0000000404c000290000000005ca0019000000200e50008a000000200440008a0000000005de00190000000007d4001900000000070704330000000000750435000000200dd0008c000013260000c13d00000000000c004b000013470000613d000000000e0a00190000133c0000013d000000000eda001900000000000d004b000013390000613d000000040400002900000000050a0019000000004704043400000000057504360000000000e5004b000013350000c13d00000000000c004b000013470000613d0004000400d0002d0000000304c0021000000000050e043300000000054501cf000000000545022f000000040100002900000000070104330000010004400089000000000747022f00000000044701cf000000000454019f00000000004e04350000000009ab001900000000000904350000000904000029000000000a040433000005f40ca001970000001f0ba0018f000000050090006b0000135f0000813d00000000000c004b0000135b0000613d0000000504b000290000000005b90019000000200d50008a000000200440008a0000000005cd00190000000007c4001900000000070704330000000000750435000000200cc0008c000013550000c13d00000000000b004b000013760000613d000000000d0900190000136b0000013d000000000dc9001900000000000c004b000013680000613d00000005040000290000000005090019000000004704043400000000057504360000000000d5004b000013640000c13d00000000000b004b000013760000613d0005000500c0002d0000000304b0021000000000050d043300000000054501cf000000000545022f000000050100002900000000070104330000010004400089000000000747022f00000000044701cf000000000454019f00000000004d043500000000089a0019000000000008043500000008040000290000000009040433000005f40b9001970000001f0a90018f000000070080006b0000138e0000813d00000000000b004b0000138a0000613d0000000704a000290000000005a80019000000200c50008a000000200440008a0000000005bc00190000000007b4001900000000070704330000000000750435000000200bb0008c000013840000c13d00000000000a004b000013a50000613d000000000c0800190000139a0000013d000000000cb8001900000000000b004b000013970000613d00000007040000290000000005080019000000004704043400000000057504360000000000c5004b000013930000c13d00000000000a004b000013a50000613d0007000700b0002d0000000304a0021000000000050c043300000000054501cf000000000545022f000000070700002900000000070704330000010004400089000000000747022f00000000044701cf000000000454019f00000000004c0435000000030a3003600000000003890019000005f4086001980000001f0960018f00000000000304350000000007830019000013b20000613d00000000040a034f0000000005030019000000004b04043c0000000005b50436000000000075004b000013ae0000c13d000000000009004b000013bf0000613d00000000048a034f0000000305900210000000000807043300000000085801cf000000000858022f000000000404043b0000010005500089000000000454022f00000000045401cf000000000484019f0000000000470435000000000363001900000000000304350000000002020433000005f4072001970000001f0620018f000000060030006b000013d60000813d000000000007004b000013d20000613d00000006046000290000000005630019000000200850008a000000200440008a0000000005780019000000000974001900000000090904330000000000950435000000200770008c000013cc0000c13d000000000006004b000013ed0000613d0000000008030019000013e20000013d0000000008730019000000000007004b000013df0000613d0000000604000029000000000503001900000000490404340000000005950436000000000085004b000013db0000c13d000000000006004b000013ed0000613d000600060070002d0000000304600210000000000508043300000000054501cf000000000545022f000000060100002900000000010104330000010004400089000000000141022f00000000014101cf000000000151019f00000000001804350000000001320019000000000001043500000001030000290000000001310049000000200210008a00000000002304350000001f01100039000005f4021001970000000001320019000000000021004b00000000020000390000000102004039000005a30010009c0000159c0000213d00000001002001900000159c0000c13d000000400010043f00000002010000290000059b0010009c0000059b010080410000004001100210000000010200002900000000020204330000059b0020009c0000059b020080410000006002200210000000000112019f0000000002000414000014e20000013d0000000b0200002900000ac30000013d0000000004380019000000000003004b000014150000613d00000000050d0019000000000f0800190000000052050434000000000f2f043600000000004f004b000014110000c13d000000000009004b000014220000613d000000000d3d00190000000302900210000000000304043300000000032301cf000000000323022f00000000050d04330000010002200089000000000525022f00000000022501cf000000000232019f0000000000240435000000000d8e001900000000000d04350000000a020000290000000005020433000005f4035001970000001f0e50018f0000000b00d0006b0000143a0000813d000000000003004b000014360000613d0000000b02e000290000000004ed0019000000200440008a000000200920008a0000000002340019000000000839001900000000080804330000000000820435000000200330008c000014300000c13d00000000000e004b000014510000613d00000000040d0019000014460000013d00000000043d0019000000000003004b000014430000613d0000000b0900002900000000080d001900000000920904340000000008280436000000000048004b0000143f0000c13d00000000000e004b000014510000613d000b000b0030002d0000000302e00210000000000304043300000000032301cf000000000323022f0000000b0800002900000000080804330000010002200089000000000828022f00000000022801cf000000000232019f00000000002404350000000004d50019000000000004043500000000050a0433000005f4035001970000001f0a50018f00000000004c004b000014680000813d000000000003004b000014640000613d0000000002ac00190000000008a40019000000200980008a000000200d20008a000000000239001900000000083d001900000000080804330000000000820435000000200330008c0000145e0000c13d00000000000a004b0000147e0000613d0000000009040019000014740000013d0000000009340019000000000003004b000014710000613d000000000d0c0019000000000804001900000000d20d04340000000008280436000000000098004b0000146d0000c13d00000000000a004b0000147e0000613d000000000c3c00190000000302a00210000000000309043300000000032301cf000000000323022f00000000080c04330000010002200089000000000828022f00000000022801cf000000000232019f0000000000290435000000000771034f0000000001450019000005f4046001980000001f0560018f000000000001043500000000034100190000148b0000613d000000000907034f0000000008010019000000009209043c0000000008280436000000000038004b000014870000c13d000000000005004b000014980000613d000000000247034f0000000304500210000000000503043300000000054501cf000000000545022f000000000202043b0000010004400089000000000242022f00000000024201cf000000000252019f00000000002304350000000001610019000000000001043500000000040b0433000005f4034001970000001f0540018f0000000d0010006b000014af0000813d000000000003004b000014ab0000613d0000000d025000290000000006510019000000200660008a000000200720008a0000000002360019000000000837001900000000080804330000000000820435000000200330008c000014a50000c13d000000000005004b000014c60000613d0000000006010019000014bb0000013d0000000006310019000000000003004b000014b80000613d0000000d07000029000000000801001900000000720704340000000008280436000000000068004b000014b40000c13d000000000005004b000014c60000613d000d000d0030002d0000000302500210000000000306043300000000032301cf000000000323022f0000000d0500002900000000050504330000010002200089000000000525022f00000000022501cf000000000232019f0000000000260435000000000114001900000000000104350000000c030000290000000001310049000000200210008a00000000002304350000001f01100039000005f4021001970000000001320019000000000021004b00000000030000390000000103004039000005a30010009c0000159c0000213d00000001003001900000159c0000c13d000000400010043f00000009010000290000059b0010009c0000059b0100804100000040011002100000000c0200002900000000020204330000059b0020009c0000059b020080410000006002200210000000000112019f00000000020004140000059b0020009c0000059b02008041000000c002200210000000000112019f000005a6011001c70000801002000039166616570000040f0000000100200190000000de0000613d0000001103000367000000000101043b000d00000001001d0000000f02000029000000e404200039000000000143034f000000000101043b000005a500100198000c00000004001d0000150e0000c13d000000400140008a000000000113034f000000800240008a000000000423034f000000000404043b000000000501043b00000000015400a9000000000005004b000015010000613d00000000055100d9000000000045004b000015080000c13d000000c002200039000000000223034f000000000202043b000000000012001a000015080000413d0000000001120019000015110000013d000005f101000041000000000010043f0000001101000039000000040010043f000005f20100004100001668000104300000012401200039000000000113034f000000000101043b000f00000001001d000005ea0100004100000000001004430000000001000410000000040010044300000000010004140000059b0010009c0000059b01008041000000c001100210000005c4011001c70000800a02000039166616570000040f0000000100200190000015320000613d000000000101043b0000000f0010006b000015330000a13d0000000001000410001000000001001d0000800a0100003900000024030000390000000004000415000000100440008a0000000504400210000005ea020000411666163b0000040f000005f002000041000000000020043f0000000f02000029000000040020043f000000240010043f000005c5010000410000166800010430000000000001042f0000000c0100002900000100011000390000001103000367000000000113034f000000000101043b00000000050000310000000e0250006a0000001f0220008a000005aa04200197000005aa06100197000000000746013f000000000046004b0000000004000019000005aa04004041000000000021004b0000000002000019000005aa02008041000005aa0070009c000000000402c019000000000004004b000000de0000c13d0000000e02100029000000000123034f000000000101043b000005a30010009c000000de0000213d00000000041500490000002006200039000005aa02400197000005aa07600197000000000827013f000000000027004b0000000002000019000005aa02004041000000000046004b0000000004000019000005aa04002041000005aa0080009c000000000204c019000000000002004b000000de0000c13d0000001f02100039000005f4022001970000003f02200039000005f404200197000000400200043d0000000004420019000000000024004b00000000080000390000000108004039000005a30040009c0000159c0000213d00000001008001900000159c0000c13d000000400040043f00000000041204360000000008610019000000000058004b000000de0000213d000000000563034f000005f4061001980000001f0710018f0000000003640019000015790000613d000000000805034f0000000009040019000000008a08043c0000000009a90436000000000039004b000015750000c13d000000000007004b000015860000613d000000000565034f0000000306700210000000000703043300000000076701cf000000000767022f000000000505043b0000010006600089000000000565022f00000000056501cf000000000575019f0000000000530435000000000114001900000000000104350000000001020433000000410010008c000015a20000c13d00000041012000390000000001010433000000ff0110018f0000001b0310008a000000020030008c000015a80000813d00000040022000390000000002020433000005ec0020009c000015ac0000413d000005eb01000041000000000010043f0000000201000039000000040010043f000000240020043f000005c5010000410000166800010430000005f101000041000000000010043f0000004101000039000000040010043f000005f2010000410000166800010430000005eb02000041000000000020043f000000040000043f000000240010043f000005c5010000410000166800010430000005eb02000041000000000020043f00000001020000390000152e0000013d0000000003040433000000400400043d0000006005400039000000000025043500000040024000390000000000320435000000200240003900000000001204350000000d010000290000000000140435000000000000043f0000059b0040009c0000059b04008041000000400140021000000000020004140000059b0020009c0000059b02008041000000c002200210000000000112019f000005ed011001c70000000102000039166616570000040f00000060031002700000059b03300197000000200030008c000000200400003900000000040340190000001f0540018f0000002004400190000015d00000613d000000000601034f0000000007000019000000006806043c0000000007870436000000000047004b000015cc0000c13d000000000005004b000015dd0000613d000000000641034f0000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f0000000000540435000000400400043d0000000100200190000015f30000613d000000000100043d000005a5011001970000000002000410000000000021004b0000000002000039000000010200c039000000000001004b0000000001000039000000010100603900000000001201a0000005ab01000041000000110110017f000005ee0100604100000000001404350000059b0040009c0000059b040080410000004001400210000005ef011001c7000016670001042e0000001f0530018f000005b4063001980000000002640019000015fd0000613d000000000701034f0000000008040019000000007907043c0000000008980436000000000028004b000015f90000c13d000000000005004b0000160a0000613d000000000161034f0000000305500210000000000602043300000000065601cf000000000656022f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f000000000012043500000060013002100000059b0040009c0000059b040080410000004002400210000000000112019f00001668000104300000001f0430018f000005b402300198000016190000613d000000000501034f0000000006000019000000005705043c0000000006760436000000000026004b000016150000c13d000000000004004b000016260000613d000000000121034f0000000304400210000000000502043300000000054501cf000000000545022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000001668000104300000000007640019000000000006004b000016310000613d0000000c080000290000000009040019000000008a0804340000000009a90436000000000079004b0000162d0000c13d000000000005004b00000b0d0000613d000c000c0060002d0000000305500210000000000607043300000000065601cf000000000656022f0000000c0800002900000b070000013d000000000001042f00000000050100190000000000200443000000040030008c000016420000a13d0000000501400270000000000101003100000004001004430000059b0030009c0000059b03008041000000600130021000000000020004140000059b0020009c0000059b02008041000000c002200210000000000112019f000005f5011001c70000000002050019166616570000040f0000000100200190000016510000613d000000000101043b000000000001042d000000000001042f00001655002104210000000102000039000000000001042d0000000002000019000000000001042d0000165a002104230000000102000039000000000001042d0000000002000019000000000001042d0000165f002104210000000102000039000000000001042d0000000002000019000000000001042d00001664002104230000000102000039000000000001042d0000000002000019000000000001042d0000166600000432000016670001042e000016680001043000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffff000000020000000000000000000000000000004000000100000000000000000000000000000000000000000000000000000000000000000000000000df9c158800000000000000000000000000000000000000000000000000000000df9c158900000000000000000000000000000000000000000000000000000000e2f318e300000000000000000000000000000000000000000000000000000000eeb8cb0900000000000000000000000000000000000000000000000000000000202bcce700000000000000000000000000000000000000000000000000000000a28c1aee000000000000000000000000000000000000000000000000ffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000000000000000ffffffffffffffffffffffffffffffffffffffff02000000000000000000000000000000000000000000000000000000000000001f70c58f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffff8000000000000000000000000000000000000000000000000000000000000000ffffffff000000000000000000000000000000000000000000000000000000009c4d535affffffffffffffffffffffffffffffffffffffffffffffffffffffff9c4d535b00000000000000000000000000000000000000000000000000000000ecf95b8a000000000000000000000000000000000000000000000000000000003cda3351000000000000000000000000000000000000000000000000000000005d3827000000000000000000000000000000000000000000000000000000000000000000ffffffff0000000000000000000000000000000000000000000000000100000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffe0ff31160100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffff7f00000000000000000000000000000000000000000000000000000000ffffffbb00000000000000000000000000000000ffffffe40000000000000000000000000100000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000001ffffffe000000000000000000000000000000000000000000000000000000003ffffffe08c5a344500000000000000000000000000000000000000000000000000000000949431dc00000000000000000000000000000000000000000000000000000000dd62ed3e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044000000800000000000000000095ea7b3000000000000000000000000000000000000000000000000000000005361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656408c379a0000000000000000000000000000000000000000000000000000000001806aa1896bbf26568e884a7374b41e002500962caba6a15023a8d90e8508b83020000020000000000000000000000000000002400000000000000000000000000000000000000000000000000000000000000440000000000000000000000005361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365000000000000000000000000000000000000000000000000000000000084000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffff3f6f742073756363656564000000000000000000000000000000000000000000005361666545524332303a204552433230206f7065726174696f6e20646964206e416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000000000000000000000000000000000000000000064000000000000000000000000ff15b06900000000000000000000000000000000000000000000000000000000b4fa3fb300000000000000000000000000000000000000000000000000000000e1239cd8000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000024000000a000000000000000009a8a0592ac89c5ad3bc6df8224c17b485976f597df104ee20d0df415241f670b0200000200000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffbf00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000009400000000000000000000000000000000000000000000000000000000000000b8000000000000000000000000000000000000000000000000000000000000008100000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000f800000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0f4a271b500000000000000000000000000000000000000000000000000000000848e1bfa1ac4e3576b728bda6721b215c70a7799a5b4866282a71bab954baac8000000000000000000000000000000000000000000000000fffffffffffffe1fc2f8787176b8ac6bf7215b4adcc1e069bf4ab82d9ab1df05a57a91d425935b6ead7c5bef027816a800da1736444fb58a807ef4c9603b7848673f7e3a68eb14a519b453ce45aaaaf3a300f5a9ec95869b4f28ab10430b572ee218c3a6a5e07d6f000000000000000000000000000000000000000000000000ffffffffffffff5f190100000000000000000000000000000000000000000000000000000000000035278d120000000000000000000000000000000000000000000000000000000080800000000000000000000000000000000000000000000000000000000000009cc7f708afc65944829bd487b90b72536b1951864fbfc14e125fc972a6507f3990f049c9000000000000000000000000000000000000000000000000000000007fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a10000000000000000000000000000000000000080000000000000000000000000202bcce700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000003eb8b54000000000000000000000000000000000000000000000000000000004e487b7100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000017a8441500000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe002000002000000000000000000000000000000000000000000000000000000008698615bd42f4b2c4bad9d9c037c3abbd88bac9d0d739351f14fc86b7f00a3e3", "blockHash": "0x8008b61c2d767fca5c705f9bc268e2912c29e77855709137a81acc30db6e3a61", @@ -2781,7 +2781,7 @@ "address": "0xc9f20fc268fc3e0e597660550033bf2c24218fd8", "topics": [ "0x00e403ec52d56843d21d3a103d6e0df67a220869cea503706fcd690e61bce9ca", - "0x01000d83e0329d9144ad041430fafcbc2b388e5434db8cb8a96e80157738a1da" + "0x01000d8bae37b82f311186426184866498b357f41d7a02ced11f3e3fbfbacd63" ], "data": "0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000001b06000130000000000020011000000000002000000600310027000000d410430019700020000004103550003000000410355000400000041035500050000004103550006000000410355000700000041035500080000004103550009000000410355000a000000410355000b000000410355000c000000410355000d000000410355000e000000410355000f00000041035500100000004103550011000000410355001200000001035500000d410030019d000100000002001f000000000100041100000d42011001c7000000000010043f0000000100200190000000350000c13d0000000001000414000000c00110021000000d43011001c7000080130200003900000000030000190000000004000019000000000500001900000000060000192c872c780000040f0000000100200190000026e10000613d000000600210027000000d4103200198000100000003001d000000610000c13d00000004010000390000000002000414000007d00220008c0000000004000019000000050420211a001100000004001d00000001001001880000000001000039000000010100c039000000690000013d0000000001000414000000c00110021000000d43011001c7000080130200003900000000030000190000000004000019000000000500001900000000060000192c872c780000040f0000000100200190000026e10000613d000000600210027000040d410020019c00000000020000190000004b0000613d0000002002000039000002e00020043f000000000201043b00030000000103550000000401000029000000200010008c000026e10000213d00000012010003670002000000010355000000600110027000000d4101100197000a00000001001d0000c0010010008c0000005b0000813d0000000a01000029000084400010043f000000040000006b000000960000c13d0000000001000414000007d00110008c0000005b0000a13d00000d440010009c000000940000813d000000000000043f000002e00100043d00000d410010009c00000d4101008041000000600110021000002c89000104300000002002000039000002e00020043f000000000201043b001100000002001d0003000000010355000000200030008c00000000010000390000000101002039000d00000001001d00000d4801000041000000000010043f0000000001000412000000040010043f000000000100041400000d410010009c00000d4101008041000000c00110021000000d49011001c700008002020000392c872c7d0000040f0000000100200190000026e10000613d000000000201043b001000000002001d0003000000010355000000000020043f000000000100041400000d410010009c00000d4101008041000000c00110021000000d6e011001c700008012020000392c872c7d0000040f00000420080000390000000d03000029000000010330018f000c00000003001d00030d54003001cb0000001003000029000000e0033002700000ffff0330018f0002000000010355000700000003001d000084400030043f0000000201000367000000000101043b000000f801100270000000110e000029000000000a000019000000000d00001900000c320001013e000000050110011a00007d000210008a00000420080000390000000203000367000000000303043b000000f803300270000000000a000019000000000d000019000000000e02001900000b230003013e000000030ee0008c0000005b0000413d000000200880008a000004400080008c0000005b0000413d0000000001080433000000000aa10019000000010dd000390000000201d00367000000000101043b000000f80110027000000b230001013e000000050ee0008c0000005b0000413d000000200880008a000004400080008c0000005b0000413d0000000001080433000000000aa100a9000000010dd000390000000201d00367000000000101043b000000f80110027000000b230001013e000000030ee0008c0000005b0000413d000000200880008a000004400080008c0000005b0000413d0000000001080433000000000a1a0049000000010dd000390000000201d00367000000000101043b000000f80110027000000b230001013e000000050ee0008c0000005b0000413d000000200880008a000004400080008c0000005b0000413d0000000002080433000000000002004b000000000100001900000000012ac0d9000000010dd000390000000202d00367000000000202043b000000f802200270000000000a01001900000b230002013e000000050ee0008c0000005b0000413d000000200880008a000004400080008c0000005b0000413d0000000002080433000000000002004b0000000001000019000000eb0000613d00000d7100a0009c000000df0000c13d00000d710100004100000d780020009c000000eb0000613d00000d712120012c00000d710220c09900000d7143a0012c000000000313013f00000d710440c09900000000012400d9000000ff023002120000000003120049000000000223019f0000000002016019000000000001004b000000000102c019000000010dd000390000000202d00367000000000202043b000000f802200270000000000a01001900000b230002013e000000050ee0008c0000005b0000413d000000200880008a000004400080008c0000005b0000413d0000000002080433000000000002004b000000000100001900000000102ac0d9000000010dd000390000000202d00367000000000202043b000000f802200270000000000a01001900000b230002013e000000050ee0008c0000005b0000413d000000200880008a000004400080008c0000005b0000413d0000000002080433000000000002004b0000000001000019000001180000613d00000d7100a0009c0000010e0000c13d00000d780020009c0000000001000019000001180000613d00000d711020012c00000d710110c09900000d7120a0012c00000d710220c09900000000101200d900000d7100a001980000000002010019000000000220c089000000000001004b000000000102c019000000010dd000390000000202d00367000000000202043b000000f802200270000000000a01001900000b230002013e000000000a2400490000000202d00367000000000202043b000000f802200270000000000801001900000b230002013e000000080ee0008c0000005b0000413d000000400180008a000004400010008c0000005b0000413d0000000002010433000000000002004b000000010dd000390000000003000019000001360000613d00000000502a00d9000000200380008a000000000303043300000000602300d9000000000456001900000000302400d9000000000056001a0000011e0000413d0000000202d00367000000000202043b000000f802200270000000000a030019000000000801001900000b230002013e000000080ee0008c0000005b0000413d000000400180008a000004400010008c0000005b0000413d0000000003010433000000000003004b000000010dd000390000000002000019000001a60000613d00000000203a00d9000000200480008a000000000404043300000000403400d900000d4d0030009c000001530000213d00000000022400a900000000a03200d90000000202d00367000000000202043b000000f802200270000000000801001900000b230002013e00000000452400a9000000000043004b000000010200008a000001a60000a13d00000d720030009c000000c0020000390000008002004039000000000623022f0000004002000039000000800200403900000d730060009c000000200220808a000000200660827000000d740060009c000000100220808a0000001006608270000001000060008c000000080220808a0000000806608270000000100060008c00000000070600190000000407708270000000040070008c000000000807001900000002088082700000000009800089000000020080008c000000020900808a000000100060008c000000040220808a000000040070008c000000020220808a0000000002290019000000ff0620018f00000000046401cf00000d7806200167000000ff0660018f0000000107500270000000000667022f000000000764019f00000000032301cf000000800430027000000000a94700d900000000062501cf000000800860027000000d4d05300197000001860000013d000000000a4a0019000000010990008a00000d4d00a0009c0000018d0000813d00000d750090009c000001820000213d000000000b5900a9000000800ca00210000000000c8c019f0000000000cb004b000001820000213d00000d4d0990019700000000093900a90000008007700210000000000787019f000000000797004900000000984700d900000d4d06600197000001990000013d0000000009490019000000010880008a00000d4d0090009c000001a00000813d00000d750080009c000001950000213d000000000a5800a9000000800b900210000000000b6b019f0000000000ba004b000001950000213d00000d4d0480019700000000033400a90000008004700210000000000464019f0000000003340049000000000223022f0000000203d00367000000000303043b000000f803300270000000000a020019000000000801001900000b230003013e0000000a02e0008c0000005b0000413d000000200880008a000004400080008c0000005b0000413d00000001030000390000000001080433000000000001004b000001c40000613d0000000004010019000000000300001900000032033000390000000804400272000001b70000c13d000000000232004b0000005b0000413d000000010300003900000001001001900000000005aa00a9000000010a00603900000000033a00a90000000101100272000000000a050019000001bd0000c13d000000000e020019000000000a030019000000010dd000390000000201d00367000000000101043b000000f80110027000000b230001013e000000050ee0008c0000005b0000413d000000200880008a000004400080008c0000005b0000413d00000000010804330000001e00a0008c000001d50000a13d000000000a010019000001df0000013d0000000302a0021000000007022001bf00000d780320021f000000000421022f00000001004001900000000003006019000001000220008900000000012101cf000000000121022f000000000a13019f000000010dd000390000000201d00367000000000101043b000000f80110027000000b230001013e000000030ee0008c0000005b0000413d000000200880008a000004400080008c0000005b0000413d000000000108043300000000001a004b000000000a000039000000010a004039000000010dd000390000000201d00367000000000101043b000000f80110027000000b230001013e000000030ee0008c0000005b0000413d000000200880008a000004400080008c0000005b0000413d000000000108043300000000001a004b000000000a000039000000010a002039000000010dd000390000000201d00367000000000101043b000000f80110027000000b230001013e000000030ee0008c0000005b0000413d000000200880008a000004400080008c0000005b0000413d000000000108043300000000001a004b000000000200001900000d710200404100000d7103a0019700000d7101100197000000000413013f000000000013004b000000000100001900000d710100204100000d710040009c000000000102c019000000010dd00039000000000001004b000000000a000039000000010a00c0390000000201d00367000000000101043b000000f80110027000000b230001013e000000030ee0008c0000005b0000413d000000200880008a000004400080008c0000005b0000413d000000000108043300000000001a004b000000000200001900000d710200204100000d7103a0019700000d7101100197000000000413013f000000000013004b000000000100001900000d710100404100000d710040009c000000000102c019000000010dd00039000000000001004b000000000a000039000000010a00c0390000000201d00367000000000101043b000000f80110027000000b230001013e000000030ee0008c0000005b0000413d000000200880008a000004400080008c0000005b0000413d000000000108043300000000001a004b000000000a000039000000010a006039000000010dd000390000000201d00367000000000101043b000000f80110027000000b230001013e000000030ee0008c0000005b0000413d000004400080008c0000005b0000413d000000010dd0003900000000000a004b000000000a000039000000010a0060390000000201d00367000000000101043b000000f80110027000000b230001013e000000030ee0008c0000005b0000413d000000200880008a000004400080008c0000005b0000413d0000000001080433000000000aa1016f000000010dd000390000000201d00367000000000101043b000000f80110027000000b230001013e000000030ee0008c0000005b0000413d000000200880008a000004400080008c0000005b0000413d0000000001080433000000000aa1019f000000010dd000390000000201d00367000000000101043b000000f80110027000000b230001013e000000030ee0008c0000005b0000413d000000200880008a000004400080008c0000005b0000413d0000000001080433000000000aa1013f000000010dd000390000000201d00367000000000101043b000000f80110027000000b230001013e000000030ee0008c0000005b0000413d000004400080008c0000005b0000413d00000d780aa00167000000010dd000390000000201d00367000000000101043b000000f80110027000000b230001013e000000030ee0008c0000005b0000413d000000200880008a000004400080008c0000005b0000413d00000000010804330000000302a0021000000000012101cf000000f8011002700000001f00a0008c0000000001002019000000010dd000390000000202d00367000000000202043b000000f802200270000000000a01001900000b230002013e000000030ee0008c0000005b0000413d000000200880008a000004400080008c0000005b0000413d00000000010804330000000001a101cf000000ff00a0008c0000000001002019000000010dd000390000000202d00367000000000202043b000000f802200270000000000a01001900000b230002013e000000030ee0008c0000005b0000413d000000200880008a000004400080008c0000005b0000413d00000000010804330000000001a1022f000000ff00a0008c0000000001002019000000010dd000390000000202d00367000000000202043b000000f802200270000000000a01001900000b230002013e000000030ee0008c0000005b0000413d000000200880008a000004400080008c0000005b0000413d000000000108043300000d710210019700000d710020009c000000010200008a000000000200c019000000ff00a0008c000000ff0a0080390000010003a0008900000000023201cf0000000003a1022f000000000223019f00000000000a004b000000000102c019000000010dd000390000000202d00367000000000202043b000000f802200270000000000a01001900000b230002013e0000001e02e0008c0000005b0000413d000000200880008a000004400080008c0000005b0000413d0000000001080433000000000001004b0000000004000019000002de0000613d00000d780310016700000000003a004b0000005b0000213d0000000003a1001900000d450030009c0000005b0000213d0000001f033000390000000503300270000084600600043d000000000563004b0000000004000019000002de0000a13d00000000046600a9000000090440027000000000063300a900000009066002700000000004460049000084600030043f00000003035000c900000000043400190000001f03100039000000050330027000000006033000c90000000003340019000000000232004b0000005b0000413d000f00000008001d001000000002001d00110000000d001d0000848002a0003900000d410020009c00000d41020080410000004002200210000000000001004b000000000200601900000d410010009c00000d41010080410000006001100210000000000112019f000000000200041400000d410020009c00000d4102008041000000c002200210000000000112019f00000d4b011001c700008010020000392c872c7d0000040f0000000100200190000026e10000613d000000110d000029000000010dd00039000000000a01043b0000000201d00367000000000101043b000000f801100270000000100e0000290000000f0800002900000b230001013e000000020ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000008a80436000000000a000410000000010dd000390000000201d00367000000000101043b000000f80110027000000b230001013e000e006400e000940000005b0000413d000004400080008c0000005b0000413d000f00000008001d00100000000e001d00110000000d001d00000d4601a00197000d00000001001d000000000010043f0000000001000414000000c00110021000000d43011001c7000080130200003900000000030000190000000004000019000000000500001900000000060000192c872c780000040f0000000100200190000026e10000613d00000d4700100198000003280000613d0000000e010000290000032d0000013d0000000e01000029000009c40010008c00000010010000290000005b0000413d00000a280110008a001000000001001d00000d590100004100000000001004430000000d010000290000000400100443000000000100041400000d410010009c00000d4101008041000000c00110021000000d58011001c70000800a020000392c872c7d0000040f0000000100200190000026e00000613d000000110d000029000000010dd00039000000000a01043b0000000201d00367000000000101043b000000f801100270000000100e0000290000000f0800002900000b230001013e000000020ee0008c0000005b0000413d000003000100043d000000000001004b0000035e0000c13d000f00000008001d000e0000000a001d00100000000e001d00110000000d001d00000d70010000410000000000100443000000000100041400000d410010009c00000d4101008041000000c00110021000000d64011001c70000800b020000392c872c7d0000040f0000000100200190000026e00000613d000000000101043b000003000010043f000000110d000029000000100e0000290000000e0a0000290000000f080000290000841f0080008c0000005b0000213d0000000008a80436000000010dd000390000000202d00367000000000202043b000000f802200270000000000a01001900000b230002013e000000020ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000008a80436000000010dd000390000000201d00367000000000101043b000000f801100270000000000a00041100000b230001013e000000020ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000008a80436000000000a000416000000010dd000390000000201d00367000000000101043b000000f80110027000000b230001013e000000030ee0008c0000005b0000413d000004400080008c0000005b0000413d000000010dd000390000000201d00367000000000101043b000000f801100270000000000a00001900000b230001013e000000020ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000008a80436000000010dd000390000000201d00367000000000101043b000000f801100270000000000a00001900000b230001013e0000000303e0008c0000005b0000413d000000400480008a000004400040008c0000005b0000413d000000600180008a0000000002010433000000200580008a00000000050504330000000004040433000000000004004b0000000007000019000003b30000613d00000d780640016700000000006a004b0000005b0000213d0000000006a4001900000d450060009c0000005b0000213d0000001f066000390000000506600270000084600900043d000000000896004b0000000007000019000003b30000a13d00000000079900a9000000090770027000000000096600a900000009099002700000000007790049000084600060043f00000003068000c900000000076700190000001f06400039000000050660027000000003066000c90000000006670019000000000e63004b0000005b0000413d00000d5c0050009c00000d5c0500804100000000064500190000848003a0003900000d4e0060009c000003d10000413d00000d5c055000990000000007350019000000000654004900000d79046001970000000004740019000000000074004b000003c90000a13d0000000007070436000000000047004b000003c60000413d0000001f06600190000003d20000613d0000000306600210000000000704043300000000076701cf000000000667022f0000000000640435000003d20000013d0000000005040019000000000005004b000003e20000613d00000d79045001970000000004340019000000000034004b000003db0000a13d0000000003030436000000000043004b000003d80000413d0000001f03500190000003e20000613d0000000303300210000000000504043300000000053501cf000000000335022f0000000000340435000000010dd000390000000203d00367000000000303043b000000f803300270000000000a020019000000000801001900000b230003013e000000020ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000008a80436000000010dd000390000000201d00367000000000101043b000000f8011002700000000a0a00002900000b230001013e0000000304e0008c0000005b0000413d000000400580008a000004400050008c0000005b0000413d000000600180008a0000000002010433000000200380008a00000000030304330000000005050433000000000005004b0000000007000019000004150000613d00000d780650016700000000006a004b0000005b0000213d0000000006a5001900000d450060009c0000005b0000213d0000001f066000390000000506600270000084600900043d000000000896004b0000000007000019000004150000a13d00000000079900a9000000090770027000000000096600a900000009099002700000000007790049000084600060043f00000003068000c900000000076700190000001f06500039000000050660027000000003066000c90000000006670019000000000e64004b0000005b0000413d0000000a07000029000000000073004b000000000307801900000000065300190000848004a00039000000000076004b000004340000a13d00000000063700490000000008460019000000000765004900000d79057001970000000005850019000000000085004b0000042c0000a13d0000000008080436000000000058004b000004290000413d0000001f07700190000004350000613d0000000307700210000000000805043300000000087801cf000000000778022f0000000000750435000004350000013d0000000006050019000000000006004b0000044e0000613d00000d79056001980000001f0660018f00000002073003670000000003540019000004410000613d000000000807034f000000008908043c0000000004940436000000000034004b0000043d0000c13d000000000006004b0000044e0000613d000000000457034f0000000305600210000000000603043300000000065601cf000000000656022f000000000404043b0000010005500089000000000454022f00000000045401cf000000000464019f0000000000430435000000010dd000390000000203d00367000000000303043b000000f803300270000000000a020019000000000801001900000b230003013e000000020ee0008c0000005b0000413d000003200100043d000000000001004b0000046f0000c13d000f00000008001d000e0000000a001d00100000000e001d00110000000d001d00000d6f010000410000000000100443000000000100041400000d410010009c00000d4101008041000000c00110021000000d64011001c70000800b020000392c872c7d0000040f0000000100200190000026e00000613d000000000101043b000003200010043f000000110d000029000000100e0000290000000e0a0000290000000f080000290000841f0080008c0000005b0000213d0000000008a80436000000010dd000390000000202d00367000000000202043b000000f802200270000000000a01001900000b230002013e0000000201d00367000000000101043b000000f801100270000000000a000019000000100e0000290000000f0800002900000b230001013e000d006400e000940000005b0000413d000004400080008c0000005b0000413d000f00000008001d00100000000e001d00110000000d001d00000d4601a00197000e00000001001d000000000010043f0000000001000414000000c00110021000000d43011001c7000080130200003900000000030000190000000004000019000000000500001900000000060000192c872c780000040f0000000100200190000026e10000613d00000d4700100198000004980000613d0000000d010000290000049d0000013d0000000d01000029000009c40010008c00000010010000290000005b0000413d00000a280110008a001000000001001d00000d4801000041000000000010043f0000000e01000029000000040010043f000000000100041400000d410010009c00000d4101008041000000c00110021000000d49011001c700008002020000392c872c7d0000040f0000000100200190000026e10000613d000000000201043b0003000000010355000000f801200270000000010010008c000004bc0000613d000000020010008c000000110d000029000000010dd00039000004780000c13d000000e0012002700000ffff0a10018f0000000201d00367000000000101043b000000f801100270000000100e0000290000000f0800002900000b230001013e00000d570100004100000000001004430000000e010000290000000400100443000000000100041400000d410010009c00000d4101008041000000c00110021000000d58011001c700008002020000392c872c7d0000040f0000000100200190000026e00000613d000000000a01043b000000110d000029000000010dd000390000000201d00367000000000101043b000000f801100270000000100e0000290000000f0800002900000b230001013e0000006406e0008c0000005b0000413d000000600180008a000004400010008c0000005b0000413d000000800280008a000c00000002001d0000000002020433000b00000002001d000000400280008a0000000002020433000800000002001d000000200280008a0000000002020433000f00000002001d0000000005010433000000000005004b0000000004000019000004f90000613d00000d78015001670000000f0010006b0000005b0000213d0000000f0150002900000d450010009c0000005b0000213d0000001f011000390000000501100270000084600300043d000000000231004b0000000004000019000004f90000a13d00000000033300a9000000090330027000000000041100a900000009044002700000000003340049000084600010043f00000003012000c90000000004130019000d00000004001d001000000006001d000e00000005001d00110000000d001d00000d4601a00197000900000001001d000000000010043f0000000001000414000000c00110021000000d43011001c7000080130200003900000000030000190000000004000019000000000500001900000000060000192c872c780000040f0000000100200190000026e10000613d0000000e030000290000001f02300039000000050220027000000003022000c90000000d0220002900000d4700100198000009c402206039000000100e20006b000000110d0000290000005b0000413d000000000003004b000005820000613d00100000000e001d00000d4801000041000000000010043f0000000901000029000000040010043f000000000100041400000d410010009c00000d4101008041000000c00110021000000d49011001c700008002020000392c872c7d0000040f0000000100200190000026e10000613d0000000f02000029000f84800020003d000000000201043b0003000000010355000d00000002001d000000000020043f000000000100041400000d410010009c00000d4101008041000000c00110021000000d6e011001c700008012020000392c872c7d0000040f000000010020019000000000040000190000000e06000029000005680000613d000000600210027000000d41032001970000000d0400002900000d5502400197000000e0044002700000ffff0440018f00000d5b0020009c0000000504406210000000000064004b0000000004068019000000080030006b00000000020300190000000802004029000000000542001900000000070200190000000002230049000000000035004b000000000204a019000000000002004b0000000004000019000005680000613d0000000004720019000000000034004b000026e10000213d000000000371034f00000d79042001980000001f0520018f0000000f01400029000005590000613d000000000603034f0000000f07000029000000006806043c0000000007870436000000000017004b000005550000c13d000000000005004b000005660000613d000000000343034f0000000304500210000000000501043300000000054501cf000000000545022f000000000303043b0000010004400089000000000343022f00000000034301cf000000000353019f000000000031043500000000040200190000000e06000029000000000246004b000000110d000029000000100e000029000005820000a13d0000000f0340002900000d79012001970000000001310019000000000031004b000005740000a13d0000000003030436000000000013004b000005710000413d0000001f02200190000005820000613d0000000302200210000000000301043300000000032301cf000000000223022f0000000000210435000000010dd000390000000201d00367000000000101043b000000f8011002700000000b0a0000290000000c0800002900000b230001013e000000010dd000390000000201d00367000000000101043b000000f8011002700000000b0a0000290000000c0800002900000b230001013e000000020ee0008c0000005b0000413d0000841f0080008c0000005b0000213d000004000100043d0000000008a80436000000010dd000390000000202d00367000000000202043b000000f802200270000000000a01001900000b230002013e0000000305e0008c0000005b0000413d000000400480008a000004400040008c0000005b0000413d000000600180008a0000000002010433000000200380008a00000000030304330000000004040433000000000004004b0000000007000019000005b60000613d00000d780640016700000000006a004b0000005b0000213d0000000006a4001900000d450060009c0000005b0000213d0000001f066000390000000506600270000084600900043d000000000896004b0000000007000019000005b60000a13d00000000079900a9000000090770027000000000096600a900000009099002700000000007790049000084600060043f00000003068000c900000000076700190000001f06400039000000050660027000000003066000c90000000006670019000000000e65004b0000005b0000413d00000d7805400167000000000053004b0000005b0000213d0000000005340019000004000600043d000000000065004b0000005b0000213d00000d79054001980000001f0440018f00000004063003670000848007a000390000000003570019000005ce0000613d000000000806034f000000008908043c0000000007970436000000000037004b000005ca0000c13d000000000004004b000005db0000613d000000000556034f0000000304400210000000000603043300000000064601cf000000000646022f000000000505043b0000010004400089000000000545022f00000000044501cf000000000464019f0000000000430435000000010dd000390000000203d00367000000000303043b000000f803300270000000000a020019000000000801001900000b230003013e0000000e01000029000001000010008c000005e70000413d00000d4f00a001980000060b0000c13d00000d5a01000041000000000010043f0000000e01000029000000040010043f000000000100041400000d410010009c00000d4101008041000000c00110021000000d49011001c700008003020000392c872c7d0000040f0000000100200190000026e10000613d000000000201043b0003000000010355000000000002004b000005fa0000613d00000d6c0a0000410000060b0000013d00000d590100004100000000001004430000000e010000290000000400100443000000000100041400000d410010009c00000d4101008041000000c00110021000000d58011001c70000800a020000392c872c7d0000040f0000000100200190000026e00000613d000000000101043b000000000001004b00000d6c0a000041000006130000613d000000110d000029000000010dd000390000000201d00367000000000101043b000000f801100270000000100e0000290000000f0800002900000b230001013e000000110d000029000000010dd000390000000201d00367000000000101043b000000f801100270000000000a000019000000100e0000290000000f0800002900000b230001013e000d006400e000940000005b0000413d000004400080008c0000005b0000413d000f00000008001d00100000000e001d00110000000d001d00000d4601a00197000e00000001001d000000000010043f0000000001000414000000c00110021000000d43011001c7000080130200003900000000030000190000000004000019000000000500001900000000060000192c872c780000040f0000000100200190000026e10000613d00000d4700100198000006350000613d0000000d010000290000063a0000013d0000000d01000029000009c40010008c00000010010000290000005b0000413d00000a280110008a001000000001001d00000d4801000041000000000010043f0000000e01000029000000040010043f000000000100041400000d410010009c00000d4101008041000000c00110021000000d49011001c700008002020000392c872c7d0000040f0000000100200190000026e10000613d000000000a01043b000300000001035500000d4a01a0019700000d4b0010009c000005e20000c13d00000d6d01000041000000000010043f0000000400a0043f000000000100041400000d410010009c00000d4101008041000000c00110021000000d49011001c700008015020000392c872c7d0000040f0000000100200190000026e10000613d000000000a01043b0003000000010355000000110d000029000000010dd000390000000201d00367000000000101043b000000f801100270000000100e0000290000000f0800002900000b230001013e000000140ee0008c0000005b0000413d000004400080008c0000005b0000413d000f00000008001d00100000000e001d00110000000d001d00000d6b0100004100000000001004430000000400a00443000000000100041400000d410010009c00000d4101008041000000c00110021000000d58011001c70000800b020000392c872c7d0000040f0000000100200190000026e00000613d000000110d000029000000010dd00039000000000a01043b0000000201d00367000000000101043b000000f801100270000000100e0000290000000f0800002900000b230001013e000000020ee0008c0000005b0000413d000003400100043d000000000001004b000006990000c13d000f00000008001d000e0000000a001d00100000000e001d00110000000d001d00000d6a010000410000000000100443000000000100041400000d410010009c00000d4101008041000000c00110021000000d64011001c70000800b020000392c872c7d0000040f0000000100200190000026e00000613d000000000101043b000003400010043f000000110d000029000000100e0000290000000e0a0000290000000f080000290000841f0080008c0000005b0000213d0000000008a80436000000010dd000390000000202d00367000000000202043b000000f802200270000000000a01001900000b230002013e000000020ee0008c0000005b0000413d000003600100043d000000000001004b000006bc0000c13d000f00000008001d000e0000000a001d00100000000e001d00110000000d001d00000d69010000410000000000100443000000000100041400000d410010009c00000d4101008041000000c00110021000000d64011001c70000800b020000392c872c7d0000040f0000000100200190000026e00000613d000000000101043b000003600010043f000000110d000029000000100e0000290000000e0a0000290000000f080000290000841f0080008c0000005b0000213d0000000008a80436000000010dd000390000000202d00367000000000202043b000000f802200270000000000a01001900000b230002013e000000020ee0008c0000005b0000413d000003800100043d000000000001004b000006df0000c13d000f00000008001d000e0000000a001d00100000000e001d00110000000d001d00000d68010000410000000000100443000000000100041400000d410010009c00000d4101008041000000c00110021000000d64011001c70000800b020000392c872c7d0000040f0000000100200190000026e00000613d000000000101043b000003800010043f000000110d000029000000100e0000290000000e0a0000290000000f080000290000841f0080008c0000005b0000213d0000000008a80436000000010dd000390000000202d00367000000000202043b000000f802200270000000000a01001900000b230002013e000000020ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000008a8043600000d670a000041000000010dd000390000000201d00367000000000101043b000000f80110027000000b230001013e000000020ee0008c0000005b0000413d000003a00100043d000000000001004b0000070d0000c13d000f00000008001d000e0000000a001d00100000000e001d00110000000d001d00000d66010000410000000000100443000000000100041400000d410010009c00000d4101008041000000c00110021000000d64011001c70000800b020000392c872c7d0000040f0000000100200190000026e00000613d000000000101043b000003a00010043f000000110d000029000000100e0000290000000e0a0000290000000f080000290000841f0080008c0000005b0000213d0000000008a80436000000010dd000390000000202d00367000000000202043b000000f802200270000000000a01001900000b230002013e000000020ee0008c0000005b0000413d000003c00100043d000000000001004b000007300000c13d000f00000008001d000e0000000a001d00100000000e001d00110000000d001d00000d65010000410000000000100443000000000100041400000d410010009c00000d4101008041000000c00110021000000d64011001c70000800b020000392c872c7d0000040f0000000100200190000026e00000613d000000000101043b000003c00010043f000000110d000029000000100e0000290000000e0a0000290000000f080000290000841f0080008c0000005b0000213d0000000008a80436000000010dd000390000000202d00367000000000202043b000000f802200270000000000a01001900000b230002013e000000050ee0008c0000005b0000413d000f00000008001d000e0000000a001d00100000000e001d00110000000d001d00000d5901000041000000000010044300000000010004100000000400100443000000000100041400000d410010009c00000d4101008041000000c00110021000000d58011001c70000800a020000392c872c7d0000040f0000000100200190000026e00000613d0000000f080000290000841f0080008c000000110d000029000000100e0000290000000e020000290000005b0000213d000000000a01043b0000000008280436000000010dd000390000000202d00367000000000202043b000000f80220027000000b230002013e000000020ee0008c0000005b0000413d000003e00100043d000000000001004b000007730000c13d000f00000008001d000e0000000a001d00100000000e001d00110000000d001d00000d63010000410000000000100443000000000100041400000d410010009c00000d4101008041000000c00110021000000d64011001c70000800b020000392c872c7d0000040f0000000100200190000026e00000613d000000000101043b000003e00010043f000000110d000029000000100e0000290000000e0a0000290000000f080000290000841f0080008c0000005b0000213d0000000008a80436000000010dd000390000000202d00367000000000202043b000000f802200270000000000a01001900000b230002013e000000020ee0008c0000005b0000413d000004400080008c0000005b0000413d000000010dd00039000000200880008a000000000a0804330000000201d00367000000000101043b000000f80110027000000b230001013e0000000301e0008c0000005b0000413d000004400080008c0000005b0000413d00000d6200a0009c0000005b0000213d0000003f02a000390000000502200270000084600500043d000000000352004b00000000040000190000079d0000a13d00000000045500a9000000090440027000000000052200a900000009055002700000000004450049000084600020043f00000003023000c90000000004240019000000000041004b0000005b0000413d000000000e410049000000010dd000390000848001a00039000000000a0104330000000201d00367000000000101043b000000f80110027000000b230001013e0000000301e0008c0000005b0000413d000000200280008a000004400020008c0000005b0000413d00000d6200a0009c0000005b0000213d0000000003020433000000400880008a00000000020804330000003f04a000390000000504400270000084600700043d000000000674004b0000000005000019000007bf0000a13d00000000057700a9000000090550027000000000074400a900000009077002700000000005570049000084600040043f00000003046000c90000000005450019000000000051004b0000005b0000413d0000848004a000390000000000340435000000000e510049000000010dd000390000000201d00367000000000101043b000000f801100270000000000a02001900000b230001013e0000000301e0008c0000005b0000413d000000200280008a000004400020008c0000005b0000413d00000d6000a0009c0000005b0000213d0000000003020433000000400880008a00000000020804330000002004a000390000000505400270000084600700043d000000000675004b0000000004000019000007e20000a13d00000000047700a9000000090440027000000000075500a900000009077002700000000004470049000084600050043f00000003056000c90000000004540019000000000041004b0000005b0000413d000000f8033002100000848005a00039000000000605043300000d6106600197000000000336019f0000000000350435000000000e410049000000010dd000390000000201d00367000000000101043b000000f801100270000000000a02001900000b230001013e000d006400e000940000005b0000413d000004400080008c0000005b0000413d000f00000008001d00100000000e001d00110000000d001d00000d5b01000041000000000010043f0000000100a0043f000000000100041400000d410010009c00000d4101008041000000c00110021000000d5f011001c70000801302000039000e0000000a001d2c872c7d0000040f0000000e0a0000290000000100200190000026e10000613d00000d47001001980000080f0000613d000000000a0a041a000000110d000029000000010dd000390000000201d00367000000000101043b000000f8011002700000000d0e0000290000000f0800002900000b230001013e0000000d01000029000007d00010008c0000005b0000413d00000000020a041a00000d4b01000041000000000010043f0000000100a0043f000e00000002001d000000210020043f0000000001000414000000c00110021000000d5e011001c7000080130200003900000000030000190000000004000019000000000500001900000000060000192c872c780000040f0000000100200190000026e10000613d000000100e000029000008340ee0008a00000d4700100198000300000001c355000000110d000029000000010dd000390000000201d00367000000000101043b000000f8011002700000000e0a0000290000000f0800002900000b230001013e000000000075004b000008350000c13d000000000007004b0000000003040019000008350000613d0000000003020019000000000e3e004b0000005b0000413d000000000016041b0000000201d00367000000000101043b000000f8011002700000000b0a00002900000b230001013e000008fd00e0008c0000005b0000413d000000200180008a000004400010008c0000005b0000413d00100000000e001d00110000000d001d0000000001010433000d00000001001d000000400880008a000f00000008001d0000000001080433000b00000001001d00000000020a041a00000d4b01000041000000000010043f0000000100a0043f000c00000002001d000000210020043f0000000001000414000000c00110021000000d5e011001c700008013020000390000000003000019000000000400001900000000050000190000000006000019000e0000000a001d2c872c780000040f0000000e060000290000000100200190000026e10000613d000000110d000029000000010dd0003900000d47001001980000138802000039000056540400003900000898030000390000000c0700002900000000050700190000086b0000613d000000000501043b000300000001035500000b540200003900004e200400003900000064030000390000000d01000029000000000071004b000000100e0000290000000f080000290000082f0000c13d000000000e3e00490000000201d00367000000000101043b000000f8011002700000000b0a00002900000b230001013e000000090ee0008c0000005b0000413d000004400080008c0000005b0000413d00000d5c00a0009c0000005b0000213d000000200880008a00000000010804330000000202a00367000000000202043b00000d550220019700000d5d0020009c0000005b0000c13d000000010da000390000000202d00367000000000202043b000000f802200270000000000a01001900000b230002013e0000000a01e0008c0000005b0000413d000000200380008a000004400030008c0000005b0000413d000000400880008a00000000020804330000000003030433000000000003004b000008a30000613d00000d5c00a0009c0000005b0000213d0000000203a00367000000000303043b00000d550330019700000d5d0030009c0000005b0000c13d000000000001004b0000005b0000613d000000010da000390000000b0ee0008a0000000201d00367000000000101043b000000f801100270000000000a02001900000b230001013e000000010dd000390000000203d00367000000000303043b000000f803300270000000000a020019000000000e01001900000b230003013e000000020ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000008a804360000000101d000390000000202100367000000000202043b000000f802200270000000000a0d0019000000000d01001900000b230002013e000000020ee0008c0000005b0000413d0000841f0080008c0000005b0000213d000084600100043d0000000008a80436000000010dd00039000000050a1002100000000201d00367000000000101043b000000f80110027000000b230001013e000000020ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000008a80436000000010dd000390000000201d00367000000000101043b000000f801100270000000000a0e001900000b230001013e00000000000e004b0000005b0000613d000000010dd00039000000010ee0008a0000000201d00367000000000101043b000000f80110027000000b230001013e000000640ee0008c0000005b0000413d000004400080008c0000005b0000413d000000010dd00039000000000a0a04460000000201d00367000000000101043b000000f80110027000000b230001013e000000640ee0008c0000005b0000413d000000200180008a000004400010008c0000005b0000413d0000000001010433000000400880008a000000000208043300000000001a0447000000010dd000390000000201d00367000000000101043b000000f801100270000000000a02001900000b230001013e0000000303e0008c0000005b0000413d000000400580008a000004400050008c0000005b0000413d000000600180008a0000000002010433000000200480008a00000000040404330000000005050433000000000005004b00000000060000190000000007000019000009030000613d00000d7806500167000000000064004b0000005b0000213d00000000006a004b0000005b0000213d0000000007a500190000000006450019000000000076004b000000000607a019000000000006004b0000000007000019000009180000613d00000d450060009c0000005b0000213d0000001f066000390000000506600270000084600900043d000000000896004b0000000007000019000009180000a13d00000000079900a9000000090770027000000000096600a900000009099002700000000007790049000084600060043f00000003068000c900000000076700190000001f06500039000000050660027000000003066000c90000000006670019000000000e63004b0000005b0000413d00000d79075001970000001f0650018f0000848005a000390000848003400039000000000053004b000009330000813d000000000007004b000009300000613d00000000086300190000000004650019000000200440008a000000200880008a0000000009740019000000000a780019000000000a0a04330000000000a90435000000200770008c0000092a0000c13d000000000006004b0000093f0000c13d000009490000013d0000000004750019000000000007004b0000093b0000613d000000000803001900000000890804340000000005950436000000000045004b000009370000c13d000000000006004b000009490000613d000000000373001900000000050400190000000304600210000000000605043300000000064601cf000000000646022f00000000030304330000010004400089000000000343022f00000000034301cf000000000363019f0000000000350435000000010dd000390000000203d00367000000000303043b000000f803300270000000000a020019000000000801001900000b230003013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a80436000000020dd00039000000f80a1002700000000201d00367000000000101043b000000f80110027000000b230001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a80436000000030dd00039000000f00a1002700000000201d00367000000000101043b000000f80110027000000b230001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a80436000000040dd00039000000e80a1002700000000201d00367000000000101043b000000f80110027000000b230001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a80436000000050dd00039000000e00a1002700000000201d00367000000000101043b000000f80110027000000b230001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a80436000000060dd00039000000d80a1002700000000201d00367000000000101043b000000f80110027000000b230001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a80436000000070dd00039000000d00a1002700000000201d00367000000000101043b000000f80110027000000b230001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a80436000000080dd00039000000c80a1002700000000201d00367000000000101043b000000f80110027000000b230001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a80436000000090dd00039000000c00a1002700000000201d00367000000000101043b000000f80110027000000b230001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a804360000000a0dd00039000000b80a1002700000000201d00367000000000101043b000000f80110027000000b230001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a804360000000b0dd00039000000b00a1002700000000201d00367000000000101043b000000f80110027000000b230001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a804360000000c0dd00039000000a80a1002700000000201d00367000000000101043b000000f80110027000000b230001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a804360000000d0dd00039000000a00a1002700000000201d00367000000000101043b000000f80110027000000b230001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a804360000000e0dd00039000000980a1002700000000201d00367000000000101043b000000f80110027000000b230001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a804360000000f0dd00039000000900a1002700000000201d00367000000000101043b000000f80110027000000b230001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a80436000000100dd00039000000880a1002700000000201d00367000000000101043b000000f80110027000000b230001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a80436000000110dd00039000000800a1002700000000201d00367000000000101043b000000f80110027000000b230001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a80436000000120dd00039000000780a1002700000000201d00367000000000101043b000000f80110027000000b230001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a80436000000130dd00039000000700a1002700000000201d00367000000000101043b000000f80110027000000b230001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a80436000000140dd00039000000680a1002700000000201d00367000000000101043b000000f80110027000000b230001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a80436000000150dd00039000000600a1002700000000201d00367000000000101043b000000f80110027000000b230001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a80436000000160dd00039000000580a1002700000000201d00367000000000101043b000000f80110027000000b230001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a80436000000170dd00039000000500a1002700000000201d00367000000000101043b000000f80110027000000b230001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a80436000000180dd00039000000480a1002700000000201d00367000000000101043b000000f80110027000000b230001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a80436000000190dd00039000000400a1002700000000201d00367000000000101043b000000f80110027000000b230001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a804360000001a0dd00039000000380a1002700000000201d00367000000000101043b000000f80110027000000b230001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a804360000001b0dd00039000000300a1002700000000201d00367000000000101043b000000f80110027000000b230001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a804360000001c0dd00039000000280a1002700000000201d00367000000000101043b000000f80110027000000b230001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a804360000001d0dd00039000000200a1002700000000201d00367000000000101043b000000f80110027000000b230001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a804360000001e0dd00039000000180a1002700000000201d00367000000000101043b000000f80110027000000b230001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a804360000001f0dd00039000000100a1002700000000201d00367000000000101043b000000f80110027000000b230001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a80436000000200dd00039000000080a1002700000000201d00367000000000101043b000000f80110027000000b230001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a80436000000210dd000390000000203d00367000000000303043b000000f803300270000000000a01001900000b230003013e000000030ee0008c0000005b0000413d000084200180008a00000d7a0010009c0000005b0000413d0000000008a80436000000010dd000390000000202d00367000000000202043b000000f80220027000000b230002013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d000000200180008a000004400010008c0000005b0000413d0000000008a80436000000010dd00039000000000a0104330000000201d00367000000000101043b000000f80110027000000b230001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d000000400180008a000004400010008c0000005b0000413d0000000008a80436000000010dd00039000000000a0104330000000201d00367000000000101043b000000f80110027000000b230001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d000000600180008a000004400010008c0000005b0000413d0000000008a80436000000010dd00039000000000a0104330000000201d00367000000000101043b000000f80110027000000b230001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d000000800180008a000004400010008c0000005b0000413d0000000008a80436000000010dd00039000000000a0104330000000201d00367000000000101043b000000f80110027000000b230001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d000000a00180008a000004400010008c0000005b0000413d0000000008a80436000000010dd00039000000000a0104330000000201d00367000000000101043b000000f80110027000000b230001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d000000c00180008a000004400010008c0000005b0000413d0000000008a80436000000010dd00039000000000a0104330000000204d00367000000000404043b000000f80440027000000b230004013e0000000301e0008c0000005b0000413d0000841f0080008c0000005b0000213d000000e00280008a000004400020008c0000005b0000413d0000000008a80436000000010dd00039000000000a0204330000000205d00367000000000505043b000000f805500270000000000e01001900000b230005013e0000000301e0008c0000005b0000413d0000841f0080008c0000005b0000213d000001000280008a000004400020008c0000005b0000413d0000000008a80436000000010dd00039000000000a0204330000000205d00367000000000505043b000000f805500270000000000e01001900000b230005013e0000000301e0008c0000005b0000413d0000841f0080008c0000005b0000213d000001200280008a000004400020008c0000005b0000413d0000000008a80436000000010dd00039000000000a0204330000000205d00367000000000505043b000000f805500270000000000e01001900000b230005013e0000000301e0008c0000005b0000413d0000841f0080008c0000005b0000213d000001400280008a000004400020008c0000005b0000413d0000000008a80436000000010dd00039000000000a0204330000000205d00367000000000505043b000000f805500270000000000e01001900000b230005013e0000000301e0008c0000005b0000413d0000841f0080008c0000005b0000213d000001600280008a000004400020008c0000005b0000413d0000000008a80436000000010dd00039000000000a0204330000000205d00367000000000505043b000000f805500270000000000e01001900000b230005013e0000000301e0008c0000005b0000413d0000841f0080008c0000005b0000213d000001800280008a000004400020008c0000005b0000413d0000000008a80436000000010dd00039000000000a0204330000000205d00367000000000505043b000000f805500270000000000e01001900000b230005013e0000000301e0008c0000005b0000413d0000841f0080008c0000005b0000213d000001a00280008a000004400020008c0000005b0000413d0000000008a80436000000010dd00039000000000a0204330000000205d00367000000000505043b000000f805500270000000000e01001900000b230005013e0000000301e0008c0000005b0000413d0000841f0080008c0000005b0000213d000001c00280008a000004400020008c0000005b0000413d0000000008a80436000000010dd00039000000000a0204330000000205d00367000000000505043b000000f805500270000000000e01001900000b230005013e0000000301e0008c0000005b0000413d0000841f0080008c0000005b0000213d000001e00280008a000004400020008c0000005b0000413d0000000008a80436000000010dd00039000000000a0204330000000205d00367000000000505043b000000f805500270000000000e01001900000b230005013e0000000301e0008c0000005b0000413d000000200280008a000004400020008c0000005b0000413d00000000030204330000000000a20435000000010dd000390000000204d00367000000000404043b000000f804400270000000000a030019000000000e01001900000b230004013e0000000301e0008c0000005b0000413d000000400280008a000004400020008c0000005b0000413d00000000030204330000000000a20435000000010dd000390000000204d00367000000000404043b000000f804400270000000000a030019000000000e01001900000b230004013e0000000301e0008c0000005b0000413d000000600280008a000004400020008c0000005b0000413d00000000030204330000000000a20435000000010dd000390000000204d00367000000000404043b000000f804400270000000000a030019000000000e01001900000b230004013e0000000301e0008c0000005b0000413d000000800280008a000004400020008c0000005b0000413d00000000030204330000000000a20435000000010dd000390000000204d00367000000000404043b000000f804400270000000000a030019000000000e01001900000b230004013e0000000301e0008c0000005b0000413d000000a00280008a000004400020008c0000005b0000413d00000000030204330000000000a20435000000010dd000390000000204d00367000000000404043b000000f804400270000000000a030019000000000e01001900000b230004013e0000000301e0008c0000005b0000413d000000c00280008a000004400020008c0000005b0000413d00000000030204330000000000a20435000000010dd000390000000204d00367000000000404043b000000f804400270000000000a030019000000000e01001900000b230004013e0000000301e0008c0000005b0000413d000000e00280008a000004400020008c0000005b0000413d00000000030204330000000000a20435000000010dd000390000000204d00367000000000404043b000000f804400270000000000a030019000000000e01001900000b230004013e0000000301e0008c0000005b0000413d000001000280008a000004400020008c0000005b0000413d00000000030204330000000000a20435000000010dd000390000000204d00367000000000404043b000000f804400270000000000a030019000000000e01001900000b230004013e0000000301e0008c0000005b0000413d000001200280008a000004400020008c0000005b0000413d00000000030204330000000000a20435000000010dd000390000000204d00367000000000404043b000000f804400270000000000a030019000000000e01001900000b230004013e0000000301e0008c0000005b0000413d000001400280008a000004400020008c0000005b0000413d00000000030204330000000000a20435000000010dd000390000000204d00367000000000404043b000000f804400270000000000a030019000000000e01001900000b230004013e0000000301e0008c0000005b0000413d000001600280008a000004400020008c0000005b0000413d00000000030204330000000000a20435000000010dd000390000000204d00367000000000404043b000000f804400270000000000a030019000000000e01001900000b230004013e0000000301e0008c0000005b0000413d000001800280008a000004400020008c0000005b0000413d00000000030204330000000000a20435000000010dd000390000000204d00367000000000404043b000000f804400270000000000a030019000000000e01001900000b230004013e0000000301e0008c0000005b0000413d000001a00280008a000004400020008c0000005b0000413d00000000030204330000000000a20435000000010dd000390000000204d00367000000000404043b000000f804400270000000000a030019000000000e01001900000b230004013e0000000301e0008c0000005b0000413d000001c00280008a000004400020008c0000005b0000413d00000000030204330000000000a20435000000010dd000390000000204d00367000000000404043b000000f804400270000000000a030019000000000e01001900000b230004013e0000000301e0008c0000005b0000413d000001e00280008a000004400020008c0000005b0000413d00000000030204330000000000a20435000000010dd000390000000204d00367000000000404043b000000f804400270000000000a030019000000000e01001900000b230004013e0000000301e0008c0000005b0000413d000002000280008a000004400020008c0000005b0000413d00000000030204330000000000a20435000000010dd000390000000204d00367000000000404043b000000f804400270000000000a030019000000000e01001900000b230004013e0000017706e0008c0000005b0000413d000000200180008a000004400010008c0000005b0000413d000000400780008a00000000080704330000000001010433000000000001004b0000000003000019000000000200001900000cfb0000613d00000d780210016700000000002a004b0000005b0000213d0000000002a1001900000d450020009c0000005b0000213d0000001f022000390000000502200270000084600500043d000000000352004b000000000400001900000cf60000a13d00000000045500a9000000090440027000000000052200a900000009055002700000000004450049000084600020043f00000003023000c9000000000424001900000003021002100000000003240019000000000036004b0000005b0000413d0000848002a00039000d00000003001d000e00000008001d000f00000007001d001000000006001d00110000000d001d00000d410010009c00000d4101008041000000600110021000000d410020009c00000d41020080410000004002200210000000000112019f000000000200041400000d410020009c00000d4102008041000000c002200210000000000121019f00000d4b011001c70000800d0200003900000000030000192c872c780000040f0000000100200190000026e10000613d0000000d02000029000000100e2000690000001102000029000000010d2000390000000203d00367000000000303043b000000f8033002700000000e0a0000290000000f0800002900000b230003013e0000017707e0008c0000005b0000413d000000400180008a000004400010008c0000005b0000413d0000000004010433000000200180008a0000000001010433000000000001004b00000d410000613d00000d780210016700000000002a004b0000005b0000213d0000000002a1001900000d450020009c0000005b0000213d0000001f022000390000000502200270000084600600043d000000000362004b000000000500001900000d3a0000a13d00000000056600a9000000090550027000000000062200a900000009066002700000000005560049000084600020043f00000003023000c9000000000525001900000003021002100000000002520019001001770020003d000000100070006c0000005b0000413d0000848002a0003900000d450000013d000001770070008c001001770000003d00000000020000190000005b0000413d000f00000007001d00110000000d001d00000d410010009c00000d4101008041000000600110021000000d410020009c00000d41020080410000004002200210000000000112019f000000600280008a000e00000002001d0000000002020433000d00000002001d000000000200041400000d410020009c00000d4102008041000000c002200210000000000112019f00000d4b011001c70000800d0200003900000001030000392c872c780000040f0000000100200190000026e10000613d00000010020000290000000f0e2000690000001102000029000000010d2000390000000203d00367000000000303043b000000f8033002700000000d0a0000290000000e0800002900000b230003013e0000017709e0008c0000005b0000413d000000600180008a000004400010008c0000005b0000413d000000400280008a0000000004020433000000200280008a0000000002020433000000000002004b00000d8d0000613d00000d780320016700000000003a004b0000005b0000213d0000000003a2001900000d450030009c0000005b0000213d0000001f033000390000000503300270000084600700043d000000000573004b000000000600001900000d860000a13d00000000067700a9000000090660027000000000073300a900000009077002700000000006670049000084600030043f00000003035000c9000000000636001900000003032002100000000003630019001002ee0030003d000000100090006c0000005b0000413d0000848003a0003900000d910000013d000002ee0090008c001002ee0000003d00000000030000190000005b0000413d000f00000009001d00110000000d001d00000d410020009c00000d4102008041000000600220021000000d410030009c00000d41030080410000004003300210000000000223019f0000000005010433000000800180008a000e00000001001d0000000001010433000d00000001001d000000000100041400000d410010009c00000d4101008041000000c001100210000000000121019f00000d4b011001c70000800d0200003900000002030000392c872c780000040f0000000100200190000026e10000613d00000010020000290000000f0e2000690000001102000029000000010d2000390000000203d00367000000000303043b000000f8033002700000000d0a0000290000000e0800002900000b230003013e0000017709e0008c0000005b0000413d000000800180008a000004400010008c0000005b0000413d000000400280008a0000000004020433000000200280008a0000000002020433000000000002004b00000dda0000613d00000d780320016700000000003a004b0000005b0000213d0000000003a2001900000d450030009c0000005b0000213d0000001f033000390000000503300270000084600700043d000000000573004b000000000600001900000dd30000a13d00000000067700a9000000090660027000000000073300a900000009077002700000000006670049000084600030043f00000003035000c9000000000636001900000003032002100000000003630019001004650030003d000000100090006c0000005b0000413d0000848003a0003900000dde0000013d000004650090008c001004650000003d00000000030000190000005b0000413d000f00000009001d00110000000d001d00000d410020009c00000d4102008041000000600220021000000d410030009c00000d41030080410000004003300210000000000223019f0000000006010433000000600180008a0000000005010433000000a00180008a000e00000001001d0000000001010433000d00000001001d000000000100041400000d410010009c00000d4101008041000000c001100210000000000121019f00000d4b011001c70000800d0200003900000003030000392c872c780000040f0000000100200190000026e10000613d00000010020000290000000f0e2000690000001102000029000000010d2000390000000203d00367000000000303043b000000f8033002700000000d0a0000290000000e0800002900000b230003013e0000017709e0008c0000005b0000413d000000a00180008a000004400010008c0000005b0000413d000000400280008a0000000004020433000000200280008a0000000002020433000000000002004b00000e290000613d00000d780320016700000000003a004b0000005b0000213d0000000003a2001900000d450030009c0000005b0000213d0000001f033000390000000503300270000084600700043d000000000573004b000000000600001900000e220000a13d00000000067700a9000000090660027000000000073300a900000009077002700000000006670049000084600030043f00000003035000c9000000000636001900000003032002100000000003630019001005dc0030003d000000100090006c0000005b0000413d0000848003a0003900000e2d0000013d000005dc0090008c001005dc0000003d00000000030000190000005b0000413d000f00000009001d00110000000d001d00000d410020009c00000d4102008041000000600220021000000d410030009c00000d41030080410000004003300210000000000223019f0000000007010433000000800180008a0000000006010433000000600180008a0000000005010433000000c00180008a000e00000001001d0000000001010433000d00000001001d000000000100041400000d410010009c00000d4101008041000000c001100210000000000121019f00000d4b011001c70000800d0200003900000004030000392c872c780000040f0000000100200190000026e10000613d00000010020000290000000f0e2000690000001102000029000000010d2000390000000203d00367000000000303043b000000f8033002700000000d0a0000290000000e0800002900000b230003013e00007d0004e0008c0000005b0000413d000000400180008a000004400010008c0000005b0000413d0000000002010433001000000001001d000000200180008a000000000101043300000000030a00190000000005000019000000000600001900110000000d001d2c872b480000040f0000001103000029000000010d300039000000000a0200190000000204d00367000000000404043b000000f8044002700000001008000029000000000e01001900000b230004013e000000c00180008a000b00000001001d000004400010008c0000005b0000413d000000a00180008a0000000007010433000000800180008a0000000006010433000000600180008a0000000001010433000c00000001001d000000400180008a0000000001010433000d00000001001d000000200180008a00000000010104330000000b020000290000000003020433000000000003004b000000000200001900000e850000613d00000d7802300167000000000027004b0000005b0000213d00000000040300190000000002740019000700000003001d000000000006004b000000000300001900000e8d0000613d00000d78036001670000000c0030006b0000005b0000213d0000000c03600029000000000032004b000000000203a019000000000002004b000000000500001900000ea20000613d00000d450020009c0000005b0000213d0000001f022000390000000502200270000084600400043d000000000342004b000000000500001900000ea20000a13d00000000044400a9000000090440027000000000052200a900000009055002700000000004450049000084600020043f00000003023000c90000000005240019000900000005001d000800000007001d000600000006001d00100000000e001d00110000000d001d00000d4601100197000f00000001001d000000000010043f0000000001000414000000c00110021000000d43011001c700008013020000390000000003000019000000000400001900000000050000190000000006000019000e0000000a001d2c872c780000040f00000001002001900000000d02000029000026e10000613d00000d4700100198000000640100003900000a28010060390000000901100029000000000002004b00000ef80000613d000900000001001d00000d570100004100000000001004430000000f010000290000000400100443000000000100041400000d410010009c00000d4101008041000000c00110021000000d58011001c700008002020000392c872c7d0000040f0000000100200190000026e00000613d00000009020000290000232804200039000000000101043b000000000001004b00000ef90000c13d000500000004001d00000d590100004100000000001004430000000f010000290000000400100443000000000100041400000d410010009c00000d4101008041000000c00110021000000d58011001c70000800a020000392c872c7d0000040f0000000100200190000026e00000613d000000000101043b000000000001004b000000050400002900000ef90000c13d00000d5a01000041000000000010043f0000000f01000029000000040010043f000000000100041400000d410010009c00000d4101008041000000c00110021000000d49011001c700008003020000392c872c7d0000040f0000000100200190000026e10000613d000000000201043b0003000000010355000000000002004b0000000f02000029000000050400002900000efa0000c13d0000000901000029000084d00410003900000efa0000013d00000000040100190000000f0200002900100010004000730000005b0000413d00000d4801000041000000000010043f000000040020043f000000000100041400000d410010009c00000d4101008041000000c00110021000000d49011001c700008002020000392c872c7d0000040f0000001004000029000000060340027000000000033400490000000e0030006c0000000e03008029000008fc043000390000000d0c00002900000000000c004b000e00000003001d000000000904001900000000090360190000000100200190000026e10000613d0000000c0200002900008480082000390000000802000029000084800d200039000000000201043b000300000001035500000d4a0120019700000d4b0010009c00000f440000c13d000900000008001d000c0000000d001d00000000000c004b00000f570000613d000500000004001d000800000009001d00000d5901000041000000000010044300000000010004100000000400100443000000000100041400000d410010009c00000d4101008041000000c00110021000000d58011001c70000800a020000392c872c7d0000040f0000000100200190000026e00000613d000000000101043b0000000d0010006c0000000809000029000000050300002900000f570000813d0000000401000367000000600210027000000d410220019700040000002103e5000004000000043f0000000e020000290000001001200069000000000e3100190000001102000029000000010d2000390000000203d00367000000000303043b000000f803300270000000000a0000190000000b0800002900000b230003013e0000000f0f0000290000000401f0008a000000040010008c000000060e00a02900000c2d0001a13e00000bb8050000390000000100f0008c000000110b000029000000060e000029000010680000613d0000000200f0008c000010310000c13d0000001f01e0003900000005011002700000000c011000c90000003c05100039000000000159004b0000106a0000413d000010c20000013d00000d5401000041000000000010043f000000200090043f0000000001000414000000c00110021000000d51011001c7000080130200003900000000030000190000000004000019000000000500001900000000060000192c872c780000040f0000000d030000290000000100200190000026e10000613d000000090100002900000d410010009c00000d41010080410000004001100210000000060200002900000d410020009c00000d41020080410000006002200210000000000112019f000000000200041400000d410020009c00000d4102008041000000c002200210000000000112019f000000000003004b00000f7b0000613d00000d4b011001c700008009020000390000000f04000029000000000500001900000f7c0000013d0000000f020000292c872c780000040f000000020300036700040000000303550002000000010355000000600410027000000d4105400197000000200450008c000026e10000413d000000000b01043b000000070040006c000000000704001900000f8c0000413d00000007070000290000002006700039000000000056004b000026e10000213d00000d79067001980000001f0770018f00000020011003700000000c0a00002900000000056a001900000f970000613d000000000801034f000000008908043c000000000a9a043600000000005a004b00000f930000c13d000000000007004b00000fa40000613d000000000661034f0000000307700210000000000805043300000000087801cf000000000878022f000000000606043b0000010007700089000000000676022f00000000067601cf000000000686019f0000000000650435000004000040043f00040000000103550002000000030355000000010a0000390000000100200190000011360000c13d00000d5201000041000000000010043f0000000001000414000000c00110021000000d53011001c700008013020000390000000003000019000000000400001900000000050000190000000006000019000f0000000b001d2c872c780000040f0000000f0b0000290000000100200190000000000a000019000011360000c13d000026e10000013d00000000038e001900000000010804330000000c02000029000084a002200039000000000032004b000000110b00002900000fcb0000a13d000000000083004b0000000004080019000000000403201900000000044200490000000304400210000000000141022f00000000014101cf000000ff0040008c000000000100201900000000040204330000000c05000029000084c005500039000000000035004b00000fd80000a13d000000000023004b000000000203201900000000022500490000000302200210000000000424022f00000000042401cf000000ff0020008c000000000400201900000000020504330000000c06000029000084e006600039000000000036004b00000fe50000a13d000000000053004b000000000503201900000000055600490000000305500210000000000252022f00000000025201cf000000ff0050008c000000000200201900000d4c05000041000000200010008c000010680000213d000000200040008c000010680000213d000000200020008c000010680000213d00000000066100190000000075060434000000000037004b00000ff80000a13d000000000063004b000000000306a01900000000033700490000000303300210000000000535022f00000000053501cf000000ff0030008c0000000005002019000000000004004b000010b30000613d0000000303400210000001000330008900000000043502310000000003000019000010b40000613d00000d4d0040009c00000000030000390000008003002039000000000434022f00000d4c0040009c00000000050000390000004005002039000000000454022f00000d410040009c00000000060000390000002006002039000000000464022f0000ffff0040008c00000000070000390000001007002039000000000474022f000000ff0040008c000900000008001d00000000080000390000000808002039000000000484022f0000000f0040008c000800000009001d00000000090000390000000409002039000000000494022f000000030040008c000000000a000039000000020a0020390000000004a4022f000000010040008c00000001033021bf000000000353019f000000000363019f000000000373019f000000000383019f0000000908000029000000000393019f00000008090000290000000003a3019f000010b40000013d0000001f01e00039000000050110027000000003011000c90000000f05100039000010670000013d000000c001e0011a000084d0011000c90000afc805100039000010670000013d000c0000000d001d00000000000f004b0000000003000039000000010300603900000d4f0020019800000001033061bf00000000000c004b00000000010000390000000101006039000800000003001d000000000031017000000005039000c9000001f40330c03900000d410080009c00000d4108008041000000400180021000000d4100e0009c00000d410e0080410000006002e00210000000000112019f00000d410030009c00000d4103008041000900000003001d000000c002300210000000000112019f0000000002000414000600000002001d00000000000c004b000010780000613d00000d4b011001c7000080090200003900000000030c001900000000040f001900000000050000192c872c780000040f000000600310027000000d4103300197000000070030006c000000070400002900000000040340190000001f0540018f00000d4e064001980000000c090000290000000004690019000010890000613d000000000701034f000000007807043c0000000009890436000000000049004b0000105f0000c13d000010890000013d0000009605000039000010670000013d0000177005000039000000110b000029000000000159004b000010c20000813d0000000401000367000000600210027000000d410220019700040000002103e5000004000000043f0000000e02000029000000100e200069000000010db000390000000203d00367000000000303043b000000f803300270000000000a0000190000000b0800002900000b230003013e00000000020f00192c872c780000040f000000600310027000000d4103300197000000070030006c000000070400002900000000040340190000001f0540018f00000d4e064001980000000c090000290000000004690019000010890000613d000000000701034f000000007807043c0000000009890436000000000049004b000010850000c13d000000000005004b000010960000613d000000000661034f0000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f0000000000540435000000110d0000290000001005000029000000080600002900000006070000290000000004000414000000000447004b00000000040040190004000000010355000004000030043f0000000100600190000010a60000613d0000000d0000006b0000000901000029000001f40110608a0000000004000019000010a70000013d0000000901000029000000000341004b0000000001000019000000050130211a000000010a20018f0000000e0250006a000000000e120019000000010dd000390000000201d00367000000000101043b000000f8011002700000000b0800002900000b230001013e0000000003000019000000000012004b000000000201a0190000000701200039000000030110027000000000011100a9000000010030008c000000010300a03900000000013100a90000ffff0110018f000000030510011a000000c80050008c000000c80500a039000000000159004b0000106a0000413d000900000001001d000c0000000d001d00000040018002100000006002e00210000000000112019f0000000002000414000000c002200210000000000121019f00000000000c004b000011010000613d00000d5b011001c7000080090200003900000000030c001900000000040f0019000000000500001900000000060000192c872c780000040f000000600310027000000d4103300197000000070000006b000000010220018f000011300000613d000000000002004b000011300000613d000000070030006c000000070200002900000000020340190000001f0420018f00000d4e052001980000000c080000290000000002580019000010e70000613d000000000601034f000000006706043c0000000008780436000000000028004b000010e30000c13d000000000004004b000000110d000029000010f50000613d000000000551034f0000000304400210000000000602043300000000064601cf000000000646022f000000000505043b0000010004400089000000000545022f00000000044501cf000000000464019f00000000004204350004000000010355000004000030043f000000010a0000390000000e020000290000001001200069000000090e100029000000010dd000390000000201d00367000000000101043b000000f8011002700000000b0800002900000b230001013e00000000020f00192c872c780000040f000000600310027000000d4103300197000000070030006c000000070400002900000000040340190000001f0540018f00000d4e064001980000000c090000290000000004690019000011120000613d000000000701034f000000007807043c0000000009890436000000000049004b0000110e0000c13d000000000005004b0000111f0000613d000000000661034f0000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f00000000005404350004000000010355000004000030043f0000000100200190000000000a000019000000000b000019000011360000613d000000010a0000390000000e020000290000001001200069000000090e100029000000110d000029000000010dd000390000000201d00367000000000101043b000000f8011002700000000b0800002900000b230001013e0004000000010355000004000030043f000000000002004b000000000a000019000000000b000019000011250000c13d0000000e020000290000001001200069000000000eb10019000000110d000029000000010dd000390000000201d00367000000000101043b000000f8011002700000000b0800002900000b230001013e000000200280008a000004400020008c0000005b0000413d00000000010e00190000000002020433000000000002004b0000157f0000613d00000d780420016700000000004a004b0000005b0000213d0000000004a2001900000d450040009c0000005b0000213d0000001f044000390000000504400270000084600700043d000000000574004b00000000060000190000115b0000a13d00000000067700a9000000090660027000000000074400a900000009077002700000000006670049000084600040043f00000003045000c90000000006460019000060000020008c0000005b0000213d000000000161004b0000005b0000413d0000848003a00039000000000403043300000d550440019700000d560040009c0000005b0000613d000015810000013d000000a00180008a000c00000001001d000004400010008c0000005b0000413d000000800180008a0000000007010433000000600180008a0000000006010433000000400180008a0000000001010433000f00000001001d000000200180008a00000000010104330000000c020000290000000003020433000000000003004b00000000020000190000117c0000613d00000d7802300167000000000027004b0000005b0000213d00000000040300190000000002740019000800000003001d000000000006004b0000000003000019000011840000613d00000d78036001670000000f0030006b0000005b0000213d0000000f03600029000000000032004b000000000203a019000000000002004b0000000005000019000011990000613d00000d450020009c0000005b0000213d0000001f022000390000000502200270000084600400043d000000000342004b0000000005000019000011990000a13d00000000044400a9000000090440027000000000052200a900000009055002700000000004450049000084600020043f00000003023000c90000000005240019000b00000005001d000900000007001d000700000006001d00100000000e001d00110000000d001d00000d4601100197000d00000001001d000000000010043f0000000001000414000000c00110021000000d43011001c700008013020000390000000003000019000000000400001900000000050000190000000006000019000e0000000a001d2c872c780000040f0000000100200190000026e10000613d00000d4700100198000000640100003900000a28010060390000000b0110002900100010001000730000005b0000413d00000d4801000041000000000010043f0000000d01000029000000040010043f000000000100041400000d410010009c00000d4101008041000000c00110021000000d49011001c700008002020000392c872c7d0000040f00000010040000290000000603400270000000000c3400490000000e00c0006c0000000e0c0080290000000100200190000026e10000613d0000000f02000029000084800f2000390000000902000029000084800d200039000000000201043b000300000001035500000d4a0120019700000d4b0010009c0000122f0000c13d000e0000000d001d00000d5401000041000000000010043f0000002000c0043f0000000001000414000000c00110021000000d51011001c700008013020000390000000003000019000000000400001900000000050000190000000006000019000f0000000c001d000b0000000f001d2c872c780000040f0000000b010000290000000100200190000026e10000613d00000d410010009c00000d41010080410000004001100210000000070200002900000d410020009c00000d41020080410000006002200210000000000112019f000000000200041400000d410020009c00000d4102008041000000c002200210000000000112019f0000000d020000292c872c820000040f0000000f0c000029000000020300036700040000000303550002000000010355000000600410027000000d4105400197000000200450008c000026e10000413d000000000b01043b000000080040006c0000000007040019000011ff0000413d00000008070000290000002006700039000000000056004b000026e10000213d00000d79067001980000001f0770018f00000020011003700000000e0a00002900000000056a00190000120a0000613d000000000801034f000000008908043c000000000a9a043600000000005a004b000012060000c13d000000000007004b000012170000613d000000000661034f0000000307700210000000000805043300000000087801cf000000000878022f000000000606043b0000010007700089000000000676022f00000000067601cf000000000686019f0000000000650435000004000040043f00040000000103550002000000030355000000010a0000390000000100200190000013580000c13d00000d5201000041000000000010043f0000000001000414000000c00110021000000d53011001c700008013020000390000000003000019000000000400001900000000050000190000000006000019000e0000000b001d2c872c780000040f0000000e0b0000290000000f0c0000290000000100200190000000000a000019000013580000c13d000026e10000013d0000000d0e0000290000000401e0008a000000040010008c000000100800a02900000c280001a13e00000bb8050000390000000100e0008c000000110b0000290000001008000029000013010000613d0000000200e0008c000012b80000c13d00000007010000290000001f0110003900000005011002700000000c011000c90000003c0510003900000000015c004b000013030000413d0000131f0000013d0000000703f0002900000000010f04330000000f02000029000084a002200039000000000032004b000000110b000029000012530000a13d0000000000f3004b00000000040f0019000000000403201900000000044200490000000304400210000000000141022f00000000014101cf000000ff0040008c000000000100201900000000040204330000000f05000029000084c005500039000000000035004b000012600000a13d000000000023004b000000000203201900000000022500490000000302200210000000000424022f00000000042401cf000000ff0020008c000000000400201900000000020504330000000f06000029000084e006600039000000000036004b0000126d0000a13d000000000053004b000000000503201900000000055600490000000305500210000000000252022f00000000025201cf000000ff0050008c000000000200201900000d4c05000041000000200010008c000013010000213d000000200040008c000013010000213d000000200020008c000013010000213d00000000066100190000000075060434000000000037004b000012800000a13d000000000063004b000000000306a01900000000033700490000000303300210000000000535022f00000000053501cf000000ff0030008c0000000005002019000000000004004b000013100000613d0000000303400210000001000330008900000000043502310000000003000019000013110000613d00000d4d0040009c00000000030000390000008003002039000000000434022f00000d4c0040009c00000000050000390000004005002039000000000454022f00000d410040009c00000000060000390000002006002039000000000464022f0000ffff0040008c00000000070000390000001007002039000000000474022f000000ff0040008c00000000080000390000000808002039000000000484022f0000000f0040008c00000000090000390000000409002039000000000494022f000000030040008c000000000a000039000000020a0020390000000004a4022f000000010040008c00000001033021bf000000000353019f000000000363019f000000000373019f000000000383019f000000000393019f0000000003a3019f0000001008000029000013110000013d00000007010000290000001f01100039000000050110027000000003011000c90000000f05100039000013000000013d0000000701000029000000c00110011a000084d0011000c90000afc805100039000013000000013d000e0000000d001d0000000401000367000000600310027000000d410330019700040000003103e5000004000000043f00000000000e004b000012c40000613d00000d4f00200198000000000a000019000000000b0c0019000013580000c13d000f0000000c001d00000d4100f0009c00000d410f0080410000004001f00210000000070200002900000d410020009c00000d41020080410000006002200210000000000112019f000000000200041400000d410020009c00000d4102008041000000c002200210000000000112019f0000000d020000292c872c820000040f000000010a20018f000000600210027000000d4102200197000000080020006c000000080300002900000000030240190000001f0430018f00000d4e053001980000000e080000290000000003580019000012e40000613d000000000601034f000000006706043c0000000008780436000000000038004b000012e00000c13d000000000004004b000000110d0000290000000f07000029000012f30000613d000000000551034f0000000304400210000000000603043300000000064601cf000000000646022f000000000505043b0000010004400089000000000545022f00000000044501cf000000000464019f00000000004304350004000000010355000004000020043f0000001001700069000000000e710019000000010dd000390000000201d00367000000000101043b000000f8011002700000000c0800002900000b230001013e0000009605000039000013000000013d0000177005000039000000110b00002900000000015c004b0000131f0000813d0000000401000367000000600210027000000d410220019700040000002103e5000004000000043f000000000ec80049000000010db000390000000203d00367000000000303043b000000f803300270000000000a0000190000000c0800002900000b230003013e0000000003000019000000000012004b000000000201a0190000000701200039000000030110027000000000011100a9000000010030008c000000010300a03900000000013100a90000ffff0110018f000000030510011a000000c80050008c000000c80500a03900000000015c004b000013030000413d000b00000001001d000f0000000c001d0000004001f0021000000007020000290000006002200210000000000112019f0000000002000414000000c002200210000000000121019f00000000020e0019000e0000000d001d2c872c7d0000040f0000000e09000029000000600310027000000d4103300197000000080030006c000000080400002900000000040340190000001f0540018f00000d4e0640019800000000046900190000133a0000613d000000000701034f000000007807043c0000000009890436000000000049004b000013360000c13d000000000005004b000013470000613d000000000661034f0000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f00000000005404350004000000010355000004000030043f0000000100200190000000000a000019000000000b0000190000000f0c000029000013580000613d000000010a0000390000001002c000690000000b0e2000290000001103000029000000010d3000390000000204d00367000000000404043b000000f8044002700000000c0800002900000b230004013e0000001001c00069000000000eb10019000000110d000029000000010dd000390000000201d00367000000000101043b000000f8011002700000000c0800002900000b230001013e00007d0004e0008c0000005b0000413d000000600180008a000004400010008c0000005b0000413d0000000006010433001000000001001d000000400180008a0000000002010433000000200180008a0000000001010433000000010500003900000000030a001900110000000d001d2c872b480000040f0000001103000029000000010d300039000000000a0200190000000204d00367000000000404043b000000f8044002700000001008000029000000000e01001900000b230004013e000000a00180008a000d00000001001d000004400010008c0000005b0000413d000000800180008a0000000007010433000000600180008a0000000006010433000000400180008a0000000001010433000f00000001001d000000200180008a00000000010104330000000d020000290000000003020433000000000003004b0000000002000019000013900000613d00000d7802300167000000000027004b0000005b0000213d00000000040300190000000002740019000b00000003001d000000000006004b0000000003000019000013980000613d00000d78036001670000000f0030006b0000005b0000213d0000000f03600029000000000032004b000000000203a019000000000002004b0000000005000019000013ad0000613d00000d450020009c0000005b0000213d0000001f022000390000000502200270000084600400043d000000000342004b0000000005000019000013ad0000a13d00000000044400a9000000090440027000000000052200a900000009055002700000000004450049000084600020043f00000003023000c90000000005240019000900000005001d000800000007001d000700000006001d00100000000e001d00110000000d001d00000d4601100197000c00000001001d000000000010043f0000000001000414000000c00110021000000d43011001c700008013020000390000000003000019000000000400001900000000050000190000000006000019000e0000000a001d2c872c780000040f0000000100200190000026e10000613d00000d4700100198000000640100003900000a2801006039000000090110002900100010001000730000005b0000413d00000d4801000041000000000010043f0000000c01000029000000040010043f000000000100041400000d410010009c00000d4101008041000000c00110021000000d49011001c700008002020000392c872c7d0000040f00000010040000290000000603400270000000000c3400490000000e00c0006c0000000e0c0080290000000100200190000026e10000613d0000000f0200002900008480092000390000000802000029000084800d200039000000000201043b000300000001035500000d4a0120019700000d4b0010009c000e0000000c001d000014320000c13d000900000009001d000f0000000d001d00000d5001000041000000000010043f0000002000c0043f0000000001000414000000c00110021000000d51011001c7000080130200003900000000030000190000000004000019000000000500001900000000060000192c872c780000040f0000000100200190000026e10000613d000000090100002900000d410010009c00000d41010080410000004001100210000000070200002900000d410020009c00000d41020080410000006002200210000000000112019f000000000200041400000d410020009c00000d4102008041000000c002200210000000000112019f0000000c020000292c872c780000040f0000000e0b000029000000020300036700040000000303550002000000010355000000600410027000000d4105400197000000200450008c000026e10000413d000000000c01043b0000000b0040006c0000000007040019000014130000413d0000000b070000290000002006700039000000000056004b000026e10000213d00000d79067001980000001f0770018f00000020011003700000000f0a00002900000000056a00190000141e0000613d000000000801034f000000008908043c000000000a9a043600000000005a004b0000141a0000c13d000000000007004b0000142b0000613d000000000661034f0000000307700210000000000805043300000000087801cf000000000878022f000000000606043b0000010007700089000000000676022f00000000067601cf000000000686019f0000000000650435000004000040043f000400000001035500020000000303550000000100200190000014470000613d000000010a000039000015750000013d0000000c0f0000290000000401f0008a000000040010008c000000100800a029000000070e00a02900000c230001a13e0000000100f0008c00000bb805000039000000110b0000290000001008000029000000070e000029000015200000613d0000000200f0008c000014ce0000c13d0000001f01e0003900000005011002700000000c011000c90000003c0510003900000000015c004b000015220000413d0000153e0000013d00000d5201000041000000000010043f0000000001000414000000c00110021000000d53011001c700008013020000390000000003000019000000000400001900000000050000190000000006000019000f0000000c001d2c872c780000040f0000000f0c0000290000000e0b0000290000000100200190000000000a000019000015750000c13d000026e10000013d00000000039e001900000000010904330000000f02000029000084a002200039000000000032004b000000110b000029000014690000a13d000000000093004b0000000004090019000000000403201900000000044200490000000304400210000000000141022f00000000014101cf000000ff0040008c000000000100201900000000040204330000000f05000029000084c005500039000000000035004b000014760000a13d000000000023004b000000000203201900000000022500490000000302200210000000000424022f00000000042401cf000000ff0020008c000000000400201900000000020504330000000f06000029000084e006600039000000000036004b000014830000a13d000000000053004b000000000503201900000000055600490000000305500210000000000252022f00000000025201cf000000ff0050008c000000000200201900000d4c05000041000000200010008c000015200000213d000000200040008c000015200000213d000000200020008c000015200000213d00000000066100190000000075060434000000000037004b000014960000a13d000000000063004b000000000306a01900000000033700490000000303300210000000000535022f00000000053501cf000000ff0030008c0000000005002019000000000004004b0000152f0000613d0000000303400210000001000330008900000000043502310000000003000019000015300000613d00000d4d0040009c00000000030000390000008003002039000000000434022f00000d4c0040009c00000000050000390000004005002039000000000454022f00000d410040009c00000000060000390000002006002039000000000464022f0000ffff0040008c00000000070000390000001007002039000000000474022f000000ff0040008c00000000080000390000000808002039000000000484022f0000000f0040008c000900000009001d00000000090000390000000409002039000000000494022f000000030040008c000000000a000039000000020a0020390000000004a4022f000000010040008c00000001033021bf000000000353019f000000000363019f000000000373019f000000000383019f000000000393019f00000009090000290000000003a3019f0000001008000029000015300000013d0000001f01e00039000000050110027000000003011000c90000000f051000390000151f0000013d000000c001e0011a000084d0011000c90000afc8051000390000151f0000013d00000d410090009c00000d4109008041000000400190021000000d4100e0009c00000d410e0080410000006003e00210000000000113019f00000d4f002001980000000002000039000000010200603900000000000f004b0000000003000039000000010300603900080000002301a40000000502c000c9000001f40220c03900000d410020009c00000d4102008041000900000002001d000000c002200210000000000112019f0000000002000414000700000002001d00000000020f0019000f0000000d001d2c872c7d0000040f0000000f09000029000000600310027000000d41033001970000000b0030006c0000000b0400002900000000040340190000001f0540018f00000d4e064001980000000004690019000014f70000613d000000000701034f000000007807043c0000000009890436000000000049004b000014f30000c13d000000000005004b000000110d000029000015050000613d000000000661034f0000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f00000000005404350000000004000414000000070440006b00000000040040190004000000010355000004000030043f000000080100002900000001001001900000000901000029000001f40110c08a000000000400c019000000000341004b0000000001000019000000050130211a000000010a20018f00000010020000290000000e0220006a000000000e120019000000010dd000390000000201d00367000000000101043b000000f8011002700000000d0800002900000b230001013e00000096050000390000151f0000013d0000177005000039000000110b00002900000000015c004b0000153e0000813d0000000401000367000000600210027000000d410220019700040000002103e5000004000000043f000000000ec80049000000010db000390000000203d00367000000000303043b000000f803300270000000000a0000190000000d0800002900000b230003013e0000000003000019000000000012004b000000000201a0190000000701200039000000030110027000000000011100a9000000010030008c000000010300a03900000000013100a90000ffff0110018f000000030510011a000000c80050008c000000c80500a03900000000015c004b000015220000413d000900000001001d00000040019002100000006002e00210000000000112019f0000000002000414000000c002200210000000000121019f00000000020f0019000f0000000d001d2c872c7d0000040f0000000f09000029000000600310027000000d41033001970000000b0030006c0000000b0400002900000000040340190000001f0540018f00000d4e064001980000000004690019000015570000613d000000000701034f000000007807043c0000000009890436000000000049004b000015530000c13d000000000005004b000015640000613d000000000661034f0000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f00000000005404350004000000010355000004000030043f0000000100200190000000000a000019000000000c0000190000000e0b000029000015750000613d000000010a0000390000001002b00069000000090e2000290000001103000029000000010d3000390000000204d00367000000000404043b000000f8044002700000000d0800002900000b230004013e0000001001b00069000000000ec10019000000110d000029000000010dd000390000000201d00367000000000101043b000000f8011002700000000d0800002900000b230001013e00000000010e001900008480030000390000000002000019000000c8042000c9000000000141004b0000005b0000413d0000001f0420003900000d790540019700000020004001900000002005506039000000000423001900000000040404360000000000040435000000000435001900000000022404360000000000120435000000600150021000000d410030009c00000d41030080410000004002300210000000000121019f00000d760110009a00002c880001042e000000200180008a000004400010008c0000005b0000413d00000000020e00190000000001010433000000000001004b0000159f0000c13d00008480030000390000000404000029000015b70000013d00000d780410016700000000004a004b0000005b0000213d0000000004a1001900000d450040009c0000005b0000213d0000001f044000390000000504400270000084600600043d000000000564004b0000000007000019000015b30000a13d00000000066600a9000000090660027000000000074400a900000009077002700000000006670049000084600040043f00000003045000c90000000007460019000000000272004b0000005b0000413d0000848003a000390000159d0000013d000000000004004b000015bc0000613d000000200330008a0000000000230435000000200110003900000d410030009c00000d4103008041000000400230021000000d410010009c00000d41010080410000006001100210000000000121019f00002c890001043000000000010e001900008480030000390000000002000019000000010000006b000015ce0000613d00000d7b0020009c0000005b0000213d000000200330008a0000000000130435000000200220003900000d410030009c00000d4103008041000000400130021000000d410020009c00000d41020080410000006002200210000000000112019f00002c880001042e000000030ee0008c0000005b0000413d000000200880008a000004400080008c0000005b0000413d0000000001080433000000000aa10019000000010dd000390000000201d00367000000000101043b000000f80110027000000c320001013e000000050ee0008c0000005b0000413d000000200880008a000004400080008c0000005b0000413d0000000001080433000000000aa100a9000000010dd000390000000201d00367000000000101043b000000f80110027000000c320001013e000000030ee0008c0000005b0000413d000000200880008a000004400080008c0000005b0000413d0000000001080433000000000a1a0049000000010dd000390000000201d00367000000000101043b000000f80110027000000c320001013e000000050ee0008c0000005b0000413d000000200880008a000004400080008c0000005b0000413d0000000002080433000000000002004b000000000100001900000000012ac0d9000000010dd000390000000202d00367000000000202043b000000f802200270000000000a01001900000c320002013e000000050ee0008c0000005b0000413d000000200880008a000004400080008c0000005b0000413d0000000002080433000000000002004b0000000001000019000016230000613d00000d7100a0009c000016170000c13d00000d710100004100000d780020009c000016230000613d00000d712120012c00000d710220c09900000d7143a0012c000000000313013f00000d710440c09900000000012400d9000000ff023002120000000003120049000000000223019f0000000002016019000000000001004b000000000102c019000000010dd000390000000202d00367000000000202043b000000f802200270000000000a01001900000c320002013e000000050ee0008c0000005b0000413d000000200880008a000004400080008c0000005b0000413d0000000002080433000000000002004b000000000100001900000000102ac0d9000000010dd000390000000202d00367000000000202043b000000f802200270000000000a01001900000c320002013e000000050ee0008c0000005b0000413d000000200880008a000004400080008c0000005b0000413d0000000002080433000000000002004b0000000001000019000016500000613d00000d7100a0009c000016460000c13d00000d780020009c0000000001000019000016500000613d00000d711020012c00000d710110c09900000d7120a0012c00000d710220c09900000000101200d900000d7100a001980000000002010019000000000220c089000000000001004b000000000102c019000000010dd000390000000202d00367000000000202043b000000f802200270000000000a01001900000c320002013e000000080ee0008c0000005b0000413d000000400180008a000004400010008c0000005b0000413d0000000002010433000000000002004b0000000003000019000016670000613d00000000502a00d9000000200380008a000000000303043300000000602300d9000000000456001900000000302400d9000000000056001a0000166e0000413d000000010dd000390000000202d00367000000000202043b000000f802200270000000000a030019000000000801001900000c320002013e000000000a240049000000010dd000390000000202d00367000000000202043b000000f802200270000000000801001900000c320002013e000000080ee0008c0000005b0000413d000000400180008a000004400010008c0000005b0000413d0000000003010433000000000003004b000000010dd000390000000002000019000016df0000613d00000000203a00d9000000200480008a000000000404043300000000403400d900000d4d0030009c0000168c0000213d00000000022400a900000000a03200d90000000202d00367000000000202043b000000f802200270000000000801001900000c320002013e00000000452400a9000000010200008a000000000043004b000016df0000a13d00000d720030009c000000c0020000390000008002004039000000000623022f0000004002000039000000800200403900000d730060009c000000200220808a000000200660827000000d740060009c000000100220808a0000001006608270000001000060008c000000080220808a0000000806608270000000100060008c00000000070600190000000407708270000000040070008c000000000807001900000002088082700000000009800089000000020080008c000000020900808a000000100060008c000000040220808a000000040070008c000000020220808a0000000002290019000000ff0620018f00000000046401cf00000d7806200167000000ff0660018f0000000107500270000000000667022f000000000764019f00000000032301cf000000800430027000000000a94700d900000000062501cf000000800860027000000d4d05300197000016bf0000013d000000000a4a0019000000010990008a00000d4d00a0009c000016c60000813d00000d750090009c000016bb0000213d000000000b5900a9000000800ca00210000000000c8c019f0000000000cb004b000016bb0000213d00000d4d0990019700000000093900a90000008007700210000000000787019f000000000797004900000000984700d900000d4d06600197000016d20000013d0000000009490019000000010880008a00000d4d0090009c000016d90000813d00000d750080009c000016ce0000213d000000000a5800a9000000800b900210000000000b6b019f0000000000ba004b000016ce0000213d00000d4d0480019700000000033400a90000008004700210000000000464019f0000000003340049000000000223022f0000000203d00367000000000303043b000000f803300270000000000a020019000000000801001900000c320003013e0000000a02e0008c0000005b0000413d000000200880008a000004400080008c0000005b0000413d00000001030000390000000001080433000000000001004b000016fd0000613d0000000004010019000000000300001900000032033000390000000804400272000016f00000c13d000000000232004b0000005b0000413d000000010300003900000001001001900000000005aa00a9000000010a00603900000000033a00a90000000101100272000000000a050019000016f60000c13d000000000e020019000000000a030019000000010dd000390000000201d00367000000000101043b000000f80110027000000c320001013e000000050ee0008c0000005b0000413d000000200880008a000004400080008c0000005b0000413d00000000010804330000001e00a0008c0000170e0000a13d000000000a010019000017180000013d0000000302a0021000000007022001bf00000d780320021f000000000421022f00000001004001900000000003006019000001000220008900000000012101cf000000000121022f000000000a13019f000000010dd000390000000201d00367000000000101043b000000f80110027000000c320001013e000000030ee0008c0000005b0000413d000000200880008a000004400080008c0000005b0000413d000000000108043300000000001a004b000000000a000039000000010a004039000000010dd000390000000201d00367000000000101043b000000f80110027000000c320001013e000000030ee0008c0000005b0000413d000000200880008a000004400080008c0000005b0000413d000000000108043300000000001a004b000000000a000039000000010a002039000000010dd000390000000201d00367000000000101043b000000f80110027000000c320001013e000000030ee0008c0000005b0000413d000000200880008a000004400080008c0000005b0000413d000000000108043300000000001a004b000000000200001900000d710200404100000d7103a0019700000d7101100197000000000413013f000000000013004b000000000100001900000d710100204100000d710040009c000000000102c019000000010dd00039000000000001004b000000000a000039000000010a00c0390000000201d00367000000000101043b000000f80110027000000c320001013e000000030ee0008c0000005b0000413d000000200880008a000004400080008c0000005b0000413d000000000108043300000000001a004b000000000200001900000d710200204100000d7103a0019700000d7101100197000000000413013f000000000013004b000000000100001900000d710100404100000d710040009c000000000102c019000000010dd00039000000000001004b000000000a000039000000010a00c0390000000201d00367000000000101043b000000f80110027000000c320001013e000000030ee0008c0000005b0000413d000000200880008a000004400080008c0000005b0000413d000000000108043300000000001a004b000000000a000039000000010a006039000000010dd000390000000201d00367000000000101043b000000f80110027000000c320001013e000000030ee0008c0000005b0000413d000004400080008c0000005b0000413d000000010dd0003900000000000a004b000000000a000039000000010a0060390000000201d00367000000000101043b000000f80110027000000c320001013e000000030ee0008c0000005b0000413d000000200880008a000004400080008c0000005b0000413d0000000001080433000000000aa1016f000000010dd000390000000201d00367000000000101043b000000f80110027000000c320001013e000000030ee0008c0000005b0000413d000000200880008a000004400080008c0000005b0000413d0000000001080433000000000aa1019f000000010dd000390000000201d00367000000000101043b000000f80110027000000c320001013e000000030ee0008c0000005b0000413d000000200880008a000004400080008c0000005b0000413d0000000001080433000000000aa1013f000000010dd000390000000201d00367000000000101043b000000f80110027000000c320001013e000000030ee0008c0000005b0000413d000004400080008c0000005b0000413d00000d780aa00167000000010dd000390000000201d00367000000000101043b000000f80110027000000c320001013e000000030ee0008c0000005b0000413d000000200880008a000004400080008c0000005b0000413d00000000010804330000000302a0021000000000012101cf000000f8011002700000001f00a0008c0000000001002019000000010dd000390000000202d00367000000000202043b000000f802200270000000000a01001900000c320002013e000000030ee0008c0000005b0000413d000000200880008a000004400080008c0000005b0000413d00000000010804330000000001a101cf000000ff00a0008c0000000001002019000000010dd000390000000202d00367000000000202043b000000f802200270000000000a01001900000c320002013e000000030ee0008c0000005b0000413d000000200880008a000004400080008c0000005b0000413d00000000010804330000000001a1022f000000ff00a0008c0000000001002019000000010dd000390000000202d00367000000000202043b000000f802200270000000000a01001900000c320002013e000000030ee0008c0000005b0000413d000000200880008a000004400080008c0000005b0000413d000000000108043300000d7102100197000000010300008a00000d710020009c000000000300c019000000ff00a0008c000000ff0a0080390000010002a0008900000000022301cf0000000003a1022f000000000223019f00000000000a004b000000000102c019000000010dd000390000000202d00367000000000202043b000000f802200270000000000a01001900000c320002013e0000001e02e0008c0000005b0000413d000000200880008a000004400080008c0000005b0000413d0000000001080433000000000001004b0000000004000019000018170000613d00000d780310016700000000003a004b0000005b0000213d0000000003a1001900000d450030009c0000005b0000213d0000001f033000390000000503300270000084600600043d000000000563004b0000000004000019000018170000a13d00000000046600a9000000090440027000000000063300a900000009066002700000000004460049000084600030043f00000003035000c900000000043400190000001f03100039000000050330027000000006033000c90000000003340019000000000232004b0000005b0000413d000f00000008001d001000000002001d00110000000d001d0000848002a0003900000d410020009c00000d41020080410000004002200210000000000001004b000000000200601900000d410010009c00000d41010080410000006001100210000000000112019f000000000200041400000d410020009c00000d4102008041000000c002200210000000000112019f00000d4b011001c700008010020000392c872c7d0000040f0000000100200190000026e10000613d000000110d000029000000010dd00039000000000a01043b0000000201d00367000000000101043b000000f801100270000000100e0000290000000f0800002900000c320001013e000000020ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000008a80436000000000a000410000000010dd000390000000201d00367000000000101043b000000f80110027000000c320001013e000e006400e000940000005b0000413d000004400080008c0000005b0000413d000f00000008001d00100000000e001d00110000000d001d00000d4601a00197000b00000001001d000000000010043f0000000001000414000000c00110021000000d43011001c7000080130200003900000000030000190000000004000019000000000500001900000000060000192c872c780000040f0000000100200190000026e10000613d00000d4700100198000018610000613d0000000e01000029000018660000013d0000000e01000029000009c40010008c00000010010000290000005b0000413d00000a280110008a001000000001001d00000d590100004100000000001004430000000b010000290000000400100443000000000100041400000d410010009c00000d4101008041000000c00110021000000d58011001c70000800a020000392c872c7d0000040f0000000100200190000026e00000613d000000110d000029000000010dd00039000000000a01043b0000000201d00367000000000101043b000000f801100270000000100e0000290000000f0800002900000c320001013e000000020ee0008c0000005b0000413d000003000100043d000000000001004b000018970000c13d000e0000000a001d000f00000008001d00100000000e001d00110000000d001d00000d70010000410000000000100443000000000100041400000d410010009c00000d4101008041000000c00110021000000d64011001c70000800b020000392c872c7d0000040f0000000100200190000026e00000613d000000000101043b000003000010043f000000110d000029000000100e0000290000000f080000290000000e0a0000290000841f0080008c0000005b0000213d0000000008a80436000000010dd000390000000202d00367000000000202043b000000f802200270000000000a01001900000c320002013e000000020ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000008a80436000000010dd000390000000201d00367000000000101043b000000f801100270000000000a00041100000c320001013e000000020ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000008a80436000000000a000416000000010dd000390000000201d00367000000000101043b000000f80110027000000c320001013e000000030ee0008c0000005b0000413d000004400080008c0000005b0000413d00000d7700a0009c0000000001000019000018bf0000213d0000001201a00367000000000101043b000000010dd000390000000202d00367000000000202043b000000f802200270000000000a01001900000c320002013e000000020ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000008a80436000000010dd000390000000202d00367000000000202043b000000f802200270000000000a00003100000c320002013e0000000304e0008c0000005b0000413d000000400580008a000004400050008c0000005b0000413d000000600180008a0000000002010433000000200380008a00000000030304330000000005050433000000000005004b0000000007000019000018f10000613d00000d780650016700000000006a004b0000005b0000213d0000000006a5001900000d450060009c0000005b0000213d0000001f066000390000000506600270000084600900043d000000000896004b0000000007000019000018f10000a13d00000000079900a9000000090770027000000000096600a900000009099002700000000007790049000084600060043f00000003068000c900000000076700190000001f06500039000000050660027000000003066000c90000000006670019000000000e64004b0000005b0000413d00000d5c0030009c00000d5c0300804100000000065300190000848004a0003900000d4e0060009c0000190f0000413d00000d5c063000990000000008460019000000000765004900000d79057001970000000005850019000000000085004b000019070000a13d0000000008080436000000000058004b000019040000413d0000001f07700190000019100000613d0000000307700210000000000805043300000000087801cf000000000778022f0000000000750435000019100000013d0000000006050019000000000006004b000019290000613d00000d79056001980000001f0660018f000000120730036700000000035400190000191c0000613d000000000807034f000000008908043c0000000004940436000000000034004b000019180000c13d000000000006004b000019290000613d000000000457034f0000000305600210000000000603043300000000065601cf000000000656022f000000000404043b0000010005500089000000000454022f00000000045401cf000000000464019f0000000000430435000000010dd000390000000203d00367000000000303043b000000f803300270000000000a020019000000000801001900000c320003013e000000020ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000008a80436000000010dd000390000000201d00367000000000101043b000000f801100270000000070a00002900000c320001013e0000000304e0008c0000005b0000413d000000400580008a000004400050008c0000005b0000413d000000600180008a0000000002010433000000200380008a00000000030304330000000005050433000000000005004b00000000070000190000195c0000613d00000d780650016700000000006a004b0000005b0000213d0000000006a5001900000d450060009c0000005b0000213d0000001f066000390000000506600270000084600900043d000000000896004b00000000070000190000195c0000a13d00000000079900a9000000090770027000000000096600a900000009099002700000000007790049000084600060043f00000003068000c900000000076700190000001f06500039000000050660027000000003066000c90000000006670019000000000e64004b0000005b0000413d0000000707000029000000000073004b000000000307801900000000065300190000848004a00039000000000076004b0000197b0000a13d00000000063700490000000008460019000000000765004900000d79057001970000000005850019000000000085004b000019730000a13d0000000008080436000000000058004b000019700000413d0000001f077001900000197c0000613d0000000307700210000000000805043300000000087801cf000000000778022f00000000007504350000197c0000013d0000000006050019000000000006004b000019950000613d00000d79056001980000001f0660018f00000002073003670000000003540019000019880000613d000000000807034f000000008908043c0000000004940436000000000034004b000019840000c13d000000000006004b000019950000613d000000000457034f0000000305600210000000000603043300000000065601cf000000000656022f000000000404043b0000010005500089000000000454022f00000000045401cf000000000464019f0000000000430435000000010dd000390000000203d00367000000000303043b000000f803300270000000000a020019000000000801001900000c320003013e000000020ee0008c0000005b0000413d000003200100043d000000000001004b000019b60000c13d000e0000000a001d000f00000008001d00100000000e001d00110000000d001d00000d6f010000410000000000100443000000000100041400000d410010009c00000d4101008041000000c00110021000000d64011001c70000800b020000392c872c7d0000040f0000000100200190000026e00000613d000000000101043b000003200010043f000000110d000029000000100e0000290000000f080000290000000e0a0000290000841f0080008c0000005b0000213d0000000008a80436000000010dd000390000000202d00367000000000202043b000000f802200270000000000a01001900000c320002013e000b006400e000940000005b0000413d000004400080008c0000005b0000413d000f00000008001d00100000000e001d00110000000d001d00000d4601a00197000e00000001001d000000000010043f0000000001000414000000c00110021000000d43011001c7000080130200003900000000030000190000000004000019000000000500001900000000060000192c872c780000040f0000000100200190000026e10000613d00000d4700100198000019d80000613d0000000b01000029000019dd0000013d0000000b01000029000009c40010008c00000010010000290000005b0000413d00000a280110008a001000000001001d00000d4801000041000000000010043f0000000e01000029000000040010043f000000000100041400000d410010009c00000d4101008041000000c00110021000000d49011001c700008002020000392c872c7d0000040f0000000100200190000026e10000613d000000000201043b0003000000010355000000f801200270000000010010008c000019fc0000613d000000020010008c00001a120000c13d000000e0012002700000ffff0a10018f000000110d000029000000010dd000390000000201d00367000000000101043b000000f801100270000000100e0000290000000f0800002900000c320001013e00000d570100004100000000001004430000000e010000290000000400100443000000000100041400000d410010009c00000d4101008041000000c00110021000000d58011001c700008002020000392c872c7d0000040f0000000100200190000026e00000613d000000000a01043b000000110d000029000000010dd000390000000201d00367000000000101043b000000f801100270000000100e0000290000000f0800002900000c320001013e000000110d000029000000010dd000390000000201d00367000000000101043b000000f801100270000000000a000019000000100e0000290000000f0800002900000c320001013e0000006406e0008c0000005b0000413d000000600180008a000004400010008c0000005b0000413d000000800280008a000a00000002001d0000000002020433000900000002001d000000400280008a0000000002020433000600000002001d000000200280008a0000000002020433000f00000002001d0000000005010433000000000005004b000000000400001900001a420000613d00000d78015001670000000f0010006b0000005b0000213d0000000f0150002900000d450010009c0000005b0000213d0000001f011000390000000501100270000084600300043d000000000231004b000000000400001900001a420000a13d00000000033300a9000000090330027000000000041100a900000009044002700000000003340049000084600010043f00000003012000c90000000004130019000b00000004001d001000000006001d000e00000005001d00110000000d001d00000d4601a00197000800000001001d000000000010043f0000000001000414000000c00110021000000d43011001c7000080130200003900000000030000190000000004000019000000000500001900000000060000192c872c780000040f0000000100200190000026e10000613d0000000e030000290000001f02300039000000050220027000000003022000c90000000b0220002900000d4700100198000009c402206039000000100e20006b000000110d0000290000005b0000413d000000000003004b00001acb0000613d00100000000e001d00000d4801000041000000000010043f0000000801000029000000040010043f000000000100041400000d410010009c00000d4101008041000000c00110021000000d49011001c700008002020000392c872c7d0000040f0000000100200190000026e10000613d0000000f02000029000f84800020003d000000000201043b0003000000010355000b00000002001d000000000020043f000000000100041400000d410010009c00000d4101008041000000c00110021000000d6e011001c700008012020000392c872c7d0000040f000000010020019000000000040000190000000e0600002900001ab10000613d000000600210027000000d41032001970000000b0400002900000d5502400197000000e0044002700000ffff0440018f00000d5b0020009c0000000504406210000000000064004b0000000004068019000000060030006b00000000020300190000000602004029000000000542001900000000070200190000000002230049000000000035004b000000000204a019000000000002004b000000000400001900001ab10000613d0000000004720019000000000034004b000026e10000213d000000000371034f00000d79042001980000001f0520018f0000000f0140002900001aa20000613d000000000603034f0000000f07000029000000006806043c0000000007870436000000000017004b00001a9e0000c13d000000000005004b00001aaf0000613d000000000343034f0000000304500210000000000501043300000000054501cf000000000545022f000000000303043b0000010004400089000000000343022f00000000034301cf000000000353019f000000000031043500000000040200190000000e06000029000000000246004b000000110d000029000000100e00002900001acb0000a13d0000000f0340002900000d79012001970000000001310019000000000031004b00001abd0000a13d0000000003030436000000000013004b00001aba0000413d0000001f0220019000001acb0000613d0000000302200210000000000301043300000000032301cf000000000223022f0000000000210435000000010dd000390000000201d00367000000000101043b000000f801100270000000090a0000290000000a0800002900000c320001013e000000010dd000390000000201d00367000000000101043b000000f801100270000000090a0000290000000a0800002900000c320001013e000000020ee0008c0000005b0000413d0000841f0080008c0000005b0000213d000004000100043d0000000008a80436000000010dd000390000000202d00367000000000202043b000000f802200270000000000a01001900000c320002013e0000000305e0008c0000005b0000413d000000400480008a000004400040008c0000005b0000413d000000600180008a0000000002010433000000200380008a00000000030304330000000004040433000000000004004b000000000700001900001aff0000613d00000d780640016700000000006a004b0000005b0000213d0000000006a4001900000d450060009c0000005b0000213d0000001f066000390000000506600270000084600900043d000000000896004b000000000700001900001aff0000a13d00000000079900a9000000090770027000000000096600a900000009099002700000000007790049000084600060043f00000003068000c900000000076700190000001f06400039000000050660027000000003066000c90000000006670019000000000e65004b0000005b0000413d00000d7805400167000000000053004b0000005b0000213d0000000005340019000004000600043d000000000065004b0000005b0000213d00000d79054001980000001f0440018f00000004063003670000848007a00039000000000357001900001b170000613d000000000806034f000000008908043c0000000007970436000000000037004b00001b130000c13d000000000004004b00001b240000613d000000000556034f0000000304400210000000000603043300000000064601cf000000000646022f000000000505043b0000010004400089000000000545022f00000000044501cf000000000464019f0000000000430435000000010dd000390000000203d00367000000000303043b000000f803300270000000000a020019000000000801001900000c320003013e000b006400e000940000005b0000413d000004400080008c0000005b0000413d000f00000008001d00100000000e001d00110000000d001d00000d4601a00197000e00000001001d000000000010043f0000000001000414000000c00110021000000d43011001c7000080130200003900000000030000190000000004000019000000000500001900000000060000192c872c780000040f0000000100200190000026e10000613d00000d470010019800001b440000613d0000000b0100002900001b490000013d0000000b01000029000009c40010008c00000010010000290000005b0000413d00000a280110008a001000000001001d00000d4801000041000000000010043f0000000e01000029000000040010043f000000000100041400000d410010009c00000d4101008041000000c00110021000000d49011001c700008002020000392c872c7d0000040f0000000100200190000026e10000613d000000000a01043b000300000001035500000d4a01a0019700000d4b0010009c00001b720000c13d00000d6d01000041000000000010043f0000000400a0043f000000000100041400000d410010009c00000d4101008041000000c00110021000000d49011001c700008015020000392c872c7d0000040f0000000100200190000026e10000613d000000000a01043b0003000000010355000000110d000029000000010dd000390000000201d00367000000000101043b000000f801100270000000100e0000290000000f0800002900000c320001013e0000000e01000029000001000010008c00001b770000413d00000d4f00a0019800001b9b0000c13d00000d5a01000041000000000010043f0000000e01000029000000040010043f000000000100041400000d410010009c00000d4101008041000000c00110021000000d49011001c700008003020000392c872c7d0000040f0000000100200190000026e10000613d000000000201043b0003000000010355000000000002004b00001b8a0000613d00000d6c0a00004100001b9b0000013d00000d590100004100000000001004430000000e010000290000000400100443000000000100041400000d410010009c00000d4101008041000000c00110021000000d58011001c70000800a020000392c872c7d0000040f0000000100200190000026e00000613d000000000101043b000000000001004b00000d6c0a00004100001ba30000613d000000110d000029000000010dd000390000000201d00367000000000101043b000000f801100270000000100e0000290000000f0800002900000c320001013e000000110d000029000000010dd000390000000201d00367000000000101043b000000f801100270000000000a000019000000100e0000290000000f0800002900000c320001013e000000140ee0008c0000005b0000413d000004400080008c0000005b0000413d000f00000008001d00100000000e001d00110000000d001d00000d6b0100004100000000001004430000000400a00443000000000100041400000d410010009c00000d4101008041000000c00110021000000d58011001c70000800b020000392c872c7d0000040f0000000100200190000026e00000613d000000110d000029000000010dd00039000000000a01043b0000000201d00367000000000101043b000000f801100270000000100e0000290000000f0800002900000c320001013e000000020ee0008c0000005b0000413d000003400100043d000000000001004b00001be20000c13d000e0000000a001d000f00000008001d00100000000e001d00110000000d001d00000d6a010000410000000000100443000000000100041400000d410010009c00000d4101008041000000c00110021000000d64011001c70000800b020000392c872c7d0000040f0000000100200190000026e00000613d000000000101043b000003400010043f000000110d000029000000100e0000290000000f080000290000000e0a0000290000841f0080008c0000005b0000213d0000000008a80436000000010dd000390000000202d00367000000000202043b000000f802200270000000000a01001900000c320002013e000000020ee0008c0000005b0000413d000003600100043d000000000001004b00001c050000c13d000e0000000a001d000f00000008001d00100000000e001d00110000000d001d00000d69010000410000000000100443000000000100041400000d410010009c00000d4101008041000000c00110021000000d64011001c70000800b020000392c872c7d0000040f0000000100200190000026e00000613d000000000101043b000003600010043f000000110d000029000000100e0000290000000f080000290000000e0a0000290000841f0080008c0000005b0000213d0000000008a80436000000010dd000390000000202d00367000000000202043b000000f802200270000000000a01001900000c320002013e000000020ee0008c0000005b0000413d000003800100043d000000000001004b00001c280000c13d000e0000000a001d000f00000008001d00100000000e001d00110000000d001d00000d68010000410000000000100443000000000100041400000d410010009c00000d4101008041000000c00110021000000d64011001c70000800b020000392c872c7d0000040f0000000100200190000026e00000613d000000000101043b000003800010043f000000110d000029000000100e0000290000000f080000290000000e0a0000290000841f0080008c0000005b0000213d0000000008a80436000000010dd000390000000202d00367000000000202043b000000f802200270000000000a01001900000c320002013e000000020ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000008a8043600000d670a000041000000010dd000390000000201d00367000000000101043b000000f80110027000000c320001013e000000020ee0008c0000005b0000413d000003a00100043d000000000001004b00001c560000c13d000e0000000a001d000f00000008001d00100000000e001d00110000000d001d00000d66010000410000000000100443000000000100041400000d410010009c00000d4101008041000000c00110021000000d64011001c70000800b020000392c872c7d0000040f0000000100200190000026e00000613d000000000101043b000003a00010043f000000110d000029000000100e0000290000000f080000290000000e0a0000290000841f0080008c0000005b0000213d0000000008a80436000000010dd000390000000202d00367000000000202043b000000f802200270000000000a01001900000c320002013e000000020ee0008c0000005b0000413d000003c00100043d000000000001004b00001c790000c13d000e0000000a001d000f00000008001d00100000000e001d00110000000d001d00000d65010000410000000000100443000000000100041400000d410010009c00000d4101008041000000c00110021000000d64011001c70000800b020000392c872c7d0000040f0000000100200190000026e00000613d000000000101043b000003c00010043f000000110d000029000000100e0000290000000f080000290000000e0a0000290000841f0080008c0000005b0000213d0000000008a80436000000010dd000390000000202d00367000000000202043b000000f802200270000000000a01001900000c320002013e000000050ee0008c0000005b0000413d000e0000000a001d000f00000008001d00100000000e001d00110000000d001d00000d5901000041000000000010044300000000010004100000000400100443000000000100041400000d410010009c00000d4101008041000000c00110021000000d58011001c70000800a020000392c872c7d0000040f0000000100200190000026e00000613d0000000f080000290000841f0080008c000000110d000029000000100e0000290000000e020000290000005b0000213d000000000a01043b0000000008280436000000010dd000390000000202d00367000000000202043b000000f80220027000000c320002013e000000020ee0008c0000005b0000413d000003e00100043d000000000001004b00001cbc0000c13d000e0000000a001d000f00000008001d00100000000e001d00110000000d001d00000d63010000410000000000100443000000000100041400000d410010009c00000d4101008041000000c00110021000000d64011001c70000800b020000392c872c7d0000040f0000000100200190000026e00000613d000000000101043b000003e00010043f000000110d000029000000100e0000290000000f080000290000000e0a0000290000841f0080008c0000005b0000213d0000000008a80436000000010dd000390000000202d00367000000000202043b000000f802200270000000000a01001900000c320002013e000000020ee0008c0000005b0000413d000004400080008c0000005b0000413d000000010dd00039000000200880008a000000000a0804330000000201d00367000000000101043b000000f80110027000000c320001013e0000000301e0008c0000005b0000413d000004400080008c0000005b0000413d00000d6200a0009c0000005b0000213d0000003f02a000390000000502200270000084600500043d000000000352004b000000000400001900001ce60000a13d00000000045500a9000000090440027000000000052200a900000009055002700000000004450049000084600020043f00000003023000c90000000004240019000000000041004b0000005b0000413d000000000e410049000000010dd000390000848001a00039000000000a0104330000000201d00367000000000101043b000000f80110027000000c320001013e0000000301e0008c0000005b0000413d000000200280008a000004400020008c0000005b0000413d00000d6200a0009c0000005b0000213d0000000003020433000000400880008a00000000020804330000003f04a000390000000504400270000084600700043d000000000674004b000000000500001900001d080000a13d00000000057700a9000000090550027000000000074400a900000009077002700000000005570049000084600040043f00000003046000c90000000005450019000000000051004b0000005b0000413d0000848004a000390000000000340435000000000e510049000000010dd000390000000201d00367000000000101043b000000f801100270000000000a02001900000c320001013e0000000301e0008c0000005b0000413d000000200280008a000004400020008c0000005b0000413d00000d6000a0009c0000005b0000213d0000000003020433000000400880008a00000000020804330000002004a000390000000505400270000084600700043d000000000675004b000000000400001900001d2b0000a13d00000000047700a9000000090440027000000000075500a900000009077002700000000004470049000084600050043f00000003056000c90000000004540019000000000041004b0000005b0000413d000000f8033002100000848005a00039000000000605043300000d6106600197000000000336019f0000000000350435000000000e410049000000010dd000390000000201d00367000000000101043b000000f801100270000000000a02001900000c320001013e000b006400e000940000005b0000413d000004400080008c0000005b0000413d000f00000008001d00100000000e001d00110000000d001d00000d5b01000041000000000010043f0000000100a0043f000000000100041400000d410010009c00000d4101008041000000c00110021000000d5f011001c70000801302000039000e0000000a001d2c872c7d0000040f0000000e0a0000290000000100200190000026e10000613d00000d470010019800001d580000613d000000000a0a041a000000110d000029000000010dd000390000000201d00367000000000101043b000000f8011002700000000b0e0000290000000f0800002900000c320001013e0000000b01000029000007d00010008c0000005b0000413d00000000020a041a00000d4b01000041000000000010043f0000000100a0043f000e00000002001d000000210020043f0000000001000414000000c00110021000000d5e011001c7000080130200003900000000030000190000000004000019000000000500001900000000060000192c872c780000040f0000000100200190000026e10000613d000000100e000029000008340ee0008a00000d4700100198000300000001c355000000110d000029000000010dd000390000000201d00367000000000101043b000000f8011002700000000e0a0000290000000f0800002900000c320001013e000008fd00e0008c0000000d0100002900000001011041bf00000001001001900000005b0000c13d000000200180008a000004400010008c0000005b0000413d00100000000e001d00110000000d001d0000000001010433000b00000001001d000000400880008a000f00000008001d0000000001080433000900000001001d00000000020a041a00000d4b01000041000000000010043f0000000100a0043f000a00000002001d000000210020043f0000000001000414000000c00110021000000d5e011001c700008013020000390000000003000019000000000400001900000000050000190000000006000019000e0000000a001d2c872c780000040f0000000e060000290000000100200190000026e10000613d000000110d000029000000010dd0003900000898020000390000565404000039000013880300003900000d47001001980000000a07000029000000000507001900001da90000613d000000000501043b0003000000010355000000640200003900004e200400003900000b54030000390000000b01000029000000000071004b000000100e0000290000000f0800002900001db40000c13d000000000e2e00490000000201d00367000000000101043b000000f801100270000000090a00002900000c320001013e000000000075004b00001dba0000c13d000000000007004b000000000204001900001dba0000613d0000000002030019000000000e2e004b0000005b0000413d000000000016041b0000000201d00367000000000101043b000000f801100270000000090a00002900000c320001013e000000090ee0008c0000005b0000413d000004400080008c0000005b0000413d00000d5c00a0009c0000005b0000213d000000200880008a00000000010804330000000202a00367000000000202043b00000d550220019700000d5d0020009c0000005b0000c13d000000010da000390000000202d00367000000000202043b000000f802200270000000000a01001900000c320002013e0000000a02e0008c0000005b0000413d000000200380008a000004400030008c0000005b0000413d000000400880008a00000000010804330000000003030433000000000003004b00001def0000613d00000d5c00a0009c0000005b0000213d0000000203a00367000000000303043b00000d550330019700000d5d0030009c0000005b0000c13d000000000002004b0000005b0000613d000000010da000390000000b0ee0008a0000000202d00367000000000202043b000000f802200270000000000a01001900000c320002013e000000010dd000390000000203d00367000000000303043b000000f803300270000000000e020019000000000a01001900000c320003013e000000020ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000008a804360000000101d000390000000202100367000000000202043b000000f802200270000000000a0d0019000000000d01001900000c320002013e000000020ee0008c0000005b0000413d0000841f0080008c0000005b0000213d000084600100043d0000000008a80436000000010dd00039000000050a1002100000000201d00367000000000101043b000000f80110027000000c320001013e000000020ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000008a80436000000010dd000390000000201d00367000000000101043b000000f801100270000000000a0e001900000c320001013e00000000000e004b0000005b0000613d000000010dd00039000000010ee0008a0000000201d00367000000000101043b000000f80110027000000c320001013e000000640ee0008c0000005b0000413d000004400080008c0000005b0000413d000000010dd00039000000000a0a04460000000201d00367000000000101043b000000f80110027000000c320001013e000000640ee0008c0000005b0000413d0000000c0000006b0000005b0000c13d000000200180008a000004400010008c0000005b0000413d0000000001010433000000400880008a000000000208043300000000001a0447000000010dd000390000000201d00367000000000101043b000000f801100270000000000a02001900000c320001013e0000000303e0008c0000005b0000413d000000400580008a000004400050008c0000005b0000413d000000600180008a0000000002010433000000200480008a00000000040404330000000005050433000000000005004b0000000006000019000000000700001900001e510000613d00000d7806500167000000000064004b0000005b0000213d00000000006a004b0000005b0000213d0000000007a500190000000006450019000000000076004b000000000607a019000000000006004b000000000700001900001e660000613d00000d450060009c0000005b0000213d0000001f066000390000000506600270000084600900043d000000000896004b000000000700001900001e660000a13d00000000079900a9000000090770027000000000096600a900000009099002700000000007790049000084600060043f00000003068000c900000000076700190000001f06500039000000050660027000000003066000c90000000006670019000000000e63004b0000005b0000413d00000d79075001970000001f0650018f0000848005a000390000848003400039000000000053004b00001e810000813d000000000007004b00001e7e0000613d00000000086300190000000004650019000000200440008a000000200880008a0000000009740019000000000a780019000000000a0a04330000000000a90435000000200770008c00001e780000c13d000000000006004b00001e8d0000c13d00001e970000013d0000000004750019000000000007004b00001e890000613d000000000803001900000000890804340000000005950436000000000045004b00001e850000c13d000000000006004b00001e970000613d000000000373001900000000050400190000000304600210000000000605043300000000064601cf000000000646022f00000000030304330000010004400089000000000343022f00000000034301cf000000000363019f0000000000350435000000010dd000390000000203d00367000000000303043b000000f803300270000000000a020019000000000801001900000c320003013e000000020ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000008a80436000000010dd000390000000201d00367000000000101043b000000f801100270000000000a00001900000c320001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a80436000000020dd00039000000f80a1002700000000201d00367000000000101043b000000f80110027000000c320001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a80436000000030dd00039000000f00a1002700000000201d00367000000000101043b000000f80110027000000c320001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a80436000000040dd00039000000e80a1002700000000201d00367000000000101043b000000f80110027000000c320001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a80436000000050dd00039000000e00a1002700000000201d00367000000000101043b000000f80110027000000c320001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a80436000000060dd00039000000d80a1002700000000201d00367000000000101043b000000f80110027000000c320001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a80436000000070dd00039000000d00a1002700000000201d00367000000000101043b000000f80110027000000c320001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a80436000000080dd00039000000c80a1002700000000201d00367000000000101043b000000f80110027000000c320001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a80436000000090dd00039000000c00a1002700000000201d00367000000000101043b000000f80110027000000c320001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a804360000000a0dd00039000000b80a1002700000000201d00367000000000101043b000000f80110027000000c320001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a804360000000b0dd00039000000b00a1002700000000201d00367000000000101043b000000f80110027000000c320001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a804360000000c0dd00039000000a80a1002700000000201d00367000000000101043b000000f80110027000000c320001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a804360000000d0dd00039000000a00a1002700000000201d00367000000000101043b000000f80110027000000c320001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a804360000000e0dd00039000000980a1002700000000201d00367000000000101043b000000f80110027000000c320001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a804360000000f0dd00039000000900a1002700000000201d00367000000000101043b000000f80110027000000c320001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a80436000000100dd00039000000880a1002700000000201d00367000000000101043b000000f80110027000000c320001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a80436000000110dd00039000000800a1002700000000201d00367000000000101043b000000f80110027000000c320001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a80436000000120dd00039000000780a1002700000000201d00367000000000101043b000000f80110027000000c320001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a80436000000130dd00039000000700a1002700000000201d00367000000000101043b000000f80110027000000c320001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a80436000000140dd00039000000680a1002700000000201d00367000000000101043b000000f80110027000000c320001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a80436000000150dd00039000000600a1002700000000201d00367000000000101043b000000f80110027000000c320001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a80436000000160dd00039000000580a1002700000000201d00367000000000101043b000000f80110027000000c320001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a80436000000170dd00039000000500a1002700000000201d00367000000000101043b000000f80110027000000c320001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a80436000000180dd00039000000480a1002700000000201d00367000000000101043b000000f80110027000000c320001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a80436000000190dd00039000000400a1002700000000201d00367000000000101043b000000f80110027000000c320001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a804360000001a0dd00039000000380a1002700000000201d00367000000000101043b000000f80110027000000c320001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a804360000001b0dd00039000000300a1002700000000201d00367000000000101043b000000f80110027000000c320001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a804360000001c0dd00039000000280a1002700000000201d00367000000000101043b000000f80110027000000c320001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a804360000001d0dd00039000000200a1002700000000201d00367000000000101043b000000f80110027000000c320001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a804360000001e0dd00039000000180a1002700000000201d00367000000000101043b000000f80110027000000c320001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a804360000001f0dd00039000000100a1002700000000201d00367000000000101043b000000f80110027000000c320001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a80436000000200dd00039000000080a1002700000000201d00367000000000101043b000000f80110027000000c320001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d0000000101d000390000000201100367000000000101043b0000000008a80436000000210dd000390000000204d00367000000000404043b000000f804400270000000000a01001900000c320004013e000000030ee0008c0000005b0000413d000084200180008a00000d7a0010009c0000005b0000413d0000000008a80436000000010dd000390000000203d00367000000000303043b000000f80330027000000c320003013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d000000200180008a000004400010008c0000005b0000413d0000000008a80436000000010dd00039000000000a0104330000000201d00367000000000101043b000000f80110027000000c320001013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d000000400180008a000004400010008c0000005b0000413d0000000008a80436000000010dd00039000000000a0104330000000204d00367000000000404043b000000f80440027000000c320004013e000000030ee0008c0000005b0000413d0000841f0080008c0000005b0000213d000000600180008a000004400010008c0000005b0000413d0000000008a80436000000010dd00039000000000a0104330000000204d00367000000000404043b000000f80440027000000c320004013e0000000301e0008c0000005b0000413d0000841f0080008c0000005b0000213d000000800280008a000004400020008c0000005b0000413d0000000008a80436000000010dd00039000000000a0204330000000205d00367000000000505043b000000f805500270000000000e01001900000c320005013e0000000301e0008c0000005b0000413d0000841f0080008c0000005b0000213d000000a00280008a000004400020008c0000005b0000413d0000000008a80436000000010dd00039000000000a0204330000000205d00367000000000505043b000000f805500270000000000e01001900000c320005013e0000000301e0008c0000005b0000413d0000841f0080008c0000005b0000213d000000c00280008a000004400020008c0000005b0000413d0000000008a80436000000010dd00039000000000a0204330000000205d00367000000000505043b000000f805500270000000000e01001900000c320005013e0000000301e0008c0000005b0000413d0000841f0080008c0000005b0000213d000000e00280008a000004400020008c0000005b0000413d0000000008a80436000000010dd00039000000000a0204330000000205d00367000000000505043b000000f805500270000000000e01001900000c320005013e0000000301e0008c0000005b0000413d0000841f0080008c0000005b0000213d000001000280008a000004400020008c0000005b0000413d0000000008a80436000000010dd00039000000000a0204330000000205d00367000000000505043b000000f805500270000000000e01001900000c320005013e0000000301e0008c0000005b0000413d0000841f0080008c0000005b0000213d000001200280008a000004400020008c0000005b0000413d0000000008a80436000000010dd00039000000000a0204330000000205d00367000000000505043b000000f805500270000000000e01001900000c320005013e0000000301e0008c0000005b0000413d0000841f0080008c0000005b0000213d000001400280008a000004400020008c0000005b0000413d0000000008a80436000000010dd00039000000000a0204330000000205d00367000000000505043b000000f805500270000000000e01001900000c320005013e0000000301e0008c0000005b0000413d0000841f0080008c0000005b0000213d000001600280008a000004400020008c0000005b0000413d0000000008a80436000000010dd00039000000000a0204330000000205d00367000000000505043b000000f805500270000000000e01001900000c320005013e0000000301e0008c0000005b0000413d0000841f0080008c0000005b0000213d000001800280008a000004400020008c0000005b0000413d0000000008a80436000000010dd00039000000000a0204330000000205d00367000000000505043b000000f805500270000000000e01001900000c320005013e0000000301e0008c0000005b0000413d0000841f0080008c0000005b0000213d000001a00280008a000004400020008c0000005b0000413d0000000008a80436000000010dd00039000000000a0204330000000205d00367000000000505043b000000f805500270000000000e01001900000c320005013e0000000301e0008c0000005b0000413d0000841f0080008c0000005b0000213d000001c00280008a000004400020008c0000005b0000413d0000000008a80436000000010dd00039000000000a0204330000000205d00367000000000505043b000000f805500270000000000e01001900000c320005013e0000000301e0008c0000005b0000413d0000841f0080008c0000005b0000213d000001e00280008a000004400020008c0000005b0000413d0000000008a80436000000010dd00039000000000a0204330000000205d00367000000000505043b000000f805500270000000000e01001900000c320005013e0000000301e0008c0000005b0000413d000000200280008a000004400020008c0000005b0000413d00000000030204330000000000a20435000000010dd000390000000204d00367000000000404043b000000f804400270000000000e010019000000000a03001900000c320004013e0000000301e0008c0000005b0000413d000000400280008a000004400020008c0000005b0000413d00000000030204330000000000a20435000000010dd000390000000204d00367000000000404043b000000f804400270000000000e010019000000000a03001900000c320004013e0000000301e0008c0000005b0000413d000000600280008a000004400020008c0000005b0000413d00000000030204330000000000a20435000000010dd000390000000204d00367000000000404043b000000f804400270000000000e010019000000000a03001900000c320004013e0000000301e0008c0000005b0000413d000000800280008a000004400020008c0000005b0000413d00000000030204330000000000a20435000000010dd000390000000204d00367000000000404043b000000f804400270000000000e010019000000000a03001900000c320004013e0000000301e0008c0000005b0000413d000000a00280008a000004400020008c0000005b0000413d00000000030204330000000000a20435000000010dd000390000000204d00367000000000404043b000000f804400270000000000e010019000000000a03001900000c320004013e0000000301e0008c0000005b0000413d000000c00280008a000004400020008c0000005b0000413d00000000030204330000000000a20435000000010dd000390000000204d00367000000000404043b000000f804400270000000000e010019000000000a03001900000c320004013e0000000301e0008c0000005b0000413d000000e00280008a000004400020008c0000005b0000413d00000000030204330000000000a20435000000010dd000390000000204d00367000000000404043b000000f804400270000000000e010019000000000a03001900000c320004013e0000000301e0008c0000005b0000413d000001000280008a000004400020008c0000005b0000413d00000000030204330000000000a20435000000010dd000390000000204d00367000000000404043b000000f804400270000000000e010019000000000a03001900000c320004013e0000000301e0008c0000005b0000413d000001200280008a000004400020008c0000005b0000413d00000000030204330000000000a20435000000010dd000390000000204d00367000000000404043b000000f804400270000000000e010019000000000a03001900000c320004013e0000000301e0008c0000005b0000413d000001400280008a000004400020008c0000005b0000413d00000000030204330000000000a20435000000010dd000390000000204d00367000000000404043b000000f804400270000000000e010019000000000a03001900000c320004013e0000000301e0008c0000005b0000413d000001600280008a000004400020008c0000005b0000413d00000000030204330000000000a20435000000010dd000390000000204d00367000000000404043b000000f804400270000000000e010019000000000a03001900000c320004013e0000000301e0008c0000005b0000413d000001800280008a000004400020008c0000005b0000413d00000000030204330000000000a20435000000010dd000390000000204d00367000000000404043b000000f804400270000000000e010019000000000a03001900000c320004013e0000000301e0008c0000005b0000413d000001a00280008a000004400020008c0000005b0000413d00000000030204330000000000a20435000000010dd000390000000204d00367000000000404043b000000f804400270000000000e010019000000000a03001900000c320004013e0000000301e0008c0000005b0000413d000001c00280008a000004400020008c0000005b0000413d00000000030204330000000000a20435000000010dd000390000000204d00367000000000404043b000000f804400270000000000e010019000000000a03001900000c320004013e0000000301e0008c0000005b0000413d000001e00280008a000004400020008c0000005b0000413d00000000030204330000000000a20435000000010dd000390000000204d00367000000000404043b000000f804400270000000000e010019000000000a03001900000c320004013e0000000301e0008c0000005b0000413d000002000280008a000004400020008c0000005b0000413d00000000030204330000000000a20435000000010dd000390000000204d00367000000000404043b000000f804400270000000000e010019000000000a03001900000c320004013e0000017706e0008c0000005b0000413d0000000c0000006b0000005b0000c13d000000200180008a000004400010008c0000005b0000413d000000400780008a00000000080704330000000001010433000000000001004b00000000030000190000000002000019000022590000613d00000d780210016700000000002a004b0000005b0000213d0000000002a1001900000d450020009c0000005b0000213d0000001f022000390000000502200270000084600500043d000000000352004b0000000004000019000022540000a13d00000000045500a9000000090440027000000000052200a900000009055002700000000004450049000084600020043f00000003023000c9000000000424001900000003021002100000000003240019000000000036004b0000005b0000413d0000848002a00039000b00000003001d000e00000008001d000f00000007001d001000000006001d00110000000d001d00000d410010009c00000d4101008041000000600110021000000d410020009c00000d41020080410000004002200210000000000112019f000000000200041400000d410020009c00000d4102008041000000c002200210000000000121019f00000d4b011001c70000800d0200003900000000030000192c872c780000040f0000000100200190000026e10000613d0000000b02000029000000100e2000690000001102000029000000010d2000390000000203d00367000000000303043b000000f8033002700000000e0a0000290000000f0800002900000c320003013e0000017707e0008c0000005b0000413d000000400180008a000004400010008c0000000d0200002900000001022041bf00000001002001900000005b0000c13d0000000004010433000000200180008a0000000001010433000000000001004b000022a20000613d00000d780210016700000000002a004b0000005b0000213d0000000002a1001900000d450020009c0000005b0000213d0000001f022000390000000502200270000084600600043d000000000362004b00000000050000190000229b0000a13d00000000056600a9000000090550027000000000062200a900000009066002700000000005560049000084600020043f00000003023000c9000000000525001900000003021002100000000002520019001001770020003d000000100070006c0000005b0000413d0000848002a00039000022a60000013d001001770000003d000001770070008c00000000020000190000005b0000413d000f00000007001d00110000000d001d00000d410010009c00000d4101008041000000600110021000000d410020009c00000d41020080410000004002200210000000000112019f000000600280008a000e00000002001d0000000002020433000b00000002001d000000000200041400000d410020009c00000d4102008041000000c002200210000000000112019f00000d4b011001c70000800d0200003900000001030000392c872c780000040f0000000100200190000026e10000613d00000010020000290000000f0e2000690000001102000029000000010d2000390000000203d00367000000000303043b000000f8033002700000000b0a0000290000000e0800002900000c320003013e0000017709e0008c0000005b0000413d000000600180008a000004400010008c0000000d0200002900000001022041bf00000001002001900000005b0000c13d000000400280008a0000000004020433000000200280008a0000000002020433000000000002004b000022f10000613d00000d780320016700000000003a004b0000005b0000213d0000000003a2001900000d450030009c0000005b0000213d0000001f033000390000000503300270000084600700043d000000000573004b0000000006000019000022ea0000a13d00000000067700a9000000090660027000000000073300a900000009077002700000000006670049000084600030043f00000003035000c9000000000636001900000003032002100000000003630019001002ee0030003d000000100090006c0000005b0000413d0000848003a00039000022f50000013d001002ee0000003d000002ee0090008c00000000030000190000005b0000413d000f00000009001d00110000000d001d00000d410020009c00000d4102008041000000600220021000000d410030009c00000d41030080410000004003300210000000000223019f0000000005010433000000800180008a000e00000001001d0000000001010433000b00000001001d000000000100041400000d410010009c00000d4101008041000000c001100210000000000121019f00000d4b011001c70000800d0200003900000002030000392c872c780000040f0000000100200190000026e10000613d00000010020000290000000f0e2000690000001102000029000000010d2000390000000203d00367000000000303043b000000f8033002700000000b0a0000290000000e0800002900000c320003013e0000017709e0008c0000005b0000413d000000800180008a000004400010008c0000000d0200002900000001022041bf00000001002001900000005b0000c13d000000400280008a0000000004020433000000200280008a0000000002020433000000000002004b000023410000613d00000d780320016700000000003a004b0000005b0000213d0000000003a2001900000d450030009c0000005b0000213d0000001f033000390000000503300270000084600700043d000000000573004b00000000060000190000233a0000a13d00000000067700a9000000090660027000000000073300a900000009077002700000000006670049000084600030043f00000003035000c9000000000636001900000003032002100000000003630019001004650030003d000000100090006c0000005b0000413d0000848003a00039000023450000013d001004650000003d000004650090008c00000000030000190000005b0000413d000f00000009001d00110000000d001d00000d410020009c00000d4102008041000000600220021000000d410030009c00000d41030080410000004003300210000000000223019f0000000006010433000000600180008a0000000005010433000000a00180008a000e00000001001d0000000001010433000b00000001001d000000000100041400000d410010009c00000d4101008041000000c001100210000000000121019f00000d4b011001c70000800d0200003900000003030000392c872c780000040f0000000100200190000026e10000613d00000010020000290000000f0e2000690000001102000029000000010d2000390000000203d00367000000000303043b000000f8033002700000000b0a0000290000000e0800002900000c320003013e0000017709e0008c0000005b0000413d000000a00180008a000004400010008c0000000d0200002900000001022041bf00000001002001900000005b0000c13d000000400280008a0000000004020433000000200280008a0000000002020433000000000002004b000023930000613d00000d780320016700000000003a004b0000005b0000213d0000000003a2001900000d450030009c0000005b0000213d0000001f033000390000000503300270000084600700043d000000000573004b00000000060000190000238c0000a13d00000000067700a9000000090660027000000000073300a900000009077002700000000006670049000084600030043f00000003035000c9000000000636001900000003032002100000000003630019001005dc0030003d000000100090006c0000005b0000413d0000848003a00039000023970000013d001005dc0000003d000005dc0090008c00000000030000190000005b0000413d000f00000009001d00110000000d001d00000d410020009c00000d4102008041000000600220021000000d410030009c00000d41030080410000004003300210000000000223019f0000000007010433000000800180008a0000000006010433000000600180008a0000000005010433000000c00180008a000e00000001001d0000000001010433000b00000001001d000000000100041400000d410010009c00000d4101008041000000c001100210000000000121019f00000d4b011001c70000800d0200003900000004030000392c872c780000040f0000000100200190000026e10000613d00000010020000290000000f0e2000690000001102000029000000010d2000390000000203d00367000000000303043b000000f8033002700000000b0a0000290000000e0800002900000c320003013e00007d0004e0008c0000005b0000413d0000000c0000006b0000005b0000c13d000000400180008a000004400010008c0000005b0000413d0000000002010433001000000001001d000000200180008a000000000101043300000000030a00190000000005000019000000000600001900110000000d001d2c872b480000040f0000001103000029000000010d300039000000000a0200190000000204d00367000000000404043b000000f804400270000000000e010019000000100800002900000c320004013e000000c00180008a000800000001001d000004400010008c0000005b0000413d000000a00180008a0000000006010433000000800180008a0000000004010433000000600180008a0000000001010433000a00000001001d000000400180008a0000000001010433000b00000001001d000000200180008a000000000101043300000008020000290000000003020433000000000003004b0000000002000019000900000004001d000023f30000613d00000d7802300167000000000026004b0000005b0000213d000000000403001900000000026400190000000904000029000400000003001d000000000004004b0000000003000019000023fc0000613d00000d78034001670000000a0030006b0000005b0000213d0000000a040000290000000903400029000000000032004b000000000203a019000000000002004b0000000005000019000024110000613d00000d450020009c0000005b0000213d0000001f022000390000000502200270000084600400043d000000000342004b0000000005000019000024110000a13d00000000044400a9000000090440027000000000052200a900000009055002700000000004450049000084600020043f00000003023000c90000000005240019000600000005001d000500000006001d00100000000e001d00110000000d001d00000d4601100197000f00000001001d000000000010043f0000000001000414000000c00110021000000d43011001c700008013020000390000000003000019000000000400001900000000050000190000000006000019000e0000000a001d2c872c780000040f00000001002001900000000b02000029000026e10000613d00000d4700100198000000640100003900000a28010060390000000601100029000000000002004b000024680000613d000600000001001d0000000c0000006b0000000f020000290000005b0000c13d00000d570100004100000000001004430000000400200443000000000100041400000d410010009c00000d4101008041000000c00110021000000d58011001c700008002020000392c872c7d0000040f0000000100200190000026e00000613d00000006020000290000232804200039000000000101043b000000000001004b000024690000c13d000200000004001d00000d590100004100000000001004430000000f010000290000000400100443000000000100041400000d410010009c00000d4101008041000000c00110021000000d58011001c70000800a020000392c872c7d0000040f0000000100200190000026e00000613d000000000101043b000000000001004b0000000204000029000024690000c13d00000d5a01000041000000000010043f0000000f01000029000000040010043f000000000100041400000d410010009c00000d4101008041000000c00110021000000d49011001c700008003020000392c872c7d0000040f0000000100200190000026e10000613d000000000201043b0003000000010355000000000002004b00000010010000290000000f0200002900000002040000290000000604006029000084d0044060390000246b0000013d000000000401001900000010010000290000000f0200002900100000004100530000005b0000413d00000d4801000041000000000010043f000000040020043f000000000100041400000d410010009c00000d4101008041000000c00110021000000d49011001c700008002020000392c872c7d0000040f0000001005000029000000060350027000000000033500490000000e0030006c0000000e03008029000008fc043000390000000b0d00002900000000000d004b000000000c040019000000000c0360190000000100200190000026e10000613d00000000083500490000000a0200002900008480092000390000000502000029000084800e200039000000000201043b000300000001035500000d4a0120019700000d4b0010009c000024ad0000c13d000600000009001d000e0000000e001d001000000008001d00000000000d004b000024bf0000613d000a00000004001d00050000000c001d00000d5901000041000000000010044300000000010004100000000400100443000000000100041400000d410010009c00000d4101008041000000c00110021000000d58011001c70000800a020000392c872c7d0000040f0000000100200190000026e00000613d000000000101043b0000000b0010006c000000050c0000290000000a0b000029000024bf0000813d0000000401000367000000600210027000000d410220019700040000002103e5000004000000043f000000000a000019000026d80000013d0000000f0f0000290000000401f0008a000000040010008c00000d3c0001a13e00000bb8050000390000000100f0008c000000110b000029000025e20000613d0000000200f0008c0000259b0000c13d00000009010000290000001f0110003900000005011002700000000c011000c90000003c0510003900000000035c004b000025e40000413d000026500000013d0000000301000029000000000010043f0000002000c0043f0000000001000414000000c00110021000000d51011001c7000080130200003900000000030000190000000004000019000000000500001900000000060000192c872c780000040f0000000b030000290000000100200190000026e10000613d000000060100002900000d410010009c00000d41010080410000004001100210000000090200002900000d410020009c00000d41020080410000006002200210000000000112019f000000000200041400000d410020009c00000d4102008041000000c002200210000000000112019f000000000003004b000024e30000613d00000d4b011001c700008009020000390000000f040000290000000005000019000024e40000013d0000000f020000292c872c780000040f000000020300036700040000000303550002000000010355000000600410027000000d4105400197000000200450008c000026e10000413d000000000b01043b000000040040006c0000000007040019000024f40000413d00000004070000290000002006700039000000000056004b000026e10000213d00000d79067001980000001f0770018f00000020011003700000000e0a00002900000000056a0019000024ff0000613d000000000801034f000000008908043c000000000a9a043600000000005a004b000024fb0000c13d000000000007004b0000250c0000613d000000000661034f0000000307700210000000000805043300000000087801cf000000000878022f000000000606043b0000010007700089000000000676022f00000000067601cf000000000686019f0000000000650435000004000040043f00040000000103550002000000030355000000010a0000390000000100200190000026d80000c13d00000d5201000041000000000010043f0000000001000414000000c00110021000000d53011001c700008013020000390000000003000019000000000400001900000000050000190000000006000019000a0000000b001d2c872c780000040f0000000a0b0000290000000100200190000000000a000019000026d80000c13d000026e10000013d000000090390002900000000010904330000000a02000029000084a002200039000000000032004b000000110b000029000025330000a13d000000000093004b0000000004090019000000000403201900000000044200490000000304400210000000000141022f00000000014101cf000000ff0040008c000000000100201900000000040204330000000a05000029000084c005500039000000000035004b000025400000a13d000000000023004b000000000203201900000000022500490000000302200210000000000424022f00000000042401cf000000ff0020008c000000000400201900000000020504330000000a06000029000084e006600039000000000036004b0000254d0000a13d000000000053004b000000000503201900000000055600490000000305500210000000000252022f00000000025201cf000000ff0050008c000000000200201900000d4c05000041000000200010008c000025e20000213d000000200040008c000025e20000213d000000200020008c000025e20000213d00000000066100190000000075060434000000000037004b000025600000a13d000000000063004b000000000306a01900000000033700490000000303300210000000000535022f00000000053501cf000000ff0030008c0000000005002019000000000004004b000026410000613d0000000303400210000001000330008900000000043502310000000003000019000026420000613d00000d4d0040009c00000000030000390000008003002039000000000434022f00000d4c0040009c00000000050000390000004005002039000000000454022f00000d410040009c00000000060000390000002006002039000000000464022f0000ffff0040008c00000000070000390000001007002039000000000474022f000000ff0040008c001000000008001d00000000080000390000000808002039000000000484022f0000000f0040008c000600000009001d00000000090000390000000409002039000000000494022f000000030040008c000000000a000039000000020a0020390000000004a4022f000000010040008c00000001033021bf000000000353019f000000000363019f000000000373019f000000000383019f0000001008000029000000000393019f00000006090000290000000003a3019f000026420000013d00000009010000290000001f01100039000000050110027000000003011000c90000000f05100039000025e10000013d0000000901000029000000c00110011a000084d0011000c90000afc805100039000025e10000013d00000000000f004b0000000003000039000000010300603900000d4f0020019800000001033061bf00000000000d004b00000000010000390000000101006039000600000003001d00000000003101700000000503c000c9000001f40330c03900000d410090009c00000d41090080410000004001900210000000090200002900000d410020009c00000d41020080410000006002200210000000000112019f00000d410030009c00000d4103008041000000c002300210000000000112019f00000000040004140000000c0000006b001000000008001d000e0000000e001d000900000003001d000a00000004001d000025f10000613d00000000020f00192c872c7d0000040f0000000e09000029000000600310027000000d4103300197000000040030006c000000040400002900000000040340190000001f0540018f00000d4e064001980000000004690019000025cb0000613d000000000701034f000000007807043c0000000009890436000000000049004b000025c70000c13d000000000005004b000025d80000613d000000000661034f0000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f0000000000540435000000110d0000290000001008000029000000090500002900000006060000290000000a090000290000262c0000013d0000009605000039000025e10000013d0000177005000039000000110b00002900000000035c004b000026500000813d0000000401000367000000600210027000000d410220019700040000002103e5000004000000043f000000000e080019000000010db000390000000203d00367000000000303043b000000f803300270000000000a000019000000080800002900000c320003013e00000000000d004b000026090000613d00000d4b011001c7000080090200003900000000030d001900000000040f001900000000050000192c872c780000040f000000600310027000000d4103300197000000040030006c000000040400002900000000040340190000001f0540018f00000d4e064001980000000e0900002900000000046900190000261a0000613d000000000701034f000000007807043c0000000009890436000000000049004b000026040000c13d0000261a0000013d00000000020f00192c872c780000040f000000600310027000000d4103300197000000040030006c000000040400002900000000040340190000001f0540018f00000d4e064001980000000e0900002900000000046900190000261a0000613d000000000701034f000000007807043c0000000009890436000000000049004b000026160000c13d000000000005004b000000110d00002900000010080000290000000a090000290000262a0000613d000000000661034f0000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f0000000000540435000000090500002900000006060000290000000004000414000000000449004b00000000040040190004000000010355000004000030043f0000000100600190000026360000613d0000000b0000006b000001f40550608a0000000004000019000000000345004b0000000001000019000000050130211a000000010a20018f000000000e180019000000010dd000390000000201d00367000000000101043b000000f801100270000000080800002900000c320001013e0000000003000019000000000012004b000000000201a0190000000701200039000000030110027000000000011100a9000000010030008c000000010300a03900000000013100a90000ffff0110018f000000030510011a000000c80050008c000000c80500a03900000000035c004b000025e40000413d000000400190021000000009020000290000006002200210000000000112019f0000000002000414000000c002200210000000000121019f0000000c0000006b001000000008001d000e0000000e001d000a00000003001d0000266e0000613d00000000020f00192c872c7d0000040f0000000e09000029000000600310027000000d4103300197000000040030006c000000040400002900000000040340190000001f0540018f00000d4e064001980000000004690019000026b50000613d000000000701034f000000007807043c0000000009890436000000000049004b000026690000c13d000026b50000013d00000000000d004b000026a40000613d00000d5b011001c7000080090200003900000000030d001900000000040f0019000000000500001900000000060000192c872c780000040f000000600310027000000d4103300197000000040000006b000000010220018f000026d20000613d000000000002004b000026d20000613d000000040030006c000000040200002900000000020340190000001f0420018f00000d4e052001980000000e09000029000000000259001900000010080000290000268c0000613d000000000601034f000000006706043c0000000009790436000000000029004b000026880000c13d000000000004004b000000110d0000290000269a0000613d000000000551034f0000000304400210000000000602043300000000064601cf000000000646022f000000000505043b0000010004400089000000000545022f00000000044501cf000000000464019f00000000004204350004000000010355000004000030043f000000010a0000390000000a0e800029000000010dd000390000000201d00367000000000101043b000000f801100270000000080800002900000c320001013e00000000020f00192c872c780000040f000000600310027000000d4103300197000000040030006c000000040400002900000000040340190000001f0540018f00000d4e064001980000000e090000290000000004690019000026b50000613d000000000701034f000000007807043c0000000009890436000000000049004b000026b10000c13d000000000005004b000026c20000613d000000000661034f0000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f00000000005404350004000000010355000004000030043f0000000100200190000000000a000019000000000b000019000026d80000613d000000010a0000390000000a02000029000000100e200029000000110d000029000000010dd000390000000201d00367000000000101043b000000f801100270000000080800002900000c320001013e0004000000010355000004000030043f000000000002004b000000000a000019000000000b000019000026c80000c13d000000100eb00029000000110d000029000000010dd000390000000201d00367000000000101043b000000f801100270000000080800002900000c320001013e000000000001042f000000000100001900002c8900010430000000200280008a000004400020008c0000005b0000413d00000000010e00190000000002020433000000000002004b000015c50000613d00000d780420016700000000004a004b0000005b0000213d0000000004a2001900000d450040009c0000005b0000213d0000001f044000390000000504400270000084600600043d000000000564004b0000000007000019000026fe0000a13d00000000066600a9000000090660027000000000074400a900000009077002700000000006670049000084600040043f00000003045000c90000000007460019000000000171004b0000005b0000413d0000848003a00039000000010000006b000015c90000c13d000015ce0000013d000000a00180008a000a00000001001d000004400010008c0000005b0000413d000000800180008a0000000007010433000000600180008a0000000006010433000000400180008a0000000001010433000f00000001001d000000200180008a00000000010104330000000a020000290000000003020433000000000003004b00000000020000190000271b0000613d00000d7802300167000000000027004b0000005b0000213d00000000040300190000000002740019000600000003001d000000000006004b0000000003000019000027230000613d00000d78036001670000000f0030006b0000005b0000213d0000000f03600029000000000032004b000000000203a019000000000002004b0000000005000019000027380000613d00000d450020009c0000005b0000213d0000001f022000390000000502200270000084600400043d000000000342004b0000000005000019000027380000a13d00000000044400a9000000090440027000000000052200a900000009055002700000000004450049000084600020043f00000003023000c90000000005240019000900000005001d000800000007001d000500000006001d00100000000e001d00110000000d001d00000d4601100197000b00000001001d000000000010043f0000000001000414000000c00110021000000d43011001c700008013020000390000000003000019000000000400001900000000050000190000000006000019000e0000000a001d2c872c780000040f0000000100200190000026e10000613d00000d4700100198000000640100003900000a2801006039000000090110002900100010001000730000005b0000413d00000d4801000041000000000010043f0000000b01000029000000040010043f000000000100041400000d410010009c00000d4101008041000000c00110021000000d49011001c700008002020000392c872c7d0000040f00000010040000290000000603400270000000000c3400490000000e00c0006c0000000e0c0080290000000100200190000026e10000613d0000000f02000029000084800f2000390000000802000029000084800d200039000000000201043b000300000001035500000d4a0120019700000d4b0010009c000027ce0000c13d000e0000000d001d0000000301000029000000000010043f0000002000c0043f0000000001000414000000c00110021000000d51011001c700008013020000390000000003000019000000000400001900000000050000190000000006000019000f0000000c001d00090000000f001d2c872c780000040f00000009010000290000000100200190000026e10000613d00000d410010009c00000d41010080410000004001100210000000050200002900000d410020009c00000d41020080410000006002200210000000000112019f000000000200041400000d410020009c00000d4102008041000000c002200210000000000112019f0000000b020000292c872c820000040f0000000f0c000029000000020300036700040000000303550002000000010355000000600410027000000d4105400197000000200450008c000026e10000413d000000000b01043b000000060040006c00000000070400190000279e0000413d00000006070000290000002006700039000000000056004b000026e10000213d00000d79067001980000001f0770018f00000020011003700000000e0a00002900000000056a0019000027a90000613d000000000801034f000000008908043c000000000a9a043600000000005a004b000027a50000c13d000000000007004b000027b60000613d000000000661034f0000000307700210000000000805043300000000087801cf000000000878022f000000000606043b0000010007700089000000000676022f00000000067601cf000000000686019f0000000000650435000004000040043f00040000000103550002000000030355000000010a0000390000000100200190000028f70000c13d00000d5201000041000000000010043f0000000001000414000000c00110021000000d53011001c700008013020000390000000003000019000000000400001900000000050000190000000006000019000e0000000b001d2c872c780000040f0000000e0b0000290000000f0c0000290000000100200190000000000a000019000028f70000c13d000026e10000013d0000000b0e0000290000000401e0008a000000040010008c000000100800a02900000d370001a13e00000bb8050000390000000100e0008c000000110b0000290000001008000029000028a00000613d0000000200e0008c000028570000c13d00000005010000290000001f0110003900000005011002700000000c011000c90000003c0510003900000000015c004b000028a20000413d000028be0000013d0000000503f0002900000000010f04330000000f02000029000084a002200039000000000032004b000000110b000029000027f20000a13d0000000000f3004b00000000040f0019000000000403201900000000044200490000000304400210000000000141022f00000000014101cf000000ff0040008c000000000100201900000000040204330000000f05000029000084c005500039000000000035004b000027ff0000a13d000000000023004b000000000203201900000000022500490000000302200210000000000424022f00000000042401cf000000ff0020008c000000000400201900000000020504330000000f06000029000084e006600039000000000036004b0000280c0000a13d000000000053004b000000000503201900000000055600490000000305500210000000000252022f00000000025201cf000000ff0050008c000000000200201900000d4c05000041000000200010008c000028a00000213d000000200040008c000028a00000213d000000200020008c000028a00000213d00000000066100190000000075060434000000000037004b0000281f0000a13d000000000063004b000000000306a01900000000033700490000000303300210000000000535022f00000000053501cf000000ff0030008c0000000005002019000000000004004b000028af0000613d0000000303400210000001000330008900000000043502310000000003000019000028b00000613d00000d4d0040009c00000000030000390000008003002039000000000434022f00000d4c0040009c00000000050000390000004005002039000000000454022f00000d410040009c00000000060000390000002006002039000000000464022f0000ffff0040008c00000000070000390000001007002039000000000474022f000000ff0040008c00000000080000390000000808002039000000000484022f0000000f0040008c00000000090000390000000409002039000000000494022f000000030040008c000000000a000039000000020a0020390000000004a4022f000000010040008c00000001033021bf000000000353019f000000000363019f000000000373019f000000000383019f000000000393019f0000000003a3019f0000001008000029000028b00000013d00000005010000290000001f01100039000000050110027000000003011000c90000000f051000390000289f0000013d0000000501000029000000c00110011a000084d0011000c90000afc8051000390000289f0000013d000e0000000d001d0000000401000367000000600310027000000d410330019700040000003103e5000004000000043f00000000000e004b000028630000613d00000d4f00200198000000000a000019000000000b0c0019000028f70000c13d000f0000000c001d00000d4100f0009c00000d410f0080410000004001f00210000000050200002900000d410020009c00000d41020080410000006002200210000000000112019f000000000200041400000d410020009c00000d4102008041000000c002200210000000000112019f0000000b020000292c872c820000040f000000010a20018f000000600210027000000d4102200197000000060020006c000000060300002900000000030240190000001f0430018f00000d4e053001980000000e080000290000000003580019000028830000613d000000000601034f000000006706043c0000000008780436000000000038004b0000287f0000c13d000000000004004b000000110d0000290000000f07000029000028920000613d000000000551034f0000000304400210000000000603043300000000064601cf000000000646022f000000000505043b0000010004400089000000000545022f00000000044501cf000000000464019f00000000004304350004000000010355000004000020043f0000001001700069000000000e710019000000010dd000390000000201d00367000000000101043b000000f8011002700000000a0800002900000c320001013e00000096050000390000289f0000013d0000177005000039000000110b00002900000000015c004b000028be0000813d0000000401000367000000600210027000000d410220019700040000002103e5000004000000043f000000000ec80049000000010db000390000000203d00367000000000303043b000000f803300270000000000a0000190000000a0800002900000c320003013e0000000003000019000000000012004b000000000201a0190000000701200039000000030110027000000000011100a9000000010030008c000000010300a03900000000013100a90000ffff0110018f000000030510011a000000c80050008c000000c80500a03900000000015c004b000028a20000413d000900000001001d000f0000000c001d0000004001f0021000000005020000290000006002200210000000000112019f0000000002000414000000c002200210000000000121019f00000000020e0019000e0000000d001d2c872c7d0000040f0000000e09000029000000600310027000000d4103300197000000060030006c000000060400002900000000040340190000001f0540018f00000d4e064001980000000004690019000028d90000613d000000000701034f000000007807043c0000000009890436000000000049004b000028d50000c13d000000000005004b000028e60000613d000000000661034f0000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f00000000005404350004000000010355000004000030043f0000000100200190000000000a000019000000000b0000190000000f0c000029000028f70000613d000000010a0000390000001002c00069000000090e2000290000001103000029000000010d3000390000000204d00367000000000404043b000000f8044002700000000a0800002900000c320004013e0000001001c00069000000000eb10019000000110d000029000000010dd000390000000201d00367000000000101043b000000f8011002700000000a0800002900000c320001013e00007d0004e0008c0000005b0000413d0000000c0000006b0000005b0000c13d000000600180008a000004400010008c0000005b0000413d0000000006010433001000000001001d000000400180008a0000000002010433000000200180008a0000000001010433000000010500003900000000030a001900110000000d001d2c872b480000040f0000001103000029000000010d300039000000000a0200190000000204d00367000000000404043b000000f804400270000000000e010019000000100800002900000c320004013e000000a00180008a000b00000001001d000004400010008c0000005b0000413d000000800180008a0000000007010433000000600180008a0000000006010433000000400180008a0000000001010433000f00000001001d000000200180008a00000000010104330000000b020000290000000003020433000000000003004b0000000002000019000029310000613d00000d7802300167000000000027004b0000005b0000213d00000000040300190000000002740019000900000003001d000000000006004b0000000003000019000029390000613d00000d78036001670000000f0030006b0000005b0000213d0000000f03600029000000000032004b000000000203a019000000000002004b00000000050000190000294e0000613d00000d450020009c0000005b0000213d0000001f022000390000000502200270000084600400043d000000000342004b00000000050000190000294e0000a13d00000000044400a9000000090440027000000000052200a900000009055002700000000004450049000084600020043f00000003023000c90000000005240019000800000005001d000600000007001d000500000006001d00100000000e001d00110000000d001d00000d4601100197000a00000001001d000000000010043f0000000001000414000000c00110021000000d43011001c700008013020000390000000003000019000000000400001900000000050000190000000006000019000e0000000a001d2c872c780000040f0000000100200190000026e10000613d00000d4700100198000000640100003900000a2801006039000000080110002900100010001000730000005b0000413d00000d4801000041000000000010043f0000000a01000029000000040010043f000000000100041400000d410010009c00000d4101008041000000c00110021000000d49011001c700008002020000392c872c7d0000040f00000010040000290000000603400270000000000c3400490000000e00c0006c0000000e0c0080290000000100200190000026e10000613d0000000f0200002900008480092000390000000602000029000084800d200039000000000201043b000300000001035500000d4a0120019700000d4b0010009c000e0000000c001d000029e40000c13d000800000009001d000f0000000d001d00000d5001000041000000000010043f0000002000c0043f0000000001000414000000c00110021000000d51011001c7000080130200003900000000030000190000000004000019000000000500001900000000060000192c872c780000040f0000000100200190000026e10000613d000000080100002900000d410010009c00000d41010080410000004001100210000000050200002900000d410020009c00000d41020080410000006002200210000000000112019f000000000200041400000d410020009c00000d4102008041000000c002200210000000000112019f0000000a020000292c872c780000040f0000000e0b000029000000020300036700040000000303550002000000010355000000600410027000000d4105400197000000200450008c000026e10000413d000000000c01043b000000090040006c0000000007040019000029b40000413d00000009070000290000002006700039000000000056004b000026e10000213d00000d79067001980000001f0770018f00000020011003700000000f0a00002900000000056a0019000029bf0000613d000000000801034f000000008908043c000000000a9a043600000000005a004b000029bb0000c13d000000000007004b000029cc0000613d000000000661034f0000000307700210000000000805043300000000087801cf000000000878022f000000000606043b0000010007700089000000000676022f00000000067601cf000000000686019f0000000000650435000004000040043f00040000000103550002000000030355000000010a000039000000010020019000002b150000c13d00000d5201000041000000000010043f0000000001000414000000c00110021000000d53011001c700008013020000390000000003000019000000000400001900000000050000190000000006000019000f0000000c001d2c872c780000040f0000000f0c0000290000000e0b0000290000000100200190000000000a00001900002b150000c13d000026e10000013d0000000a0f0000290000000401f0008a000000040010008c000000100800a029000000050e00a02900000d320001a13e00000bb8050000390000000100f0008c000000110b0000290000001008000029000000050e00002900002ac00000613d0000000200f0008c00002a6e0000c13d0000001f01e0003900000005011002700000000c011000c90000003c0510003900000000015c004b00002ac20000413d00002ade0000013d00000000039e001900000000010904330000000f02000029000084a002200039000000000032004b000000110b00002900002a090000a13d000000000093004b0000000004090019000000000403201900000000044200490000000304400210000000000141022f00000000014101cf000000ff0040008c000000000100201900000000040204330000000f05000029000084c005500039000000000035004b00002a160000a13d000000000023004b000000000203201900000000022500490000000302200210000000000424022f00000000042401cf000000ff0020008c000000000400201900000000020504330000000f06000029000084e006600039000000000036004b00002a230000a13d000000000053004b000000000503201900000000055600490000000305500210000000000252022f00000000025201cf000000ff0050008c000000000200201900000d4c05000041000000200010008c00002ac00000213d000000200040008c00002ac00000213d000000200020008c00002ac00000213d00000000066100190000000075060434000000000037004b00002a360000a13d000000000063004b000000000306a01900000000033700490000000303300210000000000535022f00000000053501cf000000ff0030008c0000000005002019000000000004004b00002acf0000613d000000030340021000000100033000890000000004350231000000000300001900002ad00000613d00000d4d0040009c00000000030000390000008003002039000000000434022f00000d4c0040009c00000000050000390000004005002039000000000454022f00000d410040009c00000000060000390000002006002039000000000464022f0000ffff0040008c00000000070000390000001007002039000000000474022f000000ff0040008c00000000080000390000000808002039000000000484022f0000000f0040008c000800000009001d00000000090000390000000409002039000000000494022f000000030040008c000000000a000039000000020a0020390000000004a4022f000000010040008c00000001033021bf000000000353019f000000000363019f000000000373019f000000000383019f000000000393019f00000008090000290000000003a3019f000000100800002900002ad00000013d0000001f01e00039000000050110027000000003011000c90000000f0510003900002abf0000013d000000c001e0011a000084d0011000c90000afc80510003900002abf0000013d00000d410090009c00000d4109008041000000400190021000000d4100e0009c00000d410e0080410000006003e00210000000000113019f00000d4f002001980000000002000039000000010200603900000000000f004b0000000003000039000000010300603900060000002301a40000000502c000c9000001f40220c03900000d410020009c00000d4102008041000800000002001d000000c002200210000000000112019f0000000002000414000500000002001d00000000020f0019000f0000000d001d2c872c7d0000040f0000000f09000029000000600310027000000d4103300197000000090030006c000000090400002900000000040340190000001f0540018f00000d4e06400198000000000469001900002a970000613d000000000701034f000000007807043c0000000009890436000000000049004b00002a930000c13d000000000005004b000000110d00002900002aa50000613d000000000661034f0000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f00000000005404350000000004000414000000050440006b00000000040040190004000000010355000004000030043f000000060100002900000001001001900000000801000029000001f40110c08a000000000400c019000000000341004b0000000001000019000000050130211a000000010a20018f00000010020000290000000e0220006a000000000e120019000000010dd000390000000201d00367000000000101043b000000f8011002700000000b0800002900000c320001013e000000960500003900002abf0000013d0000177005000039000000110b00002900000000015c004b00002ade0000813d0000000401000367000000600210027000000d410220019700040000002103e5000004000000043f000000000ec80049000000010db000390000000203d00367000000000303043b000000f803300270000000000a0000190000000b0800002900000c320003013e0000000003000019000000000012004b000000000201a0190000000701200039000000030110027000000000011100a9000000010030008c000000010300a03900000000013100a90000ffff0110018f000000030510011a000000c80050008c000000c80500a03900000000015c004b00002ac20000413d000800000001001d00000040019002100000006002e00210000000000112019f0000000002000414000000c002200210000000000121019f00000000020f0019000f0000000d001d2c872c7d0000040f0000000f09000029000000600310027000000d4103300197000000090030006c000000090400002900000000040340190000001f0540018f00000d4e06400198000000000469001900002af70000613d000000000701034f000000007807043c0000000009890436000000000049004b00002af30000c13d000000000005004b00002b040000613d000000000661034f0000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f00000000005404350004000000010355000004000030043f0000000100200190000000000a000019000000000c0000190000000e0b00002900002b150000613d000000010a0000390000001002b00069000000080e2000290000001103000029000000010d3000390000000204d00367000000000404043b000000f8044002700000000b0800002900000c320004013e0000001001b00069000000000ec10019000000110d000029000000010dd000390000000201d00367000000000101043b000000f8011002700000000b0800002900000c320001013e2c872b420000040f000000200180008a000004400010008c0000005b0000413d00000000020e00190000000001010433000000000001004b00002b290000c13d00008480030000390000000104000029000015b70000013d00000d780410016700000000004a004b0000005b0000213d0000000004a1001900000d450040009c0000005b0000213d0000001f044000390000000504400270000084600600043d000000000564004b000000000700001900002b3d0000a13d00000000066600a9000000090660027000000000074400a900000009077002700000000006670049000084600040043f00000003045000c90000000007460019000000000272004b0000005b0000413d0000848003a000390000000104000029000015b70000013d000000000000043f000002e00100043d00000d410010009c00000d4101008041000000600110021000002c89000104300008000000000002000600000006001d0000c0010020008c00002c6e0000813d00000000070200190000000008010019000000000002004b00002b650000613d00000d7801700167000000000081004b00002c6e0000413d000000000187001900000d450010009c00002c6e0000213d0000001f011000390000000502100270000084600900043d000000000692004b000000000100001900002b660000a13d00000000019900a9000000090110027000000000092200a900000009099002700000000001190049000084600020043f00000003026000c9000000000121001900002b660000013d00000000010000190000001f02700039000000050220027000000006062000c9000000000005004b0000000006006019000000010220021000000000012100190000000001610019000000000114004b00002c6e0000413d0000000404000367000000600240027000000d410220019700040000002403e5000004000000043f000000000003004b000800000001001d000500000003001d000700000007001d000400000008001d00002b920000613d000300000005001d00000d5901000041000000000010044300000000010004100000000400100443000000000100041400000d410010009c00000d4101008041000000c00110021000000d58011001c70000800a020000392c872c7d0000040f000000010020019000002c760000613d000000000101043b000000050010006c000000080100002900000007070000290000000408000029000000030500002900002b920000813d0000000002000019000000000001042d00000006021002700000000002210049000000000012004b0000000002018019000300000002001d000000000005004b00000d6c040000410000000004006019000284800080003d000000000007004b00002bb10000613d000000000005004b00002bb10000613d00000007010000290000006001100210000000020200002900000d410020009c00000d41020080410000004002200210000000000112019f000000000200041400000d410020009c00000d4102008041000000c002200210000000000121019f00000d4b011001c700008010020000392c872c7d0000040f000000010020019000002c740000613d000000000401043b00000d7c02000041000000000020043f0000000601000029000000040010043f000000240040043f0000000001000414000000c00110021000000d7d011001c7000080060200003900000000030000190000000004000019000000000500001900000000060000192c872c780000040f000000010020019000002bf30000613d000000000201043b000300000001035500000d4601200197000600000001001d000000000010043f0000000001000414000000c00110021000000d43011001c7000080130200003900000000030000190000000004000019000000000500001900000000060000192c872c780000040f000000010020019000002c740000613d00000d4801000041000000000010043f0000000601000029000000040010043f000000000100041400000d410010009c00000d4101008041000000c00110021000000d49011001c700008002020000392c872c7d0000040f000000010020019000002c740000613d000000000201043b0003000000010355000000000002004b00002bf30000c13d00000d5a01000041000000000010043f0000000601000029000000040010043f000000000100041400000d410010009c00000d4101008041000000c00110021000000d49011001c700008003020000392c872c7d0000040f000000010020019000002c740000613d000000000201043b0003000000010355000000000002004b00002bf70000613d000000000200001900000003030000290000000801300069000000000001042d00000d5401000041000000000010043f0000000301000029000000200010043f0000000001000414000000c00110021000000d51011001c7000080130200003900000000030000190000000004000019000000000500001900000000060000192c872c780000040f0000000100200190000000060400002900002c740000613d000000040200002900008400052000390000000001050433000001400010043f00008420062000390000000001060433000001600010043f00008440072000390000000001070433000001800010043f00008460082000390000000001080433000001a00010043f0000000201000029000000400110021000000d7e0110009a0000000703000029000000600230021000000d7f0220009a000000000112019f000100000008001d00000000003804350000004002000039000200000007001d0000000000270435000400000006001d000000000046043500000d8002000041000700000005001d00000000002504350000000002000414000000c002200210000000000121019f00000d5b011001c70000000503000029000000000003004b00002c300000613d00008009020000390000800604000039000000010500003900002c340000013d000080060200003900000000030000190000000004000019000000000500001900000000060000192c872c780000040f000001400300043d00000007040000290000000000340435000001600300043d00000004040000290000000000340435000001800300043d00000002040000290000000000340435000001a00300043d0000000104000029000000000034043500000002030003670002000000010355000000600410027000000d41044001970004000000030355000000010020019000002c520000613d000000400040008c00002c740000413d0000002002100370000000000202043b000000000501043b00040000004103e50002000000030355000004000000043f00002c680000013d000000200240008c00002c740000413d000000000401043b000700000004001d000004000020043f0004002000100376000200000003035500000d5201000041000000000010043f0000000001000414000000c00110021000000d53011001c7000080130200003900000000030000190000000004000019000000000500001900000000060000192c872c780000040f00000007050000290000000100200190000000000200001900002c740000613d00000003035000690000000801000029000000000013004b00002c6e0000213d0000000001310049000000000001042d000000000000043f000002e00100043d00000d410010009c00000d4101008041000000600110021000002c8900010430000000000100001900002c8900010430000000000001042f000000000001042f00002c7b002104210000000102000039000000000001042d0000000002000019000000000001042d00002c80002104230000000102000039000000000001042d0000000002000019000000000001042d00002c85002104250000000102000039000000000001042d0000000002000019000000000001042d00002c870000043200002c880001042e00002c890001043000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000157e000000000000000000000000000000000000000000000000000000000000009e00000000000000000000000000000000000000000000000000000000000000aa00000000000000000000000000000000000000000000000000000000000000b600000000000000000000000000000000000000000000000000000000000000c200000000000000000000000000000000000000000000000000000000000000d100000000000000000000000000000000000000000000000000000000000000f100000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000124000000000000000000000000000000000000000000000000000000000000013c00000000000000000000000000000000000000000000000000000000000001ac00000000000000000000000000000000000000000000000000000000000001cb0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e00000000000000000000000000000000000000000000000000000000000001e400000000000000000000000000000000000000000000000000000000000001f20000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000021900000000000000000000000000000000000000000000000000000000000002320000000000000000000000000000000000000000000000000000000000000240000000000000000000000000000000000000000000000000000000000000024c000000000000000000000000000000000000000000000000000000000000025800000000000000000000000000000000000000000000000000000000000002640000000000000000000000000000000000000000000000000000000000000270000000000000000000000000000000000000000000000000000000000000027a000000000000000000000000000000000000000000000000000000000000028b000000000000000000000000000000000000000000000000000000000000029a00000000000000000000000000000000000000000000000000000000000002a90000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e00000000000000000000000000000000000000000000000000000000000002c10000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000000304000000000000000000000000000000000000000000000000000000000000030f000000000000000000000000000000000000000000000000000000000000034400000000000000000000000000000000000000000000000000000000000003670000000000000000000000000000000000000000000000000000000000000372000000000000000000000000000000000000000000000000000000000000037d0000000000000000000000000000000000000000000000000000000000000387000000000000000000000000000000000000000000000000000000000000039200000000000000000000000000000000000000000000000000000000000003e900000000000000000000000000000000000000000000000000000000000003f40000000000000000000000000000000000000000000000000000000000000455000000000000000000000000000000000000000000000000000000000000047f00000000000000000000000000000000000000000000000000000000000004d200000000000000000000000000000000000000000000000000000000000005890000000000000000000000000000000000000000000000000000000000000595000000000000000000000000000000000000000000000000000000000000061c0000000000000000000000000000000000000000000000000000000000000663000000000000000000000000000000000000000000000000000000000000067f00000000000000000000000000000000000000000000000000000000000006a200000000000000000000000000000000000000000000000000000000000006c500000000000000000000000000000000000000000000000000000000000006e800000000000000000000000000000000000000000000000000000000000006f30000000000000000000000000000000000000000000000000000000000000716000000000000000000000000000000000000000000000000000000000000073900000000000000000000000000000000000000000000000000000000000007590000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e000000000000000000000000000000000000000000000000000000000000077c000000000000000000000000000000000000000000000000000000000000078700000000000000000000000000000000000000000000000000000000000007a500000000000000000000000000000000000000000000000000000000000007c800000000000000000000000000000000000000000000000000000000000007ef000000000000000000000000000000000000000000000000000000000000083d0000000000000000000000000000000000000000000000000000000000000876000000000000000000000000000000000000000000000000000000000000088900000000000000000000000000000000000000000000000000000000000008aa00000000000000000000000000000000000000000000000000000000000008b600000000000000000000000000000000000000000000000000000000000008c200000000000000000000000000000000000000000000000000000000000008cd00000000000000000000000000000000000000000000000000000000000008d500000000000000000000000000000000000000000000000000000000000008df00000000000000000000000000000000000000000000000000000000000008ee00000000000000000000000000000000000000000000000000000000000003870000000000000000000000000000000000000000000000000000000000000950000000000000000000000000000000000000000000000000000000000000095e000000000000000000000000000000000000000000000000000000000000096c000000000000000000000000000000000000000000000000000000000000097a0000000000000000000000000000000000000000000000000000000000000988000000000000000000000000000000000000000000000000000000000000099600000000000000000000000000000000000000000000000000000000000009a400000000000000000000000000000000000000000000000000000000000009b200000000000000000000000000000000000000000000000000000000000009c000000000000000000000000000000000000000000000000000000000000009ce00000000000000000000000000000000000000000000000000000000000009dc00000000000000000000000000000000000000000000000000000000000009ea00000000000000000000000000000000000000000000000000000000000009f80000000000000000000000000000000000000000000000000000000000000a060000000000000000000000000000000000000000000000000000000000000a140000000000000000000000000000000000000000000000000000000000000a220000000000000000000000000000000000000000000000000000000000000a300000000000000000000000000000000000000000000000000000000000000a3e0000000000000000000000000000000000000000000000000000000000000a4c0000000000000000000000000000000000000000000000000000000000000a5a0000000000000000000000000000000000000000000000000000000000000a680000000000000000000000000000000000000000000000000000000000000a760000000000000000000000000000000000000000000000000000000000000a840000000000000000000000000000000000000000000000000000000000000a920000000000000000000000000000000000000000000000000000000000000aa00000000000000000000000000000000000000000000000000000000000000aae0000000000000000000000000000000000000000000000000000000000000abc0000000000000000000000000000000000000000000000000000000000000aca0000000000000000000000000000000000000000000000000000000000000ad80000000000000000000000000000000000000000000000000000000000000ae60000000000000000000000000000000000000000000000000000000000000af40000000000000000000000000000000000000000000000000000000000000b020000000000000000000000000000000000000000000000000000000000000b100000000000000000000000000000000000000000000000000000000000000b1b0000000000000000000000000000000000000000000000000000000000000b290000000000000000000000000000000000000000000000000000000000000b370000000000000000000000000000000000000000000000000000000000000b450000000000000000000000000000000000000000000000000000000000000b530000000000000000000000000000000000000000000000000000000000000b610000000000000000000000000000000000000000000000000000000000000b6f0000000000000000000000000000000000000000000000000000000000000b7e0000000000000000000000000000000000000000000000000000000000000b8d0000000000000000000000000000000000000000000000000000000000000b9c0000000000000000000000000000000000000000000000000000000000000bab0000000000000000000000000000000000000000000000000000000000000bba0000000000000000000000000000000000000000000000000000000000000bc90000000000000000000000000000000000000000000000000000000000000bd80000000000000000000000000000000000000000000000000000000000000be70000000000000000000000000000000000000000000000000000000000000bf60000000000000000000000000000000000000000000000000000000000000c040000000000000000000000000000000000000000000000000000000000000c120000000000000000000000000000000000000000000000000000000000000c200000000000000000000000000000000000000000000000000000000000000c2e0000000000000000000000000000000000000000000000000000000000000c3c0000000000000000000000000000000000000000000000000000000000000c4a0000000000000000000000000000000000000000000000000000000000000c580000000000000000000000000000000000000000000000000000000000000c660000000000000000000000000000000000000000000000000000000000000c740000000000000000000000000000000000000000000000000000000000000c820000000000000000000000000000000000000000000000000000000000000c900000000000000000000000000000000000000000000000000000000000000c9e0000000000000000000000000000000000000000000000000000000000000cac0000000000000000000000000000000000000000000000000000000000000cba0000000000000000000000000000000000000000000000000000000000000cc80000000000000000000000000000000000000000000000000000000000000cd60000000000000000000000000000000000000000000000000000000000000d1c0000000000000000000000000000000000000000000000000000000000000d670000000000000000000000000000000000000000000000000000000000000db40000000000000000000000000000000000000000000000000000000000000e030000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000000e540000000000000000000000000000000000000000000000000000000000000e6b0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000001140000000000000000000000000000000000000000000000000000000000000116500000000000000000000000000000000000000000000000000000000000013610000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e00000000000000000000000000000000000000000000000000000000000013790000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e00000000000000000000000000000000000000000000000000000000000015950000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e00000000000000000000000000000000000000000000000000000000000014c50000000000000000000000000000000000000000000000000000000000001459000000000000000000000000000000000000000000000000000000000000151c000000000000000000000000000000000000000000000000000000000000151e00000000000000000000000000000000000000000000000000000000000014ca00000000000000000000000000000000000000000000000000000000000012ad000000000000000000000000000000000000000000000000000000000000124300000000000000000000000000000000000000000000000000000000000012fd00000000000000000000000000000000000000000000000000000000000012ff00000000000000000000000000000000000000000000000000000000000012b300000000000000000000000000000000000000000000000000000000000010280000000000000000000000000000000000000000000000000000000000000fbb00000000000000000000000000000000000000000000000000000000000010640000000000000000000000000000000000000000000000000000000000001066000000000000000000000000000000000000000000000000000000000000102d00000000000000000000000000000000000000000000000000000000000015c400000000000000000000000000000000000000000000000000000000000015d600000000000000000000000000000000000000000000000000000000000015e200000000000000000000000000000000000000000000000000000000000015ee00000000000000000000000000000000000000000000000000000000000015fa0000000000000000000000000000000000000000000000000000000000001609000000000000000000000000000000000000000000000000000000000000162900000000000000000000000000000000000000000000000000000000000016380000000000000000000000000000000000000000000000000000000000001656000000000000000000000000000000000000000000000000000000000000167500000000000000000000000000000000000000000000000000000000000016e500000000000000000000000000000000000000000000000000000000000017040000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e000000000000000000000000000000000000000000000000000000000000171d000000000000000000000000000000000000000000000000000000000000172b00000000000000000000000000000000000000000000000000000000000017390000000000000000000000000000000000000000000000000000000000001752000000000000000000000000000000000000000000000000000000000000176b000000000000000000000000000000000000000000000000000000000000177900000000000000000000000000000000000000000000000000000000000017850000000000000000000000000000000000000000000000000000000000001791000000000000000000000000000000000000000000000000000000000000179d00000000000000000000000000000000000000000000000000000000000017a900000000000000000000000000000000000000000000000000000000000017b300000000000000000000000000000000000000000000000000000000000017c400000000000000000000000000000000000000000000000000000000000017d300000000000000000000000000000000000000000000000000000000000017e20000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e00000000000000000000000000000000000000000000000000000000000017fa0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e000000000000000000000000000000000000000000000000000000000000183d0000000000000000000000000000000000000000000000000000000000001848000000000000000000000000000000000000000000000000000000000000187d00000000000000000000000000000000000000000000000000000000000018a000000000000000000000000000000000000000000000000000000000000018ab00000000000000000000000000000000000000000000000000000000000018b600000000000000000000000000000000000000000000000000000000000018c500000000000000000000000000000000000000000000000000000000000018d00000000000000000000000000000000000000000000000000000000000001930000000000000000000000000000000000000000000000000000000000000193b000000000000000000000000000000000000000000000000000000000000199c00000000000000000000000000000000000000000000000000000000000019bf0000000000000000000000000000000000000000000000000000000000001a1b0000000000000000000000000000000000000000000000000000000000001ad20000000000000000000000000000000000000000000000000000000000001ade0000000000000000000000000000000000000000000000000000000000001b2b0000000000000000000000000000000000000000000000000000000000001bac0000000000000000000000000000000000000000000000000000000000001bc80000000000000000000000000000000000000000000000000000000000001beb0000000000000000000000000000000000000000000000000000000000001c0e0000000000000000000000000000000000000000000000000000000000001c310000000000000000000000000000000000000000000000000000000000001c3c0000000000000000000000000000000000000000000000000000000000001c5f0000000000000000000000000000000000000000000000000000000000001c820000000000000000000000000000000000000000000000000000000000001ca20000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000001cc50000000000000000000000000000000000000000000000000000000000001cd00000000000000000000000000000000000000000000000000000000000001cee0000000000000000000000000000000000000000000000000000000000001d110000000000000000000000000000000000000000000000000000000000001d380000000000000000000000000000000000000000000000000000000000001d780000000000000000000000000000000000000000000000000000000000001dc20000000000000000000000000000000000000000000000000000000000001dd50000000000000000000000000000000000000000000000000000000000001df60000000000000000000000000000000000000000000000000000000000001e020000000000000000000000000000000000000000000000000000000000001e0e0000000000000000000000000000000000000000000000000000000000001e190000000000000000000000000000000000000000000000000000000000001e210000000000000000000000000000000000000000000000000000000000001e2b0000000000000000000000000000000000000000000000000000000000001e3c0000000000000000000000000000000000000000000000000000000000001e9e0000000000000000000000000000000000000000000000000000000000001ea90000000000000000000000000000000000000000000000000000000000001eb70000000000000000000000000000000000000000000000000000000000001ec50000000000000000000000000000000000000000000000000000000000001ed30000000000000000000000000000000000000000000000000000000000001ee10000000000000000000000000000000000000000000000000000000000001eef0000000000000000000000000000000000000000000000000000000000001efd0000000000000000000000000000000000000000000000000000000000001f0b0000000000000000000000000000000000000000000000000000000000001f190000000000000000000000000000000000000000000000000000000000001f270000000000000000000000000000000000000000000000000000000000001f350000000000000000000000000000000000000000000000000000000000001f430000000000000000000000000000000000000000000000000000000000001f510000000000000000000000000000000000000000000000000000000000001f5f0000000000000000000000000000000000000000000000000000000000001f6d0000000000000000000000000000000000000000000000000000000000001f7b0000000000000000000000000000000000000000000000000000000000001f890000000000000000000000000000000000000000000000000000000000001f970000000000000000000000000000000000000000000000000000000000001fa50000000000000000000000000000000000000000000000000000000000001fb30000000000000000000000000000000000000000000000000000000000001fc10000000000000000000000000000000000000000000000000000000000001fcf0000000000000000000000000000000000000000000000000000000000001fdd0000000000000000000000000000000000000000000000000000000000001feb0000000000000000000000000000000000000000000000000000000000001ff90000000000000000000000000000000000000000000000000000000000002007000000000000000000000000000000000000000000000000000000000000201500000000000000000000000000000000000000000000000000000000000020230000000000000000000000000000000000000000000000000000000000002031000000000000000000000000000000000000000000000000000000000000203f000000000000000000000000000000000000000000000000000000000000204d000000000000000000000000000000000000000000000000000000000000205b0000000000000000000000000000000000000000000000000000000000002069000000000000000000000000000000000000000000000000000000000000207400000000000000000000000000000000000000000000000000000000000020820000000000000000000000000000000000000000000000000000000000002090000000000000000000000000000000000000000000000000000000000000209e00000000000000000000000000000000000000000000000000000000000020ad00000000000000000000000000000000000000000000000000000000000020bc00000000000000000000000000000000000000000000000000000000000020cb00000000000000000000000000000000000000000000000000000000000020da00000000000000000000000000000000000000000000000000000000000020e900000000000000000000000000000000000000000000000000000000000020f80000000000000000000000000000000000000000000000000000000000002107000000000000000000000000000000000000000000000000000000000000211600000000000000000000000000000000000000000000000000000000000021250000000000000000000000000000000000000000000000000000000000002134000000000000000000000000000000000000000000000000000000000000214300000000000000000000000000000000000000000000000000000000000021520000000000000000000000000000000000000000000000000000000000002160000000000000000000000000000000000000000000000000000000000000216e000000000000000000000000000000000000000000000000000000000000217c000000000000000000000000000000000000000000000000000000000000218a000000000000000000000000000000000000000000000000000000000000219800000000000000000000000000000000000000000000000000000000000021a600000000000000000000000000000000000000000000000000000000000021b400000000000000000000000000000000000000000000000000000000000021c200000000000000000000000000000000000000000000000000000000000021d000000000000000000000000000000000000000000000000000000000000021de00000000000000000000000000000000000000000000000000000000000021ec00000000000000000000000000000000000000000000000000000000000021fa0000000000000000000000000000000000000000000000000000000000002208000000000000000000000000000000000000000000000000000000000000221600000000000000000000000000000000000000000000000000000000000022240000000000000000000000000000000000000000000000000000000000002232000000000000000000000000000000000000000000000000000000000000227a00000000000000000000000000000000000000000000000000000000000022c80000000000000000000000000000000000000000000000000000000000002318000000000000000000000000000000000000000000000000000000000000236a0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e00000000000000000000000000000000000000000000000000000000000023be00000000000000000000000000000000000000000000000000000000000023d70000000000000000000000000000000000000000000000000000000000002b1e00000000000000000000000000000000000000000000000000000000000026e3000000000000000000000000000000000000000000000000000000000000270400000000000000000000000000000000000000000000000000000000000029000000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e000000000000000000000000000000000000000000000000000000000000291a0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1f0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002b1e0000000000000000000000000000000000000000000000000000000000002a6500000000000000000000000000000000000000000000000000000000000029f90000000000000000000000000000000000000000000000000000000000002abc0000000000000000000000000000000000000000000000000000000000002abe0000000000000000000000000000000000000000000000000000000000002a6a000000000000000000000000000000000000000000000000000000000000284c00000000000000000000000000000000000000000000000000000000000027e2000000000000000000000000000000000000000000000000000000000000289c000000000000000000000000000000000000000000000000000000000000289e00000000000000000000000000000000000000000000000000000000000028520000000000000000000000000000000000000000000000000000000000002590000000000000000000000000000000000000000000000000000000000000252300000000000000000000000000000000000000000000000000000000000025de00000000000000000000000000000000000000000000000000000000000025e0000000000000000000000000000000000000000000000000000000000000259600000000000000000000000000000000000000000000000000000000ffffffff0400000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000ffffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000ffffffff0000000000000000000000004de2e468000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024000000000000000000000000ff010000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffff00000000000000000000000000000000ffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000ffffffe00000ffff0000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000010100000000000000000000000000000000000040000000000000000000000000050000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000010000000000000000000000000300000000000000000000000000000000000000000000000000000000000000ff00000000000000000000000000000000000000000000000000000000000000ef000000000000000000000000000000000000000000000000000000000000001806aa1896bbf26568e884a7374b41e002500962caba6a15023a8d90e8508b8302000002000000000000000000000000000000240000000000000000000000009cc7f708afc65944829bd487b90b72536b1951864fbfc14e125fc972a6507f395aa9b6b500000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffdf5b00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000004100000000000000000000000000000000000000000000000000000000000000210000000000000000000000000000000000000000000000000000000000000000000000000000000000bfffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000bfffe06ef25c3ab4fb9cba75ff1971e3f261040c39b067df172dd5185087fc5553a5b602000002000000000000000000000000000000040000000000000000000000009a8a0592ac89c5ad3bc6df8224c17b485976f597df104ee20d0df415241f670b7877a797fe6dca4321f33fd95414da079ab78e698d761514c01ced9211af267e0000000000000000000000000000000000000000000000000008e1bc9bf0400042cbb15ccdc3cad6266b0e7a08c0454b23bf29dc2df74b6f3c209e9336465bd1796b89b91644bc98cd93958e4c9038275d622183e25ac5af08cc6b5d95539132a6ae0aac158b2d5c9a9c9285743419d62a32f6727a640955e4ce8ee41503c78480b41246c05cbb406f874e82aa2faf7db11bba9792fe09929e56ef1eee2c2da3c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4705f8f27b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000fe173b97ed9aa263236c52fa3eb334d07741add95e972d17352d76816b4aaea3938b5f3299a1f3b18e458564efbb950733226014eece26fae19012d850b48d83800000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000fffffffffffffffffffffffffffffffeffffffffffffffffffffffffffffffffffffffc000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffdeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8020ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdff81dae860000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000440000000000000000000000000000000000000000000000000000000000000000000000640000000000000000ffffffffffffffffffffffffffffffffffffff9c00000000000000000000000000000000000000000000000000000000000000000000000000000000e43cec640000000000000000000000000000000000000000000000000000000000000000e3c556dbd0758e5b63ab73a08f194e8f3eb20e7ea9a02165e8f38f84f7e7b0c0", "blockHash": "0x613b6dd730b3f4ec0dbd59b5b4990429a37fc4b85c14a49fe4d83c82a243b1c3", diff --git a/l2-contracts/contracts/Dependencies.sol b/l2-contracts/contracts/Dependencies.sol deleted file mode 100644 index 8a606d45af..0000000000 --- a/l2-contracts/contracts/Dependencies.sol +++ /dev/null @@ -1,8 +0,0 @@ -// SPDX-License-Identifier: MIT -// We use a floating point pragma here so it can be used within other projects that interact with the ZKsync ecosystem without using our exact pragma version. -pragma solidity ^0.8.20; - -/* solhint-disable-next-line no-unused-import */ -import {TransparentUpgradeableProxy} from "@openzeppelin/contracts-v4/proxy/transparent/TransparentUpgradeableProxy.sol"; -/* solhint-disable-next-line no-unused-import */ -import {ProxyAdmin} from "@openzeppelin/contracts-v4/proxy/transparent/ProxyAdmin.sol"; diff --git a/l2-contracts/contracts/ForceDeployUpgrader.sol b/l2-contracts/contracts/ForceDeployUpgrader.sol index 2cd446f234..6ae0fd314a 100644 --- a/l2-contracts/contracts/ForceDeployUpgrader.sol +++ b/l2-contracts/contracts/ForceDeployUpgrader.sol @@ -2,7 +2,8 @@ pragma solidity 0.8.28; -import {DEPLOYER_SYSTEM_CONTRACT, IContractDeployer} from "./L2ContractHelper.sol"; +import {DEPLOYER_SYSTEM_CONTRACT} from "./L2ContractHelper.sol"; +import {ForceDeployment, IContractDeployer} from "@matterlabs/zksync-contracts/contracts/system-contracts/interfaces/IContractDeployer.sol"; /// @custom:security-contact security@matterlabs.dev /// @notice The contract that calls force deployment during the L2 system contract upgrade. @@ -10,7 +11,7 @@ import {DEPLOYER_SYSTEM_CONTRACT, IContractDeployer} from "./L2ContractHelper.so contract ForceDeployUpgrader { /// @notice A function that performs force deploy /// @param _forceDeployments The force deployments to perform. - function forceDeploy(IContractDeployer.ForceDeployment[] calldata _forceDeployments) external payable { + function forceDeploy(ForceDeployment[] calldata _forceDeployments) external payable { IContractDeployer(DEPLOYER_SYSTEM_CONTRACT).forceDeployOnAddresses{value: msg.value}(_forceDeployments); } } diff --git a/l2-contracts/contracts/L2ContractHelper.sol b/l2-contracts/contracts/L2ContractHelper.sol index 053b3d04fc..d733c62e01 100644 --- a/l2-contracts/contracts/L2ContractHelper.sol +++ b/l2-contracts/contracts/L2ContractHelper.sol @@ -2,8 +2,11 @@ // We use a floating point pragma here so it can be used within other projects that interact with the ZKsync ecosystem without using our exact pragma version. pragma solidity ^0.8.20; -import {EfficientCall} from "@matterlabs/zksync-contracts/l2/system-contracts/libraries/EfficientCall.sol"; -import {BytecodeError, MalformedBytecode} from "./errors/L2ContractErrors.sol"; +/* solhint-disable-next-line no-unused-import */ + +/* solhint-disable-next-line no-unused-import */ + +/* solhint-disable-next-line no-unused-import */ /** * @author Matter Labs @@ -25,50 +28,6 @@ interface IL1Messenger { function sendToL1(bytes calldata _message) external returns (bytes32); } -/** - * @author Matter Labs - * @custom:security-contact security@matterlabs.dev - * @notice Interface for the contract that is used to deploy contracts on L2. - */ -interface IContractDeployer { - /// @notice A struct that describes a forced deployment on an address. - /// @param bytecodeHash The bytecode hash to put on an address. - /// @param newAddress The address on which to deploy the bytecodehash to. - /// @param callConstructor Whether to run the constructor on the force deployment. - /// @param value The `msg.value` with which to initialize a contract. - /// @param input The constructor calldata. - struct ForceDeployment { - bytes32 bytecodeHash; - address newAddress; - bool callConstructor; - uint256 value; - bytes input; - } - - /// @notice This method is to be used only during an upgrade to set bytecodes on specific addresses. - /// @param _deployParams A set of parameters describing force deployment. - function forceDeployOnAddresses(ForceDeployment[] calldata _deployParams) external payable; - - /// @notice Creates a new contract at a determined address using the `CREATE2` salt on L2 - /// @param _salt a unique value to create the deterministic address of the new contract - /// @param _bytecodeHash the bytecodehash of the new contract to be deployed - /// @param _input the calldata to be sent to the constructor of the new contract - function create2(bytes32 _salt, bytes32 _bytecodeHash, bytes calldata _input) external returns (address); - - /// @notice Calculates the address of a create2 contract deployment - /// @param _sender The address of the sender. - /// @param _bytecodeHash The bytecode hash of the new contract to be deployed. - /// @param _salt a unique value to create the deterministic address of the new contract - /// @param _input the calldata to be sent to the constructor of the new contract - /// @return newAddress The derived address of the account. - function getNewAddressCreate2( - address _sender, - bytes32 _bytecodeHash, - bytes32 _salt, - bytes calldata _input - ) external view returns (address newAddress); -} - /** * @author Matter Labs * @custom:security-contact security@matterlabs.dev @@ -173,66 +132,6 @@ library L2ContractHelper { return address(uint160(uint256(data))); } - - /// @notice Validate the bytecode format and calculate its hash. - /// @param _bytecode The bytecode to hash. - /// @return hashedBytecode The 32-byte hash of the bytecode. - /// Note: The function reverts the execution if the bytecode has non expected format: - /// - Bytecode bytes length is not a multiple of 32 - /// - Bytecode bytes length is not less than 2^21 bytes (2^16 words) - /// - Bytecode words length is not odd - function hashL2BytecodeCalldata(bytes calldata _bytecode) internal view returns (bytes32 hashedBytecode) { - // Note that the length of the bytecode must be provided in 32-byte words. - if (_bytecode.length % 32 != 0) { - revert MalformedBytecode(BytecodeError.Length); - } - - uint256 bytecodeLenInWords = _bytecode.length / 32; - // bytecode length must be less than 2^16 words - if (bytecodeLenInWords >= 2 ** 16) { - revert MalformedBytecode(BytecodeError.NumberOfWords); - } - // bytecode length in words must be odd - if (bytecodeLenInWords % 2 == 0) { - revert MalformedBytecode(BytecodeError.WordsMustBeOdd); - } - hashedBytecode = - EfficientCall.sha(_bytecode) & - 0x00000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; - // Setting the version of the hash - hashedBytecode = (hashedBytecode | bytes32(uint256(1 << 248))); - // Setting the length - hashedBytecode = hashedBytecode | bytes32(bytecodeLenInWords << 224); - } - - /// @notice Validate the bytecode format and calculate its hash. - /// @param _bytecode The bytecode to hash. - /// @return hashedBytecode The 32-byte hash of the bytecode. - /// Note: The function reverts the execution if the bytecode has non expected format: - /// - Bytecode bytes length is not a multiple of 32 - /// - Bytecode bytes length is not less than 2^21 bytes (2^16 words) - /// - Bytecode words length is not odd - function hashL2Bytecode(bytes memory _bytecode) internal pure returns (bytes32 hashedBytecode) { - // Note that the length of the bytecode must be provided in 32-byte words. - if (_bytecode.length % 32 != 0) { - revert MalformedBytecode(BytecodeError.Length); - } - - uint256 bytecodeLenInWords = _bytecode.length / 32; - // bytecode length must be less than 2^16 words - if (bytecodeLenInWords >= 2 ** 16) { - revert MalformedBytecode(BytecodeError.NumberOfWords); - } - // bytecode length in words must be odd - if (bytecodeLenInWords % 2 == 0) { - revert MalformedBytecode(BytecodeError.WordsMustBeOdd); - } - hashedBytecode = sha256(_bytecode) & 0x00000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; - // Setting the version of the hash - hashedBytecode = (hashedBytecode | bytes32(uint256(1 << 248))); - // Setting the length - hashedBytecode = hashedBytecode | bytes32(bytecodeLenInWords << 224); - } } /// @notice Structure used to represent a ZKsync transaction. diff --git a/l2-contracts/contracts/data-availability/AvailL2DAValidator.sol b/l2-contracts/contracts/data-availability/AvailL2DAValidator.sol deleted file mode 100644 index fb232df7d5..0000000000 --- a/l2-contracts/contracts/data-availability/AvailL2DAValidator.sol +++ /dev/null @@ -1,31 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity 0.8.28; - -import {IL2DAValidator} from "../interfaces/IL2DAValidator.sol"; -import {StateDiffL2DAValidator} from "./StateDiffL2DAValidator.sol"; - -/// Avail L2 DA validator. It will create a commitment to the pubdata that can later be verified during settlement. -contract AvailL2DAValidator is IL2DAValidator, StateDiffL2DAValidator { - function validatePubdata( - // The rolling hash of the user L2->L1 logs. - bytes32, - // The root hash of the user L2->L1 logs. - bytes32, - // The chained hash of the L2->L1 messages - bytes32 _chainedMessagesHash, - // The chained hash of uncompressed bytecodes sent to L1 - bytes32 _chainedBytecodesHash, - // Operator data, that is related to the DA itself - bytes calldata _totalL2ToL1PubdataAndStateDiffs - ) external returns (bytes32 outputHash) { - (bytes32 stateDiffHash, bytes calldata _totalPubdata, ) = _produceStateDiffPubdata( - _chainedMessagesHash, - _chainedBytecodesHash, - _totalL2ToL1PubdataAndStateDiffs - ); - - bytes32 fullPubdataHash = keccak256(_totalPubdata); - outputHash = keccak256(abi.encodePacked(stateDiffHash, fullPubdataHash)); - } -} diff --git a/l2-contracts/contracts/data-availability/DAErrors.sol b/l2-contracts/contracts/data-availability/DAErrors.sol deleted file mode 100644 index ff0dda7e25..0000000000 --- a/l2-contracts/contracts/data-availability/DAErrors.sol +++ /dev/null @@ -1,12 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity 0.8.28; - -enum PubdataField { - MsgHash, - Bytecode, - StateDiffCompressionVersion, - ExtraData -} - -error ReconstructionMismatch(PubdataField, bytes32 expected, bytes32 actual); diff --git a/l2-contracts/contracts/data-availability/RollupL2DAValidator.sol b/l2-contracts/contracts/data-availability/RollupL2DAValidator.sol deleted file mode 100644 index 18b003d8f8..0000000000 --- a/l2-contracts/contracts/data-availability/RollupL2DAValidator.sol +++ /dev/null @@ -1,56 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity 0.8.28; - -import {IL2DAValidator} from "../interfaces/IL2DAValidator.sol"; -import {StateDiffL2DAValidator} from "./StateDiffL2DAValidator.sol"; -import {PUBDATA_CHUNK_PUBLISHER} from "../L2ContractHelper.sol"; - -import {SafeCast} from "@openzeppelin/contracts-v4/utils/math/SafeCast.sol"; -import {EfficientCall} from "@matterlabs/zksync-contracts/l2/system-contracts/libraries/EfficientCall.sol"; - -import {PubdataField, ReconstructionMismatch} from "./DAErrors.sol"; - -/// Rollup DA validator. It will publish data that would allow to use either calldata or blobs. -contract RollupL2DAValidator is IL2DAValidator, StateDiffL2DAValidator { - function validatePubdata( - // The rolling hash of the user L2->L1 logs. - bytes32, - // The root hash of the user L2->L1 logs. - bytes32, - // The chained hash of the L2->L1 messages - bytes32 _chainedMessagesHash, - // The chained hash of uncompressed bytecodes sent to L1 - bytes32 _chainedBytecodesHash, - // Operator data, that is related to the DA itself - bytes calldata _totalL2ToL1PubdataAndStateDiffs - ) external returns (bytes32 outputHash) { - (bytes32 stateDiffHash, bytes calldata _totalPubdata, bytes calldata leftover) = _produceStateDiffPubdata( - _chainedMessagesHash, - _chainedBytecodesHash, - _totalL2ToL1PubdataAndStateDiffs - ); - - /// Check for calldata strict format - if (leftover.length != 0) { - revert ReconstructionMismatch(PubdataField.ExtraData, bytes32(0), bytes32(leftover.length)); - } - - // The preimage under the hash `outputHash` is expected to be in the following format: - // - First 32 bytes are the hash of the uncompressed state diff. - // - Then, there is a 32-byte hash of the full pubdata. - // - Then, there is the 1-byte number of blobs published. - // - Then, there are linear hashes of the published blobs, 32 bytes each. - - bytes32[] memory blobLinearHashes = PUBDATA_CHUNK_PUBLISHER.chunkPubdataToBlobs(_totalPubdata); - - outputHash = keccak256( - abi.encodePacked( - stateDiffHash, - EfficientCall.keccak(_totalPubdata), - SafeCast.toUint8(blobLinearHashes.length), - blobLinearHashes - ) - ); - } -} diff --git a/l2-contracts/contracts/data-availability/StateDiffL2DAValidator.sol b/l2-contracts/contracts/data-availability/StateDiffL2DAValidator.sol deleted file mode 100644 index 05f08a4ef9..0000000000 --- a/l2-contracts/contracts/data-availability/StateDiffL2DAValidator.sol +++ /dev/null @@ -1,132 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity 0.8.28; - -import {PubdataField, ReconstructionMismatch} from "./DAErrors.sol"; -import {COMPRESSOR_CONTRACT, L2ContractHelper} from "../L2ContractHelper.sol"; - -import {EfficientCall} from "@matterlabs/zksync-contracts/l2/system-contracts/libraries/EfficientCall.sol"; - -/// @dev The current version of state diff compression being used. -uint256 constant STATE_DIFF_COMPRESSION_VERSION_NUMBER = 1; - -uint256 constant L2_TO_L1_LOG_SERIALIZE_SIZE = 88; - -/// @dev Each state diff consists of 156 bytes of actual data and 116 bytes of unused padding, needed for circuit efficiency. -uint256 constant STATE_DIFF_ENTRY_SIZE = 272; - -/// A library that could be used by any L2 DA validator to produce standard state-diff-based -/// DA output. -abstract contract StateDiffL2DAValidator { - /// @notice Validates, that the operator provided the correct preimages for logs, messages, and bytecodes. - /// @return uncompressedStateDiffHash the hash of the uncompressed state diffs - /// @return totalL2Pubdata total pubdata that should be sent to L1. - /// @return leftoverSuffix the suffix left after pubdata and uncompressed state diffs. - /// On Era or other "vanilla" rollups it is empty, but it can be used for providing additional data by the operator, - /// e.g. DA committee signatures, etc. - function _produceStateDiffPubdata( - bytes32 _chainedMessagesHash, - bytes32 _chainedBytecodesHash, - bytes calldata _totalL2ToL1PubdataAndStateDiffs - ) - internal - virtual - returns (bytes32 uncompressedStateDiffHash, bytes calldata totalL2Pubdata, bytes calldata leftoverSuffix) - { - uint256 calldataPtr = 0; - - /// Check logs - uint32 numberOfL2ToL1Logs = uint32(bytes4(_totalL2ToL1PubdataAndStateDiffs[calldataPtr:calldataPtr + 4])); - calldataPtr += 4 + numberOfL2ToL1Logs * L2_TO_L1_LOG_SERIALIZE_SIZE; - - /// Check messages - uint32 numberOfMessages = uint32(bytes4(_totalL2ToL1PubdataAndStateDiffs[calldataPtr:calldataPtr + 4])); - calldataPtr += 4; - bytes32 reconstructedChainedMessagesHash; - for (uint256 i = 0; i < numberOfMessages; ++i) { - uint32 currentMessageLength = uint32(bytes4(_totalL2ToL1PubdataAndStateDiffs[calldataPtr:calldataPtr + 4])); - calldataPtr += 4; - bytes32 hashedMessage = EfficientCall.keccak( - _totalL2ToL1PubdataAndStateDiffs[calldataPtr:calldataPtr + currentMessageLength] - ); - calldataPtr += currentMessageLength; - reconstructedChainedMessagesHash = keccak256(abi.encode(reconstructedChainedMessagesHash, hashedMessage)); - } - if (reconstructedChainedMessagesHash != _chainedMessagesHash) { - revert ReconstructionMismatch(PubdataField.MsgHash, _chainedMessagesHash, reconstructedChainedMessagesHash); - } - - /// Check bytecodes - uint32 numberOfBytecodes = uint32(bytes4(_totalL2ToL1PubdataAndStateDiffs[calldataPtr:calldataPtr + 4])); - calldataPtr += 4; - bytes32 reconstructedChainedL1BytecodesRevealDataHash; - for (uint256 i = 0; i < numberOfBytecodes; ++i) { - uint32 currentBytecodeLength = uint32( - bytes4(_totalL2ToL1PubdataAndStateDiffs[calldataPtr:calldataPtr + 4]) - ); - calldataPtr += 4; - reconstructedChainedL1BytecodesRevealDataHash = keccak256( - abi.encode( - reconstructedChainedL1BytecodesRevealDataHash, - L2ContractHelper.hashL2BytecodeCalldata( - _totalL2ToL1PubdataAndStateDiffs[calldataPtr:calldataPtr + currentBytecodeLength] - ) - ) - ); - calldataPtr += currentBytecodeLength; - } - if (reconstructedChainedL1BytecodesRevealDataHash != _chainedBytecodesHash) { - revert ReconstructionMismatch( - PubdataField.Bytecode, - _chainedBytecodesHash, - reconstructedChainedL1BytecodesRevealDataHash - ); - } - - /// Check State Diffs - /// encoding is as follows: - /// header (1 byte version, 3 bytes total len of compressed, 1 byte enumeration index size) - /// body (`compressedStateDiffSize` bytes, 4 bytes number of state diffs, `numberOfStateDiffs` * `STATE_DIFF_ENTRY_SIZE` bytes for the uncompressed state diffs) - /// encoded state diffs: [20bytes address][32bytes key][32bytes derived key][8bytes enum index][32bytes initial value][32bytes final value] - if ( - uint256(uint8(bytes1(_totalL2ToL1PubdataAndStateDiffs[calldataPtr]))) != - STATE_DIFF_COMPRESSION_VERSION_NUMBER - ) { - revert ReconstructionMismatch( - PubdataField.StateDiffCompressionVersion, - bytes32(STATE_DIFF_COMPRESSION_VERSION_NUMBER), - bytes32(uint256(uint8(bytes1(_totalL2ToL1PubdataAndStateDiffs[calldataPtr])))) - ); - } - ++calldataPtr; - - uint24 compressedStateDiffSize = uint24(bytes3(_totalL2ToL1PubdataAndStateDiffs[calldataPtr:calldataPtr + 3])); - calldataPtr += 3; - - uint8 enumerationIndexSize = uint8(bytes1(_totalL2ToL1PubdataAndStateDiffs[calldataPtr])); - ++calldataPtr; - - bytes calldata compressedStateDiffs = _totalL2ToL1PubdataAndStateDiffs[calldataPtr:calldataPtr + - compressedStateDiffSize]; - calldataPtr += compressedStateDiffSize; - - totalL2Pubdata = _totalL2ToL1PubdataAndStateDiffs[:calldataPtr]; - - uint32 numberOfStateDiffs = uint32(bytes4(_totalL2ToL1PubdataAndStateDiffs[calldataPtr:calldataPtr + 4])); - calldataPtr += 4; - - bytes calldata stateDiffs = _totalL2ToL1PubdataAndStateDiffs[calldataPtr:calldataPtr + - (numberOfStateDiffs * STATE_DIFF_ENTRY_SIZE)]; - - uncompressedStateDiffHash = COMPRESSOR_CONTRACT.verifyCompressedStateDiffs( - numberOfStateDiffs, - enumerationIndexSize, - stateDiffs, - compressedStateDiffs - ); - - calldataPtr += numberOfStateDiffs * STATE_DIFF_ENTRY_SIZE; - - leftoverSuffix = _totalL2ToL1PubdataAndStateDiffs[calldataPtr:]; - } -} diff --git a/l2-contracts/contracts/data-availability/ValidiumL2DAValidator.sol b/l2-contracts/contracts/data-availability/ValidiumL2DAValidator.sol deleted file mode 100644 index d186961af6..0000000000 --- a/l2-contracts/contracts/data-availability/ValidiumL2DAValidator.sol +++ /dev/null @@ -1,27 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity 0.8.28; - -import {IL2DAValidator} from "../interfaces/IL2DAValidator.sol"; - -/// Rollup DA validator. It will publish data that would allow to use either calldata or blobs. -contract ValidiumL2DAValidator is IL2DAValidator { - function validatePubdata( - // The rolling hash of the user L2->L1 logs. - bytes32, - // The root hash of the user L2->L1 logs. - bytes32, - // The chained hash of the L2->L1 messages - bytes32, - // The chained hash of uncompressed bytecodes sent to L1 - bytes32, - // Operator data, that is related to the DA itself - bytes calldata - ) external returns (bytes32 outputHash) { - // Since we do not need to publish anything to L1, we can just return 0. - // Note, that Rollup validator sends the hash of uncompressed state diffs, since the - // correctness of the publish pubdata depends on it. However Validium doesn't sent anything, - // so we don't need to publish even that. - outputHash = bytes32(0); - } -} diff --git a/l2-contracts/contracts/errors/L2ContractErrors.sol b/l2-contracts/contracts/errors/L2ContractErrors.sol index 0445caf446..5011f004b9 100644 --- a/l2-contracts/contracts/errors/L2ContractErrors.sol +++ b/l2-contracts/contracts/errors/L2ContractErrors.sol @@ -8,8 +8,6 @@ error FailedToTransferTokens(address tokenContract, address to, uint256 amount); error InsufficientAllowance(uint256 providedAllowance, uint256 requiredAmount); // 0xb4fa3fb3 error InvalidInput(); -// 0x43e266b0 -error MalformedBytecode(BytecodeError); // 0x8e4a23d6 error Unauthorized(address); // 0xff15b069 diff --git a/l2-contracts/contracts/interfaces/IL2DAValidator.sol b/l2-contracts/contracts/interfaces/IL2DAValidator.sol deleted file mode 100644 index 1e053307d9..0000000000 --- a/l2-contracts/contracts/interfaces/IL2DAValidator.sol +++ /dev/null @@ -1,18 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.20; - -interface IL2DAValidator { - function validatePubdata( - // The rolling hash of the user L2->L1 logs. - bytes32 _chainedLogsHash, - // The root hash of the user L2->L1 logs. - bytes32 _logsRootHash, - // The chained hash of the L2->L1 messages - bytes32 _chainedMessagesHash, - // The chained hash of uncompressed bytecodes sent to L1 - bytes32 _chainedBytecodesHash, - // Same operator input - bytes calldata _totalL2ToL1PubdataAndStateDiffs - ) external returns (bytes32 outputHash); -} diff --git a/l2-contracts/package.json b/l2-contracts/package.json index a4ba332276..750c9be062 100644 --- a/l2-contracts/package.json +++ b/l2-contracts/package.json @@ -43,7 +43,6 @@ "deploy-testnet-paymaster-through-l1": "ts-node src/deploy-testnet-paymaster-through-l1.ts", "deploy-force-deploy-upgrader-through-l1": "ts-node src/deploy-force-deploy-upgrader-through-l1.ts", "deploy-shared-bridge-on-l2-through-l1": "ts-node src/deploy-shared-bridge-on-l2-through-l1.ts", - "deploy-l2-da-validator-on-l2-through-l1": "ts-node src/deploy-l2-da-validator-on-l2-through-l1.ts", "publish-bridge-preimages": "ts-node src/publish-bridge-preimages.ts", "deploy-l2-weth": "ts-node src/deploy-l2-weth.ts", "upgrade-bridge-contracts": "ts-node src/upgrade-bridge-impl.ts", diff --git a/l2-contracts/src/deploy-l2-da-validator-on-l2-through-l1.ts b/l2-contracts/src/deploy-l2-da-validator-on-l2-through-l1.ts deleted file mode 100644 index a9bfb7ecaa..0000000000 --- a/l2-contracts/src/deploy-l2-da-validator-on-l2-through-l1.ts +++ /dev/null @@ -1,118 +0,0 @@ -import { Command } from "commander"; -import type { BigNumberish } from "ethers"; -import { ethers, Wallet } from "ethers"; -import { formatUnits, parseUnits } from "ethers/lib/utils"; -import { computeL2Create2Address, create2DeployFromL1, provider, priorityTxMaxGasLimit } from "./utils"; - -import { ethTestConfig } from "./deploy-utils"; - -import { Deployer } from "../../l1-contracts/src.ts/deploy"; -import { GAS_MULTIPLIER } from "../../l1-contracts/scripts/utils"; -import { AdminFacetFactory } from "../../l1-contracts/typechain"; -import * as hre from "hardhat"; - -async function deployContractOnL2ThroughL1( - deployer: Deployer, - name: string, - chainId: string, - gasPrice: BigNumberish -): Promise { - const bytecode = hre.artifacts.readArtifactSync(name).bytecode; - const address = computeL2Create2Address( - deployer.deployWallet, - bytecode, - // Empty constructor data - "0x", - ethers.constants.HashZero - ); - - const tx = await create2DeployFromL1( - chainId, - deployer.deployWallet, - bytecode, - "0x", - ethers.constants.HashZero, - priorityTxMaxGasLimit, - gasPrice - ); - - await tx.wait(); - - return address; -} - -async function main() { - const program = new Command(); - - program.version("0.1.0").name("deploy-shared-bridge-on-l2-through-l1"); - - program - .option("--private-key ") - .option("--chain-id ") - .option("--local-legacy-bridge-testing") - .option("--gas-price ") - .option("--nonce ") - .option("--erc20-bridge ") - .option("--validium-mode") - .action(async (cmd) => { - const chainId: string = cmd.chainId ? cmd.chainId : process.env.CHAIN_ETH_ZKSYNC_NETWORK_ID; - const deployWallet = cmd.privateKey - ? new Wallet(cmd.privateKey, provider) - : Wallet.fromMnemonic( - process.env.MNEMONIC ? process.env.MNEMONIC : ethTestConfig.mnemonic, - "m/44'/60'/0'/0/1" - ).connect(provider); - console.log(`Using deployer wallet: ${deployWallet.address}`); - - const deployer = new Deployer({ - deployWallet, - ownerAddress: deployWallet.address, - verbose: true, - }); - - const nonce = cmd.nonce ? parseInt(cmd.nonce) : await deployer.deployWallet.getTransactionCount(); - console.log(`Using nonce: ${nonce}`); - - const gasPrice = cmd.gasPrice - ? parseUnits(cmd.gasPrice, "gwei") - : (await provider.getGasPrice()).mul(GAS_MULTIPLIER); - console.log(`Using gas price: ${formatUnits(gasPrice, "gwei")} gwei`); - - let l2DaValidatorAddress; - let l1DaValidatorAddress; - if (cmd.validiumMode) { - l2DaValidatorAddress = await deployContractOnL2ThroughL1(deployer, "ValidiumL2DAValidator", chainId, gasPrice); - l1DaValidatorAddress = deployer.addresses.ValidiumL1DAValidator; - } else { - l2DaValidatorAddress = await deployContractOnL2ThroughL1(deployer, "RollupL2DAValidator", chainId, gasPrice); - l1DaValidatorAddress = deployer.addresses.RollupL1DAValidator; - } - - console.log(`CONTRACTS_L1_DA_VALIDATOR_ADDR=${l1DaValidatorAddress}`); - console.log(`CONTRACTS_L2_DA_VALIDATOR_ADDR=${l2DaValidatorAddress}`); - - const adminFacetInterface = new AdminFacetFactory().interface; - - console.log("Setting the DA Validator pair on diamond proxy"); - console.log("Who is called: ", deployer.addresses.StateTransition.DiamondProxy); - await deployer.executeChainAdminMulticall([ - { - target: deployer.addresses.StateTransition.DiamondProxy, - data: adminFacetInterface.encodeFunctionData("setDAValidatorPair", [ - l1DaValidatorAddress, - l2DaValidatorAddress, - ]), - value: 0, - }, - ]); - }); - - await program.parseAsync(process.argv); -} - -main() - .then(() => process.exit(0)) - .catch((err) => { - console.error("Error:", err); - process.exit(1); - }); diff --git a/l2-contracts/test/foundry/unit/data-availability/ValidiumL2DAValidator.t.sol b/l2-contracts/test/foundry/unit/data-availability/ValidiumL2DAValidator.t.sol deleted file mode 100644 index a0ab307206..0000000000 --- a/l2-contracts/test/foundry/unit/data-availability/ValidiumL2DAValidator.t.sol +++ /dev/null @@ -1,17 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.20; - -import {Test} from "forge-std/Test.sol"; - -import {ValidiumL2DAValidator} from "contracts/data-availability/ValidiumL2DAValidator.sol"; - -contract L2ValidiumDAValidatorTest is Test { - function test_callValidiumDAValidator(address depositor, address receiver, uint256 amount) internal { - ValidiumL2DAValidator validator = new ValidiumL2DAValidator(); - - bytes32 outputHash = validator.validatePubdata(bytes32(0), bytes32(0), bytes32(0), bytes32(0), hex""); - - assertEq(outputHash, bytes32(0)); - } -} diff --git a/lib/@matterlabs/zksync-contracts b/lib/@matterlabs/zksync-contracts index b8449bf9c8..e554ae64ec 160000 --- a/lib/@matterlabs/zksync-contracts +++ b/lib/@matterlabs/zksync-contracts @@ -1 +1 @@ -Subproject commit b8449bf9c819098cc8bfee0549ff5094456be51d +Subproject commit e554ae64ec150c47d6f17786e7f4aacebc7bf945 diff --git a/scripts/unify_and_clean_imports.py b/scripts/unify_and_clean_imports.py index d4a30dc668..7a6be47643 100644 --- a/scripts/unify_and_clean_imports.py +++ b/scripts/unify_and_clean_imports.py @@ -15,6 +15,10 @@ # Regex to match named import statements: import {a, b} from "path"; IMPORT_REGEX = re.compile(r'^\s*import\s*{([^}]*)}\s*from\s*["\']([^"\']+)["\'];') +dependency_files = [ + "contracts/l1-contracts/contracts/common/Dependencies.sol", + "contracts/l2-contracts/contracts/Dependencies.sol", +] def process_file(path: str): """ @@ -27,6 +31,7 @@ def process_file(path: str): imports = OrderedDict() # import_path -> { 'symbols': list, 'first_index': int } duplicates_in_line = False unsorted_in_line = False + to_be_removed = [] # First pass: collect named imports, detect intra-line duplicates & unsorted for idx, line in enumerate(lines): @@ -46,10 +51,23 @@ def process_file(path: str): imp_path = m.group(2) if imp_path not in imports: imports[imp_path] = {'symbols': [], 'first_index': idx} - # accumulate unique symbols + # accumulate unique symbols and check if they are used in the file for sym in raw_symbols: if sym not in imports[imp_path]['symbols']: - imports[imp_path]['symbols'].append(sym) + # Check if the symbol is used anywhere else in the file + symbol_used = False + if " as " in sym: + symbol_used = True + for other_line in lines: + if line == other_line: + continue + if sym in other_line and not IMPORT_REGEX.match(other_line): + symbol_used = True + break + if not symbol_used: + to_be_removed.append(sym) + else: + imports[imp_path]['symbols'].append(sym) # Count how many import statements per path occurrences = {imp_path: 0 for imp_path in imports} @@ -61,15 +79,21 @@ def process_file(path: str): # If nothing to unify (no multi-line duplicates), no intra-line duplicates, and everything already sorted → done if not any(count > 1 for count in occurrences.values()) \ and not duplicates_in_line \ - and not unsorted_in_line: + and not unsorted_in_line \ + and not to_be_removed: return # Build unified import lines (sorted symbols) unified_import_lines = {} for imp_path, data in imports.items(): symbols_sorted = sorted(data['symbols']) + if path in dependency_files: + symbols_filtered = symbols_sorted + else: + symbols_filtered = [sym for sym in symbols_sorted if sym not in to_be_removed] + empty_import = len(symbols_filtered) == 0 unified_import_lines[imp_path] = ( - f"import {{{', '.join(symbols_sorted)}}} from \"{imp_path}\";\n" + f"import {{{', '.join(symbols_filtered)}}} from \"{imp_path}\";\n" if not empty_import else "\n" ) # Second pass: write new lines, replacing first occurrence (or only occurrence) @@ -97,6 +121,10 @@ def process_file(path: str): def walk_and_clean(root_dir: str): for dirpath, _, filenames in os.walk(root_dir): + # Skip files in ./lib and node_modules directories + if (dirpath.startswith(os.path.join(root_dir, 'lib')) or + dirpath.startswith(os.path.join(root_dir, 'node_modules'))): + continue for file in filenames: if file.endswith('.sol'): process_file(os.path.join(dirpath, file)) diff --git a/system-contracts/.gitignore b/system-contracts/.gitignore index 9e6a3cb76c..680c6720cb 100644 --- a/system-contracts/.gitignore +++ b/system-contracts/.gitignore @@ -1,6 +1,8 @@ # Compiler files cache/ +cache-forge-tests/ out/ +out-tests/ zkout/ # Ignores development broadcast logs diff --git a/system-contracts/bootloader/bootloader.yul b/system-contracts/bootloader/bootloader.yul index 70b444dea6..238f70b4d7 100644 --- a/system-contracts/bootloader/bootloader.yul +++ b/system-contracts/bootloader/bootloader.yul @@ -2857,7 +2857,7 @@ object "Bootloader" { // First slot (only last 4 bytes) -- selector mstore(ptr, {{PUBLISH_PUBDATA_SELECTOR}}) - // Second slot is occupied by the address of the L2 DA validator. + // Second slot is occupied by the option of L2 DA commitment scheme. // The operator can provide any one it wants. It will be the responsibility of the // L1Messenger system contract to send the corresponding log to L1. // @@ -2866,7 +2866,7 @@ object "Bootloader" { // Third slot -- length of pubdata let len := mload(add(ptr, 96)) - // 4 bytes for selector, 32 bytes for ABI-encoded L2 DA validator address, + // 4 bytes for selector, 32 bytes for ABI-encoded L2 DA validation scheme option, // 32 bytes for array offset and 32 bytes for array length let fullLen := add(len, 100) diff --git a/system-contracts/bootloader/test_infra/Cargo.lock b/system-contracts/bootloader/test_infra/Cargo.lock index e1f882addc..224a339e60 100644 --- a/system-contracts/bootloader/test_infra/Cargo.lock +++ b/system-contracts/bootloader/test_infra/Cargo.lock @@ -24,9 +24,9 @@ dependencies = [ [[package]] name = "adler2" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" [[package]] name = "ahash" @@ -54,12 +54,6 @@ version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - [[package]] name = "android_system_properties" version = "0.1.5" @@ -71,9 +65,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.98" +version = "1.0.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" +checksum = "b0674a1ddeecb70197781e945de4b3b8ffb61fa939a5597bcf48503737663100" [[package]] name = "arr_macro" @@ -140,20 +134,20 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ - "proc-macro2 1.0.95", + "proc-macro2 1.0.101", "quote 1.0.40", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] name = "async-trait" -version = "0.1.88" +version = "0.1.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5" +checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" dependencies = [ - "proc-macro2 1.0.95", + "proc-macro2 1.0.101", "quote 1.0.40", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -173,15 +167,15 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "autocfg" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] name = "aws-config" -version = "1.6.3" +version = "1.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02a18fd934af6ae7ca52410d4548b98eb895aab0f1ea417d168d85db1434a141" +checksum = "8bc1b40fb26027769f16960d2f4a6bc20c4bb755d403e552c8c1a73af433c246" dependencies = [ "aws-credential-types", "aws-runtime", @@ -204,9 +198,9 @@ dependencies = [ [[package]] name = "aws-credential-types" -version = "1.2.3" +version = "1.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "687bc16bc431a8533fe0097c7f0182874767f920989d7260950172ae8e3c4465" +checksum = "d025db5d9f52cbc413b167136afb3d8aeea708c0d8884783cf6253be5e22f6f2" dependencies = [ "aws-smithy-async", "aws-smithy-runtime-api", @@ -216,9 +210,9 @@ dependencies = [ [[package]] name = "aws-lc-rs" -version = "1.13.1" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fcc8f365936c834db5514fc45aee5b1202d677e6b40e48468aaaa8183ca8c7" +checksum = "94b8ff6c09cd57b16da53641caa860168b88c172a5ee163b0288d3d6eea12786" dependencies = [ "aws-lc-sys", "zeroize", @@ -226,11 +220,11 @@ dependencies = [ [[package]] name = "aws-lc-sys" -version = "0.29.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61b1d86e7705efe1be1b569bab41d4fa1e14e220b60a160f78de2db687add079" +checksum = "0e44d16778acaf6a9ec9899b92cebd65580b83f685446bf2e1f5d3d732f99dcd" dependencies = [ - "bindgen 0.69.5", + "bindgen 0.72.1", "cc", "cmake", "dunce", @@ -239,9 +233,9 @@ dependencies = [ [[package]] name = "aws-runtime" -version = "1.5.7" +version = "1.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c4063282c69991e57faab9e5cb21ae557e59f5b0fb285c196335243df8dc25c" +checksum = "c034a1bc1d70e16e7f4e4caf7e9f7693e4c9c24cd91cf17c2a0b21abaebc7c8b" dependencies = [ "aws-credential-types", "aws-sigv4", @@ -264,9 +258,9 @@ dependencies = [ [[package]] name = "aws-sdk-s3" -version = "1.90.0" +version = "1.105.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5934beb9403c562bd129a1de1bd51ab67209c05ddf3a4a8c86714120181c860f" +checksum = "c99789e929b5e1d9a5aa3fa1d81317f3a789afc796141d11b0eaafd9d9f47e38" dependencies = [ "aws-credential-types", "aws-runtime", @@ -298,9 +292,9 @@ dependencies = [ [[package]] name = "aws-sdk-sts" -version = "1.72.0" +version = "1.85.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6933f189ed1255e78175fbd73fb200c0aae7240d220ed3346f567b0ddca3083" +checksum = "410309ad0df4606bc721aff0d89c3407682845453247213a0ccc5ff8801ee107" dependencies = [ "aws-credential-types", "aws-runtime", @@ -321,9 +315,9 @@ dependencies = [ [[package]] name = "aws-sigv4" -version = "1.3.2" +version = "1.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3734aecf9ff79aa401a6ca099d076535ab465ff76b46440cf567c8e70b65dc13" +checksum = "084c34162187d39e3740cb635acd73c4e3a551a36146ad6fe8883c929c9f876c" dependencies = [ "aws-credential-types", "aws-smithy-eventstream", @@ -360,9 +354,9 @@ dependencies = [ [[package]] name = "aws-smithy-checksums" -version = "0.63.3" +version = "0.63.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2f77a921dbd2c78ebe70726799787c1d110a2245dd65e39b20923dfdfb2deee" +checksum = "56d2df0314b8e307995a3b86d44565dfe9de41f876901a7d71886c756a25979f" dependencies = [ "aws-smithy-http", "aws-smithy-types", @@ -380,9 +374,9 @@ dependencies = [ [[package]] name = "aws-smithy-eventstream" -version = "0.60.8" +version = "0.60.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c45d3dddac16c5c59d553ece225a88870cf81b7b813c9cc17b78cf4685eac7a" +checksum = "182b03393e8c677347fb5705a04a9392695d47d20ef0a2f8cfe28c8e6b9b9778" dependencies = [ "aws-smithy-types", "bytes", @@ -391,9 +385,9 @@ dependencies = [ [[package]] name = "aws-smithy-http" -version = "0.62.1" +version = "0.62.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99335bec6cdc50a346fda1437f9fefe33abf8c99060739a546a16457f2862ca9" +checksum = "7c4dacf2d38996cf729f55e7a762b30918229917eca115de45dfa8dfb97796c9" dependencies = [ "aws-smithy-eventstream", "aws-smithy-runtime-api", @@ -412,37 +406,39 @@ dependencies = [ [[package]] name = "aws-smithy-http-client" -version = "1.0.2" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e44697a9bded898dcd0b1cb997430d949b87f4f8940d91023ae9062bf218250" +checksum = "147e8eea63a40315d704b97bf9bc9b8c1402ae94f89d5ad6f7550d963309da1b" dependencies = [ "aws-smithy-async", "aws-smithy-runtime-api", "aws-smithy-types", - "h2 0.4.10", + "h2 0.3.27", + "h2 0.4.12", "http 0.2.12", "http 1.3.1", "http-body 0.4.6", "hyper 0.14.32", - "hyper 1.6.0", + "hyper 1.7.0", "hyper-rustls 0.24.2", - "hyper-rustls 0.27.6", + "hyper-rustls 0.27.7", "hyper-util", "pin-project-lite", "rustls 0.21.12", - "rustls 0.23.27", + "rustls 0.23.31", "rustls-native-certs 0.8.1", "rustls-pki-types", "tokio", - "tower 0.5.2", + "tokio-rustls 0.26.2", + "tower", "tracing", ] [[package]] name = "aws-smithy-json" -version = "0.61.3" +version = "0.61.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92144e45819cae7dc62af23eac5a038a58aa544432d2102609654376a900bd07" +checksum = "eaa31b350998e703e9826b2104dd6f63be0508666e1aba88137af060e8944047" dependencies = [ "aws-smithy-types", ] @@ -468,9 +464,9 @@ dependencies = [ [[package]] name = "aws-smithy-runtime" -version = "1.8.3" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14302f06d1d5b7d333fd819943075b13d27c7700b414f574c3c35859bfb55d5e" +checksum = "d3946acbe1ead1301ba6862e712c7903ca9bb230bdf1fbd1b5ac54158ef2ab1f" dependencies = [ "aws-smithy-async", "aws-smithy-http", @@ -492,9 +488,9 @@ dependencies = [ [[package]] name = "aws-smithy-runtime-api" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1e5d9e3a80a18afa109391fb5ad09c3daf887b516c6fd805a157c6ea7994a57" +checksum = "07f5e0fc8a6b3f2303f331b94504bbf754d85488f402d6f1dd7a6080f99afe56" dependencies = [ "aws-smithy-async", "aws-smithy-types", @@ -509,9 +505,9 @@ dependencies = [ [[package]] name = "aws-smithy-types" -version = "1.3.1" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40076bd09fadbc12d5e026ae080d0930defa606856186e31d83ccc6a255eeaf3" +checksum = "d498595448e43de7f4296b7b7a18a8a02c61ec9349128c80a368f7c3b4ab11a8" dependencies = [ "base64-simd", "bytes", @@ -535,18 +531,18 @@ dependencies = [ [[package]] name = "aws-smithy-xml" -version = "0.60.9" +version = "0.60.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab0b0166827aa700d3dc519f72f8b3a91c35d0b8d042dc5d643a91e6f80648fc" +checksum = "3db87b96cb1b16c024980f133968d52882ca0daaee3a086c6decc500f6c99728" dependencies = [ "xmlparser", ] [[package]] name = "aws-types" -version = "1.3.7" +version = "1.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a322fec39e4df22777ed3ad8ea868ac2f94cd15e1a55f6ee8d8d6305057689a" +checksum = "b069d19bf01e46298eaedd7c6f283fe565a59263e53eebec945f3e6398f42390" dependencies = [ "aws-credential-types", "aws-smithy-async", @@ -556,53 +552,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "axum" -version = "0.7.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edca88bc138befd0323b20752846e6587272d3b03b0343c8ea28a6f819e6e71f" -dependencies = [ - "async-trait", - "axum-core", - "bytes", - "futures-util", - "http 1.3.1", - "http-body 1.0.1", - "http-body-util", - "itoa", - "matchit", - "memchr", - "mime", - "percent-encoding", - "pin-project-lite", - "rustversion", - "serde", - "sync_wrapper 1.0.2", - "tower 0.5.2", - "tower-layer", - "tower-service", -] - -[[package]] -name = "axum-core" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199" -dependencies = [ - "async-trait", - "bytes", - "futures-util", - "http 1.3.1", - "http-body 1.0.1", - "http-body-util", - "mime", - "pin-project-lite", - "rustversion", - "sync_wrapper 1.0.2", - "tower-layer", - "tower-service", -] - [[package]] name = "backon" version = "0.4.4" @@ -672,9 +621,9 @@ dependencies = [ [[package]] name = "base64ct" -version = "1.7.3" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89e25b6adfb930f02d1981565a6e5d9c547ac15a96606256d3b59040e5cd4ca3" +checksum = "55248b47b0caf0546f7988906588779981c43bb1bc9d0c44087278f80cdb44ba" [[package]] name = "beef" @@ -717,53 +666,32 @@ dependencies = [ "lazycell", "peeking_take_while", "prettyplease", - "proc-macro2 1.0.95", + "proc-macro2 1.0.101", "quote 1.0.40", "regex", "rustc-hash 1.1.0", "shlex", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] name = "bindgen" -version = "0.69.5" +version = "0.72.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088" +checksum = "993776b509cfb49c750f11b8f07a46fa23e0a1386ffc01fb1e7d343efc387895" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.4", "cexpr", "clang-sys", - "itertools 0.12.1", - "lazy_static", - "lazycell", + "itertools 0.13.0", "log", "prettyplease", - "proc-macro2 1.0.95", - "quote 1.0.40", - "regex", - "rustc-hash 1.1.0", - "shlex", - "syn 2.0.101", - "which", -] - -[[package]] -name = "bindgen" -version = "0.71.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f58bf3d7db68cfbac37cfc485a8d711e87e064c3d0fe0435b92f7a407f9d6b3" -dependencies = [ - "bitflags 2.9.1", - "cexpr", - "clang-sys", - "itertools 0.13.0", - "proc-macro2 1.0.95", + "proc-macro2 1.0.101", "quote 1.0.40", "regex", "rustc-hash 2.1.1", "shlex", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -783,9 +711,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.9.1" +version = "2.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" +checksum = "2261d10cca569e4643e526d8dc2e62e433cc8aba21ab764233731f8d369bf394" dependencies = [ "serde", ] @@ -880,9 +808,9 @@ checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" [[package]] name = "blst" -version = "0.3.14" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47c79a94619fade3c0b887670333513a67ac28a6a7e653eb260bf0d4103db38d" +checksum = "4fd49896f12ac9b6dcd7a5998466b9b58263a695a3dd1ecc1aaca2e12a90b080" dependencies = [ "cc", "glob", @@ -939,16 +867,16 @@ checksum = "fdd1d3c0c2f5833f22386f252fe8ed005c7f59fdcddeef025c01b4c3b9fd9ac3" dependencies = [ "once_cell", "proc-macro-crate 3.3.0", - "proc-macro2 1.0.95", + "proc-macro2 1.0.101", "quote 1.0.40", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] name = "bumpalo" -version = "3.17.0" +version = "3.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" +checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" [[package]] name = "byte-slice-cast" @@ -973,16 +901,16 @@ version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3db406d29fbcd95542e92559bed4d8ad92636d1ca8b3b72ede10b4bcc010e659" dependencies = [ - "proc-macro2 1.0.95", + "proc-macro2 1.0.101", "quote 1.0.40", "syn 1.0.109", ] [[package]] name = "bytecount" -version = "0.6.8" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ce89b21cab1437276d2650d57e971f9d548a2d9037cc231abdc0562b97498ce" +checksum = "175812e0be2bccb6abe50bb8d566126198344f707e304f45c648fd8f2cc0365e" [[package]] name = "byteorder" @@ -1018,9 +946,9 @@ dependencies = [ [[package]] name = "camino" -version = "1.1.9" +version = "1.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3" +checksum = "dd0b03af37dad7a14518b7691d81acb0f8222604ad3d1b02f6b4bed5188c0cd5" dependencies = [ "serde", ] @@ -1049,10 +977,11 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.25" +version = "1.2.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0fc897dc1e865cc67c0e05a836d9d3f1df3cbe442aa4a9473b18e12624a4951" +checksum = "5252b3d2648e5eedbc1a6f501e3c795e07025c1e93bbf8bbdd6eef7f447a6d54" dependencies = [ + "find-msvc-tools", "jobserver", "libc", "shlex", @@ -1069,9 +998,9 @@ dependencies = [ [[package]] name = "cfg-if" -version = "1.0.0" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +checksum = "2fd1289c04a9ea8cb22300a459a72a385d7c73d3259e2ed7dcb2af674838cfa9" [[package]] name = "cfg_aliases" @@ -1081,15 +1010,14 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "chrono" -version = "0.4.41" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c469d952047f47f91b68d1cba3f10d63c11d73e4636f24f08daf0278abf01c4d" +checksum = "145052bdd345b87320e369255277e3fb5152762ad123a901ef5c262dd38fe8d2" dependencies = [ - "android-tzdata", "iana-time-zone", "num-traits", "serde", - "windows-link", + "windows-link 0.2.0", ] [[package]] @@ -1121,9 +1049,9 @@ dependencies = [ [[package]] name = "circuit_definitions" -version = "0.152.3" +version = "0.152.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "558525d05da2dcb1a4953cc0ea80fe4bd57f9586b052db4660ec18962c4af8a5" +checksum = "be380f1e0caba206aa731d3d24a20de53b106ad51cd367557807a413ed0e8587" dependencies = [ "circuit_encodings", "crossbeam", @@ -1135,26 +1063,26 @@ dependencies = [ [[package]] name = "circuit_encodings" -version = "0.152.3" +version = "0.152.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8381cbb52de325fb551347a7eb7af77c8b1df919da51c49405540f207c92313" +checksum = "c3cff3465b8da5aa0a566094910e3fe72b7f196e471da1607a0be0395e4d6fab" dependencies = [ "derivative", "serde", - "zk_evm 0.152.3", + "zk_evm 0.152.4", "zkevm_circuits", ] [[package]] name = "circuit_sequencer_api" -version = "0.152.3" +version = "0.152.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b1b6a32c5c902ea01ef7eca76dd9c16585d5c9005aabcb2c08a7a4a45827b07" +checksum = "9c56d8a70d5d1e4a3e50b0256bb95e143721d8d9a3b155d7945df898d03e1c67" dependencies = [ "derivative", "rayon", "serde", - "zk_evm 0.152.3", + "zk_evm 0.152.4", "zksync_bellman", ] @@ -1233,7 +1161,7 @@ version = "0.2.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d57c2eccfb16dbac1f4e61e206105db5820c9d26c3c472bc17c774259ef7744" dependencies = [ - "proc-macro2 1.0.95", + "proc-macro2 1.0.101", "quote 1.0.40", "unicode-xid 0.2.6", ] @@ -1305,23 +1233,22 @@ checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" [[package]] name = "crc-fast" -version = "1.2.1" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "add8d3a4c789d77eeb0f0e3c1035f73610d017f9047e87db94f89c02a56d8fef" +checksum = "6bf62af4cc77d8fe1c22dde4e721d87f2f54056139d8c412e1366b740305f56f" dependencies = [ - "cc", "crc", "digest 0.10.7", "libc", - "rand 0.9.1", + "rand 0.9.2", "regex", ] [[package]] name = "crc32fast" -version = "1.4.2" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" +checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" dependencies = [ "cfg-if", ] @@ -1384,9 +1311,9 @@ checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "crunchy" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43da5946c66ffcc7745f48db692ffbb10a83bfe0afd96235c5c2a4fb23994929" +checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" [[package]] name = "crypto-bigint" @@ -1439,7 +1366,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a2785755761f3ddc1492979ce1e48d2c00d09311c39e4466429188f3dd6501" dependencies = [ "quote 1.0.40", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -1464,9 +1391,9 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ - "proc-macro2 1.0.95", + "proc-macro2 1.0.101", "quote 1.0.40", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -1487,7 +1414,7 @@ checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" dependencies = [ "fnv", "ident_case", - "proc-macro2 1.0.95", + "proc-macro2 1.0.101", "quote 1.0.40", "strsim", "syn 1.0.109", @@ -1550,9 +1477,9 @@ dependencies = [ [[package]] name = "deranged" -version = "0.4.0" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e" +checksum = "d630bccd429a5bb5a64b5e94f693bfc48c9f8566418fda4c494cc94f911f87cc" dependencies = [ "powerfmt", "serde", @@ -1564,7 +1491,7 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ - "proc-macro2 1.0.95", + "proc-macro2 1.0.101", "quote 1.0.40", "syn 1.0.109", ] @@ -1584,9 +1511,9 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bda628edc44c4bb645fbe0f758797143e4e07926f7ebf4e9bdfbd3d2ce621df3" dependencies = [ - "proc-macro2 1.0.95", + "proc-macro2 1.0.101", "quote 1.0.40", - "syn 2.0.101", + "syn 2.0.106", "unicode-xid 0.2.6", ] @@ -1623,9 +1550,9 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ - "proc-macro2 1.0.95", + "proc-macro2 1.0.101", "quote 1.0.40", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -1684,9 +1611,9 @@ dependencies = [ [[package]] name = "ed25519-dalek" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" +checksum = "70e796c081cee67dc755e1a36a0a172b897fab85fc3f6bc48307991f64e4eca9" dependencies = [ "curve25519-dalek", "ed25519", @@ -1771,18 +1698,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa18ce2bc66555b3218614519ac839ddb759a7d6720732f979ef8d13be147ecd" dependencies = [ "once_cell", - "proc-macro2 1.0.95", + "proc-macro2 1.0.101", "quote 1.0.40", - "syn 2.0.101", -] - -[[package]] -name = "envy" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f47e0157f2cb54f5ae1bd371b30a2ae4311e1c028f575cd4e81de7353215965" -dependencies = [ - "serde", + "syn 2.0.106", ] [[package]] @@ -1793,12 +1711,12 @@ checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "errno" -version = "0.3.12" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cea14ef9355e3beab063703aa9dab15afd25f0667c341310c1e5274bb1d0da18" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.59.0", + "windows-sys 0.61.0", ] [[package]] @@ -1867,9 +1785,9 @@ dependencies = [ [[package]] name = "event-listener" -version = "5.4.0" +version = "5.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3492acde4c3fc54c845eaab3eed8bd00c7a7d881f78bfc801e43a93dec1331ae" +checksum = "e13b66accf52311f30a0db42147dadea9850cb48cd070028831ae5f5d4b856ab" dependencies = [ "concurrent-queue", "parking", @@ -1925,6 +1843,12 @@ version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" +[[package]] +name = "find-msvc-tools" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fd99930f64d146689264c637b5af2f0233a933bef0d8570e2526bf9e083192d" + [[package]] name = "findshlibs" version = "0.10.2" @@ -1963,9 +1887,9 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ced92e76e966ca2fd84c8f7aa01a4aea65b0eb6648d72f7c8f3e2764a67fece" +checksum = "4a3d7db9596fecd151c5f638c0ee5d5bd487b6e0ea232e5dc96d5250f6f94b1d" dependencies = [ "crc32fast", "miniz_oxide", @@ -2011,9 +1935,9 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" -version = "1.2.1" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" dependencies = [ "percent-encoding", ] @@ -2135,9 +2059,9 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ - "proc-macro2 1.0.95", + "proc-macro2 1.0.101", "quote 1.0.40", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -2190,7 +2114,7 @@ dependencies = [ "cfg-if", "js-sys", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi 0.11.1+wasi-snapshot-preview1", "wasm-bindgen", ] @@ -2203,7 +2127,7 @@ dependencies = [ "cfg-if", "libc", "r-efi", - "wasi 0.14.2+wasi-0.2.4", + "wasi 0.14.5+wasi-0.2.4", ] [[package]] @@ -2214,9 +2138,9 @@ checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "glob" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" +checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" [[package]] name = "google-cloud-auth" @@ -2230,7 +2154,7 @@ dependencies = [ "google-cloud-token", "home", "jsonwebtoken", - "reqwest 0.12.18", + "reqwest 0.12.23", "serde", "serde_json", "thiserror 1.0.69", @@ -2246,7 +2170,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d901aeb453fd80e51d64df4ee005014f6cf39f2d736dd64f7239c132d9d39a6a" dependencies = [ - "reqwest 0.12.18", + "reqwest 0.12.23", "thiserror 1.0.69", "tokio", ] @@ -2271,7 +2195,7 @@ dependencies = [ "percent-encoding", "pkcs8 0.10.2", "regex", - "reqwest 0.12.18", + "reqwest 0.12.23", "reqwest-middleware", "ring", "serde", @@ -2317,9 +2241,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" +checksum = "0beca50380b1fc32983fc1cb4587bfa4bb9e78fc259aad4a0032d2080309222d" dependencies = [ "bytes", "fnv", @@ -2327,7 +2251,7 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.12", - "indexmap 2.9.0", + "indexmap 2.11.1", "slab", "tokio", "tokio-util", @@ -2336,9 +2260,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.10" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9421a676d1b147b16b82c9225157dc629087ef8ec4d5e2960f9437a90dac0a5" +checksum = "f3c0b69cfcb4e1b9f1bf2f53f95f766e4661169728ec61cd3fe5a0166f2d1386" dependencies = [ "atomic-waker", "bytes", @@ -2346,7 +2270,7 @@ dependencies = [ "futures-core", "futures-sink", "http 1.3.1", - "indexmap 2.9.0", + "indexmap 2.11.1", "slab", "tokio", "tokio-util", @@ -2394,9 +2318,9 @@ checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" [[package]] name = "hashbrown" -version = "0.15.3" +version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84b26c544d002229e640969970a2e74021aadf6e2f96372b9c58eff97de08eb3" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" dependencies = [ "allocator-api2", "equivalent", @@ -2409,7 +2333,7 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7382cf6263419f2d8df38c55d7da83da5c18aef87fc7a7fc1fb1e344edfe14c1" dependencies = [ - "hashbrown 0.15.3", + "hashbrown 0.15.5", ] [[package]] @@ -2420,9 +2344,9 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hermit-abi" -version = "0.3.9" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" +checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" [[package]] name = "hex" @@ -2546,14 +2470,14 @@ dependencies = [ "futures-channel", "futures-core", "futures-util", - "h2 0.3.26", + "h2 0.3.27", "http 0.2.12", "http-body 0.4.6", "httparse", "httpdate", "itoa", "pin-project-lite", - "socket2", + "socket2 0.5.10", "tokio", "tower-service", "tracing", @@ -2562,20 +2486,22 @@ dependencies = [ [[package]] name = "hyper" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80" +checksum = "eb3aa54a13a0dfe7fbe3a59e0c76093041720fdc77b110cc0fc260fafb4dc51e" dependencies = [ + "atomic-waker", "bytes", "futures-channel", - "futures-util", - "h2 0.4.10", + "futures-core", + "h2 0.4.12", "http 1.3.1", "http-body 1.0.1", "httparse", "httpdate", "itoa", "pin-project-lite", + "pin-utils", "smallvec", "tokio", "want", @@ -2599,14 +2525,14 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.27.6" +version = "0.27.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03a01595e11bdcec50946522c32dde3fc6914743000a68b93000965f2f02406d" +checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" dependencies = [ "http 1.3.1", - "hyper 1.6.0", + "hyper 1.7.0", "hyper-util", - "rustls 0.23.27", + "rustls 0.23.31", "rustls-native-certs 0.8.1", "rustls-pki-types", "tokio", @@ -2614,19 +2540,6 @@ dependencies = [ "tower-service", ] -[[package]] -name = "hyper-timeout" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b90d566bffbce6a75bd8b09a05aa8c2cb1fabb6cb348f8840c9e4c90a0d83b0" -dependencies = [ - "hyper 1.6.0", - "hyper-util", - "pin-project-lite", - "tokio", - "tower-service", -] - [[package]] name = "hyper-tls" version = "0.5.0" @@ -2648,7 +2561,7 @@ checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ "bytes", "http-body-util", - "hyper 1.6.0", + "hyper 1.7.0", "hyper-util", "native-tls", "tokio", @@ -2658,9 +2571,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.13" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1c293b6b3d21eca78250dc7dbebd6b9210ec5530e038cbfe0661b5c47ab06e8" +checksum = "8d9b05277c7e8da2c93a568989bb6207bef0112e8d17df7a6eda4a3cf143bc5e" dependencies = [ "base64 0.22.1", "bytes", @@ -2669,12 +2582,12 @@ dependencies = [ "futures-util", "http 1.3.1", "http-body 1.0.1", - "hyper 1.6.0", + "hyper 1.7.0", "ipnet", "libc", "percent-encoding", "pin-project-lite", - "socket2", + "socket2 0.6.0", "system-configuration 0.6.1", "tokio", "tower-service", @@ -2800,9 +2713,9 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "1.0.3" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" dependencies = [ "idna_adapter", "smallvec", @@ -2852,9 +2765,9 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0eb5a3343abf848c0984fe4604b2b105da9539376e24fc0a3b0007411ae4fd9" dependencies = [ - "proc-macro2 1.0.95", + "proc-macro2 1.0.101", "quote 1.0.40", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -2869,12 +2782,23 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.9.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" +checksum = "206a8042aec68fa4a62e8d3f7aa4ceb508177d9324faf261e1959e495b7a1921" dependencies = [ "equivalent", - "hashbrown 0.15.3", + "hashbrown 0.15.5", +] + +[[package]] +name = "io-uring" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "046fa2d4d00aea763528b4950358d0ead425372445dc8ff86312b3c69ff7727b" +dependencies = [ + "bitflags 2.9.4", + "cfg-if", + "libc", ] [[package]] @@ -2946,9 +2870,9 @@ checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" [[package]] name = "jobserver" -version = "0.1.33" +version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38f262f097c174adebe41eb73d66ae9c06b2844fb0da69969647bbddd9b0538a" +checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" dependencies = [ "getrandom 0.3.3", "libc", @@ -2956,9 +2880,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.77" +version = "0.3.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" +checksum = "0c0b063578492ceec17683ef2f8c5e89121fbd0b172cbc280635ab7567db2738" dependencies = [ "once_cell", "wasm-bindgen", @@ -3031,9 +2955,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.172" +version = "0.2.175" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa" +checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543" [[package]] name = "libloading" @@ -3042,7 +2966,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667" dependencies = [ "cfg-if", - "windows-targets 0.53.0", + "windows-targets 0.53.3", ] [[package]] @@ -3051,6 +2975,17 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" +[[package]] +name = "libredox" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "391290121bad3d37fbddad76d8f5d1c1c314cfc646d143d7e07a3086ddff0ce3" +dependencies = [ + "bitflags 2.9.4", + "libc", + "redox_syscall", +] + [[package]] name = "librocksdb-sys" version = "0.11.0+8.1.1" @@ -3090,15 +3025,9 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.4.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" - -[[package]] -name = "linux-raw-sys" -version = "0.9.4" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" +checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" [[package]] name = "litemap" @@ -3118,9 +3047,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.27" +version = "0.4.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" +checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" [[package]] name = "logos" @@ -3139,10 +3068,10 @@ checksum = "dc487311295e0002e452025d6b580b77bb17286de87b57138f3b5db711cded68" dependencies = [ "beef", "fnv", - "proc-macro2 1.0.95", + "proc-macro2 1.0.101", "quote 1.0.40", "regex-syntax 0.6.29", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -3160,7 +3089,7 @@ version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" dependencies = [ - "hashbrown 0.15.3", + "hashbrown 0.15.5", ] [[package]] @@ -3181,19 +3110,13 @@ checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" [[package]] name = "matchers" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9" dependencies = [ - "regex-automata 0.1.10", + "regex-automata", ] -[[package]] -name = "matchit" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" - [[package]] name = "md-5" version = "0.10.6" @@ -3206,9 +3129,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.4" +version = "2.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" +checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" [[package]] name = "miette" @@ -3228,9 +3151,9 @@ version = "5.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49e7bc1560b95a3c4a25d03de42fe76ca718ab92d1a22a55b9b4cf67b3ae635c" dependencies = [ - "proc-macro2 1.0.95", + "proc-macro2 1.0.101", "quote 1.0.40", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -3272,9 +3195,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.8.8" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be647b768db090acb35d5ec5db2b0e1f1de11133ca123b9eacf5137868f892a" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" dependencies = [ "adler2", ] @@ -3286,7 +3209,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" dependencies = [ "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi 0.11.1+wasi-snapshot-preview1", "windows-sys 0.59.0", ] @@ -3331,12 +3254,11 @@ dependencies = [ [[package]] name = "nu-ansi-term" -version = "0.46.0" +version = "0.50.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +checksum = "d4a28e057d01f97e61255210fcff094d74ed0466038633e95017f5beb68e4399" dependencies = [ - "overload", - "winapi", + "windows-sys 0.52.0", ] [[package]] @@ -3471,9 +3393,9 @@ dependencies = [ [[package]] name = "num_cpus" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +checksum = "91df4bbde75afed763b708b7eee1e8e7651e02d97f6d5dd763e89367e957b23b" dependencies = [ "hermit-abi", "libc", @@ -3490,11 +3412,12 @@ dependencies = [ [[package]] name = "num_enum" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179" +checksum = "a973b4e44ce6cad84ce69d797acf9a044532e4184c4f267913d1b546a0727b7a" dependencies = [ - "num_enum_derive 0.7.3", + "num_enum_derive 0.7.4", + "rustversion", ] [[package]] @@ -3504,21 +3427,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" dependencies = [ "proc-macro-crate 1.3.1", - "proc-macro2 1.0.95", + "proc-macro2 1.0.101", "quote 1.0.40", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] name = "num_enum_derive" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" +checksum = "77e878c846a8abae00dd069496dbe8751b16ac1c3d6bd2a7283a938e8228f90d" dependencies = [ "proc-macro-crate 3.3.0", - "proc-macro2 1.0.95", + "proc-macro2 1.0.101", "quote 1.0.40", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -3548,7 +3471,7 @@ version = "0.10.73" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8505734d46c8ab1e19a1dce3aef597ad87dcb4c37e7188231769bd6bd51cebf8" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.4", "cfg-if", "foreign-types", "libc", @@ -3563,9 +3486,9 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ - "proc-macro2 1.0.95", + "proc-macro2 1.0.101", "quote 1.0.40", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -3588,23 +3511,23 @@ dependencies = [ [[package]] name = "opentelemetry" -version = "0.24.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c365a63eec4f55b7efeceb724f1336f26a9cf3427b70e59e2cd2a5b947fba96" +checksum = "aaf416e4cb72756655126f7dd7bb0af49c674f4c1b9903e80c009e0c37e552e6" dependencies = [ "futures-core", "futures-sink", "js-sys", - "once_cell", "pin-project-lite", - "thiserror 1.0.69", + "thiserror 2.0.16", + "tracing", ] [[package]] name = "opentelemetry-appender-tracing" -version = "0.5.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b84de945cb3a6f1e0d6317cbd998bbd0519ab00f4b790db67e0ff4fdcf7cedb6" +checksum = "e68f63eca5fad47e570e00e893094fc17be959c80c79a7d6ec1abdd5ae6ffc16" dependencies = [ "opentelemetry", "tracing", @@ -3614,42 +3537,39 @@ dependencies = [ [[package]] name = "opentelemetry-http" -version = "0.13.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad31e9de44ee3538fb9d64fe3376c1362f406162434609e79aea2a41a0af78ab" +checksum = "50f6639e842a97dbea8886e3439710ae463120091e2e064518ba8e716e6ac36d" dependencies = [ "async-trait", "bytes", "http 1.3.1", "opentelemetry", - "reqwest 0.12.18", + "reqwest 0.12.23", ] [[package]] name = "opentelemetry-otlp" -version = "0.17.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b925a602ffb916fb7421276b86756027b37ee708f9dce2dbdcc51739f07e727" +checksum = "dbee664a43e07615731afc539ca60c6d9f1a9425e25ca09c57bc36c87c55852b" dependencies = [ - "async-trait", - "futures-core", "http 1.3.1", "opentelemetry", "opentelemetry-http", "opentelemetry-proto", "opentelemetry_sdk", "prost 0.13.5", - "reqwest 0.12.18", - "thiserror 1.0.69", - "tokio", - "tonic", + "reqwest 0.12.23", + "thiserror 2.0.16", + "tracing", ] [[package]] name = "opentelemetry-proto" -version = "0.7.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30ee9f20bff9c984511a02f082dc8ede839e4a9bf15cc2487c8d6fea5ad850d9" +checksum = "2e046fd7660710fe5a05e8748e70d9058dc15c94ba914e7c4faa7c728f0e8ddc" dependencies = [ "opentelemetry", "opentelemetry_sdk", @@ -3659,29 +3579,24 @@ dependencies = [ [[package]] name = "opentelemetry-semantic-conventions" -version = "0.16.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cefe0543875379e47eb5f1e68ff83f45cc41366a92dfd0d073d513bf68e9a05" +checksum = "83d059a296a47436748557a353c5e6c5705b9470ef6c95cfc52c21a8814ddac2" [[package]] name = "opentelemetry_sdk" -version = "0.24.1" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "692eac490ec80f24a17828d49b40b60f5aeaccdfe6a503f939713afd22bc28df" +checksum = "11f644aa9e5e31d11896e024305d7e3c98a88884d9f8919dbf37a9991bc47a4b" dependencies = [ - "async-trait", "futures-channel", "futures-executor", "futures-util", - "glob", - "once_cell", "opentelemetry", "percent-encoding", - "rand 0.8.5", + "rand 0.9.2", "serde_json", - "thiserror 1.0.69", - "tokio", - "tokio-stream", + "thiserror 2.0.16", ] [[package]] @@ -3695,11 +3610,12 @@ dependencies = [ [[package]] name = "os_info" -version = "3.11.0" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41fc863e2ca13dc2d5c34fb22ea4a588248ac14db929616ba65c45f21744b1e9" +checksum = "d0e1ac5fde8d43c34139135df8ea9ee9465394b2d8d20f032d38998f64afffc3" dependencies = [ "log", + "plist", "serde", "windows-sys 0.52.0", ] @@ -3710,12 +3626,6 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a80800c0488c3a21695ea981a54918fbb37abf04f4d0720c453632255e2ff0e" -[[package]] -name = "overload" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" - [[package]] name = "p256" version = "0.11.1" @@ -3762,9 +3672,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34b4653168b563151153c9e4c08ebed57fb8262bebfa79711552fa983c623e7a" dependencies = [ "proc-macro-crate 3.3.0", - "proc-macro2 1.0.95", + "proc-macro2 1.0.101", "quote 1.0.40", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -3829,26 +3739,26 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.3.1" +version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "pest" -version = "2.8.0" +version = "2.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "198db74531d58c70a361c42201efde7e2591e976d518caf7662a47dc5720e7b6" +checksum = "1db05f56d34358a8b1066f67cbb203ee3e7ed2ba674a6263a1d5ec6db2204323" dependencies = [ "memchr", - "thiserror 2.0.12", + "thiserror 2.0.16", "ucd-trie", ] [[package]] name = "pest_derive" -version = "2.8.0" +version = "2.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d725d9cfd79e87dccc9341a2ef39d1b6f6353d68c4b33c177febbe1a402c97c5" +checksum = "bb056d9e8ea77922845ec74a1c4e8fb17e7c218cc4fc11a15c5d25e189aa40bc" dependencies = [ "pest", "pest_generator", @@ -3856,24 +3766,23 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.8.0" +version = "2.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db7d01726be8ab66ab32f9df467ae8b1148906685bbe75c82d1e65d7f5b3f841" +checksum = "87e404e638f781eb3202dc82db6760c8ae8a1eeef7fb3fa8264b2ef280504966" dependencies = [ "pest", "pest_meta", - "proc-macro2 1.0.95", + "proc-macro2 1.0.101", "quote 1.0.40", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] name = "pest_meta" -version = "2.8.0" +version = "2.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f9f832470494906d1fca5329f8ab5791cc60beb230c74815dff541cbd2b5ca0" +checksum = "edd1101f170f5903fde0914f899bb503d9ff5271d7ba76bbb70bea63690cc0d5" dependencies = [ - "once_cell", "pest", "sha2 0.10.8", ] @@ -3885,7 +3794,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset", - "indexmap 2.9.0", + "indexmap 2.11.1", ] [[package]] @@ -3903,9 +3812,9 @@ version = "1.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" dependencies = [ - "proc-macro2 1.0.95", + "proc-macro2 1.0.101", "quote 1.0.40", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -3957,11 +3866,24 @@ version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" +[[package]] +name = "plist" +version = "1.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3af6b589e163c5a788fab00ce0c0366f6efbb9959c2f9874b224936af7fce7e1" +dependencies = [ + "base64 0.22.1", + "indexmap 2.11.1", + "quick-xml", + "serde", + "time", +] + [[package]] name = "potential_utf" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5a7c30837279ca13e7c867e9e40053bc68740f988cb07f7ca6df43cc734b585" +checksum = "84df19adbe5b5a0782edcab45899906947ab039ccf4573713735ee7de1e6b08a" dependencies = [ "zerovec", ] @@ -3993,12 +3915,12 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.32" +version = "0.2.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "664ec5419c51e34154eec046ebcba56312d5a2fc3b09a06da188e1ad21afadf6" +checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" dependencies = [ - "proc-macro2 1.0.95", - "syn 2.0.101", + "proc-macro2 1.0.101", + "syn 2.0.106", ] [[package]] @@ -4039,7 +3961,7 @@ version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "edce586971a4dfaa28950c6f18ed55e0406c1ab88bbce2c6f6293a7aaba73d35" dependencies = [ - "toml_edit 0.22.26", + "toml_edit 0.22.27", ] [[package]] @@ -4049,7 +3971,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", - "proc-macro2 1.0.95", + "proc-macro2 1.0.101", "quote 1.0.40", "syn 1.0.109", "version_check", @@ -4061,7 +3983,7 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ - "proc-macro2 1.0.95", + "proc-macro2 1.0.101", "quote 1.0.40", "version_check", ] @@ -4083,9 +4005,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.95" +version = "1.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" +checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de" dependencies = [ "unicode-ident", ] @@ -4108,9 +4030,9 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ - "proc-macro2 1.0.95", + "proc-macro2 1.0.101", "quote 1.0.40", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -4150,7 +4072,7 @@ dependencies = [ "prost 0.12.6", "prost-types", "regex", - "syn 2.0.101", + "syn 2.0.106", "tempfile", ] @@ -4162,9 +4084,9 @@ checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" dependencies = [ "anyhow", "itertools 0.12.1", - "proc-macro2 1.0.95", + "proc-macro2 1.0.101", "quote 1.0.40", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -4175,9 +4097,9 @@ checksum = "8a56d757972c98b346a9b766e3f02746cde6dd1cd1d1d563472929fdd74bec4d" dependencies = [ "anyhow", "itertools 0.14.0", - "proc-macro2 1.0.95", + "proc-macro2 1.0.101", "quote 1.0.40", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -4247,7 +4169,7 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" dependencies = [ - "proc-macro2 1.0.95", + "proc-macro2 1.0.101", "quote 1.0.40", "syn 1.0.109", ] @@ -4258,7 +4180,7 @@ version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57206b407293d2bcd3af849ce869d52068623f19e1b5ff8e8778e3309439682b" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.4", "memchr", "unicase", ] @@ -4278,6 +4200,15 @@ dependencies = [ "byteorder", ] +[[package]] +name = "quick-xml" +version = "0.38.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42a232e7487fc2ef313d96dde7948e7a3c05101870d8985e4fd8d26aedd27b89" +dependencies = [ + "memchr", +] + [[package]] name = "quote" version = "0.6.13" @@ -4293,14 +4224,14 @@ version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" dependencies = [ - "proc-macro2 1.0.95", + "proc-macro2 1.0.101", ] [[package]] name = "r-efi" -version = "5.2.0" +version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" [[package]] name = "radium" @@ -4334,9 +4265,9 @@ dependencies = [ [[package]] name = "rand" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97" +checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" dependencies = [ "rand_chacha 0.9.0", "rand_core 0.9.3", @@ -4397,9 +4328,9 @@ dependencies = [ [[package]] name = "rayon" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" +checksum = "368f01d005bf8fd9b1206fb6fa653e6c4a81ceb1466406b81792d87c5677a58f" dependencies = [ "either", "rayon-core", @@ -4407,9 +4338,9 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.12.1" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91" dependencies = [ "crossbeam-deque", "crossbeam-utils", @@ -4426,50 +4357,41 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.12" +version = "0.5.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "928fca9cf2aa042393a8325b9ead81d2f0df4cb12e1e24cef072922ccd99c5af" +checksum = "5407465600fb0548f1442edf71dd20683c6ed326200ace4b1ef0763521bb3b77" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.4", ] [[package]] name = "regex" -version = "1.11.1" +version = "1.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" +checksum = "23d7fd106d8c02486a8d64e778353d1cffe08ce79ac2e82f540c86d0facf6912" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.9", - "regex-syntax 0.8.5", -] - -[[package]] -name = "regex-automata" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" -dependencies = [ - "regex-syntax 0.6.29", + "regex-automata", + "regex-syntax 0.8.6", ] [[package]] name = "regex-automata" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" +checksum = "6b9458fa0bfeeac22b5ca447c63aaf45f28439a709ccd244698632f9aa6394d6" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.5", + "regex-syntax 0.8.6", ] [[package]] name = "regex-lite" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53a49587ad06b26609c52e423de037e7f57f20d53535d66e08c695f347df952a" +checksum = "943f41321c63ef1c92fd763bfe054d2668f7f225a5c29f0105903dc2fc04ba30" [[package]] name = "regex-syntax" @@ -4479,9 +4401,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" +checksum = "caf4aa5b0f434c91fe5c7f1ecb6a5ece2130b02ad2a590589dda5146df959001" [[package]] name = "rend" @@ -4503,7 +4425,7 @@ dependencies = [ "encoding_rs", "futures-core", "futures-util", - "h2 0.3.26", + "h2 0.3.27", "http 0.2.12", "http-body 0.4.6", "hyper 0.14.32", @@ -4534,9 +4456,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.12.18" +version = "0.12.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e98ff6b0dbbe4d5a37318f433d4fc82babd21631f194d370409ceb2e40b2f0b5" +checksum = "d429f34c8092b2d42c7c93cec323bb4adeb7c67698f70839adec842ec10c7ceb" dependencies = [ "base64 0.22.1", "bytes", @@ -4544,21 +4466,19 @@ dependencies = [ "futures-channel", "futures-core", "futures-util", - "h2 0.4.10", + "h2 0.4.12", "http 1.3.1", "http-body 1.0.1", "http-body-util", - "hyper 1.6.0", - "hyper-rustls 0.27.6", + "hyper 1.7.0", + "hyper-rustls 0.27.7", "hyper-tls 0.6.0", "hyper-util", - "ipnet", "js-sys", "log", "mime", "mime_guess", "native-tls", - "once_cell", "percent-encoding", "pin-project-lite", "rustls-pki-types", @@ -4569,7 +4489,7 @@ dependencies = [ "tokio", "tokio-native-tls", "tokio-util", - "tower 0.5.2", + "tower", "tower-http", "tower-service", "url", @@ -4588,7 +4508,7 @@ dependencies = [ "anyhow", "async-trait", "http 1.3.1", - "reqwest 0.12.18", + "reqwest 0.12.23", "serde", "thiserror 1.0.69", "tower-service", @@ -4678,7 +4598,7 @@ version = "0.7.45" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "503d1d27590a2b0a3a4ca4c94755aa2875657196ecbf401a42eff41d7de532c0" dependencies = [ - "proc-macro2 1.0.95", + "proc-macro2 1.0.101", "quote 1.0.40", "syn 1.0.109", ] @@ -4725,9 +4645,9 @@ dependencies = [ [[package]] name = "rust_decimal" -version = "1.37.1" +version = "1.37.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "faa7de2ba56ac291bd90c6b9bece784a52ae1411f9506544b3eae36dd2356d50" +checksum = "b203a6425500a03e0919c42d3c47caca51e79f1132046626d2c8871c5092035d" dependencies = [ "arrayvec 0.7.6", "borsh", @@ -4741,9 +4661,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.24" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" +checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" [[package]] name = "rustc-hash" @@ -4774,28 +4694,15 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" -dependencies = [ - "bitflags 2.9.1", - "errno", - "libc", - "linux-raw-sys 0.4.15", - "windows-sys 0.59.0", -] - -[[package]] -name = "rustix" -version = "1.0.7" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c71e83d6afe7ff64890ec6b71d6a69bb8a610ab78ce364b3352876bb4c801266" +checksum = "cd15f8a2c5551a84d56efdc1cd049089e409ac19a3072d5037a17fd70719ff3e" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.4", "errno", "libc", - "linux-raw-sys 0.9.4", - "windows-sys 0.59.0", + "linux-raw-sys", + "windows-sys 0.61.0", ] [[package]] @@ -4812,14 +4719,14 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.27" +version = "0.23.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "730944ca083c1c233a75c09f199e973ca499344a2b7ba9e755c457e86fb4a321" +checksum = "c0ebcbd2f03de0fc1122ad9bb24b127a5a6cd51d72604a3f3c50ac459762b6cc" dependencies = [ "aws-lc-rs", "once_cell", "rustls-pki-types", - "rustls-webpki 0.103.3", + "rustls-webpki 0.103.4", "subtle", "zeroize", ] @@ -4845,7 +4752,7 @@ dependencies = [ "openssl-probe", "rustls-pki-types", "schannel", - "security-framework 3.2.0", + "security-framework 3.4.0", ] [[package]] @@ -4878,9 +4785,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.103.3" +version = "0.103.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4a72fe2bcf7a6ac6fd7d0b9e5cb68aeb7d4c0a0271730218b3e92d43b4eb435" +checksum = "0a17884ae0c1b773f1ccd2bd4a8c72f16da897310a98b0e84bf349ad5ead92fc" dependencies = [ "aws-lc-rs", "ring", @@ -4890,9 +4797,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.21" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a0d197bd2c9dc6e53b84da9556a69ba4cdfab8619eb41a8bd1cc2027a0f6b1d" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] name = "ryu" @@ -4911,11 +4818,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.27" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" +checksum = "891d81b926048e76efe18581bf793546b4c0eaf8448d72be8de2bbee5fd166e1" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.61.0", ] [[package]] @@ -4979,9 +4886,9 @@ dependencies = [ [[package]] name = "secp256k1-sys" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70a129b9e9efbfb223753b9163c4ab3b13cff7fd9c7f010fbac25ab4099fa07e" +checksum = "4473013577ec77b4ee3668179ef1186df3146e2cf2d927bd200974c6fe60fd99" dependencies = [ "cc", ] @@ -5001,7 +4908,7 @@ version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.4", "core-foundation 0.9.4", "core-foundation-sys", "libc", @@ -5010,11 +4917,11 @@ dependencies = [ [[package]] name = "security-framework" -version = "3.2.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "271720403f46ca04f7ba6f55d438f8bd878d6b8ca0a1046e8228c4145bcbb316" +checksum = "60b369d18893388b345804dc0007963c99b7d665ae71d275812d828c6f089640" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.4", "core-foundation 0.10.1", "core-foundation-sys", "libc", @@ -5023,9 +4930,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.14.0" +version = "2.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" +checksum = "cc1f0cbffaac4852523ce30d8bd3c5cdc873501d96ff467ca09b6767bb8cd5c0" dependencies = [ "core-foundation-sys", "libc", @@ -5179,16 +5086,16 @@ version = "1.0.219" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" dependencies = [ - "proc-macro2 1.0.95", + "proc-macro2 1.0.101", "quote 1.0.40", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] name = "serde_json" -version = "1.0.140" +version = "1.0.143" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" +checksum = "d401abef1d108fbd9cbaebc3e46611f4b1021f714a0597a71f41ee463f5f4a5a" dependencies = [ "itoa", "memchr", @@ -5227,7 +5134,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e182d6ec6f05393cc0e5ed1bf81ad6db3a8feedf8ee515ecdd369809bcce8082" dependencies = [ "darling", - "proc-macro2 1.0.95", + "proc-macro2 1.0.101", "quote 1.0.40", "syn 1.0.109", ] @@ -5238,7 +5145,7 @@ version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ - "indexmap 2.9.0", + "indexmap 2.11.1", "itoa", "ryu", "serde", @@ -5340,9 +5247,9 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "signal-hook-registry" -version = "1.4.5" +version = "1.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9203b8055f63a2a00e2f593bb0510367fe707d7ff1e5c872de2f537b339e5410" +checksum = "b2a4719bff48cee6b39d12c020eeb490953ad2443b7055bd0b21fca26bd8c28b" dependencies = [ "libc", ] @@ -5381,7 +5288,7 @@ checksum = "297f631f50729c8c99b84667867963997ec0b50f32b2a7dbcab828ef0541e8bb" dependencies = [ "num-bigint 0.4.6", "num-traits", - "thiserror 2.0.12", + "thiserror 2.0.16", "time", ] @@ -5402,18 +5309,15 @@ dependencies = [ [[package]] name = "slab" -version = "0.4.9" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] +checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" [[package]] name = "smallvec" -version = "1.15.0" +version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8917285742e9f3e1683f0a9c4e6b57960b7314d0b08d30d1ecd426713ee2eee9" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" dependencies = [ "serde", ] @@ -5441,9 +5345,9 @@ version = "0.2.0-pre" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a5fede39e20d50047e6eb1aee008bd44db17e6a851b1e1b00bce117bdf74d50" dependencies = [ - "proc-macro2 1.0.95", + "proc-macro2 1.0.101", "quote 1.0.40", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -5468,6 +5372,16 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "socket2" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] + [[package]] name = "spin" version = "0.9.8" @@ -5534,9 +5448,9 @@ dependencies = [ "futures-intrusive", "futures-io", "futures-util", - "hashbrown 0.15.3", + "hashbrown 0.15.5", "hashlink", - "indexmap 2.9.0", + "indexmap 2.11.1", "ipnetwork", "log", "memchr", @@ -5548,7 +5462,7 @@ dependencies = [ "serde_json", "sha2 0.10.8", "smallvec", - "thiserror 2.0.12", + "thiserror 2.0.16", "tokio", "tokio-stream", "tracing", @@ -5561,11 +5475,11 @@ version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2d452988ccaacfbf5e0bdbc348fb91d7c8af5bee192173ac3636b5fb6e6715d" dependencies = [ - "proc-macro2 1.0.95", + "proc-macro2 1.0.101", "quote 1.0.40", "sqlx-core", "sqlx-macros-core", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -5579,7 +5493,7 @@ dependencies = [ "heck", "hex", "once_cell", - "proc-macro2 1.0.95", + "proc-macro2 1.0.101", "quote 1.0.40", "serde", "serde_json", @@ -5588,7 +5502,7 @@ dependencies = [ "sqlx-mysql", "sqlx-postgres", "sqlx-sqlite", - "syn 2.0.101", + "syn 2.0.106", "tokio", "url", ] @@ -5602,7 +5516,7 @@ dependencies = [ "atoi", "base64 0.22.1", "bigdecimal", - "bitflags 2.9.1", + "bitflags 2.9.4", "byteorder", "bytes", "chrono", @@ -5633,7 +5547,7 @@ dependencies = [ "smallvec", "sqlx-core", "stringprep", - "thiserror 2.0.12", + "thiserror 2.0.16", "tracing", "whoami", ] @@ -5647,7 +5561,7 @@ dependencies = [ "atoi", "base64 0.22.1", "bigdecimal", - "bitflags 2.9.1", + "bitflags 2.9.4", "byteorder", "chrono", "crc", @@ -5675,7 +5589,7 @@ dependencies = [ "smallvec", "sqlx-core", "stringprep", - "thiserror 2.0.12", + "thiserror 2.0.16", "tracing", "whoami", ] @@ -5700,7 +5614,7 @@ dependencies = [ "serde", "serde_urlencoded", "sqlx-core", - "thiserror 2.0.12", + "thiserror 2.0.16", "tracing", "url", ] @@ -5750,10 +5664,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" dependencies = [ "heck", - "proc-macro2 1.0.95", + "proc-macro2 1.0.101", "quote 1.0.40", "rustversion", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -5779,18 +5693,18 @@ version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ - "proc-macro2 1.0.95", + "proc-macro2 1.0.101", "quote 1.0.40", "unicode-ident", ] [[package]] name = "syn" -version = "2.0.101" +version = "2.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf" +checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6" dependencies = [ - "proc-macro2 1.0.95", + "proc-macro2 1.0.101", "quote 1.0.40", "unicode-ident", ] @@ -5816,9 +5730,9 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ - "proc-macro2 1.0.95", + "proc-macro2 1.0.101", "quote 1.0.40", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -5838,7 +5752,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.4", "core-foundation 0.9.4", "system-configuration-sys 0.6.0", ] @@ -5877,15 +5791,15 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tempfile" -version = "3.20.0" +version = "3.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8a64e3985349f2441a1a9ef0b853f869006c3855f2cda6862a94d26ebb9d6a1" +checksum = "84fa4d11fadde498443cca10fd3ac23c951f0dc59e080e9f4b93d4df4e4eea53" dependencies = [ "fastrand", "getrandom 0.3.3", "once_cell", - "rustix 1.0.7", - "windows-sys 0.59.0", + "rustix", + "windows-sys 0.61.0", ] [[package]] @@ -5918,11 +5832,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.12" +version = "2.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" +checksum = "3467d614147380f2e4e374161426ff399c91084acd2363eaf549172b3d5e60c0" dependencies = [ - "thiserror-impl 2.0.12", + "thiserror-impl 2.0.16", ] [[package]] @@ -5931,30 +5845,29 @@ version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ - "proc-macro2 1.0.95", + "proc-macro2 1.0.101", "quote 1.0.40", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] name = "thiserror-impl" -version = "2.0.12" +version = "2.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" +checksum = "6c5e1be1c48b9172ee610da68fd9cd2770e7a4056cb3fc98710ee6906f0c7960" dependencies = [ - "proc-macro2 1.0.95", + "proc-macro2 1.0.101", "quote 1.0.40", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] name = "thread_local" -version = "1.1.8" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" dependencies = [ "cfg-if", - "once_cell", ] [[package]] @@ -5968,12 +5881,11 @@ dependencies = [ [[package]] name = "time" -version = "0.3.41" +version = "0.3.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a7619e19bc266e0f9c5e6686659d394bc57973859340060a69221e57dbc0c40" +checksum = "83bde6f1ec10e72d583d91623c939f623002284ef622b87de38cfd546cbf2031" dependencies = [ "deranged", - "itoa", "num-conv", "powerfmt", "serde", @@ -5983,15 +5895,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.4" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c" +checksum = "40868e7c1d2f0b8d73e4a8c7f0ff63af4f6d19be117e90bd73eb1d62cf831c6b" [[package]] name = "time-macros" -version = "0.2.22" +version = "0.2.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3526739392ec93fd8b359c8e98514cb3e8e021beb4e5f597b00a0221f8ed8a49" +checksum = "30cfb0125f12d9c277f35663a0a33f8c30190f4e4574868a330595412d34ebf3" dependencies = [ "num-conv", "time-core", @@ -6027,9 +5939,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09b3661f17e86524eccd4371ab0429194e0d7c008abb45f7a7495b1719463c71" +checksum = "bfa5fdc3bce6191a1dbc8c02d5c8bffcf557bafa17c124c5264a458f1b0613fa" dependencies = [ "tinyvec_macros", ] @@ -6042,20 +5954,22 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.45.1" +version = "1.47.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75ef51a33ef1da925cea3e4eb122833cb377c61439ca401b770f54902b806779" +checksum = "89e49afdadebb872d3145a5638b59eb0691ea23e46ca484037cfab3b76b95038" dependencies = [ "backtrace", "bytes", + "io-uring", "libc", "mio", "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2", + "slab", + "socket2 0.6.0", "tokio-macros", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -6064,9 +5978,9 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ - "proc-macro2 1.0.95", + "proc-macro2 1.0.101", "quote 1.0.40", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -6095,7 +6009,7 @@ version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e727b36a1a0e8b74c376ac2211e40c2c8af09fb4013c60d910495810f008e9b" dependencies = [ - "rustls 0.23.27", + "rustls 0.23.31", "tokio", ] @@ -6112,9 +6026,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.15" +version = "0.7.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66a539a9ad6d5d281510d5bd368c973d636c02dbf8a67300bfb6b950696ad7df" +checksum = "14307c986784f72ef81c89db7d9e28d6ac26d16213b109ea501696195e6e3ce5" dependencies = [ "bytes", "futures-core", @@ -6125,9 +6039,9 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.9" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3da5db5a963e24bc68be8b17b6fa82814bb22ee8660f192bb182771d498f09a3" +checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" [[package]] name = "toml_edit" @@ -6135,67 +6049,38 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.9.0", + "indexmap 2.11.1", "toml_datetime", "winnow 0.5.40", ] [[package]] name = "toml_edit" -version = "0.22.26" +version = "0.22.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "310068873db2c5b3e7659d2cc35d21855dbafa50d1ce336397c666e3cb08137e" +checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" dependencies = [ - "indexmap 2.9.0", + "indexmap 2.11.1", "toml_datetime", - "winnow 0.7.10", + "winnow 0.7.13", ] [[package]] name = "tonic" -version = "0.12.3" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877c5b330756d856ffcc4553ab34a5684481ade925ecc54bcd1bf02b1d0d4d52" +checksum = "7e581ba15a835f4d9ea06c55ab1bd4dce26fc53752c69a04aac00703bfb49ba9" dependencies = [ - "async-stream", "async-trait", - "axum", "base64 0.22.1", "bytes", - "h2 0.4.10", "http 1.3.1", "http-body 1.0.1", "http-body-util", - "hyper 1.6.0", - "hyper-timeout", - "hyper-util", "percent-encoding", "pin-project", "prost 0.13.5", - "socket2", - "tokio", "tokio-stream", - "tower 0.4.13", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "tower" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" -dependencies = [ - "futures-core", - "futures-util", - "indexmap 1.9.3", - "pin-project", - "pin-project-lite", - "rand 0.8.5", - "slab", - "tokio", - "tokio-util", "tower-layer", "tower-service", "tracing", @@ -6218,18 +6103,18 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.6.4" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fdb0c213ca27a9f57ab69ddb290fd80d970922355b83ae380b395d3986b8a2e" +checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.4", "bytes", "futures-util", "http 1.3.1", "http-body 1.0.1", "iri-string", "pin-project-lite", - "tower 0.5.2", + "tower", "tower-layer", "tower-service", ] @@ -6260,20 +6145,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.28" +version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" +checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" dependencies = [ - "proc-macro2 1.0.95", + "proc-macro2 1.0.101", "quote 1.0.40", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] name = "tracing-core" -version = "0.1.33" +version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" +checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" dependencies = [ "once_cell", "valuable", @@ -6292,9 +6177,9 @@ dependencies = [ [[package]] name = "tracing-opentelemetry" -version = "0.25.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9784ed4da7d921bc8df6963f8c80a0e4ce34ba6ba76668acadd3edbd985ff3b" +checksum = "ddcf5959f39507d0d04d6413119c04f33b623f4f951ebcbdddddfad2d0623a9c" dependencies = [ "js-sys", "once_cell", @@ -6320,14 +6205,14 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.19" +version = "0.3.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" +checksum = "2054a14f5307d601f88daf0553e1cbf472acc4f2c51afab632431cdcd72124d5" dependencies = [ "matchers", "nu-ansi-term", "once_cell", - "regex", + "regex-automata", "serde", "serde_json", "sharded-slab", @@ -6405,9 +6290,9 @@ checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" [[package]] name = "unicode-ident" -version = "1.0.18" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" +checksum = "f63a545481291138910575129486daeaf8ac54aee4387fe7906919f7830c7d9d" [[package]] name = "unicode-normalization" @@ -6485,9 +6370,9 @@ dependencies = [ [[package]] name = "url" -version = "2.5.4" +version = "2.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" +checksum = "08bc136a29a3d1758e07a9cca267be308aeebf5cfd5a10f3f67ab2097683ef5b" dependencies = [ "form_urlencoded", "idna", @@ -6509,9 +6394,9 @@ checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" [[package]] name = "uuid" -version = "1.17.0" +version = "1.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cf4199d1e5d15ddd86a694e4d0dffa9c323ce759fea589f00fef9d81cc1931d" +checksum = "2f87b8aa10b915a06587d0dec516c282ff295b475d94abf425d62b57710070a2" dependencies = [ "js-sys", "serde", @@ -6538,8 +6423,9 @@ checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "vise" -version = "0.3.1" -source = "git+https://github.com/matter-labs/vise.git?rev=8d800385a108eb598cbaa6c8bc8ab4ef3bf69011#8d800385a108eb598cbaa6c8bc8ab4ef3bf69011" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cec485349f926890c1d90a27e8f3147b552bf16cfd80212cd5ff72e8645056fd" dependencies = [ "compile-fmt", "ctor", @@ -6551,12 +6437,12 @@ dependencies = [ [[package]] name = "vise-exporter" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "123b171330b78f46a6f79370bd92f827da7e04636ad3a90d245dac334420222d" +checksum = "d2f9be7083dca21a182f7ba0ec98f5e87dc9e47944f624443b4e7a6c9c911679" dependencies = [ "http-body-util", - "hyper 1.6.0", + "hyper 1.7.0", "hyper-util", "once_cell", "tokio", @@ -6566,12 +6452,13 @@ dependencies = [ [[package]] name = "vise-macros" -version = "0.3.1" -source = "git+https://github.com/matter-labs/vise.git?rev=8d800385a108eb598cbaa6c8bc8ab4ef3bf69011#8d800385a108eb598cbaa6c8bc8ab4ef3bf69011" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe466916e9bf50cc69aba41affc11970885e9dd2b9e448e20e1fb8fc726132ed" dependencies = [ - "proc-macro2 1.0.95", + "proc-macro2 1.0.101", "quote 1.0.40", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -6601,17 +6488,26 @@ dependencies = [ [[package]] name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" +version = "0.11.1+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "wasi" -version = "0.14.2+wasi-0.2.4" +version = "0.14.5+wasi-0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" +checksum = "a4494f6290a82f5fe584817a676a34b9d6763e8d9d18204009fb31dceca98fd4" dependencies = [ - "wit-bindgen-rt", + "wasip2", +] + +[[package]] +name = "wasip2" +version = "1.0.0+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03fa2761397e5bd52002cd7e73110c71af2109aca4e521a9f40473fe685b0a24" +dependencies = [ + "wit-bindgen", ] [[package]] @@ -6622,35 +6518,36 @@ checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" [[package]] name = "wasm-bindgen" -version = "0.2.100" +version = "0.2.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" +checksum = "7e14915cadd45b529bb8d1f343c4ed0ac1de926144b746e2710f9cd05df6603b" dependencies = [ "cfg-if", "once_cell", "rustversion", "wasm-bindgen-macro", + "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.100" +version = "0.2.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" +checksum = "e28d1ba982ca7923fd01448d5c30c6864d0a14109560296a162f80f305fb93bb" dependencies = [ "bumpalo", "log", - "proc-macro2 1.0.95", + "proc-macro2 1.0.101", "quote 1.0.40", - "syn 2.0.101", + "syn 2.0.106", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.50" +version = "0.4.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" +checksum = "0ca85039a9b469b38336411d6d6ced91f3fc87109a2a27b0c197663f5144dffe" dependencies = [ "cfg-if", "js-sys", @@ -6661,9 +6558,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.100" +version = "0.2.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" +checksum = "7c3d463ae3eff775b0c45df9da45d68837702ac35af998361e2c84e7c5ec1b0d" dependencies = [ "quote 1.0.40", "wasm-bindgen-macro-support", @@ -6671,22 +6568,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.100" +version = "0.2.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" +checksum = "7bb4ce89b08211f923caf51d527662b75bdc9c9c7aab40f86dcb9fb85ac552aa" dependencies = [ - "proc-macro2 1.0.95", + "proc-macro2 1.0.101", "quote 1.0.40", - "syn 2.0.101", + "syn 2.0.106", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.100" +version = "0.2.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +checksum = "f143854a3b13752c6950862c906306adb27c7e839f7414cec8fea35beab624c1" dependencies = [ "unicode-ident", ] @@ -6706,9 +6603,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.77" +version = "0.3.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" +checksum = "77e4b637749ff0d92b8fad63aa1f7cff3cbe125fd49c175cd6345e7272638b12" dependencies = [ "js-sys", "wasm-bindgen", @@ -6724,25 +6621,13 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "which" -version = "4.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" -dependencies = [ - "either", - "home", - "once_cell", - "rustix 0.38.44", -] - [[package]] name = "whoami" -version = "1.6.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6994d13118ab492c3c80c1f81928718159254c53c472bf9ce36f8dae4add02a7" +checksum = "5d4a4db5077702ca3015d3d02d74974948aba2ad9e12ab7df718ee64ccd7e97d" dependencies = [ - "redox_syscall", + "libredox", "wasite", ] @@ -6764,11 +6649,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.9" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.61.0", ] [[package]] @@ -6785,9 +6670,9 @@ checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" dependencies = [ "windows-implement", "windows-interface", - "windows-link", + "windows-link 0.1.3", "windows-result", - "windows-strings 0.4.2", + "windows-strings", ] [[package]] @@ -6796,9 +6681,9 @@ version = "0.60.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" dependencies = [ - "proc-macro2 1.0.95", + "proc-macro2 1.0.101", "quote 1.0.40", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -6807,26 +6692,32 @@ version = "0.59.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" dependencies = [ - "proc-macro2 1.0.95", + "proc-macro2 1.0.101", "quote 1.0.40", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] name = "windows-link" -version = "0.1.1" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" + +[[package]] +name = "windows-link" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38" +checksum = "45e46c0661abb7180e7b9c281db115305d49ca1709ab8242adf09666d2173c65" [[package]] name = "windows-registry" -version = "0.4.0" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4286ad90ddb45071efd1a66dfa43eb02dd0dfbae1545ad6cc3c51cf34d7e8ba3" +checksum = "5b8a9ed28765efc97bbc954883f4e6796c33a06546ebafacbabee9696967499e" dependencies = [ + "windows-link 0.1.3", "windows-result", - "windows-strings 0.3.1", - "windows-targets 0.53.0", + "windows-strings", ] [[package]] @@ -6835,16 +6726,7 @@ version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" dependencies = [ - "windows-link", -] - -[[package]] -name = "windows-strings" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87fa48cc5d406560701792be122a10132491cff9d0aeb23583cc2dcafc847319" -dependencies = [ - "windows-link", + "windows-link 0.1.3", ] [[package]] @@ -6853,7 +6735,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" dependencies = [ - "windows-link", + "windows-link 0.1.3", ] [[package]] @@ -6883,6 +6765,15 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-sys" +version = "0.61.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e201184e40b2ede64bc2ea34968b28e33622acdbbf37104f0e4a33f7abe657aa" +dependencies = [ + "windows-link 0.2.0", +] + [[package]] name = "windows-targets" version = "0.48.5" @@ -6916,10 +6807,11 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.53.0" +version = "0.53.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1e4c7e8ceaaf9cb7d7507c974735728ab453b67ef8f18febdd7c11fe59dca8b" +checksum = "d5fe6031c4041849d7c496a8ded650796e7b6ecc19df1a431c1a363342e5dc91" dependencies = [ + "windows-link 0.1.3", "windows_aarch64_gnullvm 0.53.0", "windows_aarch64_msvc 0.53.0", "windows_i686_gnu 0.53.0", @@ -7079,9 +6971,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.7.10" +version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06928c8748d81b05c9be96aad92e1b6ff01833332f281e8cfca3be4b35fc9ec" +checksum = "21a0236b59786fed61e2a80582dd500fe61f18b5dca67a4a067d0bc9039339cf" dependencies = [ "memchr", ] @@ -7097,13 +6989,10 @@ dependencies = [ ] [[package]] -name = "wit-bindgen-rt" -version = "0.39.0" +name = "wit-bindgen" +version = "0.45.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" -dependencies = [ - "bitflags 2.9.1", -] +checksum = "5c573471f125075647d03df72e026074b7203790d41351cd6edc96f46bcccd36" [[package]] name = "writeable" @@ -7150,30 +7039,30 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" dependencies = [ - "proc-macro2 1.0.95", + "proc-macro2 1.0.101", "quote 1.0.40", - "syn 2.0.101", + "syn 2.0.106", "synstructure", ] [[package]] name = "zerocopy" -version = "0.8.25" +version = "0.8.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1702d9583232ddb9174e01bb7c15a2ab8fb1bc6f227aa1233858c351a3ba0cb" +checksum = "0894878a5fa3edfd6da3f88c4805f4c8558e2b996227a3d864f47fe11e38282c" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.25" +version = "0.8.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28a6e20d751156648aa063f3800b706ee209a32c0b4d9f24be3d980b01be55ef" +checksum = "88d2b8d9c68ad2b9e4340d7832716a4d21a22a1154777ad56ea55c51a9cf3831" dependencies = [ - "proc-macro2 1.0.95", + "proc-macro2 1.0.101", "quote 1.0.40", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -7191,9 +7080,9 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ - "proc-macro2 1.0.95", + "proc-macro2 1.0.101", "quote 1.0.40", - "syn 2.0.101", + "syn 2.0.106", "synstructure", ] @@ -7212,9 +7101,9 @@ version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ - "proc-macro2 1.0.95", + "proc-macro2 1.0.101", "quote 1.0.40", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -7230,9 +7119,9 @@ dependencies = [ [[package]] name = "zerovec" -version = "0.11.2" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a05eb080e015ba39cc9e23bbe5e7fb04d5fb040350f99f34e338d5fdd294428" +checksum = "e7aa2bd55086f1ab526693ecbe444205da57e25f4489879da80635a46d90e73b" dependencies = [ "yoke", "zerofrom", @@ -7245,9 +7134,9 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" dependencies = [ - "proc-macro2 1.0.95", + "proc-macro2 1.0.101", "quote 1.0.40", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -7333,9 +7222,9 @@ dependencies = [ [[package]] name = "zk_evm" -version = "0.152.3" +version = "0.152.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a207813b523f4a617350f87bd56c4a56635c78ce14fb00828f52af442395b740" +checksum = "382a5f7501b49f6e0bc082d3dc7c47191bb188678e354064ab8a0818cb42aa0b" dependencies = [ "anyhow", "lazy_static", @@ -7343,7 +7232,7 @@ dependencies = [ "serde", "serde_json", "static_assertions", - "zk_evm_abstractions 0.152.3", + "zk_evm_abstractions 0.152.4", ] [[package]] @@ -7387,22 +7276,22 @@ dependencies = [ [[package]] name = "zk_evm_abstractions" -version = "0.152.3" +version = "0.152.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7c45a892c8c254aeff3617df7507650815925943b423cf888bac201c94b926c" +checksum = "9c8c376763e04f0f06a533fa578dd2028e0fab2b9c76ca9d7aba3657399e3dac" dependencies = [ "anyhow", "num_enum 0.6.1", "serde", "static_assertions", - "zkevm_opcode_defs 0.152.3", + "zkevm_opcode_defs 0.152.4", ] [[package]] name = "zkevm_circuits" -version = "0.152.3" +version = "0.152.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "733098c2321910b16f6fe5b8110e3a1d675ea52345e1aeb5f4b897edaf88b22d" +checksum = "86f429ed1bcedd31260ca4988d66e4ace1e45d8545f8074445d30596d478b0ae" dependencies = [ "arrayvec 0.7.6", "boojum", @@ -7416,7 +7305,7 @@ dependencies = [ "serde", "serde_json", "smallvec", - "zkevm_opcode_defs 0.152.3", + "zkevm_opcode_defs 0.152.4", "zksync_cs_derive", ] @@ -7438,7 +7327,7 @@ version = "0.132.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e0769f7b27d8fb06e715da3290c575cac5d04d10a557faef180e847afce50ac4" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.4", "blake2 0.10.6", "ethereum-types", "k256 0.11.6", @@ -7453,7 +7342,7 @@ version = "0.141.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6be7bd5f0e0b61211f544147289640b4712715589d7f2fe5229d92a7a3ac64c0" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.4", "blake2 0.10.6", "ethereum-types", "k256 0.13.4", @@ -7468,7 +7357,7 @@ version = "0.151.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e50a5bc9bfe4cdea8f057d77df5cd21bcf38e9044b36de3235fbf6e361de53a" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.4", "blake2 0.10.6", "ethereum-types", "k256 0.13.4", @@ -7481,11 +7370,11 @@ dependencies = [ [[package]] name = "zkevm_opcode_defs" -version = "0.152.3" +version = "0.152.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04f02fb6f185df1aa4f33b18002024c50e73e3f701d25070e7da0c419bb93d77" +checksum = "ef4f77fb59a9481fd44574b8888f5afda11d44956a785da6f92f86ddaeef4859" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.4", "blake2 0.10.6", "ethereum-types", "k256 0.13.4", @@ -7499,24 +7388,25 @@ dependencies = [ [[package]] name = "zksync_basic_types" -version = "28.6.0-non-semver-compat" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=b5d75aab854ed279ca3d2618a044b111d32677ed#b5d75aab854ed279ca3d2618a044b111d32677ed" +version = "29.2.0-non-semver-compat" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=f4e890a61db5fc372bf23fd0ffc501d3bce41f75#f4e890a61db5fc372bf23fd0ffc501d3bce41f75" dependencies = [ "anyhow", "chrono", "const-decoder", "ethabi", "hex", - "num_enum 0.7.3", + "num_enum 0.7.4", "secrecy", "serde", "serde_json", "serde_with", "sha2 0.10.8", "strum", - "thiserror 2.0.12", + "thiserror 2.0.16", "tiny-keccak 2.0.2", "url", + "vise", ] [[package]] @@ -7544,9 +7434,9 @@ dependencies = [ [[package]] name = "zksync_concurrency" -version = "0.11.3" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e2dc7b3cddb8995e19ac9967896242f7f017b1daeaec7375fd07b884a1d1aff" +checksum = "75d6c6ee96606feeaf8376dca54815591a96702d86bf94faf44dc280b763645a" dependencies = [ "anyhow", "once_cell", @@ -7563,27 +7453,26 @@ dependencies = [ [[package]] name = "zksync_config" -version = "28.6.0-non-semver-compat" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=b5d75aab854ed279ca3d2618a044b111d32677ed#b5d75aab854ed279ca3d2618a044b111d32677ed" +version = "29.2.0-non-semver-compat" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=f4e890a61db5fc372bf23fd0ffc501d3bce41f75#f4e890a61db5fc372bf23fd0ffc501d3bce41f75" dependencies = [ "anyhow", - "rand 0.8.5", "secrecy", "serde", "serde_json", "serde_yaml", "smart-config", + "tracing", "zksync_basic_types", "zksync_concurrency", - "zksync_consensus_utils", "zksync_crypto_primitives", ] [[package]] name = "zksync_consensus_crypto" -version = "0.11.3" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fbbc9a062a65a9918f814db2b0c61d8f44875def9a466543b025ab069dda52a" +checksum = "42985ecd42d50132d2b5ba6d4d5c0ddd5c2aa8165ec55755cadab5dd5e01ce88" dependencies = [ "anyhow", "blst", @@ -7599,25 +7488,27 @@ dependencies = [ [[package]] name = "zksync_consensus_engine" -version = "0.11.3" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf3ac354972ad6d181c9a5c5532139b68e920b7d7dc55e5542194c1d97479407" +checksum = "72b5228e97d5b2545494c77b6fdf486be0684f4829cb6c5fbc08abadfb5a3c28" dependencies = [ "anyhow", "async-trait", + "hex", "rand 0.8.5", "tracing", "vise", "zksync_concurrency", + "zksync_consensus_crypto", "zksync_consensus_roles", "zksync_protobuf_build", ] [[package]] name = "zksync_consensus_roles" -version = "0.11.3" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bd6e92de8ff7b31dd245efd355872ffb8cc124abb7873ed9c6ba18baade7338" +checksum = "3ebd80ccee65a942a4da2286fce540b047671a67808c9cfd67d695ff654d5c62" dependencies = [ "anyhow", "bit-vec", @@ -7635,9 +7526,9 @@ dependencies = [ [[package]] name = "zksync_consensus_utils" -version = "0.11.3" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2aa6e711211929724d6e1deee6da90d9a311bc2341ed6d1f7b84f52e3bcc2af7" +checksum = "4c1d64d96be295de498c908b03e9f2f87fc3bb8dc1e74da60c757c10eaa1d6a4" dependencies = [ "rand 0.8.5", "thiserror 1.0.69", @@ -7646,10 +7537,9 @@ dependencies = [ [[package]] name = "zksync_contracts" -version = "28.6.0-non-semver-compat" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=b5d75aab854ed279ca3d2618a044b111d32677ed#b5d75aab854ed279ca3d2618a044b111d32677ed" +version = "29.2.0-non-semver-compat" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=f4e890a61db5fc372bf23fd0ffc501d3bce41f75#f4e890a61db5fc372bf23fd0ffc501d3bce41f75" dependencies = [ - "envy", "hex", "once_cell", "serde", @@ -7660,8 +7550,8 @@ dependencies = [ [[package]] name = "zksync_crypto_primitives" -version = "28.6.0-non-semver-compat" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=b5d75aab854ed279ca3d2618a044b111d32677ed#b5d75aab854ed279ca3d2618a044b111d32677ed" +version = "29.2.0-non-semver-compat" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=f4e890a61db5fc372bf23fd0ffc501d3bce41f75#f4e890a61db5fc372bf23fd0ffc501d3bce41f75" dependencies = [ "anyhow", "blake2 0.10.6", @@ -7671,7 +7561,7 @@ dependencies = [ "serde", "serde_json", "sha2 0.10.8", - "thiserror 2.0.12", + "thiserror 2.0.16", "zksync_basic_types", ] @@ -7682,15 +7572,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cba4ebb398f1ba780690d07a8d0368177261d059e63f0c3746e2e82855588892" dependencies = [ "proc-macro-error", - "proc-macro2 1.0.95", + "proc-macro2 1.0.101", "quote 1.0.40", "syn 1.0.109", ] [[package]] name = "zksync_dal" -version = "28.6.0-non-semver-compat" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=b5d75aab854ed279ca3d2618a044b111d32677ed#b5d75aab854ed279ca3d2618a044b111d32677ed" +version = "29.2.0-non-semver-compat" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=f4e890a61db5fc372bf23fd0ffc501d3bce41f75#f4e890a61db5fc372bf23fd0ffc501d3bce41f75" dependencies = [ "anyhow", "async-trait", @@ -7706,11 +7596,12 @@ dependencies = [ "serde_json", "sqlx", "strum", - "thiserror 2.0.12", + "thiserror 2.0.16", "tokio", "tracing", "vise", "zksync_concurrency", + "zksync_config", "zksync_consensus_crypto", "zksync_consensus_engine", "zksync_consensus_roles", @@ -7718,7 +7609,6 @@ dependencies = [ "zksync_contracts", "zksync_db_connection", "zksync_l1_contract_interface", - "zksync_multivm", "zksync_protobuf", "zksync_protobuf_build", "zksync_system_constants", @@ -7728,15 +7618,15 @@ dependencies = [ [[package]] name = "zksync_db_connection" -version = "28.6.0-non-semver-compat" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=b5d75aab854ed279ca3d2618a044b111d32677ed#b5d75aab854ed279ca3d2618a044b111d32677ed" +version = "29.2.0-non-semver-compat" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=f4e890a61db5fc372bf23fd0ffc501d3bce41f75#f4e890a61db5fc372bf23fd0ffc501d3bce41f75" dependencies = [ "anyhow", "rand 0.8.5", "serde", "serde_json", "sqlx", - "thiserror 2.0.12", + "thiserror 2.0.16", "tokio", "tracing", "vise", @@ -7765,7 +7655,7 @@ dependencies = [ "num-bigint 0.4.6", "num-integer", "num-traits", - "proc-macro2 1.0.95", + "proc-macro2 1.0.101", "quote 1.0.40", "serde", "syn 1.0.109", @@ -7773,9 +7663,9 @@ dependencies = [ [[package]] name = "zksync_kzg" -version = "0.152.3" +version = "0.152.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15e73fcc7cc64e59ce36bb8e8d436b62057e87ee9dd12aec21f9055524eb42fa" +checksum = "7068a7c2d89107be13304c9aad8fa2bb4c52f57869a59eff18d4e95d83dd690c" dependencies = [ "boojum", "derivative", @@ -7790,8 +7680,8 @@ dependencies = [ [[package]] name = "zksync_l1_contract_interface" -version = "28.6.0-non-semver-compat" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=b5d75aab854ed279ca3d2618a044b111d32677ed#b5d75aab854ed279ca3d2618a044b111d32677ed" +version = "29.2.0-non-semver-compat" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=f4e890a61db5fc372bf23fd0ffc501d3bce41f75#f4e890a61db5fc372bf23fd0ffc501d3bce41f75" dependencies = [ "anyhow", "circuit_definitions", @@ -7808,8 +7698,8 @@ dependencies = [ [[package]] name = "zksync_mini_merkle_tree" -version = "28.6.0-non-semver-compat" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=b5d75aab854ed279ca3d2618a044b111d32677ed#b5d75aab854ed279ca3d2618a044b111d32677ed" +version = "29.2.0-non-semver-compat" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=f4e890a61db5fc372bf23fd0ffc501d3bce41f75#f4e890a61db5fc372bf23fd0ffc501d3bce41f75" dependencies = [ "once_cell", "zksync_basic_types", @@ -7818,8 +7708,8 @@ dependencies = [ [[package]] name = "zksync_multivm" -version = "28.6.0-non-semver-compat" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=b5d75aab854ed279ca3d2618a044b111d32677ed#b5d75aab854ed279ca3d2618a044b111d32677ed" +version = "29.2.0-non-semver-compat" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=f4e890a61db5fc372bf23fd0ffc501d3bce41f75#f4e890a61db5fc372bf23fd0ffc501d3bce41f75" dependencies = [ "anyhow", "circuit_sequencer_api", @@ -7827,7 +7717,7 @@ dependencies = [ "hex", "itertools 0.13.0", "once_cell", - "thiserror 2.0.12", + "thiserror 2.0.16", "tracing", "vise", "zk_evm 0.131.0-rc.2", @@ -7835,7 +7725,7 @@ dependencies = [ "zk_evm 0.140.0", "zk_evm 0.141.0", "zk_evm 0.151.8", - "zk_evm 0.152.3", + "zk_evm 0.152.4", "zksync_contracts", "zksync_mini_merkle_tree", "zksync_system_constants", @@ -7846,8 +7736,8 @@ dependencies = [ [[package]] name = "zksync_object_store" -version = "28.6.0-non-semver-compat" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=b5d75aab854ed279ca3d2618a044b111d32677ed#b5d75aab854ed279ca3d2618a044b111d32677ed" +version = "29.2.0-non-semver-compat" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=f4e890a61db5fc372bf23fd0ffc501d3bce41f75#f4e890a61db5fc372bf23fd0ffc501d3bce41f75" dependencies = [ "anyhow", "async-trait", @@ -7861,7 +7751,7 @@ dependencies = [ "http 1.3.1", "prost 0.12.6", "rand 0.8.5", - "reqwest 0.12.18", + "reqwest 0.12.23", "serde_json", "tokio", "tracing", @@ -7886,9 +7776,9 @@ dependencies = [ [[package]] name = "zksync_protobuf" -version = "0.11.3" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7df9d1f5ca99acd51df6ffcc845862d29c00225b6c8ceafa301abf3cfe9a4c3b" +checksum = "e362c8e7025907707d0b4d153728817425620a654439eb73a5375efa17aaed7f" dependencies = [ "anyhow", "bit-vec", @@ -7907,25 +7797,25 @@ dependencies = [ [[package]] name = "zksync_protobuf_build" -version = "0.11.3" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e7bb096cb1fa79ff1900b586e849ec729d275279bbf0d54bfc2cca77fb70650" +checksum = "7cfec98c42651ec08eee8fd23ff5f9e7325a70803e4984a761da0923f912291b" dependencies = [ "anyhow", "heck", "prettyplease", - "proc-macro2 1.0.95", + "proc-macro2 1.0.101", "prost-build", "prost-reflect", "protox", "quote 1.0.40", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] name = "zksync_prover_interface" -version = "28.6.0-non-semver-compat" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=b5d75aab854ed279ca3d2618a044b111d32677ed#b5d75aab854ed279ca3d2618a044b111d32677ed" +version = "29.2.0-non-semver-compat" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=f4e890a61db5fc372bf23fd0ffc501d3bce41f75#f4e890a61db5fc372bf23fd0ffc501d3bce41f75" dependencies = [ "chrono", "ciborium", @@ -7941,8 +7831,8 @@ dependencies = [ [[package]] name = "zksync_shared_metrics" -version = "28.6.0-non-semver-compat" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=b5d75aab854ed279ca3d2618a044b111d32677ed#b5d75aab854ed279ca3d2618a044b111d32677ed" +version = "29.2.0-non-semver-compat" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=f4e890a61db5fc372bf23fd0ffc501d3bce41f75#f4e890a61db5fc372bf23fd0ffc501d3bce41f75" dependencies = [ "rustc_version", "serde", @@ -7971,8 +7861,8 @@ dependencies = [ [[package]] name = "zksync_state" -version = "28.6.0-non-semver-compat" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=b5d75aab854ed279ca3d2618a044b111d32677ed#b5d75aab854ed279ca3d2618a044b111d32677ed" +version = "29.2.0-non-semver-compat" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=f4e890a61db5fc372bf23fd0ffc501d3bce41f75#f4e890a61db5fc372bf23fd0ffc501d3bce41f75" dependencies = [ "anyhow", "async-trait", @@ -7993,8 +7883,8 @@ dependencies = [ [[package]] name = "zksync_storage" -version = "28.6.0-non-semver-compat" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=b5d75aab854ed279ca3d2618a044b111d32677ed#b5d75aab854ed279ca3d2618a044b111d32677ed" +version = "29.2.0-non-semver-compat" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=f4e890a61db5fc372bf23fd0ffc501d3bce41f75#f4e890a61db5fc372bf23fd0ffc501d3bce41f75" dependencies = [ "num_cpus", "once_cell", @@ -8006,8 +7896,8 @@ dependencies = [ [[package]] name = "zksync_system_constants" -version = "28.6.0-non-semver-compat" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=b5d75aab854ed279ca3d2618a044b111d32677ed#b5d75aab854ed279ca3d2618a044b111d32677ed" +version = "29.2.0-non-semver-compat" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=f4e890a61db5fc372bf23fd0ffc501d3bce41f75#f4e890a61db5fc372bf23fd0ffc501d3bce41f75" dependencies = [ "once_cell", "zksync_basic_types", @@ -8015,8 +7905,8 @@ dependencies = [ [[package]] name = "zksync_types" -version = "28.6.0-non-semver-compat" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=b5d75aab854ed279ca3d2618a044b111d32677ed#b5d75aab854ed279ca3d2618a044b111d32677ed" +version = "29.2.0-non-semver-compat" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=f4e890a61db5fc372bf23fd0ffc501d3bce41f75#f4e890a61db5fc372bf23fd0ffc501d3bce41f75" dependencies = [ "anyhow", "async-trait", @@ -8025,14 +7915,14 @@ dependencies = [ "ciborium", "derive_more", "hex", - "num_enum 0.7.3", + "num_enum 0.7.4", "once_cell", "prost 0.12.6", "rlp", "serde", "serde_json", "serde_with", - "thiserror 2.0.12", + "thiserror 2.0.16", "tracing", "zksync_basic_types", "zksync_contracts", @@ -8045,8 +7935,8 @@ dependencies = [ [[package]] name = "zksync_utils" -version = "28.6.0-non-semver-compat" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=b5d75aab854ed279ca3d2618a044b111d32677ed#b5d75aab854ed279ca3d2618a044b111d32677ed" +version = "29.2.0-non-semver-compat" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=f4e890a61db5fc372bf23fd0ffc501d3bce41f75#f4e890a61db5fc372bf23fd0ffc501d3bce41f75" dependencies = [ "anyhow", "once_cell", @@ -8056,8 +7946,8 @@ dependencies = [ [[package]] name = "zksync_vlog" -version = "28.6.0-non-semver-compat" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=b5d75aab854ed279ca3d2618a044b111d32677ed#b5d75aab854ed279ca3d2618a044b111d32677ed" +version = "29.2.0-non-semver-compat" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=f4e890a61db5fc372bf23fd0ffc501d3bce41f75#f4e890a61db5fc372bf23fd0ffc501d3bce41f75" dependencies = [ "anyhow", "async-trait", @@ -8070,7 +7960,7 @@ dependencies = [ "sentry", "serde", "serde_json", - "thiserror 2.0.12", + "thiserror 2.0.16", "time", "tokio", "tracing", @@ -8089,8 +7979,8 @@ checksum = "43b3bc8ecfdfdc986aff5229f995340cad4c7c1967f0ad96ac870d354847925f" dependencies = [ "enum_dispatch", "primitive-types", - "zk_evm_abstractions 0.152.3", - "zkevm_opcode_defs 0.152.3", + "zk_evm_abstractions 0.152.4", + "zkevm_opcode_defs 0.152.4", "zksync_vm2_interface", ] @@ -8105,15 +7995,15 @@ dependencies = [ [[package]] name = "zksync_vm_interface" -version = "28.6.0-non-semver-compat" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=b5d75aab854ed279ca3d2618a044b111d32677ed#b5d75aab854ed279ca3d2618a044b111d32677ed" +version = "29.2.0-non-semver-compat" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=f4e890a61db5fc372bf23fd0ffc501d3bce41f75#f4e890a61db5fc372bf23fd0ffc501d3bce41f75" dependencies = [ "anyhow", "async-trait", "hex", "pretty_assertions", "serde", - "thiserror 2.0.12", + "thiserror 2.0.16", "tracing", "zksync_contracts", "zksync_system_constants", @@ -8122,11 +8012,16 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.15+zstd.1.5.7" +version = "2.0.16+zstd.1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb81183ddd97d0c74cedf1d50d85c8d08c1b8b68ee863bdee9e706eedba1a237" +checksum = "91e19ebc2adc8f83e43039e79776e3fda8ca919132d68a1fed6a5faca2683748" dependencies = [ - "bindgen 0.71.1", + "bindgen 0.72.1", "cc", "pkg-config", ] + +[[patch.unused]] +name = "vise" +version = "0.3.1" +source = "git+https://github.com/matter-labs/vise.git?rev=8d800385a108eb598cbaa6c8bc8ab4ef3bf69011#8d800385a108eb598cbaa6c8bc8ab4ef3bf69011" diff --git a/system-contracts/bootloader/test_infra/Cargo.toml b/system-contracts/bootloader/test_infra/Cargo.toml index aeb1f97a66..fe5a068dd3 100644 --- a/system-contracts/bootloader/test_infra/Cargo.toml +++ b/system-contracts/bootloader/test_infra/Cargo.toml @@ -7,12 +7,12 @@ edition = "2021" [dependencies] -zksync_multivm = { git = "https://github.com/matter-labs/zksync-era.git", rev = "b5d75aab854ed279ca3d2618a044b111d32677ed" } -zksync_types = { git = "https://github.com/matter-labs/zksync-era.git", rev = "b5d75aab854ed279ca3d2618a044b111d32677ed" } -zksync_contracts = { git = "https://github.com/matter-labs/zksync-era.git", rev = "b5d75aab854ed279ca3d2618a044b111d32677ed" } -zksync_utils = { git = "https://github.com/matter-labs/zksync-era.git", rev = "b5d75aab854ed279ca3d2618a044b111d32677ed" } -zksync_state = { git = "https://github.com/matter-labs/zksync-era.git", rev = "b5d75aab854ed279ca3d2618a044b111d32677ed" } -zksync_vlog = { git = "https://github.com/matter-labs/zksync-era.git", rev = "b5d75aab854ed279ca3d2618a044b111d32677ed" } +zksync_multivm = { git = "https://github.com/matter-labs/zksync-era.git", rev = "f4e890a61db5fc372bf23fd0ffc501d3bce41f75" } +zksync_types = { git = "https://github.com/matter-labs/zksync-era.git", rev = "f4e890a61db5fc372bf23fd0ffc501d3bce41f75" } +zksync_contracts = { git = "https://github.com/matter-labs/zksync-era.git", rev = "f4e890a61db5fc372bf23fd0ffc501d3bce41f75" } +zksync_utils = { git = "https://github.com/matter-labs/zksync-era.git", rev = "f4e890a61db5fc372bf23fd0ffc501d3bce41f75" } +zksync_state = { git = "https://github.com/matter-labs/zksync-era.git", rev = "f4e890a61db5fc372bf23fd0ffc501d3bce41f75" } +zksync_vlog = { git = "https://github.com/matter-labs/zksync-era.git", rev = "f4e890a61db5fc372bf23fd0ffc501d3bce41f75" } colored = "2.0" hex = "0.4" diff --git a/system-contracts/contracts/Constants.sol b/system-contracts/contracts/Constants.sol index 30a269e165..f8b32eb3f6 100644 --- a/system-contracts/contracts/Constants.sol +++ b/system-contracts/contracts/Constants.sol @@ -108,6 +108,8 @@ address constant EVM_GAS_MANAGER = address(SYSTEM_CONTRACTS_OFFSET + 0x13); address constant EVM_PREDEPLOYS_MANAGER = address(SYSTEM_CONTRACTS_OFFSET + 0x14); IEvmHashesStorage constant EVM_HASHES_STORAGE = IEvmHashesStorage(address(SYSTEM_CONTRACTS_OFFSET + 0x15)); +address constant L2_DA_VALIDATOR = address(SYSTEM_CONTRACTS_OFFSET + 0x16); + ICreate2Factory constant L2_CREATE2_FACTORY = ICreate2Factory(address(USER_CONTRACTS_OFFSET)); IL2AssetRouter constant L2_ASSET_ROUTER = IL2AssetRouter(address(USER_CONTRACTS_OFFSET + 0x03)); IBridgehub constant L2_BRIDGE_HUB = IBridgehub(address(USER_CONTRACTS_OFFSET + 0x02)); @@ -141,6 +143,18 @@ bytes1 constant CREATE2_EVM_PREFIX = 0xff; /// @dev Each state diff consists of 156 bytes of actual data and 116 bytes of unused padding, needed for circuit efficiency. uint256 constant STATE_DIFF_ENTRY_SIZE = 272; +/// @dev Bytes in raw L2 to L1 log +/// @dev Equal to the bytes size of the tuple - (uint8 ShardId, bool isService, uint16 txNumberInBlock, address sender, bytes32 key, bytes32 value) +uint256 constant L2_TO_L1_LOG_SERIALIZE_SIZE = 88; + +/// @dev The value of default leaf hash for L2 to L1 logs Merkle tree +/// @dev An incomplete fixed-size tree is filled with this value to be a full binary tree +/// @dev Actually equal to the `keccak256(new bytes(L2_TO_L1_LOG_SERIALIZE_SIZE))` +bytes32 constant L2_L1_LOGS_TREE_DEFAULT_LEAF_HASH = 0x72abee45b59e344af8a6e520241c4744aff26ed411f4c4b00f8af09adada43ba; + +/// @dev The current version of state diff compression being used. +uint256 constant STATE_DIFF_COMPRESSION_VERSION_NUMBER = 1; + enum SystemLogKey { L2_TO_L1_LOGS_TREE_ROOT_KEY, PACKED_BATCH_AND_L2_BLOCK_TIMESTAMP_KEY, @@ -151,7 +165,7 @@ enum SystemLogKey { // it is the only one that is emitted before the system contracts are upgraded. PREV_BATCH_HASH_KEY, L2_DA_VALIDATOR_OUTPUT_HASH_KEY, - USED_L2_DA_VALIDATOR_ADDRESS_KEY, + USED_L2_DA_VALIDATION_COMMITMENT_SCHEME_KEY, MESSAGE_ROOT_ROLLING_HASH_KEY, L2_TXS_STATUS_ROLLING_HASH_KEY, EXPECTED_SYSTEM_CONTRACT_UPGRADE_TX_HASH_KEY @@ -199,3 +213,15 @@ uint8 constant ERA_VM_BYTECODE_FLAG = 1; uint8 constant EVM_BYTECODE_FLAG = 2; address constant SERVICE_CALL_PSEUDO_CALLER = 0xFFfFfFffFFfffFFfFFfFFFFFffFFFffffFfFFFfF; + +/// @dev Pubdata commitment scheme used for DA. +/// @param NONE Invalid option. +/// @param EMPTY_NO_DA No DA commitment, used by Validiums. +/// @param PUBDATA_KECCAK256 Keccak of stateDiffHash and keccak(pubdata). Can be used by custom DA solutions. +/// @param BLOBS_AND_PUBDATA_KECCAK256 This commitment includes EIP-4844 blobs data. Used by default RollupL1DAValidator. +enum L2DACommitmentScheme { + NONE, + EMPTY_NO_DA, + PUBDATA_KECCAK256, + BLOBS_AND_PUBDATA_KECCAK256 +} diff --git a/system-contracts/contracts/L1Messenger.sol b/system-contracts/contracts/L1Messenger.sol index 7f786c78f5..cb6698708b 100644 --- a/system-contracts/contracts/L1Messenger.sol +++ b/system-contracts/contracts/L1Messenger.sol @@ -2,13 +2,14 @@ pragma solidity 0.8.28; -import {IL1Messenger, L2ToL1Log, L2_L1_LOGS_TREE_DEFAULT_LEAF_HASH, L2_TO_L1_LOG_SERIALIZE_SIZE} from "./interfaces/IL1Messenger.sol"; +import {IL1Messenger, L2ToL1Log} from "./interfaces/IL1Messenger.sol"; import {SystemContractBase} from "./abstract/SystemContractBase.sol"; import {SystemContractHelper} from "./libraries/SystemContractHelper.sol"; import {EfficientCall} from "./libraries/EfficientCall.sol"; +import {L2DAValidator} from "./libraries/L2DAValidator.sol"; import {Utils} from "./libraries/Utils.sol"; -import {COMPUTATIONAL_PRICE_FOR_PUBDATA, KNOWN_CODE_STORAGE_CONTRACT, L2_MESSAGE_ROOT, L2_TO_L1_LOGS_MERKLE_TREE_LEAVES, SYSTEM_CONTEXT_CONTRACT, SystemLogKey} from "./Constants.sol"; +import {COMPUTATIONAL_PRICE_FOR_PUBDATA, KNOWN_CODE_STORAGE_CONTRACT, L2DACommitmentScheme, L2_L1_LOGS_TREE_DEFAULT_LEAF_HASH, L2_MESSAGE_ROOT, L2_TO_L1_LOGS_MERKLE_TREE_LEAVES, L2_TO_L1_LOG_SERIALIZE_SIZE, SYSTEM_CONTEXT_CONTRACT, SystemLogKey} from "./Constants.sol"; import {PubdataField, ReconstructionMismatch} from "./SystemContractErrors.sol"; import {IL2DAValidator} from "./interfaces/IL2DAValidator.sol"; @@ -186,21 +187,23 @@ contract L1Messenger is IL1Messenger, SystemContractBase { /// @notice Verifies that the {_operatorInput} reflects what occurred within the L1Batch and that /// the compressed statediffs are equivalent to the full state diffs. - /// @param _l2DAValidator the address of the l2 da validator + /// @param _l2DACommitmentScheme The scheme of L2 DA commitment. Different L1 validators may use different schemes. /// @param _operatorInput The total pubdata and uncompressed state diffs of transactions that were - /// processed in the current L1 Batch. Pubdata consists of L2 to L1 Logs, messages, deployed bytecode, and state diffs. + /// processed in the current L1 Batch. Pubdata consists of L2 to L1 Logs, messages, deployed bytecodes, and state diffs. /// @dev Function that should be called exactly once per L1 Batch by the bootloader. /// @dev Checks that totalL2ToL1Pubdata is strictly packed data that should to be published to L1. /// @dev The data passed in also contains the encoded state diffs to be checked again, however this is aux data that is not /// part of the committed pubdata. - /// @dev Performs calculation of L2ToL1Logs merkle tree root, "sends" such root and keccak256(totalL2ToL1Pubdata) + /// @dev Performs calculation of L2ToL1Logs merkle tree root, "sends" such root and L2 DA commitment /// to L1 using low-level (VM) L2Log. function publishPubdataAndClearState( - address _l2DAValidator, + L2DACommitmentScheme _l2DACommitmentScheme, bytes calldata _operatorInput ) external onlyCallFromBootloader { uint256 calldataPtr = 0; + // Note that provided function sig and values of hashes are used only for backward compatibility and sanity checks. + // Check function sig and data in the other hashes // 4 + 32 + 32 + 32 + 32 + 32 + 32 // 4 bytes for L2 DA Validator `validatePubdata` function selector @@ -212,6 +215,7 @@ contract L1Messenger is IL1Messenger, SystemContractBase { // 32 bytes for length bytes4 inputL2DAValidatePubdataFunctionSig = bytes4(_operatorInput[calldataPtr:calldataPtr + 4]); + // Implemented for backward compatibility with operator's encoding. if (inputL2DAValidatePubdataFunctionSig != IL2DAValidator.validatePubdata.selector) { revert ReconstructionMismatch( PubdataField.InputDAFunctionSig, @@ -222,22 +226,25 @@ contract L1Messenger is IL1Messenger, SystemContractBase { calldataPtr += 4; bytes32 inputChainedLogsHash = bytes32(_operatorInput[calldataPtr:calldataPtr + 32]); + // Sanity check if (inputChainedLogsHash != chainedLogsHash) { revert ReconstructionMismatch(PubdataField.InputLogsHash, chainedLogsHash, inputChainedLogsHash); } calldataPtr += 32; - // Check happens below after we reconstruct the logs root hash + // Sanity check happens below after we reconstruct the logs root hash bytes32 inputChainedLogsRootHash = bytes32(_operatorInput[calldataPtr:calldataPtr + 32]); calldataPtr += 32; bytes32 inputChainedMsgsHash = bytes32(_operatorInput[calldataPtr:calldataPtr + 32]); + // Sanity check if (inputChainedMsgsHash != chainedMessagesHash) { revert ReconstructionMismatch(PubdataField.InputMsgsHash, chainedMessagesHash, inputChainedMsgsHash); } calldataPtr += 32; bytes32 inputChainedBytecodesHash = bytes32(_operatorInput[calldataPtr:calldataPtr + 32]); + // Sanity check if (inputChainedBytecodesHash != chainedL1BytecodesRevealDataHash) { revert ReconstructionMismatch( PubdataField.InputBytecodeHash, @@ -259,7 +266,7 @@ contract L1Messenger is IL1Messenger, SystemContractBase { // Shift calldata ptr past the pubdata offset and len calldataPtr += 64; - /// Check logs + /// Check logs. Full logs root hash is published even for Validiums without DA. uint32 numberOfL2ToL1Logs = uint32(bytes4(_operatorInput[calldataPtr:calldataPtr + 4])); if (numberOfL2ToL1Logs > L2_TO_L1_LOGS_MERKLE_TREE_LEAVES) { revert ReconstructionMismatch( @@ -289,6 +296,7 @@ contract L1Messenger is IL1Messenger, SystemContractBase { l2ToL1LogsTreeArray[i] = hashedLog; reconstructedChainedLogsHash = keccak256(abi.encode(reconstructedChainedLogsHash, hashedLog)); } + // Sanity check if (reconstructedChainedLogsHash != chainedLogsHash) { revert ReconstructionMismatch(PubdataField.LogsHash, chainedLogsHash, reconstructedChainedLogsHash); } @@ -309,29 +317,33 @@ contract L1Messenger is IL1Messenger, SystemContractBase { bytes32 aggregatedRootHash = L2_MESSAGE_ROOT.getAggregatedRoot(); bytes32 fullRootHash = keccak256(bytes.concat(localLogsRootHash, aggregatedRootHash)); + // Sanity check if (inputChainedLogsRootHash != localLogsRootHash) { revert ReconstructionMismatch(PubdataField.InputLogsRootHash, localLogsRootHash, inputChainedLogsRootHash); } - bytes32 l2DAValidatorOutputhash = bytes32(0); - if (_l2DAValidator != address(0)) { - bytes memory returnData = EfficientCall.call({ - _gas: gasleft(), - _address: _l2DAValidator, - _value: 0, - _data: _operatorInput, - _isSystem: false - }); - - l2DAValidatorOutputhash = abi.decode(returnData, (bytes32)); - } + // Pubdata-related input, includes logs, messages, bytecodes, compressed and uncompressed state diffs + // encoded as `bytes`, so it has offset and length + uint256 operatorDataOffset = 4 + uint256(bytes32(_operatorInput[4 + 32 * 4:4 + 32 * 4 + 32])); + uint256 operatorDataLength = uint256(bytes32(_operatorInput[operatorDataOffset:operatorDataOffset + 32])); + + // Validate pubdata and make commitment. Logs are not checked since we already checked them above. + // Does nothing if commitment scheme is EMPTY_NO_DA. + // It is expected that operator data includes logs, messages, bytecodes and compressed state diffs. + // inputChainedMsgsHash and inputChainedBytecodesHash values are used to double-check messages and bytecodes validity. + bytes32 l2DAValidatorOutputhash = L2DAValidator.makeDACommitment( + _l2DACommitmentScheme, + inputChainedMsgsHash, + inputChainedBytecodesHash, + _operatorInput[operatorDataOffset + 32:operatorDataOffset + 32 + operatorDataLength] // Operator data + ); /// Native (VM) L2 to L1 log SystemContractHelper.toL1(true, bytes32(uint256(SystemLogKey.L2_TO_L1_LOGS_TREE_ROOT_KEY)), fullRootHash); SystemContractHelper.toL1( true, - bytes32(uint256(SystemLogKey.USED_L2_DA_VALIDATOR_ADDRESS_KEY)), - bytes32(uint256(uint160(_l2DAValidator))) + bytes32(uint256(SystemLogKey.USED_L2_DA_VALIDATION_COMMITMENT_SCHEME_KEY)), + bytes32(uint256(_l2DACommitmentScheme)) ); SystemContractHelper.toL1( true, diff --git a/system-contracts/contracts/L2GenesisForceDeploymentsHelper.sol b/system-contracts/contracts/L2GenesisForceDeploymentsHelper.sol deleted file mode 100644 index 2d4bea6418..0000000000 --- a/system-contracts/contracts/L2GenesisForceDeploymentsHelper.sol +++ /dev/null @@ -1,257 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity 0.8.28; - -import {DEPLOYER_SYSTEM_CONTRACT, L2_ASSET_ROUTER, L2_BRIDGE_HUB, L2_CHAIN_ASSET_HANDLER, L2_MESSAGE_ROOT, L2_NATIVE_TOKEN_VAULT, WRAPPED_BASE_TOKEN_IMPL_ADDRESS} from "./Constants.sol"; -import {ForceDeployment, IContractDeployer} from "./interfaces/IContractDeployer.sol"; -import {SystemContractHelper} from "./libraries/SystemContractHelper.sol"; -import {FixedForceDeploymentsData, ZKChainSpecificForceDeploymentsData} from "./interfaces/IL2GenesisUpgrade.sol"; -import {IL2SharedBridgeLegacy} from "./interfaces/IL2SharedBridgeLegacy.sol"; -import {IL2WrappedBaseToken} from "./interfaces/IL2WrappedBaseToken.sol"; - -import {TransparentUpgradeableProxy} from "@openzeppelin/contracts-v4/proxy/transparent/TransparentUpgradeableProxy.sol"; - -/// @title L2GenesisForceDeploymentsHelper -/// @author Matter Labs -/// @custom:security-contact security@matterlabs.dev -/// @notice A helper library for initializing and managing force-deployed contracts during either the L2 gateway upgrade or -/// the genesis after the gateway protocol upgrade. -library L2GenesisForceDeploymentsHelper { - /// @notice Initializes force-deployed contracts required for the L2 genesis upgrade. - /// @param _ctmDeployer Address of the CTM Deployer contract. - /// @param _fixedForceDeploymentsData Encoded data for forced deployment that - /// is the same for all the chains. - /// @param _additionalForceDeploymentsData Encoded data for force deployments that - /// is specific for each ZK Chain. - function performForceDeployedContractsInit( - address _ctmDeployer, - bytes memory _fixedForceDeploymentsData, - bytes memory _additionalForceDeploymentsData - ) internal { - // Decode and retrieve the force deployments data. - ForceDeployment[] memory forceDeployments = _getForceDeploymentsData( - _fixedForceDeploymentsData, - _additionalForceDeploymentsData - ); - - // Force deploy the contracts on specified addresses. - IContractDeployer(DEPLOYER_SYSTEM_CONTRACT).forceDeployOnAddresses{value: msg.value}(forceDeployments); - - // It is expected that either through the force deployments above - // or upon initialization, both the L2 deployment of BridgeHub, AssetRouter, and MessageRoot are deployed. - // However, there is still some follow-up finalization that needs to be done. - - // Retrieve the owner of the BridgeHub contract. - address bridgehubOwner = L2_BRIDGE_HUB.owner(); - - // Prepare calldata to set addresses in BridgeHub. - bytes memory data = abi.encodeCall( - L2_BRIDGE_HUB.setAddresses, - (address(L2_ASSET_ROUTER), _ctmDeployer, address(L2_MESSAGE_ROOT), address(L2_CHAIN_ASSET_HANDLER)) - ); - - // Execute the call to set addresses in BridgeHub. - (bool success, bytes memory returnData) = SystemContractHelper.mimicCall( - address(L2_BRIDGE_HUB), - bridgehubOwner, - data - ); - - // Revert with the original revert reason if the call failed. - if (!success) { - /// @dev Propagate the revert reason from the failed call. - assembly { - revert(add(returnData, 0x20), returndatasize()) - } - } - } - - /// @notice Retrieves and constructs the force deployments array. - /// @dev Decodes the provided force deployments data and organizes them into an array of `ForceDeployment` to - /// to execute. - /// @param _fixedForceDeploymentsData Encoded data for forced deployment that - /// is the same for all the chains. - /// @param _additionalForceDeploymentsData Encoded data for force deployments that - /// is specific for each ZK Chain. - /// @return forceDeployments An array of `ForceDeployment` structs containing deployment details. - function _getForceDeploymentsData( - bytes memory _fixedForceDeploymentsData, - bytes memory _additionalForceDeploymentsData - ) internal returns (ForceDeployment[] memory forceDeployments) { - // Decode the fixed and additional force deployments data. - FixedForceDeploymentsData memory fixedForceDeploymentsData = abi.decode( - _fixedForceDeploymentsData, - (FixedForceDeploymentsData) - ); - ZKChainSpecificForceDeploymentsData memory additionalForceDeploymentsData = abi.decode( - _additionalForceDeploymentsData, - (ZKChainSpecificForceDeploymentsData) - ); - - forceDeployments = new ForceDeployment[](5); - - // Configure the MessageRoot deployment. - forceDeployments[0] = ForceDeployment({ - bytecodeHash: fixedForceDeploymentsData.messageRootBytecodeHash, - newAddress: address(L2_MESSAGE_ROOT), - callConstructor: true, - value: 0, - // solhint-disable-next-line func-named-parameters - input: abi.encode(address(L2_BRIDGE_HUB), fixedForceDeploymentsData.l1ChainId) - }); - - // Configure the BridgeHub deployment. - forceDeployments[1] = ForceDeployment({ - bytecodeHash: fixedForceDeploymentsData.bridgehubBytecodeHash, - newAddress: address(L2_BRIDGE_HUB), - callConstructor: true, - value: 0, - input: abi.encode( - fixedForceDeploymentsData.l1ChainId, - fixedForceDeploymentsData.aliasedL1Governance, - fixedForceDeploymentsData.maxNumberOfZKChains - ) - }); - - // Configure the AssetRouter deployment. - forceDeployments[2] = ForceDeployment({ - bytecodeHash: fixedForceDeploymentsData.l2AssetRouterBytecodeHash, - newAddress: address(L2_ASSET_ROUTER), - callConstructor: true, - value: 0, - // solhint-disable-next-line func-named-parameters - input: abi.encode( - fixedForceDeploymentsData.l1ChainId, - fixedForceDeploymentsData.eraChainId, - fixedForceDeploymentsData.l1AssetRouter, - additionalForceDeploymentsData.l2LegacySharedBridge, - additionalForceDeploymentsData.baseTokenAssetId, - fixedForceDeploymentsData.aliasedL1Governance - ) - }); - - // Ensure the WETH token is deployed and retrieve its address. - address wrappedBaseTokenAddress = _ensureWethToken({ - _predeployedWethToken: additionalForceDeploymentsData.predeployedL2WethAddress, - _aliasedL1Governance: fixedForceDeploymentsData.aliasedL1Governance, - _baseTokenL1Address: additionalForceDeploymentsData.baseTokenL1Address, - _baseTokenAssetId: additionalForceDeploymentsData.baseTokenAssetId, - _baseTokenName: additionalForceDeploymentsData.baseTokenName, - _baseTokenSymbol: additionalForceDeploymentsData.baseTokenSymbol - }); - - address deployedTokenBeacon; - bool contractsDeployedAlready; - if (additionalForceDeploymentsData.l2LegacySharedBridge != address(0)) { - // In production, the `fixedForceDeploymentsData.dangerousTestOnlyForcedBeacon` must always - // be equal to 0. It is only for simplifying testing. - if (fixedForceDeploymentsData.dangerousTestOnlyForcedBeacon == address(0)) { - deployedTokenBeacon = address( - IL2SharedBridgeLegacy(additionalForceDeploymentsData.l2LegacySharedBridge).l2TokenBeacon() - ); - } else { - deployedTokenBeacon = fixedForceDeploymentsData.dangerousTestOnlyForcedBeacon; - } - - contractsDeployedAlready = true; - } - - // Configure the Native Token Vault deployment. - forceDeployments[3] = ForceDeployment({ - bytecodeHash: fixedForceDeploymentsData.l2NtvBytecodeHash, - newAddress: address(L2_NATIVE_TOKEN_VAULT), - callConstructor: true, - value: 0, - // solhint-disable-next-line func-named-parameters - input: abi.encode( - fixedForceDeploymentsData.l1ChainId, - fixedForceDeploymentsData.aliasedL1Governance, - fixedForceDeploymentsData.l2TokenProxyBytecodeHash, - additionalForceDeploymentsData.l2LegacySharedBridge, - deployedTokenBeacon, - contractsDeployedAlready, - wrappedBaseTokenAddress, - additionalForceDeploymentsData.baseTokenAssetId - ) - }); - - // Configure the ChainAssetHandler deployment. - forceDeployments[4] = ForceDeployment({ - bytecodeHash: fixedForceDeploymentsData.chainAssetHandlerBytecodeHash, - newAddress: address(L2_CHAIN_ASSET_HANDLER), - callConstructor: true, - value: 0, - // solhint-disable-next-line func-named-parameters - input: abi.encode( - fixedForceDeploymentsData.l1ChainId, - fixedForceDeploymentsData.aliasedL1Governance, - address(L2_BRIDGE_HUB), - address(L2_ASSET_ROUTER), - address(L2_MESSAGE_ROOT) - ) - }); - } - - /// @notice Constructs the initialization calldata for the L2WrappedBaseToken. - /// @param _wrappedBaseTokenName The name of the wrapped base token. - /// @param _wrappedBaseTokenSymbol The symbol of the wrapped base token. - /// @param _baseTokenL1Address The L1 address of the base token. - /// @param _baseTokenAssetId The asset ID of the base token. - /// @return initData The encoded initialization calldata. - function getWethInitData( - string memory _wrappedBaseTokenName, - string memory _wrappedBaseTokenSymbol, - address _baseTokenL1Address, - bytes32 _baseTokenAssetId - ) internal pure returns (bytes memory initData) { - initData = abi.encodeCall( - IL2WrappedBaseToken.initializeV3, - ( - _wrappedBaseTokenName, - _wrappedBaseTokenSymbol, - address(L2_ASSET_ROUTER), - _baseTokenL1Address, - _baseTokenAssetId - ) - ); - } - - /// @notice Ensures that the WETH token is deployed. If not predeployed, deploys it. - /// @param _predeployedWethToken The potential address of the predeployed WETH token. - /// @param _aliasedL1Governance Address of the aliased L1 governance. - /// @param _baseTokenL1Address L1 address of the base token. - /// @param _baseTokenAssetId Asset ID of the base token. - /// @param _baseTokenName Name of the base token. - /// @param _baseTokenSymbol Symbol of the base token. - /// @return The address of the ensured WETH token. - function _ensureWethToken( - address _predeployedWethToken, - address _aliasedL1Governance, - address _baseTokenL1Address, - bytes32 _baseTokenAssetId, - string memory _baseTokenName, - string memory _baseTokenSymbol - ) private returns (address) { - if (_predeployedWethToken != address(0)) { - return _predeployedWethToken; - } - - string memory wrappedBaseTokenName = string.concat("Wrapped ", _baseTokenName); - string memory wrappedBaseTokenSymbol = string.concat("W", _baseTokenSymbol); - - bytes memory initData = getWethInitData( - wrappedBaseTokenName, - wrappedBaseTokenSymbol, - _baseTokenL1Address, - _baseTokenAssetId - ); - - TransparentUpgradeableProxy proxy = new TransparentUpgradeableProxy{salt: bytes32(0)}( - WRAPPED_BASE_TOKEN_IMPL_ADDRESS, - _aliasedL1Governance, - initData - ); - - return address(proxy); - } -} diff --git a/system-contracts/contracts/L2V29Upgrade.sol b/system-contracts/contracts/L2V29Upgrade.sol index 1124c71a4b..b60834a1a0 100644 --- a/system-contracts/contracts/L2V29Upgrade.sol +++ b/system-contracts/contracts/L2V29Upgrade.sol @@ -7,7 +7,7 @@ import {IL2SharedBridgeLegacy} from "./interfaces/IL2SharedBridgeLegacy.sol"; import {UpgradeableBeacon} from "@openzeppelin/contracts-v4/proxy/beacon/UpgradeableBeacon.sol"; import {ProxyAdmin} from "@openzeppelin/contracts-v4/proxy/transparent/ProxyAdmin.sol"; import {Ownable2Step} from "@openzeppelin/contracts-v4/access/Ownable2Step.sol"; -import {L2_ASSET_ROUTER, L2_BRIDGE_HUB, L2_NATIVE_TOKEN_VAULT, L2_CHAIN_ASSET_HANDLER} from "./Constants.sol"; +import {L2_ASSET_ROUTER, L2_BRIDGE_HUB, L2_CHAIN_ASSET_HANDLER, L2_NATIVE_TOKEN_VAULT} from "./Constants.sol"; import {IBridgedStandardERC20} from "./interfaces/IBridgedStandardERC20.sol"; import {LegacyBridgeNotProxy} from "./SystemContractErrors.sol"; import {IBridgehub} from "./interfaces/IBridgehub.sol"; diff --git a/system-contracts/contracts/SystemContext.sol b/system-contracts/contracts/SystemContext.sol index 9f37ca72c3..b8910916ea 100644 --- a/system-contracts/contracts/SystemContext.sol +++ b/system-contracts/contracts/SystemContext.sol @@ -7,7 +7,7 @@ import {SystemContractBase} from "./abstract/SystemContractBase.sol"; import {ISystemContextDeprecated} from "./interfaces/ISystemContextDeprecated.sol"; import {SystemContractHelper} from "./libraries/SystemContractHelper.sol"; import {BOOTLOADER_FORMAL_ADDRESS, COMPLEX_UPGRADER_CONTRACT, SystemLogKey} from "./Constants.sol"; -import {CannotInitializeFirstVirtualBlock, CannotReuseL2BlockNumberFromPreviousBatch, CurrentBatchNumberMustBeGreaterThanZero, InconsistentNewBatchTimestamp, IncorrectL2BlockHash, IncorrectSameL2BlockPrevBlockHash, IncorrectSameL2BlockTimestamp, IncorrectVirtualBlockInsideMiniblock, InvalidNewL2BlockNumber, L2BlockAndBatchTimestampMismatch, L2BlockNumberZero, NoVirtualBlocks, NonMonotonicL2BlockTimestamp, PreviousL2BlockHashIsIncorrect, ProvidedBatchNumberIsNotCorrect, TimestampsShouldBeIncremental, UpgradeTransactionMustBeFirst} from "contracts/SystemContractErrors.sol"; +import {CannotInitializeFirstVirtualBlock, CannotReuseL2BlockNumberFromPreviousBatch, CurrentBatchNumberMustBeGreaterThanZero, DeprecatedFunction, InconsistentNewBatchTimestamp, IncorrectL2BlockHash, IncorrectSameL2BlockPrevBlockHash, IncorrectSameL2BlockTimestamp, IncorrectVirtualBlockInsideMiniblock, InvalidNewL2BlockNumber, L2BlockAndBatchTimestampMismatch, L2BlockNumberZero, NoVirtualBlocks, NonMonotonicL2BlockTimestamp, PreviousL2BlockHashIsIncorrect, ProvidedBatchNumberIsNotCorrect, TimestampsShouldBeIncremental, UpgradeTransactionMustBeFirst} from "contracts/SystemContractErrors.sol"; /** * @author Matter Labs @@ -416,7 +416,7 @@ contract SystemContext is ISystemContext, ISystemContextDeprecated, SystemContra /// @notice Publishes L2->L1 logs needed to verify the validity of this batch on L1. /// @dev Should be called at the end of the current batch. function publishTimestampDataToL1() external onlyCallFromBootloader { - (uint128 currentBatchNumber, uint128 currentBatchTimestamp) = getBatchNumberAndTimestamp(); + (uint128 currentBatchNumber, uint128 currentBatchTimestamp) = _getBatchNumberAndTimestamp(); (, uint128 currentL2BlockTimestamp) = getL2BlockNumberAndTimestamp(); // The structure of the "setNewBatch" implies that currentBatchNumber > 0, but we still double check it @@ -458,7 +458,7 @@ contract SystemContext is ISystemContext, ISystemContextDeprecated, SystemContra uint128 _expectedNewNumber, uint256 _baseFee ) external onlyCallFromBootloader { - (uint128 previousBatchNumber, uint128 previousBatchTimestamp) = getBatchNumberAndTimestamp(); + (uint128 previousBatchNumber, uint128 previousBatchTimestamp) = _getBatchNumberAndTimestamp(); if (_newTimestamp <= previousBatchTimestamp) { revert TimestampsShouldBeIncremental(_newTimestamp, previousBatchTimestamp); } @@ -499,6 +499,14 @@ contract SystemContext is ISystemContext, ISystemContextDeprecated, SystemContra txNumberInBlock = 0; } + /// @notice Returns the current batch's number and timestamp. + /// @return batchNumber and batchTimestamp tuple of the current batch's number and the current batch's timestamp + function _getBatchNumberAndTimestamp() internal view returns (uint128 batchNumber, uint128 batchTimestamp) { + BlockInfo memory batchInfo = currentBatchInfo; + batchNumber = batchInfo.number; + batchTimestamp = batchInfo.timestamp; + } + /*////////////////////////////////////////////////////////////// DEPRECATED METHODS //////////////////////////////////////////////////////////////*/ @@ -508,44 +516,43 @@ contract SystemContext is ISystemContext, ISystemContextDeprecated, SystemContra /// @return hash The hash of the batch. /// @dev Deprecated to make publicly accessible methods compatible with planned releases. /// @dev Please use the block function `getBlockHashEVM` if needed. - /// @dev The function body will be replaced with revert in the next release. + /// @dev The function will be completely removed in the next release. + // solhint-disable-next-line no-unused-vars function getBatchHash(uint256 _batchNumber) external view returns (bytes32 hash) { - hash = batchHashes[_batchNumber]; + revert DeprecatedFunction(this.getBatchHash.selector); } /// @notice Returns the current batch's number and timestamp. /// @return batchNumber and batchTimestamp tuple of the current batch's number and the current batch's timestamp /// @dev Deprecated for external usage to make publicly accessible methods compatible with planned releases. /// @dev Please use the block function `getL2BlockNumberAndTimestamp` if needed. - /// @dev The function body will be replaced with revert in the next release. - function getBatchNumberAndTimestamp() public view returns (uint128 batchNumber, uint128 batchTimestamp) { - BlockInfo memory batchInfo = currentBatchInfo; - batchNumber = batchInfo.number; - batchTimestamp = batchInfo.timestamp; + /// @dev The function will be completely removed in the next release. + function getBatchNumberAndTimestamp() external view returns (uint128 batchNumber, uint128 batchTimestamp) { + revert DeprecatedFunction(this.getBatchNumberAndTimestamp.selector); } /// @notice Returns the current batch's number and timestamp. /// @dev Deprecated for external usage to make publicly accessible methods compatible with planned releases. /// @dev Please use the block function `getL2BlockNumberAndTimestamp` if needed. - /// @dev The function body will be replaced with revert in the next release. + /// @dev The function will be completely removed in the next release. function currentBlockInfo() external view returns (uint256 blockInfo) { - (uint128 blockNumber, uint128 blockTimestamp) = getBatchNumberAndTimestamp(); - blockInfo = (uint256(blockNumber) << 128) | uint256(blockTimestamp); + revert DeprecatedFunction(this.currentBlockInfo.selector); } /// @notice Returns the current batch's number and timestamp. /// @dev Deprecated to make publicly accessible methods compatible with planned releases. /// @dev Please use the block function `getL2BlockNumberAndTimestamp` if needed. - /// @dev The function body will be replaced with revert in the next release. + /// @dev The function will be completely removed in the next release. function getBlockNumberAndTimestamp() external view returns (uint256 blockNumber, uint256 blockTimestamp) { - (blockNumber, blockTimestamp) = getBatchNumberAndTimestamp(); + revert DeprecatedFunction(this.getBlockNumberAndTimestamp.selector); } /// @notice Returns the hash of the given batch. /// @dev Deprecated to make publicly accessible methods compatible with planned releases. /// @dev Please use the block function `getBlockHashEVM` if needed. - /// @dev The function body will be replaced with revert in the next release. + /// @dev The function will be completely removed in the next release. + // solhint-disable-next-line no-unused-vars function blockHash(uint256 _blockNumber) external view returns (bytes32 hash) { - hash = batchHashes[_blockNumber]; + revert DeprecatedFunction(this.blockHash.selector); } } diff --git a/system-contracts/contracts/SystemContractErrors.sol b/system-contracts/contracts/SystemContractErrors.sol index 3e9934d41c..5a46041a4e 100644 --- a/system-contracts/contracts/SystemContractErrors.sol +++ b/system-contracts/contracts/SystemContractErrors.sol @@ -2,8 +2,6 @@ // We use a floating point pragma here so it can be used within other projects that interact with the ZKsync ecosystem without using our exact pragma version. pragma solidity ^0.8.20; -// 0x86bb51b8 -error AddressHasNoCode(address); // 0xefce78c7 error CallerMustBeBootloader(); // 0xbe4bf9e4 @@ -30,6 +28,8 @@ error CompressorEnumIndexNotEqual(uint256 expected, uint256 actual); error CompressorInitialWritesProcessedNotEqual(uint256 expected, uint256 actual); // 0x6ad429e8 error CurrentBatchNumberMustBeGreaterThanZero(); +// 0x01e6c91e +error DeprecatedFunction(bytes4 selector); // 0x9be48d8d error DerivedKeyNotEqualToCompressedValue(bytes32 expected, bytes32 provided); // 0xe223db5e @@ -72,10 +72,10 @@ error IndexSizeError(); error InsufficientFunds(uint256 required, uint256 actual); // 0xae962d4e error InvalidCall(); -// 0x7a47c9a2 -error InvalidChainId(); // 0x6a84bc39 error InvalidCodeHash(CodeHashReason); +// 0xc74537a1 +error InvalidDACommitmentScheme(uint256); // 0xb4fa3fb3 error InvalidInput(); // 0x8c13f15d @@ -132,7 +132,8 @@ error PreviousBytecodeUnknown(); error PreviousL2BlockHashIsIncorrect(bytes32 correctPrevBlockHash, bytes32 expectedPrevL2BlockHash); // 0x33cb1485 error ProvidedBatchNumberIsNotCorrect(uint128 previousBatchNumber, uint128 _expectedNewNumber); -// 0x7f7b0cf7 +// Note: enum should be encoded as uint8 to calculate selector! +// skip-errors-lint 0x7f7b0cf7 error ReconstructionMismatch(PubdataField, bytes32 expected, bytes32 actual); // 0x26772295 error ReturnedBytecodeDoesNotMatchExpectedHash(bytes32 returnedBytecode, bytes32 expectedBytecodeHash); @@ -193,7 +194,9 @@ enum PubdataField { InputMsgsHash, InputBytecodeHash, Offset, - Length + Length, + StateDiffCompressionVersion, + ExtraData } enum BytecodeError { diff --git a/system-contracts/contracts/interfaces/ICompressor.sol b/system-contracts/contracts/interfaces/ICompressor.sol index 854aa7904f..a3ed4077f1 100644 --- a/system-contracts/contracts/interfaces/ICompressor.sol +++ b/system-contracts/contracts/interfaces/ICompressor.sol @@ -26,5 +26,5 @@ interface ICompressor { uint256 _enumerationIndexSize, bytes calldata _stateDiffs, bytes calldata _compressedStateDiffs - ) external returns (bytes32 stateDiffHash); + ) external view returns (bytes32 stateDiffHash); } diff --git a/system-contracts/contracts/interfaces/IL1Messenger.sol b/system-contracts/contracts/interfaces/IL1Messenger.sol index 51535d8d80..7beeab20c5 100644 --- a/system-contracts/contracts/interfaces/IL1Messenger.sol +++ b/system-contracts/contracts/interfaces/IL1Messenger.sol @@ -20,18 +20,6 @@ struct L2ToL1Log { bytes32 value; } -/// @dev Bytes in raw L2 to L1 log -/// @dev Equal to the bytes size of the tuple - (uint8 ShardId, bool isService, uint16 txNumberInBlock, address sender, bytes32 key, bytes32 value) -uint256 constant L2_TO_L1_LOG_SERIALIZE_SIZE = 88; - -/// @dev The value of default leaf hash for L2 to L1 logs Merkle tree -/// @dev An incomplete fixed-size tree is filled with this value to be a full binary tree -/// @dev Actually equal to the `keccak256(new bytes(L2_TO_L1_LOG_SERIALIZE_SIZE))` -bytes32 constant L2_L1_LOGS_TREE_DEFAULT_LEAF_HASH = 0x72abee45b59e344af8a6e520241c4744aff26ed411f4c4b00f8af09adada43ba; - -/// @dev The current version of state diff compression being used. -uint256 constant STATE_DIFF_COMPRESSION_VERSION_NUMBER = 1; - /** * @author Matter Labs * @custom:security-contact security@matterlabs.dev diff --git a/system-contracts/contracts/interfaces/IL2DAValidator.sol b/system-contracts/contracts/interfaces/IL2DAValidator.sol index 09d3bbb238..2c7f026b22 100644 --- a/system-contracts/contracts/interfaces/IL2DAValidator.sol +++ b/system-contracts/contracts/interfaces/IL2DAValidator.sol @@ -5,6 +5,7 @@ pragma solidity ^0.8.20; /// @author Matter Labs /// @custom:security-contact security@matterlabs.dev interface IL2DAValidator { + // Used only for signature calculation (sort of magic value) function validatePubdata( // The rolling hash of the user L2->L1 logs. bytes32 _chainedLogsHash, diff --git a/system-contracts/contracts/interfaces/IL2GenesisUpgrade.sol b/system-contracts/contracts/interfaces/IL2GenesisUpgrade.sol index ac3d5ae5db..b828dd5d76 100644 --- a/system-contracts/contracts/interfaces/IL2GenesisUpgrade.sol +++ b/system-contracts/contracts/interfaces/IL2GenesisUpgrade.sol @@ -17,6 +17,7 @@ struct ZKChainSpecificForceDeploymentsData { /// @notice The structure that describes force deployments that are the same for each chain. /// @dev Note, that for simplicity, the same struct is used both for upgrading to the /// Gateway version and for the Genesis. Some fields may not be used in either of those. +// FIXME: not in sync with L1. // solhint-disable-next-line gas-struct-packing struct FixedForceDeploymentsData { uint256 l1ChainId; @@ -44,6 +45,7 @@ interface IL2GenesisUpgrade { event UpgradeComplete(uint256 _chainId); function genesisUpgrade( + bool _isZKsyncOS, uint256 _chainId, address _ctmDeployer, bytes calldata _fixedForceDeploymentsData, diff --git a/system-contracts/contracts/libraries/L2DAValidator.sol b/system-contracts/contracts/libraries/L2DAValidator.sol new file mode 100644 index 0000000000..43678237a4 --- /dev/null +++ b/system-contracts/contracts/libraries/L2DAValidator.sol @@ -0,0 +1,199 @@ +// SPDX-License-Identifier: MIT + +pragma solidity 0.8.28; + +import {COMPRESSOR_CONTRACT, L2DACommitmentScheme, L2_TO_L1_LOG_SERIALIZE_SIZE, PUBDATA_CHUNK_PUBLISHER, STATE_DIFF_COMPRESSION_VERSION_NUMBER, STATE_DIFF_ENTRY_SIZE} from "../Constants.sol"; +import {EfficientCall} from "../libraries/EfficientCall.sol"; +import {InvalidDACommitmentScheme, PubdataField, ReconstructionMismatch} from "../SystemContractErrors.sol"; +import {Utils} from "./Utils.sol"; + +/** + * @author Matter Labs + * @custom:security-contact security@matterlabs.dev + * @notice This library is used to validate pubdata and create L2 DA commitments. These commitments then used to validate DA on settlement layer. + */ +library L2DAValidator { + /// @notice Validates that the operator provided the correct pubdata (and aux data) and creates pubdata commitment for DA. + /// @dev Logs are not validated. It is the caller's responsibility to check that they are valid. + /// Note, that validity of uncompressed state diffs is not checked. + /// @param _l2DACommitmentScheme The scheme of L2 DA commitment. Different L1 validators may use different schemes. + /// @param _chainedMessagesHash The chained hash of messages. + /// @param _chainedBytecodesHash The chained hash of bytecodes. + /// @param _operatorData The data provided by opretator. Should include logs, messages, bytecodes, compressed and uncompressed state diffs. + /// @return pubdataDACommitment The pubdata DA commitment. + function makeDACommitment( + L2DACommitmentScheme _l2DACommitmentScheme, + bytes32 _chainedMessagesHash, + bytes32 _chainedBytecodesHash, + bytes calldata _operatorData + ) internal view returns (bytes32 pubdataDACommitment) { + if (_l2DACommitmentScheme == L2DACommitmentScheme.EMPTY_NO_DA) { + // Since we do not need to publish anything to L1, we can just return 0. + // Note, that Rollup validator sends the hash of uncompressed state diffs, since the + // correctness of the published pubdata depends on it. However Validium doesn't sent anything, + // so we don't need to publish even that. + return bytes32(0); + } + + (bytes32 uncompressedStateDiffHash, bytes calldata pubdata, bytes calldata leftover) = _validateOperatorData( + _chainedMessagesHash, + _chainedBytecodesHash, + _operatorData + ); + + // Creates a commitment to the pubdata that can later be verified during settlement. + if (_l2DACommitmentScheme == L2DACommitmentScheme.BLOBS_AND_PUBDATA_KECCAK256) { + // Default Rollup DA commitment scheme. It will commit to data that would allow to use either calldata or EIP-4844 blobs. + + // Check for calldata strict format + if (leftover.length != 0) { + revert ReconstructionMismatch(PubdataField.ExtraData, bytes32(0), bytes32(leftover.length)); + } + + // The preimage under the `daCommitment` hash is expected to be in the following format: + // - First 32 bytes are the hash of the uncompressed state diff. + // - Then, there is a 32-byte hash of the full pubdata. + // - Then, there is the 1-byte number of blobs published. + // - Then, there are linear hashes of the published blobs, 32 bytes each. + + bytes32[] memory blobLinearHashes = PUBDATA_CHUNK_PUBLISHER.chunkPubdataToBlobs(pubdata); + + pubdataDACommitment = keccak256( + abi.encodePacked( + uncompressedStateDiffHash, + EfficientCall.keccak(pubdata), + Utils.safeCastToU8(blobLinearHashes.length), + blobLinearHashes + ) + ); + } else if (_l2DACommitmentScheme == L2DACommitmentScheme.PUBDATA_KECCAK256) { + // Just commit to state diffs and pubdata using keccak256. + + bytes32 fullPubdataHash = EfficientCall.keccak(pubdata); + pubdataDACommitment = keccak256(abi.encodePacked(uncompressedStateDiffHash, fullPubdataHash)); + } else { + revert InvalidDACommitmentScheme(uint256(_l2DACommitmentScheme)); + } + } + + /// @notice Validates that the operator provided the correct state diffs compression as well as preimages for messages and bytecodes. + /// @dev Logs are not validated. It is expected that logs are valid. + /// @param _chainedMessagesHash The chained hash of messages. + /// @param _chainedBytecodesHash The chained hash of bytecodes. + /// @param _operatorData The data provided by opretator. Should include logs, messages, bytecodes, compressed and uncompressed state diffs. + /// @return uncompressedStateDiffHash the hash of the uncompressed state diffs + /// @return totalL2Pubdata total pubdata that should be sent to L1. Includes logs, messages, bytecodes and compressed state diffs. + /// @return leftoverSuffix the suffix left after pubdata and uncompressed state diffs. + /// On Era or other "vanilla" rollups it is empty, but it can be used for providing additional data by the operator, + /// e.g. DA committee signatures, etc. + function _validateOperatorData( + bytes32 _chainedMessagesHash, + bytes32 _chainedBytecodesHash, + bytes calldata _operatorData + ) + internal + view + returns (bytes32 uncompressedStateDiffHash, bytes calldata totalL2Pubdata, bytes calldata leftoverSuffix) + { + uint256 calldataPtr = 0; + + // Skip logs + { + uint32 numberOfL2ToL1Logs = uint32(bytes4(_operatorData[calldataPtr:calldataPtr + 4])); + calldataPtr += 4 + numberOfL2ToL1Logs * L2_TO_L1_LOG_SERIALIZE_SIZE; + } + + // Check messages + { + uint32 numberOfMessages = uint32(bytes4(_operatorData[calldataPtr:calldataPtr + 4])); + calldataPtr += 4; + bytes32 reconstructedChainedMessagesHash; + for (uint256 i = 0; i < numberOfMessages; ++i) { + uint32 currentMessageLength = uint32(bytes4(_operatorData[calldataPtr:calldataPtr + 4])); + calldataPtr += 4; + bytes32 hashedMessage = EfficientCall.keccak( + _operatorData[calldataPtr:calldataPtr + currentMessageLength] + ); + calldataPtr += currentMessageLength; + reconstructedChainedMessagesHash = keccak256( + abi.encode(reconstructedChainedMessagesHash, hashedMessage) + ); + } + if (reconstructedChainedMessagesHash != _chainedMessagesHash) { + revert ReconstructionMismatch( + PubdataField.MsgHash, + _chainedMessagesHash, + reconstructedChainedMessagesHash + ); + } + } + + // Check bytecodes + { + uint32 numberOfBytecodes = uint32(bytes4(_operatorData[calldataPtr:calldataPtr + 4])); + calldataPtr += 4; + bytes32 reconstructedChainedL1BytecodesRevealDataHash; + for (uint256 i = 0; i < numberOfBytecodes; ++i) { + uint32 currentBytecodeLength = uint32(bytes4(_operatorData[calldataPtr:calldataPtr + 4])); + calldataPtr += 4; + reconstructedChainedL1BytecodesRevealDataHash = keccak256( + abi.encode( + reconstructedChainedL1BytecodesRevealDataHash, + Utils.hashL2Bytecode(_operatorData[calldataPtr:calldataPtr + currentBytecodeLength]) + ) + ); + calldataPtr += currentBytecodeLength; + } + if (reconstructedChainedL1BytecodesRevealDataHash != _chainedBytecodesHash) { + revert ReconstructionMismatch( + PubdataField.Bytecode, + _chainedBytecodesHash, + reconstructedChainedL1BytecodesRevealDataHash + ); + } + } + + // Check State Diffs + // encoding is as follows: + // header (1 byte version, 3 bytes total len of compressed, 1 byte enumeration index size) + // body (`compressedStateDiffSize` bytes, 4 bytes number of state diffs, `numberOfStateDiffs` * `STATE_DIFF_ENTRY_SIZE` bytes for the uncompressed state diffs) + // encoded state diffs: [20bytes address][32bytes key][32bytes derived key][8bytes enum index][32bytes initial value][32bytes final value] + if (uint256(uint8(bytes1(_operatorData[calldataPtr]))) != STATE_DIFF_COMPRESSION_VERSION_NUMBER) { + revert ReconstructionMismatch( + PubdataField.StateDiffCompressionVersion, + bytes32(STATE_DIFF_COMPRESSION_VERSION_NUMBER), + bytes32(uint256(uint8(bytes1(_operatorData[calldataPtr])))) + ); + } + ++calldataPtr; + + uint24 compressedStateDiffSize = uint24(bytes3(_operatorData[calldataPtr:calldataPtr + 3])); + calldataPtr += 3; + + uint8 enumerationIndexSize = uint8(bytes1(_operatorData[calldataPtr])); + ++calldataPtr; + + bytes calldata compressedStateDiffs = _operatorData[calldataPtr:calldataPtr + compressedStateDiffSize]; + calldataPtr += compressedStateDiffSize; + + // Actual pubdata ends here. The rest of the data are uncompressed state diffs (to check compression) and optional leftover (arbitrary data). + totalL2Pubdata = _operatorData[:calldataPtr]; + + uint32 numberOfStateDiffs = uint32(bytes4(_operatorData[calldataPtr:calldataPtr + 4])); + calldataPtr += 4; + + bytes calldata stateDiffs = _operatorData[calldataPtr:calldataPtr + + (numberOfStateDiffs * STATE_DIFF_ENTRY_SIZE)]; + + uncompressedStateDiffHash = COMPRESSOR_CONTRACT.verifyCompressedStateDiffs( + numberOfStateDiffs, + enumerationIndexSize, + stateDiffs, + compressedStateDiffs + ); + + calldataPtr += numberOfStateDiffs * STATE_DIFF_ENTRY_SIZE; + + leftoverSuffix = _operatorData[calldataPtr:]; + } +} diff --git a/system-contracts/contracts/libraries/TransactionHelper.sol b/system-contracts/contracts/libraries/TransactionHelper.sol index 7ba23dbc03..530d1a93d3 100644 --- a/system-contracts/contracts/libraries/TransactionHelper.sol +++ b/system-contracts/contracts/libraries/TransactionHelper.sol @@ -2,8 +2,8 @@ // We use a floating point pragma here so it can be used within other projects that interact with the ZKsync ecosystem without using our exact pragma version. pragma solidity ^0.8.20; -import {IERC20} from "../openzeppelin/token/ERC20/IERC20.sol"; -import {SafeERC20} from "../openzeppelin/token/ERC20/utils/SafeERC20.sol"; +import {IERC20} from "@openzeppelin/contracts-v4/token/ERC20/IERC20.sol"; +import {SafeERC20} from "@openzeppelin/contracts-v4/token/ERC20/utils/SafeERC20.sol"; import {IPaymasterFlow} from "../interfaces/IPaymasterFlow.sol"; import {BASE_TOKEN_SYSTEM_CONTRACT, BOOTLOADER_FORMAL_ADDRESS} from "../Constants.sol"; diff --git a/system-contracts/contracts/libraries/Utils.sol b/system-contracts/contracts/libraries/Utils.sol index b17120d978..f92af3ddeb 100644 --- a/system-contracts/contracts/libraries/Utils.sol +++ b/system-contracts/contracts/libraries/Utils.sol @@ -45,6 +45,14 @@ library Utils { return uint24(_x); } + function safeCastToU8(uint256 _x) internal pure returns (uint8) { + if (_x > type(uint8).max) { + revert Overflow(); + } + + return uint8(_x); + } + /// @return If this bytecode hash for EVM contract or not function isCodeHashEVM(bytes32 _bytecodeHash) internal pure returns (bool) { return (uint8(_bytecodeHash[0]) == EVM_BYTECODE_FLAG); diff --git a/system-contracts/contracts/openzeppelin/token/ERC20/IERC20.sol b/system-contracts/contracts/openzeppelin/token/ERC20/IERC20.sol deleted file mode 100644 index 18b39a7a9c..0000000000 --- a/system-contracts/contracts/openzeppelin/token/ERC20/IERC20.sol +++ /dev/null @@ -1,82 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) -// We use a floating point pragma here so it can be used within other projects that interact with the ZKsync ecosystem without using our exact pragma version. -pragma solidity ^0.8.0; - -/** - * @dev Interface of the ERC20 standard as defined in the EIP. - */ -interface IERC20 { - /** - * @dev Emitted when `value` tokens are moved from one account (`from`) to - * another (`to`). - * - * Note that `value` may be zero. - */ - event Transfer(address indexed from, address indexed to, uint256 value); - - /** - * @dev Emitted when the allowance of a `spender` for an `owner` is set by - * a call to {approve}. `value` is the new allowance. - */ - event Approval(address indexed owner, address indexed spender, uint256 value); - - /** - * @dev Returns the amount of tokens in existence. - */ - function totalSupply() external view returns (uint256); - - /** - * @dev Returns the amount of tokens owned by `account`. - */ - function balanceOf(address account) external view returns (uint256); - - /** - * @dev Moves `amount` tokens from the caller's account to `to`. - * - * Returns a boolean value indicating whether the operation succeeded. - * - * Emits a {Transfer} event. - */ - function transfer(address to, uint256 amount) external returns (bool); - - /** - * @dev Returns the remaining number of tokens that `spender` will be - * allowed to spend on behalf of `owner` through {transferFrom}. This is - * zero by default. - * - * This value changes when {approve} or {transferFrom} are called. - */ - function allowance(address owner, address spender) external view returns (uint256); - - /** - * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. - * - * Returns a boolean value indicating whether the operation succeeded. - * - * IMPORTANT: Beware that changing an allowance with this method brings the risk - * that someone may use both the old and the new allowance by unfortunate - * transaction ordering. One possible solution to mitigate this race - * condition is to first reduce the spender's allowance to 0 and set the - * desired value afterwards: - * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 - * - * Emits an {Approval} event. - */ - function approve(address spender, uint256 amount) external returns (bool); - - /** - * @dev Moves `amount` tokens from `from` to `to` using the - * allowance mechanism. `amount` is then deducted from the caller's - * allowance. - * - * Returns a boolean value indicating whether the operation succeeded. - * - * Emits a {Transfer} event. - */ - function transferFrom( - address from, - address to, - uint256 amount - ) external returns (bool); -} diff --git a/system-contracts/contracts/openzeppelin/token/ERC20/extensions/IERC20Metadata.sol b/system-contracts/contracts/openzeppelin/token/ERC20/extensions/IERC20Metadata.sol deleted file mode 100644 index 83ba6ac5ed..0000000000 --- a/system-contracts/contracts/openzeppelin/token/ERC20/extensions/IERC20Metadata.sol +++ /dev/null @@ -1,28 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) - -pragma solidity ^0.8.0; - -import "../IERC20.sol"; - -/** - * @dev Interface for the optional metadata functions from the ERC20 standard. - * - * _Available since v4.1._ - */ -interface IERC20Metadata is IERC20 { - /** - * @dev Returns the name of the token. - */ - function name() external view returns (string memory); - - /** - * @dev Returns the symbol of the token. - */ - function symbol() external view returns (string memory); - - /** - * @dev Returns the decimals places of the token. - */ - function decimals() external view returns (uint8); -} diff --git a/system-contracts/contracts/openzeppelin/token/ERC20/extensions/IERC20Permit.sol b/system-contracts/contracts/openzeppelin/token/ERC20/extensions/IERC20Permit.sol deleted file mode 100644 index 5e0875438d..0000000000 --- a/system-contracts/contracts/openzeppelin/token/ERC20/extensions/IERC20Permit.sol +++ /dev/null @@ -1,60 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Permit.sol) -// We use a floating point pragma here so it can be used within other projects that interact with the ZKsync ecosystem without using our exact pragma version. -pragma solidity ^0.8.0; - -/** - * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in - * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. - * - * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by - * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't - * need to send a transaction, and thus is not required to hold Ether at all. - */ -interface IERC20Permit { - /** - * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, - * given ``owner``'s signed approval. - * - * IMPORTANT: The same issues {IERC20-approve} has related to transaction - * ordering also apply here. - * - * Emits an {Approval} event. - * - * Requirements: - * - * - `spender` cannot be the zero address. - * - `deadline` must be a timestamp in the future. - * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` - * over the EIP712-formatted function arguments. - * - the signature must use ``owner``'s current nonce (see {nonces}). - * - * For more information on the signature format, see the - * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP - * section]. - */ - function permit( - address owner, - address spender, - uint256 value, - uint256 deadline, - uint8 v, - bytes32 r, - bytes32 s - ) external; - - /** - * @dev Returns the current nonce for `owner`. This value must be - * included whenever a signature is generated for {permit}. - * - * Every successful call to {permit} increases ``owner``'s nonce by one. This - * prevents a signature from being used multiple times. - */ - function nonces(address owner) external view returns (uint256); - - /** - * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. - */ - // solhint-disable-next-line func-name-mixedcase - function DOMAIN_SEPARATOR() external view returns (bytes32); -} diff --git a/system-contracts/contracts/openzeppelin/token/ERC20/utils/SafeERC20.sol b/system-contracts/contracts/openzeppelin/token/ERC20/utils/SafeERC20.sol deleted file mode 100644 index a23e6d1f72..0000000000 --- a/system-contracts/contracts/openzeppelin/token/ERC20/utils/SafeERC20.sol +++ /dev/null @@ -1,151 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol) -// We use a floating point pragma here so it can be used within other projects that interact with the ZKsync ecosystem without using our exact pragma version. -pragma solidity ^0.8.0; - -import {IERC20} from "../IERC20.sol"; -import {IERC20Permit} from "../extensions/IERC20Permit.sol"; -import {Address} from "../../../utils/Address.sol"; - -/** - * @title SafeERC20 - * @dev Wrappers around ERC20 operations that throw on failure (when the token - * contract returns false). Tokens that return no value (and instead revert or - * throw on failure) are also supported, non-reverting calls are assumed to be - * successful. - * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, - * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. - */ -library SafeERC20 { - using Address for address; - - function safeTransfer( - IERC20 token, - address to, - uint256 value - ) internal { - _callOptionalReturn( - token, - abi.encodeWithSelector(token.transfer.selector, to, value) - ); - } - - function safeTransferFrom( - IERC20 token, - address from, - address to, - uint256 value - ) internal { - _callOptionalReturn( - token, - abi.encodeWithSelector(token.transferFrom.selector, from, to, value) - ); - } - - /** - * @dev Deprecated. This function has issues similar to the ones found in - * {IERC20-approve}, and its usage is discouraged. - * - * Whenever possible, use {safeIncreaseAllowance} and - * {safeDecreaseAllowance} instead. - */ - function safeApprove( - IERC20 token, - address spender, - uint256 value - ) internal { - // safeApprove should only be called when setting an initial allowance, - // or when resetting it to zero. To increase and decrease it, use - // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' - require( - (value == 0) || (token.allowance(address(this), spender) == 0), - "SafeERC20: approve from non-zero to non-zero allowance" - ); - _callOptionalReturn( - token, - abi.encodeWithSelector(token.approve.selector, spender, value) - ); - } - - function safeIncreaseAllowance( - IERC20 token, - address spender, - uint256 value - ) internal { - uint256 newAllowance = token.allowance(address(this), spender) + value; - _callOptionalReturn( - token, - abi.encodeWithSelector( - token.approve.selector, - spender, - newAllowance - ) - ); - } - - function safeDecreaseAllowance( - IERC20 token, - address spender, - uint256 value - ) internal { - unchecked { - uint256 oldAllowance = token.allowance(address(this), spender); - require( - oldAllowance >= value, - "SafeERC20: decreased allowance below zero" - ); - uint256 newAllowance = oldAllowance - value; - _callOptionalReturn( - token, - abi.encodeWithSelector( - token.approve.selector, - spender, - newAllowance - ) - ); - } - } - - function safePermit( - IERC20Permit token, - address owner, - address spender, - uint256 value, - uint256 deadline, - uint8 v, - bytes32 r, - bytes32 s - ) internal { - uint256 nonceBefore = token.nonces(owner); - token.permit({owner: owner, spender: spender, value: value, deadline : deadline, v: v, r: r, s: s}); - uint256 nonceAfter = token.nonces(owner); - require( - nonceAfter == nonceBefore + 1, - "SafeERC20: permit did not succeed" - ); - } - - /** - * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement - * on the return value: the return value is optional (but if data is returned, it must not be false). - * @param token The token targeted by the call. - * @param data The call data (encoded using abi.encode or one of its variants). - */ - function _callOptionalReturn(IERC20 token, bytes memory data) private { - // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since - // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that - // the target address contains contract code and also asserts for success in the low-level call. - - bytes memory returndata = address(token).functionCall( - data, - "SafeERC20: low-level call failed" - ); - if (returndata.length > 0) { - // Return data is optional - require( - abi.decode(returndata, (bool)), - "SafeERC20: ERC20 operation did not succeed" - ); - } - } -} diff --git a/system-contracts/contracts/openzeppelin/utils/Address.sol b/system-contracts/contracts/openzeppelin/utils/Address.sol deleted file mode 100644 index 5d6de78c4a..0000000000 --- a/system-contracts/contracts/openzeppelin/utils/Address.sol +++ /dev/null @@ -1,308 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) -// We use a floating point pragma here so it can be used within other projects that interact with the ZKsync ecosystem without using our exact pragma version. -pragma solidity ^0.8.1; - -/** - * @dev Collection of functions related to the address type - */ -library Address { - /** - * @dev Returns true if `account` is a contract. - * - * [IMPORTANT] - * ==== - * It is unsafe to assume that an address for which this function returns - * false is an externally-owned account (EOA) and not a contract. - * - * Among others, `isContract` will return false for the following - * types of addresses: - * - * - an externally-owned account - * - a contract in construction - * - an address where a contract will be created - * - an address where a contract lived, but was destroyed - * ==== - * - * [IMPORTANT] - * ==== - * You shouldn't rely on `isContract` to protect against flash loan attacks! - * - * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets - * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract - * constructor. - * ==== - */ - function isContract(address account) internal view returns (bool) { - // This method relies on extcodesize/address.code.length, which returns 0 - // for contracts in construction, since the code is only stored at the end - // of the constructor execution. - - return account.code.length > 0; - } - - /** - * @dev Replacement for Solidity's `transfer`: sends `amount` wei to - * `recipient`, forwarding all available gas and reverting on errors. - * - * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost - * of certain opcodes, possibly making contracts go over the 2300 gas limit - * imposed by `transfer`, making them unable to receive funds via - * `transfer`. {sendValue} removes this limitation. - * - * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more]. - * - * IMPORTANT: because control is transferred to `recipient`, care must be - * taken to not create reentrancy vulnerabilities. Consider using - * {ReentrancyGuard} or the - * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. - */ - function sendValue(address payable recipient, uint256 amount) internal { - require( - address(this).balance >= amount, - "Address: insufficient balance" - ); - - (bool success, ) = recipient.call{value: amount}(""); - require( - success, - "Address: unable to send value, recipient may have reverted" - ); - } - - /** - * @dev Performs a Solidity function call using a low level `call`. A - * plain `call` is an unsafe replacement for a function call: use this - * function instead. - * - * If `target` reverts with a revert reason, it is bubbled up by this - * function (like regular Solidity function calls). - * - * Returns the raw returned data. To convert to the expected return value, - * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. - * - * Requirements: - * - * - `target` must be a contract. - * - calling `target` with `data` must not revert. - * - * _Available since v3.1._ - */ - function functionCall(address target, bytes memory data) - internal - returns (bytes memory) - { - return - functionCallWithValue( - target, - data, - 0, - "Address: low-level call failed" - ); - } - - /** - * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with - * `errorMessage` as a fallback revert reason when `target` reverts. - * - * _Available since v3.1._ - */ - function functionCall( - address target, - bytes memory data, - string memory errorMessage - ) internal returns (bytes memory) { - return functionCallWithValue(target, data, 0, errorMessage); - } - - /** - * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], - * but also transferring `value` wei to `target`. - * - * Requirements: - * - * - the calling contract must have an ETH balance of at least `value`. - * - the called Solidity function must be `payable`. - * - * _Available since v3.1._ - */ - function functionCallWithValue( - address target, - bytes memory data, - uint256 value - ) internal returns (bytes memory) { - return - functionCallWithValue( - target, - data, - value, - "Address: low-level call with value failed" - ); - } - - /** - * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but - * with `errorMessage` as a fallback revert reason when `target` reverts. - * - * _Available since v3.1._ - */ - function functionCallWithValue( - address target, - bytes memory data, - uint256 value, - string memory errorMessage - ) internal returns (bytes memory) { - require( - address(this).balance >= value, - "Address: insufficient balance for call" - ); - (bool success, bytes memory returndata) = target.call{value: value}( - data - ); - return - verifyCallResultFromTarget( - target, - success, - returndata, - errorMessage - ); - } - - /** - * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], - * but performing a static call. - * - * _Available since v3.3._ - */ - function functionStaticCall(address target, bytes memory data) - internal - view - returns (bytes memory) - { - return - functionStaticCall( - target, - data, - "Address: low-level static call failed" - ); - } - - /** - * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], - * but performing a static call. - * - * _Available since v3.3._ - */ - function functionStaticCall( - address target, - bytes memory data, - string memory errorMessage - ) internal view returns (bytes memory) { - (bool success, bytes memory returndata) = target.staticcall(data); - return - verifyCallResultFromTarget( - target, - success, - returndata, - errorMessage - ); - } - - /** - * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], - * but performing a delegate call. - * - * _Available since v3.4._ - */ - function functionDelegateCall(address target, bytes memory data) - internal - returns (bytes memory) - { - return - functionDelegateCall( - target, - data, - "Address: low-level delegate call failed" - ); - } - - /** - * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], - * but performing a delegate call. - * - * _Available since v3.4._ - */ - function functionDelegateCall( - address target, - bytes memory data, - string memory errorMessage - ) internal returns (bytes memory) { - (bool success, bytes memory returndata) = target.delegatecall(data); - return - verifyCallResultFromTarget( - target, - success, - returndata, - errorMessage - ); - } - - /** - * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling - * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. - * - * _Available since v4.8._ - */ - function verifyCallResultFromTarget( - address target, - bool success, - bytes memory returndata, - string memory errorMessage - ) internal view returns (bytes memory) { - if (success) { - if (returndata.length == 0) { - // only check isContract if the call was successful and the return data is empty - // otherwise we already know that it was a contract - require(isContract(target), "Address: call to non-contract"); - } - return returndata; - } else { - _revert(returndata, errorMessage); - } - } - - /** - * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the - * revert reason or using the provided one. - * - * _Available since v4.3._ - */ - function verifyCallResult( - bool success, - bytes memory returndata, - string memory errorMessage - ) internal pure returns (bytes memory) { - if (success) { - return returndata; - } else { - _revert(returndata, errorMessage); - } - } - - function _revert(bytes memory returndata, string memory errorMessage) - private - pure - { - // Look for revert reason and bubble it up if present - if (returndata.length > 0) { - // The easiest way to bubble the revert reason is using memory via assembly - /// @solidity memory-safe-assembly - assembly { - let returndata_size := mload(returndata) - revert(add(32, returndata), returndata_size) - } - } else { - revert(errorMessage); - } - } -} diff --git a/system-contracts/contracts/test-contracts/DummyChainAssetHandler.sol b/system-contracts/contracts/test-contracts/DummyChainAssetHandler.sol deleted file mode 100644 index 77a1f2c8bc..0000000000 --- a/system-contracts/contracts/test-contracts/DummyChainAssetHandler.sol +++ /dev/null @@ -1,9 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity 0.8.28; - -contract DummyChainAssetHandler { - constructor(uint256 _l1ChainId, address _owner, address _bridgehub, address _assetRouter, address _messageRoot) { - // do nothing - } -} diff --git a/system-contracts/contracts/test-contracts/DummyL2AssetRouter.sol b/system-contracts/contracts/test-contracts/DummyL2AssetRouter.sol deleted file mode 100644 index 10d05dfe91..0000000000 --- a/system-contracts/contracts/test-contracts/DummyL2AssetRouter.sol +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity 0.8.28; - -contract DummyL2AssetRouter { - constructor( - uint256 _l1ChainId, - address _l1AssetRouter, - address _aliasedL1Governance, - bytes32 _baseTokenAssetId, - uint256 _maxNumberOfZKChains - ) {} -} diff --git a/system-contracts/contracts/test-contracts/DummyL2NativeTokenVault.sol b/system-contracts/contracts/test-contracts/DummyL2NativeTokenVault.sol deleted file mode 100644 index edc4d25403..0000000000 --- a/system-contracts/contracts/test-contracts/DummyL2NativeTokenVault.sol +++ /dev/null @@ -1,15 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity 0.8.28; - -contract DummyL2NativeTokenVault { - constructor( - uint256 _l1ChainId, - address _aliasedL1Governance, - bytes32 _l2TokenProxyBytecodeHash, - address _bridgedTokenBeacon, - bool _contractsDeployedAlready, - address _wethToken, - bytes32 _baseTokenAssetId - ) {} -} diff --git a/system-contracts/contracts/test-contracts/DummyMessageRoot.sol b/system-contracts/contracts/test-contracts/DummyMessageRoot.sol deleted file mode 100644 index 33b879c274..0000000000 --- a/system-contracts/contracts/test-contracts/DummyMessageRoot.sol +++ /dev/null @@ -1,7 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity 0.8.28; - -contract DummyMessageRoot { - constructor(address _bridgehub, uint256 _l1ChainId) {} -} diff --git a/system-contracts/contracts/test-contracts/L2DAValidatorTester.sol b/system-contracts/contracts/test-contracts/L2DAValidatorTester.sol new file mode 100644 index 0000000000..12e24ca12d --- /dev/null +++ b/system-contracts/contracts/test-contracts/L2DAValidatorTester.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.20; + +import {L2DAValidator} from "../libraries/L2DAValidator.sol"; +import {L2DACommitmentScheme} from "../Constants.sol"; + +contract L2DAValidatorTester { + function validatePubdata( + L2DACommitmentScheme _l2DACommitmentScheme, + bytes32 _chainedMessagesHash, + bytes32 _chainedBytecodesHash, + bytes calldata _operatorData + ) external view returns (bytes32 outputHash) { + outputHash = L2DAValidator.makeDACommitment( + _l2DACommitmentScheme, + _chainedMessagesHash, + _chainedBytecodesHash, + _operatorData + ); + } +} diff --git a/system-contracts/contracts/test-contracts/SystemContextTest.sol b/system-contracts/contracts/test-contracts/SystemContextTest.sol new file mode 100644 index 0000000000..e7bb07fd2a --- /dev/null +++ b/system-contracts/contracts/test-contracts/SystemContextTest.sol @@ -0,0 +1,23 @@ +// SPDX-License-Identifier: MIT + +pragma solidity 0.8.28; + +import {SystemContext} from "../SystemContext.sol"; + +/** + * @title SystemContextTest + * @notice Test contract that makes some of the deprecated functions in SystemContext accessible for testing purposes + */ +contract SystemContextTest is SystemContext { + /// @notice Returns the number and timestamp of the given batch for testing purposes + function getBatchNumberAndTimestampTesting() external view returns (uint128 batchNumber, uint128 batchTimestamp) { + BlockInfo memory batchInfo = currentBatchInfo; + batchNumber = batchInfo.number; + batchTimestamp = batchInfo.timestamp; + } + + /// @notice Returns the hash of the given batch for testing purposes + function getBatchHashTesting(uint256 _batchNumber) external view returns (bytes32 hash) { + return batchHashes[_batchNumber]; + } +} diff --git a/system-contracts/foundry.toml b/system-contracts/foundry.toml index ae64936bbe..1592a93c80 100644 --- a/system-contracts/foundry.toml +++ b/system-contracts/foundry.toml @@ -14,3 +14,17 @@ remappings = [ zksolc = "1.5.11" enable_eravm_extensions = true suppressed_errors = ["sendtransfer"] + +[profile.test] +src = 'test/foundry' +test = 'test/foundry' +out = "out-tests" +libs = ["lib"] +cache_path = "cache-forge-tests" +evm_version = "cancun" +solc_version = "0.8.28" + +[profile.test.zksync] +zksolc = "1.5.11" +enable_eravm_extensions = true +suppressed_errors = ["sendtransfer"] diff --git a/system-contracts/package.json b/system-contracts/package.json index 717c2f4137..61bbea64a4 100644 --- a/system-contracts/package.json +++ b/system-contracts/package.json @@ -74,7 +74,8 @@ "test-l2-v29-upgrade": "yarn build:system-contracts && hardhat test --network zkSyncTestNode test/manual-tests/L2V29Upgrade.manual.ts", "test-node": "./bin/anvil-zksync --protocol-version=28 --emulate-evm", "test-node-local-contracts": "yarn build:foundry && ./bin/anvil-zksync --protocol-version=28 --dev-system-contracts=local --system-contracts-path='.'", - "test:bootloader": "cd ./bootloader/test_infra && cargo run", + "test:foundry": "FOUNDRY_PROFILE='test' forge test --zksync", + "test:bootloader": "cd bootloader/test_infra && cargo run", "install-anvil": "ts-node ./scripts/install-anvil.ts" } } diff --git a/system-contracts/scripts/constants.ts b/system-contracts/scripts/constants.ts index decd88e963..90cb9d991e 100644 --- a/system-contracts/scripts/constants.ts +++ b/system-contracts/scripts/constants.ts @@ -165,9 +165,9 @@ export const SYSTEM_CONTRACTS: ISystemContracts = { }, complexUpgrader: { address: "0x000000000000000000000000000000000000800f", - codeName: "ComplexUpgrader", + codeName: "L2ComplexUpgrader", lang: Language.Solidity, - location: SourceLocation.SystemContracts, + location: SourceLocation.L1Contracts, }, keccak256: { address: "0x0000000000000000000000000000000000008010", @@ -209,7 +209,7 @@ export const SYSTEM_CONTRACTS: ISystemContracts = { address: "0x0000000000000000000000000000000000010001", codeName: "L2GenesisUpgrade", lang: Language.Solidity, - location: SourceLocation.SystemContracts, + location: SourceLocation.L1Contracts, }, L2BridgeHub: { // This is explicitly a non-system-contract address. diff --git a/system-contracts/test/ComplexUpgrader.spec.ts b/system-contracts/test/ComplexUpgrader.spec.ts deleted file mode 100644 index e9104e0100..0000000000 --- a/system-contracts/test/ComplexUpgrader.spec.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { expect } from "chai"; -import { ethers, network } from "hardhat"; -import type { ComplexUpgrader, MockContract } from "../typechain"; -import { ComplexUpgraderFactory } from "../typechain"; -import { TEST_COMPLEX_UPGRADER_CONTRACT_ADDRESS, TEST_FORCE_DEPLOYER_ADDRESS } from "./shared/constants"; -import { deployContract, deployContractOnAddress, getWallets } from "./shared/utils"; - -describe("ComplexUpgrader tests", function () { - let complexUpgrader: ComplexUpgrader; - let dummyUpgrade: MockContract; - - before(async () => { - const wallet = (await getWallets())[0]; - await deployContractOnAddress(TEST_COMPLEX_UPGRADER_CONTRACT_ADDRESS, "ComplexUpgrader"); - complexUpgrader = ComplexUpgraderFactory.connect(TEST_COMPLEX_UPGRADER_CONTRACT_ADDRESS, wallet); - dummyUpgrade = (await deployContract("MockContract")) as MockContract; - }); - - describe("upgrade", function () { - it("non force deployer failed to call", async () => { - await expect(complexUpgrader.upgrade(dummyUpgrade.address, "0xdeadbeef")).to.be.revertedWithCustomError( - complexUpgrader, - "Unauthorized" - ); - }); - - it("successfully upgraded", async () => { - const force_deployer = await ethers.getImpersonatedSigner(TEST_FORCE_DEPLOYER_ADDRESS); - - await expect(complexUpgrader.connect(force_deployer).upgrade(dummyUpgrade.address, "0xdeadbeef")) - .to.emit(dummyUpgrade.attach(TEST_COMPLEX_UPGRADER_CONTRACT_ADDRESS), "Called") - .withArgs(0, "0xdeadbeef"); - - await network.provider.request({ - method: "hardhat_stopImpersonatingAccount", - params: [TEST_FORCE_DEPLOYER_ADDRESS], - }); - }); - }); -}); diff --git a/system-contracts/test/L1Messenger.spec.ts b/system-contracts/test/L1Messenger.spec.ts index 0b10d23cbd..721c0be229 100644 --- a/system-contracts/test/L1Messenger.spec.ts +++ b/system-contracts/test/L1Messenger.spec.ts @@ -19,6 +19,13 @@ const L2_TO_L1_LOGS_MERKLE_TREE_LEAVES = 16_384; const L2_TO_L1_LOG_SERIALIZE_SIZE = 88; const L2_L1_LOGS_TREE_DEFAULT_LEAF_HASH = "0x72abee45b59e344af8a6e520241c4744aff26ed411f4c4b00f8af09adada43ba"; +const L2_DA_COMMITMENT_SCHEME = { + NONE: 0, + EMPTY: 1, + ROLLUP: 2, + KECCAK: 3, +}; + describe("L1Messenger tests", () => { let l1Messenger: L1Messenger; let wallet: Wallet; @@ -56,7 +63,7 @@ describe("L1Messenger tests", () => { await l1Messenger .connect(bootloaderAccount) .publishPubdataAndClearState( - ethers.constants.AddressZero, + L2_DA_COMMITMENT_SCHEME.EMPTY, await emulator.buildTotalL2ToL1PubdataAndStateDiffs(l1Messenger) ); await network.provider.request({ @@ -85,7 +92,7 @@ describe("L1Messenger tests", () => { await l1Messenger .connect(bootloaderAccount) .publishPubdataAndClearState( - ethers.constants.AddressZero, + L2_DA_COMMITMENT_SCHEME.EMPTY, await emulator.buildTotalL2ToL1PubdataAndStateDiffs(l1Messenger), { gasLimit: 1000000000 } ) @@ -97,7 +104,7 @@ describe("L1Messenger tests", () => { l1Messenger .connect(bootloaderAccount) .publishPubdataAndClearState( - ethers.constants.AddressZero, + L2_DA_COMMITMENT_SCHEME.EMPTY, await emulator.buildTotalL2ToL1PubdataAndStateDiffs(l1Messenger, { numberOfLogs: 0x4002 }) ) ).to.be.revertedWithCustomError(l1Messenger, "ReconstructionMismatch"); @@ -107,7 +114,7 @@ describe("L1Messenger tests", () => { l1Messenger .connect(bootloaderAccount) .publishPubdataAndClearState( - ethers.constants.AddressZero, + L2_DA_COMMITMENT_SCHEME.EMPTY, await emulator.buildTotalL2ToL1PubdataAndStateDiffs(l1Messenger, { l2DaValidatorFunctionSig: "0x12121212" }) ) ).to.be.revertedWithCustomError(l1Messenger, "ReconstructionMismatch"); @@ -131,7 +138,7 @@ describe("L1Messenger tests", () => { l1Messenger .connect(bootloaderAccount) .publishPubdataAndClearState( - ethers.constants.AddressZero, + L2_DA_COMMITMENT_SCHEME.EMPTY, await emulator.buildTotalL2ToL1PubdataAndStateDiffs(l1Messenger, overrideData) ) ).to.be.revertedWithCustomError(l1Messenger, "ReconstructionMismatch"); @@ -140,7 +147,7 @@ describe("L1Messenger tests", () => { const correctChainedMessagesHash = await l1Messenger.provider.getStorageAt(l1Messenger.address, 2); await expect( l1Messenger.connect(bootloaderAccount).publishPubdataAndClearState( - ethers.constants.AddressZero, + L2_DA_COMMITMENT_SCHEME.EMPTY, await emulator.buildTotalL2ToL1PubdataAndStateDiffs(l1Messenger, { chainedMessagesHash: ethers.utils.keccak256(correctChainedMessagesHash), }) @@ -151,7 +158,7 @@ describe("L1Messenger tests", () => { const correctChainedBytecodesHash = await l1Messenger.provider.getStorageAt(l1Messenger.address, 3); await expect( l1Messenger.connect(bootloaderAccount).publishPubdataAndClearState( - ethers.constants.AddressZero, + L2_DA_COMMITMENT_SCHEME.EMPTY, await emulator.buildTotalL2ToL1PubdataAndStateDiffs(l1Messenger, { chainedBytecodeHash: ethers.utils.keccak256(correctChainedBytecodesHash), }) @@ -161,7 +168,7 @@ describe("L1Messenger tests", () => { it("should revert Invalid offset", async () => { await expect( l1Messenger.connect(bootloaderAccount).publishPubdataAndClearState( - ethers.constants.AddressZero, + L2_DA_COMMITMENT_SCHEME.EMPTY, await emulator.buildTotalL2ToL1PubdataAndStateDiffs(l1Messenger, { operatorDataOffset: EXPECTED_DA_INPUT_OFFSET + 1, }) @@ -173,7 +180,7 @@ describe("L1Messenger tests", () => { l1Messenger .connect(bootloaderAccount) .publishPubdataAndClearState( - ethers.constants.AddressZero, + L2_DA_COMMITMENT_SCHEME.EMPTY, await emulator.buildTotalL2ToL1PubdataAndStateDiffs(l1Messenger, { operatorDataLength: 1 }) ) ).to.be.revertedWithCustomError(l1Messenger, "ReconstructionMismatch"); @@ -181,7 +188,7 @@ describe("L1Messenger tests", () => { it("should revert Invalid root hash", async () => { await expect( l1Messenger.connect(bootloaderAccount).publishPubdataAndClearState( - ethers.constants.AddressZero, + L2_DA_COMMITMENT_SCHEME.EMPTY, await emulator.buildTotalL2ToL1PubdataAndStateDiffs(l1Messenger, { chainedLogsRootHash: ethers.constants.HashZero, }) diff --git a/system-contracts/test/L2GenesisUpgrade.spec.ts b/system-contracts/test/L2GenesisUpgrade.spec.ts deleted file mode 100644 index d69e4b6560..0000000000 --- a/system-contracts/test/L2GenesisUpgrade.spec.ts +++ /dev/null @@ -1,156 +0,0 @@ -import { expect } from "chai"; -import { ethers, network } from "hardhat"; -import * as zksync from "zksync-ethers"; -import type { ComplexUpgrader, L2GenesisUpgrade } from "../typechain"; -import { ComplexUpgraderFactory, L2GenesisUpgradeFactory } from "../typechain"; -import { - TEST_L2_GENESIS_UPGRADE_CONTRACT_ADDRESS, - TEST_FORCE_DEPLOYER_ADDRESS, - REAL_L2_ASSET_ROUTER_ADDRESS, - REAL_L2_MESSAGE_ROOT_ADDRESS, - REAL_L2_CHAIN_ASSET_HANDLER_ADDRESS, - TEST_COMPLEX_UPGRADER_CONTRACT_ADDRESS, - ADDRESS_ONE, -} from "./shared/constants"; -import { deployContractOnAddress, loadArtifact } from "./shared/utils"; -import { prepareEnvironment, setResult } from "./shared/mocks"; - -describe("L2GenesisUpgrade tests", function () { - let l2GenesisUpgrade: L2GenesisUpgrade; - let complexUpgrader: ComplexUpgrader; - const chainId = 270; - - const ctmDeployerAddress = ethers.utils.hexlify(ethers.utils.randomBytes(20)); - const bridgehubOwnerAddress = ethers.utils.hexlify(ethers.utils.randomBytes(20)); - - const forceDeployments = [ - { - bytecodeHash: "0x0100056f53fd9e940906d998a80ed53392e5c50a8eb198baf9f78fd84ce7ec70", - newAddress: "0x0000000000000000000000000000000000020002", - callConstructor: true, - value: 0, - input: "0x", - }, - ]; - - let fixedForceDeploymentsData: string; - - const additionalForceDeploymentsData = ethers.utils.defaultAbiCoder.encode( - [ - "tuple(bytes32 baseTokenAssetId, address l2LegacySharedBridge, address predeployedL2WethAddress, address baseTokenL1Address, string baseTokenName, string baseTokenSymbol)", - ], - [ - { - baseTokenAssetId: "0x0100056f53fd9e940906d998a80ed53392e5c50a8eb198baf9f78fd84ce7ec70", - l2LegacySharedBridge: ethers.constants.AddressZero, - predeployedL2WethAddress: ADDRESS_ONE, - baseTokenL1Address: ADDRESS_ONE, - baseTokenName: "Ether", - baseTokenSymbol: "ETH", - }, - ] - ); - - before(async () => { - await prepareEnvironment(); - - const wallet = await ethers.getImpersonatedSigner(TEST_FORCE_DEPLOYER_ADDRESS); - await deployContractOnAddress(TEST_COMPLEX_UPGRADER_CONTRACT_ADDRESS, "ComplexUpgrader"); - await deployContractOnAddress(TEST_L2_GENESIS_UPGRADE_CONTRACT_ADDRESS, "L2GenesisUpgrade"); - complexUpgrader = ComplexUpgraderFactory.connect(TEST_COMPLEX_UPGRADER_CONTRACT_ADDRESS, wallet); - l2GenesisUpgrade = L2GenesisUpgradeFactory.connect(TEST_L2_GENESIS_UPGRADE_CONTRACT_ADDRESS, wallet); - - await setResult( - "IBridgehub", - "setAddresses", - [ - REAL_L2_ASSET_ROUTER_ADDRESS, - ctmDeployerAddress, - REAL_L2_MESSAGE_ROOT_ADDRESS, - REAL_L2_CHAIN_ASSET_HANDLER_ADDRESS, - ], - { - failure: false, - returnData: "0x", - } - ); - await setResult("IBridgehub", "owner", [], { - failure: false, - returnData: ethers.utils.defaultAbiCoder.encode(["address"], [bridgehubOwnerAddress]), - }); - - await setResult("SystemContext", "setChainId", [chainId], { - failure: false, - returnData: "0x", - }); - - await setResult("ContractDeployer", "forceDeployOnAddresses", [forceDeployments], { - failure: false, - returnData: "0x", - }); - - const interopRootBytecode = (await loadArtifact("DummyMessageRoot")).bytecode; - const messageRootBytecodeHash = zksync.utils.hashBytecode(interopRootBytecode); - - const ntvBytecode = (await loadArtifact("DummyL2NativeTokenVault")).bytecode; - const ntvBytecodeHash = zksync.utils.hashBytecode(ntvBytecode); - - const l2AssetRouterBytecode = (await loadArtifact("DummyL2AssetRouter")).bytecode; - const l2AssetRouterBytecodeHash = zksync.utils.hashBytecode(l2AssetRouterBytecode); - - const bridgehubBytecode = (await loadArtifact("DummyBridgehub")).bytecode; - const bridgehubBytecodeHash = zksync.utils.hashBytecode(bridgehubBytecode); - - const chainAssetHandlerBytecode = (await loadArtifact("DummyChainAssetHandler")).bytecode; - const chainAssetHandlerBytecodeHash = zksync.utils.hashBytecode(chainAssetHandlerBytecode); - - fixedForceDeploymentsData = ethers.utils.defaultAbiCoder.encode( - [ - "tuple(uint256 l1ChainId, uint256 eraChainId, address l1AssetRouter, bytes32 l2TokenProxyBytecodeHash, address aliasedL1Governance, uint256 maxNumberOfZKChains, bytes32 bridgehubBytecodeHash, bytes32 l2AssetRouterBytecodeHash, bytes32 l2NtvBytecodeHash, bytes32 messageRootBytecodeHash, bytes32 chainAssetHandlerBytecodeHash, address l2SharedBridgeLegacyImpl, address l2BridgedStandardERC20Impl, address dangerousTestOnlyForcedBeacon)", - ], - [ - { - l1ChainId: 1, - eraChainId: 1, - l1AssetRouter: ADDRESS_ONE, - l2TokenProxyBytecodeHash: "0x0100056f53fd9e940906d998a80ed53392e5c50a8eb198baf9f78fd84ce7ec70", - aliasedL1Governance: ADDRESS_ONE, - maxNumberOfZKChains: 100, - bridgehubBytecodeHash: bridgehubBytecodeHash, - l2AssetRouterBytecodeHash: l2AssetRouterBytecodeHash, - l2NtvBytecodeHash: ntvBytecodeHash, - messageRootBytecodeHash: messageRootBytecodeHash, - chainAssetHandlerBytecodeHash: chainAssetHandlerBytecodeHash, - // For genesis upgrade these values will always be zero - l2SharedBridgeLegacyImpl: ethers.constants.AddressZero, - l2BridgedStandardERC20Impl: ethers.constants.AddressZero, - dangerousTestOnlyForcedBeacon: ethers.constants.AddressZero, - }, - ] - ); - }); - - describe("upgrade", function () { - it("successfully upgraded", async () => { - const data = l2GenesisUpgrade.interface.encodeFunctionData("genesisUpgrade", [ - chainId, - ctmDeployerAddress, - fixedForceDeploymentsData, - additionalForceDeploymentsData, - ]); - - // Note, that the event is emitted at the complex upgrader, but the event declaration is taken from the l2GenesisUpgrade contract. - await expect(complexUpgrader.upgrade(l2GenesisUpgrade.address, data)) - .to.emit( - new ethers.Contract(complexUpgrader.address, l2GenesisUpgrade.interface, complexUpgrader.signer), - "UpgradeComplete" - ) - .withArgs(chainId); - - await network.provider.request({ - method: "hardhat_stopImpersonatingAccount", - params: [TEST_FORCE_DEPLOYER_ADDRESS], - }); - }); - }); -}); diff --git a/system-contracts/test/SystemContext.spec.ts b/system-contracts/test/SystemContext.spec.ts index db73192439..849a29065d 100644 --- a/system-contracts/test/SystemContext.spec.ts +++ b/system-contracts/test/SystemContext.spec.ts @@ -1,6 +1,6 @@ import { ethers, network } from "hardhat"; -import { SystemContextFactory } from "../typechain"; -import type { SystemContext } from "../typechain"; +import { SystemContextTestFactory } from "../typechain"; +import type { SystemContextTest } from "../typechain"; import { TEST_BOOTLOADER_FORMAL_ADDRESS, TEST_SYSTEM_CONTEXT_CONTRACT_ADDRESS } from "./shared/constants"; import { deployContractOnAddress, getWallets } from "./shared/utils"; import { prepareEnvironment } from "./shared/mocks"; @@ -8,13 +8,13 @@ import { expect } from "chai"; describe("SystemContext tests", () => { const wallet = getWallets()[0]; - let systemContext: SystemContext; + let systemContext: SystemContextTest; let bootloaderAccount: ethers.Signer; before(async () => { await prepareEnvironment(); - await deployContractOnAddress(TEST_SYSTEM_CONTEXT_CONTRACT_ADDRESS, "SystemContext"); - systemContext = SystemContextFactory.connect(TEST_SYSTEM_CONTEXT_CONTRACT_ADDRESS, wallet); + await deployContractOnAddress(TEST_SYSTEM_CONTEXT_CONTRACT_ADDRESS, "SystemContextTest"); + systemContext = SystemContextTestFactory.connect(TEST_SYSTEM_CONTEXT_CONTRACT_ADDRESS, wallet); bootloaderAccount = await ethers.getImpersonatedSigner(TEST_BOOTLOADER_FORMAL_ADDRESS); }); @@ -65,20 +65,20 @@ describe("SystemContext tests", () => { describe("getBatchNumberAndTimestamp", async () => { it("should get batch number and timestamp", async () => { - const result = await systemContext.getBatchNumberAndTimestamp(); + const result = await systemContext.getBatchNumberAndTimestampTesting(); expect(result.batchNumber).to.be.equal(0); expect(result.batchTimestamp).to.be.equal(0); }); it("should get changed batch data", async () => { await systemContext.connect(bootloaderAccount).unsafeOverrideBatch(222, 111, 333); - const batchDataAfterChanges = await systemContext.getBatchNumberAndTimestamp(); + const batchDataAfterChanges = await systemContext.getBatchNumberAndTimestampTesting(); const baseFee = await systemContext.baseFee(); expect(batchDataAfterChanges.batchNumber).to.be.equal(111); expect(batchDataAfterChanges.batchTimestamp).to.be.equal(222); expect(baseFee).to.be.equal(333); await systemContext.connect(bootloaderAccount).unsafeOverrideBatch(0, 0, 0); - const batchDataRestored = await systemContext.getBatchNumberAndTimestamp(); + const batchDataRestored = await systemContext.getBatchNumberAndTimestampTesting(); const baseFeeRestored = await systemContext.baseFee(); expect(batchDataRestored.batchNumber).to.be.equal(0); expect(batchDataRestored.batchTimestamp).to.be.equal(0); @@ -88,22 +88,22 @@ describe("SystemContext tests", () => { describe("setNewBatch", async () => { it("should get hash of the given batch", async () => { - const batchData = await systemContext.getBatchNumberAndTimestamp(); - const result = await systemContext.getBatchHash(batchData.batchNumber); + const batchData = await systemContext.getBatchNumberAndTimestampTesting(); + const result = await systemContext.getBatchHashTesting(batchData.batchNumber); expect(result).to.equal(ethers.constants.HashZero); }); it("should revert not called by bootlader", async () => { - const batchData = await systemContext.getBatchNumberAndTimestamp(); - const batchHash = await systemContext.getBatchHash(batchData.batchNumber); + const batchData = await systemContext.getBatchNumberAndTimestampTesting(); + const batchHash = await systemContext.getBatchHashTesting(batchData.batchNumber); await expect( systemContext.setNewBatch(batchHash, batchData.batchTimestamp.add(1), batchData.batchNumber.add(1), 1) ).to.be.revertedWithCustomError(systemContext, "CallerMustBeBootloader"); }); it("should revert timestamp should be incremental", async () => { - const batchData = await systemContext.getBatchNumberAndTimestamp(); - const batchHash = await systemContext.getBatchHash(batchData.batchNumber); + const batchData = await systemContext.getBatchNumberAndTimestampTesting(); + const batchHash = await systemContext.getBatchHashTesting(batchData.batchNumber); await expect( systemContext .connect(bootloaderAccount) @@ -112,8 +112,8 @@ describe("SystemContext tests", () => { }); it("should revert wrong block number", async () => { - const batchData = await systemContext.getBatchNumberAndTimestamp(); - const batchHash = await systemContext.getBatchHash(batchData.batchNumber); + const batchData = await systemContext.getBatchNumberAndTimestampTesting(); + const batchHash = await systemContext.getBatchHashTesting(batchData.batchNumber); await expect( systemContext .connect(bootloaderAccount) @@ -122,16 +122,16 @@ describe("SystemContext tests", () => { }); it("should set new batch", async () => { - const batchData = await systemContext.getBatchNumberAndTimestamp(); - const batchHash = await systemContext.getBatchHash(batchData.batchNumber); + const batchData = await systemContext.getBatchNumberAndTimestampTesting(); + const batchHash = await systemContext.getBatchHashTesting(batchData.batchNumber); const newBatchHash = await ethers.utils.keccak256(ethers.utils.solidityPack(["uint32"], [2137])); await systemContext .connect(bootloaderAccount) .setNewBatch(newBatchHash, batchData.batchTimestamp.add(42), batchData.batchNumber.add(1), 2); - const batchDataAfter = await systemContext.getBatchNumberAndTimestamp(); + const batchDataAfter = await systemContext.getBatchNumberAndTimestampTesting(); expect(batchDataAfter.batchNumber).to.be.equal(batchData.batchNumber.add(1)); expect(batchDataAfter.batchTimestamp).to.be.equal(batchData.batchTimestamp.add(42)); - const prevBatchHashAfter = await systemContext.getBatchHash(batchData.batchNumber); + const prevBatchHashAfter = await systemContext.getBatchHashTesting(batchData.batchNumber); expect(prevBatchHashAfter).to.not.be.equal(batchHash); expect(prevBatchHashAfter).to.be.equal(newBatchHash); }); @@ -235,7 +235,7 @@ describe("SystemContext tests", () => { expect(blockHash).to.be.equal(ethers.constants.HashZero); // block < currentVirtualBlockUpgradeInfo.virtualBlockStartBatch const blockHash1 = await systemContext.getBlockHashEVM(0); - const batchHash = await systemContext.getBatchHash(0); + const batchHash = await systemContext.getBatchHashTesting(0); expect(blockHash1).to.be.equal(batchHash); }); @@ -381,7 +381,7 @@ describe("SystemContext tests", () => { // They should go after `setL2Block` section since tests from there rely on the fact that function `setL2Block` is not called before. describe("setNewBatch after setL2Block", async () => { it("should revert InconsistentNewBatchTimestamp", async () => { - const batchData = await systemContext.getBatchNumberAndTimestamp(); + const batchData = await systemContext.getBatchNumberAndTimestampTesting(); const blockData = await systemContext.getL2BlockNumberAndTimestamp(); const newBatchTimestamp = blockData.blockTimestamp.sub(1); @@ -395,7 +395,7 @@ describe("SystemContext tests", () => { }); it("should allow new batch timestamp to be the same as the timestamp of the previous L2 block", async () => { - const batchData = await systemContext.getBatchNumberAndTimestamp(); + const batchData = await systemContext.getBatchNumberAndTimestampTesting(); const blockData = await systemContext.getL2BlockNumberAndTimestamp(); const newBatchTimestamp = blockData.blockTimestamp; @@ -409,7 +409,7 @@ describe("SystemContext tests", () => { describe("publishTimestampDataToL1", async () => { it("should revert The current batch number must be greater than 0", async () => { - const batchData = await systemContext.getBatchNumberAndTimestamp(); + const batchData = await systemContext.getBatchNumberAndTimestampTesting(); const baseFee = await systemContext.baseFee(); await systemContext.connect(bootloaderAccount).unsafeOverrideBatch(batchData.batchTimestamp, 0, baseFee); await expect(systemContext.connect(bootloaderAccount).publishTimestampDataToL1()).to.be.revertedWithCustomError( diff --git a/l2-contracts/test/foundry/unit/data-availability/RollupL2DAValidator.t.sol b/system-contracts/test/foundry/L2DAValidator.t.sol similarity index 58% rename from l2-contracts/test/foundry/unit/data-availability/RollupL2DAValidator.t.sol rename to system-contracts/test/foundry/L2DAValidator.t.sol index c0bae2a2da..055930d146 100644 --- a/l2-contracts/test/foundry/unit/data-availability/RollupL2DAValidator.t.sol +++ b/system-contracts/test/foundry/L2DAValidator.t.sol @@ -2,31 +2,27 @@ pragma solidity ^0.8.20; -// solhint-disable gas-custom-errors - import {Test} from "forge-std/Test.sol"; import {TestStateDiffComposer} from "./TestStateDiffComposer.sol"; -import {RollupL2DAValidator} from "contracts/data-availability/RollupL2DAValidator.sol"; -import {STATE_DIFF_ENTRY_SIZE} from "contracts/data-availability/StateDiffL2DAValidator.sol"; -import {PubdataField, ReconstructionMismatch} from "contracts/data-availability/DAErrors.sol"; - -import {COMPRESSOR_CONTRACT, PUBDATA_CHUNK_PUBLISHER} from "contracts/L2ContractHelper.sol"; +import {L2DAValidatorTester} from "contracts/test-contracts/L2DAValidatorTester.sol"; -import {console2 as console} from "forge-std/Script.sol"; +import {COMPRESSOR_CONTRACT, L2DACommitmentScheme, PUBDATA_CHUNK_PUBLISHER, STATE_DIFF_ENTRY_SIZE} from "contracts/Constants.sol"; +import {InvalidDACommitmentScheme, PubdataField, ReconstructionMismatch} from "contracts/SystemContractErrors.sol"; -contract RollupL2DAValidatorTest is Test { - RollupL2DAValidator internal l2DAValidator; +contract L2DAValidatorTest is Test { + L2DAValidatorTester internal l2DAValidator; TestStateDiffComposer internal composer; function setUp() public { - l2DAValidator = new RollupL2DAValidator(); + l2DAValidator = new L2DAValidatorTester(); composer = new TestStateDiffComposer(); bytes memory emptyArray = new bytes(0); // Setting dummy state diffs, so it works fine. + // solhint-disable-next-line func-named-parameters composer.setDummyStateDiffs(1, 0, 64, emptyArray, 0, emptyArray); bytes memory verifyCompressedStateDiffsData = abi.encodeCall( @@ -42,7 +38,10 @@ contract RollupL2DAValidatorTest is Test { vm.mockCall(address(PUBDATA_CHUNK_PUBLISHER), chunkPubdataToBlobsData, new bytes(32)); } - function finalizeAndCall(bytes memory revertMessage) internal returns (bytes32) { + function finalizeAndCall( + L2DACommitmentScheme commitmentScheme, + bytes memory revertMessage + ) internal returns (bytes32) { bytes32 rollingMessagesHash = composer.correctRollingMessagesHash(); bytes32 rollingBytecodeHash = composer.correctRollingBytecodesHash(); bytes memory totalL2ToL1PubdataAndStateDiffs = composer.generateTotalStateDiffsAndPubdata(); @@ -52,8 +51,7 @@ contract RollupL2DAValidatorTest is Test { } return l2DAValidator.validatePubdata( - bytes32(0), - bytes32(0), + commitmentScheme, rollingMessagesHash, rollingBytecodeHash, totalL2ToL1PubdataAndStateDiffs @@ -69,7 +67,7 @@ contract RollupL2DAValidatorTest is Test { composer.correctRollingMessagesHash(), composer.currentRollingMessagesHash() ); - finalizeAndCall(revertMessage); + finalizeAndCall(L2DACommitmentScheme.BLOBS_AND_PUBDATA_KECCAK256, revertMessage); } function test_incorrectChainBytecodeHash() public { @@ -81,10 +79,11 @@ contract RollupL2DAValidatorTest is Test { composer.correctRollingBytecodesHash(), composer.currentRollingBytecodesHash() ); - finalizeAndCall(revertMessage); + finalizeAndCall(L2DACommitmentScheme.BLOBS_AND_PUBDATA_KECCAK256, revertMessage); } function test_incorrectStateDiffVersion() public { + // solhint-disable-next-line func-named-parameters composer.setDummyStateDiffs(2, 0, 64, new bytes(0), 0, new bytes(0)); bytes memory revertMessage = abi.encodeWithSelector( @@ -93,10 +92,11 @@ contract RollupL2DAValidatorTest is Test { bytes32(uint256(1)), bytes32(uint256(2)) ); - finalizeAndCall(revertMessage); + finalizeAndCall(L2DACommitmentScheme.BLOBS_AND_PUBDATA_KECCAK256, revertMessage); } function test_nonZeroLeftOver() public { + // solhint-disable-next-line func-named-parameters composer.setDummyStateDiffs(1, 0, 64, new bytes(0), 0, new bytes(32)); bytes memory revertMessage = abi.encodeWithSelector( @@ -105,7 +105,7 @@ contract RollupL2DAValidatorTest is Test { bytes32(0), bytes32(uint256(32)) ); - finalizeAndCall(revertMessage); + finalizeAndCall(L2DACommitmentScheme.BLOBS_AND_PUBDATA_KECCAK256, revertMessage); } function test_fullCorrectCompression() public { @@ -117,6 +117,7 @@ contract RollupL2DAValidatorTest is Test { bytes memory compressedStateDiffs = new bytes(12); bytes memory uncompressedStateDiffs = new bytes(STATE_DIFF_ENTRY_SIZE * numberOfStateDiffs); + // solhint-disable-next-line func-named-parameters composer.setDummyStateDiffs( 1, uint24(compressedStateDiffs.length), @@ -143,7 +144,7 @@ contract RollupL2DAValidatorTest is Test { ); vm.mockCall(address(PUBDATA_CHUNK_PUBLISHER), chunkPubdataToBlobsData, abi.encode(blobHashes)); - bytes32 operatorDAHash = finalizeAndCall(new bytes(0)); + bytes32 operatorDAHash = finalizeAndCall(L2DACommitmentScheme.BLOBS_AND_PUBDATA_KECCAK256, new bytes(0)); bytes32 expectedOperatorDAHash = keccak256( abi.encodePacked(stateDiffsHash, keccak256(totalPubdata), uint8(blobHashes.length), blobHashes) @@ -151,4 +152,53 @@ contract RollupL2DAValidatorTest is Test { assertEq(operatorDAHash, expectedOperatorDAHash); } + + function test_fullCorrectCompression_keccak_commitment() public { + composer.appendAMessage("message", true, true); + composer.appendBytecode(new bytes(32), true, true); + + uint256 numberOfStateDiffs = 1; + // Just some non-zero array, the structure does not matter here. + bytes memory compressedStateDiffs = new bytes(12); + bytes memory uncompressedStateDiffs = new bytes(STATE_DIFF_ENTRY_SIZE * numberOfStateDiffs); + + // solhint-disable-next-line func-named-parameters + composer.setDummyStateDiffs( + 1, + uint24(compressedStateDiffs.length), + 64, + compressedStateDiffs, + uint32(numberOfStateDiffs), + uncompressedStateDiffs + ); + + bytes32 stateDiffsHash = keccak256(uncompressedStateDiffs); + bytes memory verifyCompressedStateDiffsData = abi.encodeCall( + COMPRESSOR_CONTRACT.verifyCompressedStateDiffs, + (numberOfStateDiffs, 64, uncompressedStateDiffs, compressedStateDiffs) + ); + vm.mockCall(address(COMPRESSOR_CONTRACT), verifyCompressedStateDiffsData, abi.encodePacked(stateDiffsHash)); + + bytes32 operatorDAHash = finalizeAndCall(L2DACommitmentScheme.PUBDATA_KECCAK256, new bytes(0)); + + bytes memory totalPubdata = composer.getTotalPubdata(); + bytes32 expectedOperatorDAHash = keccak256(abi.encodePacked(stateDiffsHash, keccak256(totalPubdata))); + + assertEq(operatorDAHash, expectedOperatorDAHash); + } + + function test_callValidiumDAValidator() public { + bytes32 operatorDAHash = finalizeAndCall(L2DACommitmentScheme.EMPTY_NO_DA, new bytes(0)); + + assertEq(operatorDAHash, bytes32(0)); + } + + function test_invalidCommitmentScheme() public { + bytes memory revertMessage = abi.encodeWithSelector( + InvalidDACommitmentScheme.selector, + uint256(L2DACommitmentScheme.NONE) + ); + + finalizeAndCall(L2DACommitmentScheme.NONE, revertMessage); + } } diff --git a/l2-contracts/test/foundry/unit/data-availability/TestStateDiffComposer.sol b/system-contracts/test/foundry/TestStateDiffComposer.sol similarity index 80% rename from l2-contracts/test/foundry/unit/data-availability/TestStateDiffComposer.sol rename to system-contracts/test/foundry/TestStateDiffComposer.sol index 1806ed2555..aec3f0e057 100644 --- a/l2-contracts/test/foundry/unit/data-availability/TestStateDiffComposer.sol +++ b/system-contracts/test/foundry/TestStateDiffComposer.sol @@ -1,8 +1,9 @@ // SPDX-License-Identifier: MIT -import {L2_TO_L1_LOG_SERIALIZE_SIZE} from "contracts/data-availability/StateDiffL2DAValidator.sol"; +pragma solidity ^0.8.28; -import {L2ContractHelper} from "contracts/L2ContractHelper.sol"; +import {L2_TO_L1_LOG_SERIALIZE_SIZE} from "contracts/Constants.sol"; +import {Utils} from "contracts/libraries/Utils.sol"; /// @notice The contract that is used in testing to compose the pubdata needed for the /// state diff DA validator. @@ -46,17 +47,17 @@ contract TestStateDiffComposer { } } - function appendBytecode(bytes memory bytecode, bool includeToArray, bool includeToCorrectHash) public { + function appendBytecode(bytes calldata bytecode, bool includeToArray, bool includeToCorrectHash) public { if (includeToArray) { ++bytecodesNumber; bytecodes = bytes.concat(bytecodes, bytes4(uint32(bytecode.length)), bytecode); currentRollingBytecodesHash = keccak256( - abi.encode(currentRollingBytecodesHash, L2ContractHelper.hashL2Bytecode(bytecode)) + abi.encode(currentRollingBytecodesHash, Utils.hashL2Bytecode(bytecode)) ); } if (includeToCorrectHash) { correctRollingBytecodesHash = keccak256( - abi.encode(correctRollingBytecodesHash, L2ContractHelper.hashL2Bytecode(bytecode)) + abi.encode(correctRollingBytecodesHash, Utils.hashL2Bytecode(bytecode)) ); } } @@ -79,7 +80,8 @@ contract TestStateDiffComposer { uncomressedStateDiffsPart = abi.encodePacked(_numberOfStateDiffs, _stateDiffs); } - function getTotalPubdata() public returns (bytes memory _totalPubdata) { + function getTotalPubdata() public view returns (bytes memory _totalPubdata) { + // solhint-disable-next-line func-named-parameters _totalPubdata = abi.encodePacked( uint32(logsNumber), logs, @@ -91,7 +93,7 @@ contract TestStateDiffComposer { ); } - function generateTotalStateDiffsAndPubdata() public returns (bytes memory _totalL2ToL1PubdataAndStateDiffs) { + function generateTotalStateDiffsAndPubdata() public view returns (bytes memory _totalL2ToL1PubdataAndStateDiffs) { _totalL2ToL1PubdataAndStateDiffs = abi.encodePacked(getTotalPubdata(), uncomressedStateDiffsPart); } } diff --git a/tools/README.md b/tools/README.md index 2e6a056bd9..76c5a61231 100644 --- a/tools/README.md +++ b/tools/README.md @@ -1,24 +1,45 @@ # Tool for generating Plonk & Fflonk verifier contracts using json verification keys -`cargo run --bin zksync_verifier_contract_generator --release -- --plonk_input_path /path/to/plonk_scheduler_verification_key.json --fflonk_input_path /path/to/fflonk_scheduler_verification_key.json --plonk_output_path /path/to/VerifierPlonk.sol --fflonk_output_path /path/to/VerifierFflonk.sol` +## Usage -First, copy the keys into data directory: +The tool supports three variants for generating verifier contracts: + +### 1. Era Variant + +Automatically uses Era-prefixed key files and generates Era-prefixed output files: ```shell -cp ../../zksync-era/prover/data/keys/fflonk_verification_snark_key.json data/fflonk_scheduler_key.json -cp ../../zksync-era/prover/data/keys/verification_snark_key.json data/plonk_scheduler_key.json +cargo run --bin zksync_verifier_contract_generator --release -- --variant era ``` -To generate the verifier from the scheduler key in 'data' directory, just run: +This will: + +- Use input files: `data/Era_plonk_scheduler_key.json`, `data/Era_fflonk_scheduler_key.json` +- Generate outputs: `data/EraVerifierPlonk.sol`, `data/EraVerifierFflonk.sol` + +### 2. ZKsyncOS Variant + +Automatically uses ZKsyncOS-prefixed key files and generates ZKsyncOS-prefixed output files: ```shell -cargo run --bin zksync_verifier_contract_generator --release -- --plonk_input_path data/plonk_scheduler_key.json --fflonk_input_path data/fflonk_scheduler_key.json --plonk_output_path ../l1-contracts/contracts/state-transition/verifiers/L1VerifierPlonk.sol --fflonk_output_path ../l1-contracts/contracts/state-transition/verifiers/L1VerifierFflonk.sol +cargo run --bin zksync_verifier_contract_generator --release -- --variant zksync-os ``` -## L2 mode +This will: + +- Use input files: `data/ZKsyncOS_plonk_scheduler_key.json`, `data/ZKsyncOS_fflonk_scheduler_key.json` +- Generate outputs: `data/ZKsyncOSVerifierPlonk.sol`, `data/ZKsyncOSVerifierFflonk.sol` + +### 3. Custom Variant (Default) + +Allows specifying custom paths for both input and output files: + +```shell +cargo run --bin zksync_verifier_contract_generator --release -- --variant custom --plonk_input_path /path/to/plonk_scheduler_verification_key.json --fflonk_input_path /path/to/fflonk_scheduler_verification_key.json --plonk_output_path /path/to/VerifierPlonk.sol --fflonk_output_path /path/to/VerifierFflonk.sol +``` -At the time of this writing, `modexp` precompile is not present on zkSync Era. In order to deploy the verifier on top of a ZK Chain, a different version has to be used with custom implementation of modular exponentiation. +Omitting the `--variant` flag defaults to `custom` behavior: ```shell -cargo run --bin zksync_verifier_contract_generator --release -- --plonk_input_path data/plonk_scheduler_key.json --fflonk_input_path data/fflonk_scheduler_key.json --plonk_output_path ../l1-contracts/contracts/state-transition/verifiers/L2VerifierPlonk.sol --l2_mode --fflonk_output_path ../l1-contracts/contracts/state-transition/verifiers/L2VerifierFflonk.sol +cargo run --bin zksync_verifier_contract_generator --release -- --plonk_input_path data/plonk_scheduler_key.json --fflonk_input_path data/fflonk_scheduler_key.json --plonk_output_path ../l1-contracts/contracts/state-transition/verifiers/VerifierPlonk.sol --fflonk_output_path ../l1-contracts/contracts/state-transition/verifiers/VerifierFflonk.sol ``` diff --git a/tools/data/fflonk_scheduler_key.json b/tools/data/Era_fflonk_scheduler_key.json similarity index 100% rename from tools/data/fflonk_scheduler_key.json rename to tools/data/Era_fflonk_scheduler_key.json diff --git a/tools/data/plonk_scheduler_key.json b/tools/data/Era_plonk_scheduler_key.json similarity index 100% rename from tools/data/plonk_scheduler_key.json rename to tools/data/Era_plonk_scheduler_key.json diff --git a/tools/data/ZKsyncOS_fflonk_scheduler_key.json b/tools/data/ZKsyncOS_fflonk_scheduler_key.json new file mode 100644 index 0000000000..b2a29a1efa --- /dev/null +++ b/tools/data/ZKsyncOS_fflonk_scheduler_key.json @@ -0,0 +1,100 @@ +{ + "n": 8388607, + "c0": { + "x": [ + 9878536302458040129, + 7072944109966006247, + 5735025731440953759, + 1745957900286229622 + ], + "y": [ + 8109620634627525174, + 12271611730423466405, + 18183968510115880526, + 616284296044257947 + ], + "infinity": false + }, + "num_inputs": 1, + "num_state_polys": 3, + "num_witness_polys": 0, + "total_lookup_entries_length": 0, + "non_residues": [ + [ + 5, + 0, + 0, + 0 + ], + [ + 7, + 0, + 0, + 0 + ] + ], + "g2_elements": [ + { + "x": { + "c0": [ + 5106727233969649389, + 7440829307424791261, + 4785637993704342649, + 1729627375292849782 + ], + "c1": [ + 10945020018377822914, + 17413811393473931026, + 8241798111626485029, + 1841571559660931130 + ] + }, + "y": { + "c0": [ + 5541340697920699818, + 16416156555105522555, + 5380518976772849807, + 1353435754470862315 + ], + "c1": [ + 6173549831154472795, + 13567992399387660019, + 17050234209342075797, + 650358724130500725 + ] + }, + "infinity": false + }, + { + "x": { + "c0": [ + 9089143573911733168, + 11482283522806384523, + 13585589533905622862, + 79029415676722370 + ], + "c1": [ + 5692040832573735873, + 16884514497384809355, + 16717166481813659368, + 2742131088506155463 + ] + }, + "y": { + "c0": [ + 9604638503594647125, + 1289961608472612514, + 6217038149984805214, + 2521661352385209130 + ], + "c1": [ + 17168069778630926308, + 11309277837895768996, + 15154989611154567813, + 359271377050603491 + ] + }, + "infinity": false + } + ] +} \ No newline at end of file diff --git a/tools/data/ZKsyncOS_plonk_scheduler_key.json b/tools/data/ZKsyncOS_plonk_scheduler_key.json new file mode 100644 index 0000000000..fdf2eb6d81 --- /dev/null +++ b/tools/data/ZKsyncOS_plonk_scheduler_key.json @@ -0,0 +1,399 @@ +{ + "n": 16777215, + "num_inputs": 1, + "state_width": 4, + "num_witness_polys": 0, + "gate_setup_commitments": [ + { + "x": [ + 16820525042981043912, + 15505099949242093620, + 9695269054476226642, + 2422129643081140976 + ], + "y": [ + 65590269518816703, + 8961297680345101187, + 1442336725632485514, + 3046905946044812071 + ], + "infinity": false + }, + { + "x": [ + 10190127436395050645, + 10006052029296770243, + 8241014800142352151, + 1147759817010683146 + ], + "y": [ + 13177252048287174819, + 16905544806625222741, + 11786523221926133798, + 3418347286415573422 + ], + "infinity": false + }, + { + "x": [ + 2136298160199286171, + 3469367960547874444, + 693895847051669048, + 498997307839465676 + ], + "y": [ + 8808826904730520432, + 8064798286516104113, + 45067800940923418, + 3449409978597296913 + ], + "infinity": false + }, + { + "x": [ + 17139484479057464623, + 5931303905342198332, + 9739903308826530192, + 3005994977744063980 + ], + "y": [ + 17633365380574104702, + 7797017762926624982, + 2822927960035768008, + 3235144621302212096 + ], + "infinity": false + }, + { + "x": [ + 1388037131015816673, + 10421086062283732757, + 13546621064601825120, + 908619623355442816 + ], + "y": [ + 4091243931537159737, + 18149330390424114448, + 11217575976302514083, + 1928367709009899082 + ], + "infinity": false + }, + { + "x": [ + 8463347725055815720, + 8447434869648962560, + 16176356342464043154, + 328236316937245911 + ], + "y": [ + 17801779650121802033, + 5449934453899238678, + 16509606078153705678, + 1415117220521443604 + ], + "infinity": false + }, + { + "x": [ + 16071726243015634856, + 16897225729091904220, + 17739742296886998226, + 827025098404664587 + ], + "y": [ + 14020620550404463254, + 17357417630117113477, + 6971352657662071866, + 1865053147859291016 + ], + "infinity": false + }, + { + "x": [ + 438095030529526572, + 15369727954797781021, + 1782218696210886332, + 1945531733704292080 + ], + "y": [ + 15392905753098447322, + 15030755557172843917, + 4103649516263107617, + 1847170590908793861 + ], + "infinity": false + } + ], + "gate_selectors_commitments": [ + { + "x": [ + 11716800003736957271, + 11479415174261304835, + 7886816636243072617, + 872297746236591054 + ], + "y": [ + 7180854384508316722, + 2530176597657609055, + 10404950392726907580, + 3228271347054196557 + ], + "infinity": false + }, + { + "x": [ + 529934427901563851, + 7943541403969592476, + 10166528506154114535, + 2933180011708176027 + ], + "y": [ + 9173882661622775607, + 7600296545685450495, + 8905347659516213892, + 2809872948083323481 + ], + "infinity": false + } + ], + "permutation_commitments": [ + { + "x": [ + 11225007974736308668, + 12266240793048397174, + 10730239459110286230, + 3033370722701415539 + ], + "y": [ + 869539689735774811, + 4276485432372020985, + 3660086592123771711, + 1481595872750804532 + ], + "infinity": false + }, + { + "x": [ + 16482370271727952786, + 10018661453845674914, + 15895723195575161772, + 1979925170868828408 + ], + "y": [ + 17212436523822136888, + 11763207540852079148, + 18260797016573345696, + 183449595374654301 + ], + "infinity": false + }, + { + "x": [ + 17968824913069920369, + 11124271478764152035, + 141099125071970030, + 2812925712352867693 + ], + "y": [ + 4347936761357110592, + 8588469254114661223, + 1620355654564840528, + 72120521060461034 + ], + "infinity": false + }, + { + "x": [ + 5223289965230063877, + 17852110061347243918, + 13650097524870206791, + 321814388327272029 + ], + "y": [ + 16255789416520826708, + 15669288639547018034, + 9171259620826615427, + 2267784145659252761 + ], + "infinity": false + } + ], + "total_lookup_entries_length": 2169740, + "lookup_selector_commitment": { + "x": [ + 11615275443767937304, + 7576876171484194196, + 10360860836786245039, + 646850041460845172 + ], + "y": [ + 3280282818865371261, + 16870600009380887146, + 10408678897091826727, + 2739092340137637016 + ], + "infinity": false + }, + "lookup_tables_commitments": [ + { + "x": [ + 10873859091125335643, + 3906092213625635374, + 17046157606087980048, + 3193402705223440293 + ], + "y": [ + 10158946293873382504, + 2171386304067884865, + 6918663094168980658, + 350601565475975409 + ], + "infinity": false + }, + { + "x": [ + 12822112641313049260, + 3646552465186399021, + 10324071010773924047, + 2209084192380614662 + ], + "y": [ + 11045141628975531869, + 12589678537679955590, + 3065046617868727674, + 2099447669854151830 + ], + "infinity": false + }, + { + "x": [ + 11395032673621937545, + 3000063650268118516, + 7857619430005721792, + 805706808484810738 + ], + "y": [ + 6817063666434679427, + 1646386051225388537, + 4677946977082722827, + 1369650305976868514 + ], + "infinity": false + }, + { + "x": [ + 2885179371868476351, + 159944842081142878, + 6092294387055034894, + 213843603626505240 + ], + "y": [ + 11868113133779277990, + 8509646480531194854, + 14088068011597639414, + 707070630614027545 + ], + "infinity": false + } + ], + "lookup_table_type_commitment": { + "x": [ + 12624523264459618712, + 6802324399396396570, + 11085681463704737728, + 1365397205340387728 + ], + "y": [ + 4124193833163401394, + 345287265117315530, + 3567116663563214937, + 40030386651885774 + ], + "infinity": false + }, + "non_residues": [ + [ + 5, + 0, + 0, + 0 + ], + [ + 7, + 0, + 0, + 0 + ], + [ + 10, + 0, + 0, + 0 + ] + ], + "g2_elements": [ + { + "x": { + "c0": [ + 5106727233969649389, + 7440829307424791261, + 4785637993704342649, + 1729627375292849782 + ], + "c1": [ + 10945020018377822914, + 17413811393473931026, + 8241798111626485029, + 1841571559660931130 + ] + }, + "y": { + "c0": [ + 5541340697920699818, + 16416156555105522555, + 5380518976772849807, + 1353435754470862315 + ], + "c1": [ + 6173549831154472795, + 13567992399387660019, + 17050234209342075797, + 650358724130500725 + ] + }, + "infinity": false + }, + { + "x": { + "c0": [ + 9089143573911733168, + 11482283522806384523, + 13585589533905622862, + 79029415676722370 + ], + "c1": [ + 5692040832573735873, + 16884514497384809355, + 16717166481813659368, + 2742131088506155463 + ] + }, + "y": { + "c0": [ + 9604638503594647125, + 1289961608472612514, + 6217038149984805214, + 2521661352385209130 + ], + "c1": [ + 17168069778630926308, + 11309277837895768996, + 15154989611154567813, + 359271377050603491 + ] + }, + "infinity": false + } + ] +} \ No newline at end of file diff --git a/tools/data/fflonk_verifier_contract_template.txt b/tools/data/fflonk_verifier_contract_template.txt index b2b1e3dbf2..19b6db1b69 100644 --- a/tools/data/fflonk_verifier_contract_template.txt +++ b/tools/data/fflonk_verifier_contract_template.txt @@ -11,7 +11,7 @@ import {IVerifierV2} from "../chain-interfaces/IVerifierV2.sol"; /// * Fflonk Paper: https://eprint.iacr.org/2021/1167 /// @dev Contract was generated from a verification key with a hash of 0x{{vk_hash}} /// @custom:security-contact security@matterlabs.dev -contract VerifierFflonk is IVerifierV2 { +contract {{contract_name}}VerifierFflonk is IVerifierV2 { // ================Constants================ uint32 internal constant DST_0 = 0; uint32 internal constant DST_1 = 1; diff --git a/tools/data/plonk_verifier_contract_template.txt b/tools/data/plonk_verifier_contract_template.txt index 024fbcae91..54da1a5df5 100644 --- a/tools/data/plonk_verifier_contract_template.txt +++ b/tools/data/plonk_verifier_contract_template.txt @@ -18,7 +18,7 @@ import {IVerifier} from "../chain-interfaces/IVerifier.sol"; /// * Plonk for ZKsync v1.1: https://github.com/matter-labs/solidity_plonk_verifier/raw/recursive/bellman_vk_codegen_recursive/RecursivePlonkUnrolledForEthereum.pdf /// The notation used in the code is the same as in the papers. /* solhint-enable max-line-length */ -contract VerifierPlonk is IVerifier { +contract {{contract_name}}VerifierPlonk is IVerifier { /*////////////////////////////////////////////////////////////// Verification keys //////////////////////////////////////////////////////////////*/ diff --git a/tools/src/fflonk.rs b/tools/src/fflonk.rs index 6e612e9b03..e3ba87f610 100644 --- a/tools/src/fflonk.rs +++ b/tools/src/fflonk.rs @@ -37,19 +37,19 @@ pub fn insert_residue_elements_and_commitments( template: &str, vk: &HashMap, vk_hash: &str, - l2_mode: bool, + contract_name: &str, ) -> Result> { let reg = Handlebars::new(); let residue_g2_elements = generate_residue_g2_elements(vk); let commitments = generate_commitments(vk); - let modexp_function = get_modexp_function(l2_mode); + let modexp_function = get_modexp_function(); let verifier_contract_template = template.replace("{{modexp_function}}", &modexp_function); Ok(reg.render_template( &verifier_contract_template, &json!({"residue_g2_elements": residue_g2_elements, "c0": commitments, - "vk_hash": vk_hash}), + "vk_hash": vk_hash, "contract_name": contract_name}), )?) } diff --git a/tools/src/main.rs b/tools/src/main.rs index dd7b50e8ef..bfd5368f6d 100644 --- a/tools/src/main.rs +++ b/tools/src/main.rs @@ -18,6 +18,27 @@ use fflonk::insert_residue_elements_and_commitments as fflonk_insert_residue_ele use plonk::insert_residue_elements_and_commitments as plonk_insert_residue_elements_and_commitments; use serde_json::{from_reader, Value}; use structopt::StructOpt; +use std::str::FromStr; + +#[derive(Debug, Clone)] +enum Variant { + Era, + ZKsyncOS, + Custom, +} + +impl FromStr for Variant { + type Err = String; + + fn from_str(s: &str) -> Result { + match s.to_lowercase().as_str() { + "era" => Ok(Variant::Era), + "zksync-os" | "zksyncos" => Ok(Variant::ZKsyncOS), + "custom" => Ok(Variant::Custom), + _ => Err(format!("Invalid variant '{}'. Valid options: era, zksync-os, custom", s)), + } + } +} #[derive(Debug, StructOpt)] #[structopt( @@ -25,6 +46,10 @@ use structopt::StructOpt; about = "Tool for generating verifier contract using scheduler json key" )] struct Opt { + /// Variant to use: era, zksync-os, or custom + #[structopt(long = "variant", default_value = "custom")] + variant: Variant, + /// Input path to scheduler verification key file. #[structopt( long = "plonk_input_path", @@ -47,16 +72,47 @@ struct Opt { #[structopt(long = "plonk_output_path", default_value = "data/VerifierPlonk.sol")] plonk_output_path: String, - /// The Verifier is to be compiled for an L2 network, where modexp precompile is not available. - #[structopt(short = "l2", long = "l2_mode")] - l2_mode: bool, +} + +fn resolve_paths(opt: &Opt) -> (String, String, String, String) { + match opt.variant { + Variant::Era => ( + "data/Era_plonk_scheduler_key.json".to_string(), + "data/Era_fflonk_scheduler_key.json".to_string(), + "data/EraVerifierPlonk.sol".to_string(), + "data/EraVerifierFflonk.sol".to_string(), + ), + Variant::ZKsyncOS => ( + "data/ZKsyncOS_plonk_scheduler_key.json".to_string(), + "data/ZKsyncOS_fflonk_scheduler_key.json".to_string(), + "data/ZKsyncOSVerifierPlonk.sol".to_string(), + "data/ZKsyncOSVerifierFflonk.sol".to_string(), + ), + Variant::Custom => ( + opt.plonk_input_path.clone(), + opt.fflonk_input_path.clone(), + opt.plonk_output_path.clone(), + opt.fflonk_output_path.clone(), + ), + } +} + +fn resolve_contract_name(variant: &Variant) -> String { + match variant { + Variant::Era => "Era".to_string(), + Variant::ZKsyncOS => "ZKsyncOS".to_string(), + Variant::Custom => "".to_string(), + } } fn main() -> Result<(), Box> { let opt = Opt::from_args(); - let plonk_reader = BufReader::new(File::open(&opt.plonk_input_path)?); - let fflonk_reader = BufReader::new(File::open(&opt.fflonk_input_path)?); + let (plonk_input_path, fflonk_input_path, plonk_output_path, fflonk_output_path) = resolve_paths(&opt); + let contract_name = resolve_contract_name(&opt.variant); + + let plonk_reader = BufReader::new(File::open(&plonk_input_path)?); + let fflonk_reader = BufReader::new(File::open(&fflonk_input_path)?); let plonk_vk: HashMap = from_reader(plonk_reader)?; let fflonk_vk: HashMap = from_reader(fflonk_reader)?; @@ -66,27 +122,11 @@ fn main() -> Result<(), Box> { let fflonk_verifier_contract_template = fs::read_to_string("data/fflonk_verifier_contract_template.txt")?; - let plonk_verifier_contract_template = if opt.l2_mode { - plonk_verifier_contract_template - .replace("contract VerifierPlonk", "contract L2VerifierPlonk") - } else { - plonk_verifier_contract_template - .replace("contract VerifierPlonk", "contract L1VerifierPlonk") - }; - - let fflonk_verifier_contract_template = if opt.l2_mode { - fflonk_verifier_contract_template - .replace("contract VerifierFflonk", "contract L2VerifierFflonk") - } else { - fflonk_verifier_contract_template - .replace("contract VerifierFflonk", "contract L1VerifierFflonk") - }; - - let plonk_verification_key = fs::read_to_string(&opt.plonk_input_path) - .unwrap_or_else(|_| panic!("Unable to read from {}", &opt.plonk_input_path)); + let plonk_verification_key = fs::read_to_string(&plonk_input_path) + .unwrap_or_else(|_| panic!("Unable to read from {}", &plonk_input_path)); - let fflonk_verification_key = fs::read_to_string(&opt.fflonk_input_path) - .unwrap_or_else(|_| panic!("Unable to read from {}", &opt.fflonk_input_path)); + let fflonk_verification_key = fs::read_to_string(&fflonk_input_path) + .unwrap_or_else(|_| panic!("Unable to read from {}", &fflonk_input_path)); let plonk_verification_key: VerificationKey = serde_json::from_str(&plonk_verification_key).unwrap(); @@ -104,20 +144,20 @@ fn main() -> Result<(), Box> { &plonk_verifier_contract_template, &plonk_vk, &plonk_vk_hash, - opt.l2_mode, + &contract_name, )?; let fflonk_verifier_contract_template = fflonk_insert_residue_elements_and_commitments( &fflonk_verifier_contract_template, &fflonk_vk, &fflonk_vk_hash, - opt.l2_mode, + &contract_name, )?; - let mut plonk_file = File::create(opt.plonk_output_path)?; + let mut plonk_file = File::create(plonk_output_path)?; plonk_file.write_all(plonk_verifier_contract_template.as_bytes())?; - let mut fflonk_file = File::create(opt.fflonk_output_path)?; + let mut fflonk_file = File::create(fflonk_output_path)?; fflonk_file.write_all(fflonk_verifier_contract_template.as_bytes())?; Ok(()) diff --git a/tools/src/plonk.rs b/tools/src/plonk.rs index 212f7d4755..962b1305c9 100644 --- a/tools/src/plonk.rs +++ b/tools/src/plonk.rs @@ -76,7 +76,7 @@ pub fn insert_residue_elements_and_commitments( template: &str, vk: &HashMap, vk_hash: &str, - l2_mode: bool, + contract_name: &str, ) -> Result> { let reg = Handlebars::new(); let residue_g2_elements = generate_residue_g2_elements(vk); @@ -85,7 +85,7 @@ pub fn insert_residue_elements_and_commitments( let verifier_contract_template = template.replace("{{residue_g2_elements}}", &residue_g2_elements); - let modexp_function = get_modexp_function(l2_mode); + let modexp_function = get_modexp_function(); let verifier_contract_template = verifier_contract_template.replace("{{modexp_function}}", &modexp_function); @@ -93,7 +93,8 @@ pub fn insert_residue_elements_and_commitments( &verifier_contract_template, &json!({"residue_g2_elements": residue_g2_elements, "commitments": commitments, - "vk_hash": vk_hash}), + "vk_hash": vk_hash, + "contract_name": contract_name}), )?) } diff --git a/tools/src/utils.rs b/tools/src/utils.rs index f94a621fea..9b321b3459 100644 --- a/tools/src/utils.rs +++ b/tools/src/utils.rs @@ -36,25 +36,8 @@ pub fn create_hash_map( hash_map } -pub fn get_modexp_function(l2_mode: bool) -> String { - if l2_mode { - r#"function modexp(value, power) -> res { - res := 1 - for { - - } gt(power, 0) { - - } { - if mod(power, 2) { - res := mulmod(res, value, R_MOD) - } - value := mulmod(value, value, R_MOD) - power := shr(1, power) - } - }"# - .to_string() - } else { - r#"function modexp(value, power) -> res { +pub fn get_modexp_function() -> String { + r#"function modexp(value, power) -> res { mstore(0x00, 0x20) mstore(0x20, 0x20) mstore(0x40, 0x20) @@ -66,6 +49,5 @@ pub fn get_modexp_function(l2_mode: bool) -> String { } res := mload(0x00) }"# - .to_string() - } + .to_string() } diff --git a/yarn.lock b/yarn.lock index 8f227e2b23..f1373bf1bc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4,7 +4,7 @@ "@babel/code-frame@^7.0.0": version "7.24.2" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.24.2.tgz#718b4b19841809a58b29b68cde80bc5e1aa6d9ae" + resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.2.tgz" integrity sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ== dependencies: "@babel/highlight" "^7.24.2" @@ -12,12 +12,12 @@ "@babel/helper-validator-identifier@^7.22.20": version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz#75b889cfaf9e35c2aaf42cf0d72c8e91719251db" + resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz" integrity sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w== "@babel/highlight@^7.24.2": version "7.24.2" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.24.2.tgz#3f539503efc83d3c59080a10e6634306e0370d26" + resolved "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.2.tgz" integrity sha512-Yac1ao4flkTxTteCDZLEvdxg2fZfz1v8M4QpaGypq/WPDqg3ijHYbDfs+LG5hvzSoqaSZ9/Z9lKSP3CjZjv+pA== dependencies: "@babel/helper-validator-identifier" "^7.22.20" @@ -27,17 +27,17 @@ "@balena/dockerignore@^1.0.2": version "1.0.2" - resolved "https://registry.yarnpkg.com/@balena/dockerignore/-/dockerignore-1.0.2.tgz#9ffe4726915251e8eb69f44ef3547e0da2c03e0d" + resolved "https://registry.npmjs.org/@balena/dockerignore/-/dockerignore-1.0.2.tgz" integrity sha512-wMue2Sy4GAVTk6Ic4tJVcnfdau+gx2EnG7S+uAEe+TWJFqE4YoWN4/H8MSLj4eYJKxGg26lZwboEniNiNwZQ6Q== "@blakek/curry@^2.0.2": version "2.0.2" - resolved "https://registry.yarnpkg.com/@blakek/curry/-/curry-2.0.2.tgz#979e927bcf5fa0426d2af681d7131df5791d1cd4" + resolved "https://registry.npmjs.org/@blakek/curry/-/curry-2.0.2.tgz" integrity sha512-B/KkDnZqm9Y92LwETU80BaxbQ61bYTR2GaAY41mKisaICwBoC8lcuw7lwQLl52InMhviCTJBO39GJOA8d+BrVw== "@blakek/deep@^2.2.0": version "2.2.0" - resolved "https://registry.yarnpkg.com/@blakek/deep/-/deep-2.2.0.tgz#eb97488e4a0943df4da09ad50efba4a98789f5e5" + resolved "https://registry.npmjs.org/@blakek/deep/-/deep-2.2.0.tgz" integrity sha512-aRq/qF1yrlhCWNk2tI4epXNpo+cA8/MrxsR5oIkpKKNYtYOQKjAxRMbgnhASPx+b328MkDN+T706yFKJg8VZkQ== dependencies: "@blakek/curry" "^2.0.2" @@ -45,31 +45,31 @@ "@colors/colors@1.5.0": version "1.5.0" - resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9" + resolved "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz" integrity sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ== "@cspotcode/source-map-support@^0.8.0": version "0.8.1" - resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1" + resolved "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz" integrity sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw== dependencies: "@jridgewell/trace-mapping" "0.3.9" "@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0": version "4.4.0" - resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" + resolved "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz" integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA== dependencies: eslint-visitor-keys "^3.3.0" "@eslint-community/regexpp@^4.5.1", "@eslint-community/regexpp@^4.6.1": version "4.10.0" - resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.10.0.tgz#548f6de556857c8bb73bbee70c35dc82a2e74d63" + resolved "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz" integrity sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA== "@eslint/eslintrc@^2.1.4": version "2.1.4" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.4.tgz#388a269f0f25c1b6adc317b5a2c55714894c70ad" + resolved "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz" integrity sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ== dependencies: ajv "^6.12.4" @@ -84,12 +84,12 @@ "@eslint/js@8.57.0": version "8.57.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.57.0.tgz#a5417ae8427873f1dd08b70b3574b453e67b5f7f" + resolved "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz" integrity sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g== "@ethereum-waffle/chai@4.0.10": version "4.0.10" - resolved "https://registry.yarnpkg.com/@ethereum-waffle/chai/-/chai-4.0.10.tgz#6f600a40b6fdaed331eba42b8625ff23f3a0e59a" + resolved "https://registry.npmjs.org/@ethereum-waffle/chai/-/chai-4.0.10.tgz" integrity sha512-X5RepE7Dn8KQLFO7HHAAe+KeGaX/by14hn90wePGBhzL54tq4Y8JscZFu+/LCwCl6TnkAAy5ebiMoqJ37sFtWw== dependencies: "@ethereum-waffle/provider" "4.0.5" @@ -98,7 +98,7 @@ "@ethereum-waffle/compiler@4.0.3": version "4.0.3" - resolved "https://registry.yarnpkg.com/@ethereum-waffle/compiler/-/compiler-4.0.3.tgz#069e2df24b879b8a7b78857bad6f8bf6ebc8a5b1" + resolved "https://registry.npmjs.org/@ethereum-waffle/compiler/-/compiler-4.0.3.tgz" integrity sha512-5x5U52tSvEVJS6dpCeXXKvRKyf8GICDwiTwUvGD3/WD+DpvgvaoHOL82XqpTSUHgV3bBq6ma5/8gKUJUIAnJCw== dependencies: "@resolver-engine/imports" "^0.3.3" @@ -111,17 +111,17 @@ "@ethereum-waffle/ens@4.0.3": version "4.0.3" - resolved "https://registry.yarnpkg.com/@ethereum-waffle/ens/-/ens-4.0.3.tgz#4a46ac926414f3c83b4e8cc2562c8e2aee06377a" + resolved "https://registry.npmjs.org/@ethereum-waffle/ens/-/ens-4.0.3.tgz" integrity sha512-PVLcdnTbaTfCrfSOrvtlA9Fih73EeDvFS28JQnT5M5P4JMplqmchhcZB1yg/fCtx4cvgHlZXa0+rOCAk2Jk0Jw== "@ethereum-waffle/mock-contract@4.0.4": version "4.0.4" - resolved "https://registry.yarnpkg.com/@ethereum-waffle/mock-contract/-/mock-contract-4.0.4.tgz#f13fea29922d87a4d2e7c4fc8fe72ea04d2c13de" + resolved "https://registry.npmjs.org/@ethereum-waffle/mock-contract/-/mock-contract-4.0.4.tgz" integrity sha512-LwEj5SIuEe9/gnrXgtqIkWbk2g15imM/qcJcxpLyAkOj981tQxXmtV4XmQMZsdedEsZ/D/rbUAOtZbgwqgUwQA== "@ethereum-waffle/provider@4.0.5": version "4.0.5" - resolved "https://registry.yarnpkg.com/@ethereum-waffle/provider/-/provider-4.0.5.tgz#8a65dbf0263f4162c9209608205dee1c960e716b" + resolved "https://registry.npmjs.org/@ethereum-waffle/provider/-/provider-4.0.5.tgz" integrity sha512-40uzfyzcrPh+Gbdzv89JJTMBlZwzya1YLDyim8mVbEqYLP5VRYWoGp0JMyaizgV3hMoUFRqJKVmIUw4v7r3hYw== dependencies: "@ethereum-waffle/ens" "4.0.3" @@ -131,7 +131,7 @@ "@ethereumjs/block@^3.5.0", "@ethereumjs/block@^3.6.0", "@ethereumjs/block@^3.6.2": version "3.6.3" - resolved "https://registry.yarnpkg.com/@ethereumjs/block/-/block-3.6.3.tgz#d96cbd7af38b92ebb3424223dbf773f5ccd27f84" + resolved "https://registry.npmjs.org/@ethereumjs/block/-/block-3.6.3.tgz" integrity sha512-CegDeryc2DVKnDkg5COQrE0bJfw/p0v3GBk2W5/Dj5dOVfEmb50Ux0GLnSPypooLnfqjwFaorGuT9FokWB3GRg== dependencies: "@ethereumjs/common" "^2.6.5" @@ -141,7 +141,7 @@ "@ethereumjs/blockchain@^5.5.0": version "5.5.3" - resolved "https://registry.yarnpkg.com/@ethereumjs/blockchain/-/blockchain-5.5.3.tgz#aa49a6a04789da6b66b5bcbb0d0b98efc369f640" + resolved "https://registry.npmjs.org/@ethereumjs/blockchain/-/blockchain-5.5.3.tgz" integrity sha512-bi0wuNJ1gw4ByNCV56H0Z4Q7D+SxUbwyG12Wxzbvqc89PXLRNR20LBcSUZRKpN0+YCPo6m0XZL/JLio3B52LTw== dependencies: "@ethereumjs/block" "^3.6.2" @@ -155,7 +155,7 @@ "@ethereumjs/common@2.6.0": version "2.6.0" - resolved "https://registry.yarnpkg.com/@ethereumjs/common/-/common-2.6.0.tgz#feb96fb154da41ee2cc2c5df667621a440f36348" + resolved "https://registry.npmjs.org/@ethereumjs/common/-/common-2.6.0.tgz" integrity sha512-Cq2qS0FTu6O2VU1sgg+WyU9Ps0M6j/BEMHN+hRaECXCV/r0aI78u4N6p52QW/BDVhwWZpCdrvG8X7NJdzlpNUA== dependencies: crc-32 "^1.2.0" @@ -163,7 +163,7 @@ "@ethereumjs/common@^2.6.0", "@ethereumjs/common@^2.6.4", "@ethereumjs/common@^2.6.5": version "2.6.5" - resolved "https://registry.yarnpkg.com/@ethereumjs/common/-/common-2.6.5.tgz#0a75a22a046272579d91919cb12d84f2756e8d30" + resolved "https://registry.npmjs.org/@ethereumjs/common/-/common-2.6.5.tgz" integrity sha512-lRyVQOeCDaIVtgfbowla32pzeDv2Obr8oR8Put5RdUBNRGr1VGPGQNGP6elWIpgK3YdpzqTOh4GyUGOureVeeA== dependencies: crc-32 "^1.2.0" @@ -171,7 +171,7 @@ "@ethereumjs/ethash@^1.1.0": version "1.1.0" - resolved "https://registry.yarnpkg.com/@ethereumjs/ethash/-/ethash-1.1.0.tgz#7c5918ffcaa9cb9c1dc7d12f77ef038c11fb83fb" + resolved "https://registry.npmjs.org/@ethereumjs/ethash/-/ethash-1.1.0.tgz" integrity sha512-/U7UOKW6BzpA+Vt+kISAoeDie1vAvY4Zy2KF5JJb+So7+1yKmJeJEHOGSnQIj330e9Zyl3L5Nae6VZyh2TJnAA== dependencies: "@ethereumjs/block" "^3.5.0" @@ -182,12 +182,12 @@ "@ethereumjs/rlp@^4.0.1": version "4.0.1" - resolved "https://registry.yarnpkg.com/@ethereumjs/rlp/-/rlp-4.0.1.tgz#626fabfd9081baab3d0a3074b0c7ecaf674aaa41" + resolved "https://registry.npmjs.org/@ethereumjs/rlp/-/rlp-4.0.1.tgz" integrity sha512-tqsQiBQDQdmPWE1xkkBq4rlSW5QZpLOUJ5RJh2/9fug+q9tnUhuZoVLk7s0scUIKTOzEtR72DFBXI4WiZcMpvw== "@ethereumjs/tx@3.4.0": version "3.4.0" - resolved "https://registry.yarnpkg.com/@ethereumjs/tx/-/tx-3.4.0.tgz#7eb1947eefa55eb9cf05b3ca116fb7a3dbd0bce7" + resolved "https://registry.npmjs.org/@ethereumjs/tx/-/tx-3.4.0.tgz" integrity sha512-WWUwg1PdjHKZZxPPo274ZuPsJCWV3SqATrEKQP1n2DrVYVP1aZIYpo/mFaA0BDoE0tIQmBeimRCEA0Lgil+yYw== dependencies: "@ethereumjs/common" "^2.6.0" @@ -195,7 +195,7 @@ "@ethereumjs/tx@^3.4.0", "@ethereumjs/tx@^3.5.2": version "3.5.2" - resolved "https://registry.yarnpkg.com/@ethereumjs/tx/-/tx-3.5.2.tgz#197b9b6299582ad84f9527ca961466fce2296c1c" + resolved "https://registry.npmjs.org/@ethereumjs/tx/-/tx-3.5.2.tgz" integrity sha512-gQDNJWKrSDGu2w7w0PzVXVBNMzb7wwdDOmOqczmhNjqFxFuIbhVJDwiGEnxFNC2/b8ifcZzY7MLcluizohRzNw== dependencies: "@ethereumjs/common" "^2.6.4" @@ -203,7 +203,7 @@ "@ethereumjs/util@^8.1.0": version "8.1.0" - resolved "https://registry.yarnpkg.com/@ethereumjs/util/-/util-8.1.0.tgz#299df97fb6b034e0577ce9f94c7d9d1004409ed4" + resolved "https://registry.npmjs.org/@ethereumjs/util/-/util-8.1.0.tgz" integrity sha512-zQ0IqbdX8FZ9aw11vP+dZkKDkS+kgIvQPHnSAXzP9pLu+Rfu3D3XEeLbicvoXJTYnhZiPmsZUxgdzXwNKxRPbA== dependencies: "@ethereumjs/rlp" "^4.0.1" @@ -212,7 +212,7 @@ "@ethereumjs/vm@5.6.0": version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethereumjs/vm/-/vm-5.6.0.tgz#e0ca62af07de820143674c30b776b86c1983a464" + resolved "https://registry.npmjs.org/@ethereumjs/vm/-/vm-5.6.0.tgz" integrity sha512-J2m/OgjjiGdWF2P9bj/4LnZQ1zRoZhY8mRNVw/N3tXliGI8ai1sI1mlDPkLpeUUM4vq54gH6n0ZlSpz8U/qlYQ== dependencies: "@ethereumjs/block" "^3.6.0" @@ -230,7 +230,7 @@ "@ethersproject/abi@5.7.0", "@ethersproject/abi@^5.0.9", "@ethersproject/abi@^5.1.2", "@ethersproject/abi@^5.7.0": version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.7.0.tgz#b3f3e045bbbeed1af3947335c247ad625a44e449" + resolved "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.7.0.tgz" integrity sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA== dependencies: "@ethersproject/address" "^5.7.0" @@ -245,7 +245,7 @@ "@ethersproject/abstract-provider@5.7.0", "@ethersproject/abstract-provider@^5.7.0": version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.7.0.tgz#b0a8550f88b6bf9d51f90e4795d48294630cb9ef" + resolved "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.7.0.tgz" integrity sha512-R41c9UkchKCpAqStMYUpdunjo3pkEvZC3FAwZn5S5MGbXoMQOHIdHItezTETxAO5bevtMApSyEhn9+CHcDsWBw== dependencies: "@ethersproject/bignumber" "^5.7.0" @@ -258,7 +258,7 @@ "@ethersproject/abstract-signer@5.7.0", "@ethersproject/abstract-signer@^5.7.0": version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.7.0.tgz#13f4f32117868452191a4649723cb086d2b596b2" + resolved "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.7.0.tgz" integrity sha512-a16V8bq1/Cz+TGCkE2OPMTOUDLS3grCpdjoJCYNnVBbdYEMSgKrU0+B90s8b6H+ByYTBZN7a3g76jdIJi7UfKQ== dependencies: "@ethersproject/abstract-provider" "^5.7.0" @@ -269,7 +269,7 @@ "@ethersproject/address@5.7.0", "@ethersproject/address@^5.0.2", "@ethersproject/address@^5.7.0": version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.7.0.tgz#19b56c4d74a3b0a46bfdbb6cfcc0a153fc697f37" + resolved "https://registry.npmjs.org/@ethersproject/address/-/address-5.7.0.tgz" integrity sha512-9wYhYt7aghVGo758POM5nqcOMaE168Q6aRLJZwUmiqSrAungkG74gSSeKEIR7ukixesdRZGPgVqme6vmxs1fkA== dependencies: "@ethersproject/bignumber" "^5.7.0" @@ -280,14 +280,14 @@ "@ethersproject/base64@5.7.0", "@ethersproject/base64@^5.7.0": version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.7.0.tgz#ac4ee92aa36c1628173e221d0d01f53692059e1c" + resolved "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.7.0.tgz" integrity sha512-Dr8tcHt2mEbsZr/mwTPIQAf3Ai0Bks/7gTw9dSqk1mQvhW3XvRlmDJr/4n+wg1JmCl16NZue17CDh8xb/vZ0sQ== dependencies: "@ethersproject/bytes" "^5.7.0" "@ethersproject/basex@5.7.0", "@ethersproject/basex@^5.7.0": version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/basex/-/basex-5.7.0.tgz#97034dc7e8938a8ca943ab20f8a5e492ece4020b" + resolved "https://registry.npmjs.org/@ethersproject/basex/-/basex-5.7.0.tgz" integrity sha512-ywlh43GwZLv2Voc2gQVTKBoVQ1mti3d8HK5aMxsfu/nRDnMmNqaSJ3r3n85HBByT8OpoY96SXM1FogC533T4zw== dependencies: "@ethersproject/bytes" "^5.7.0" @@ -295,7 +295,7 @@ "@ethersproject/bignumber@5.7.0", "@ethersproject/bignumber@^5.7.0": version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.7.0.tgz#e2f03837f268ba655ffba03a57853e18a18dc9c2" + resolved "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.7.0.tgz" integrity sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw== dependencies: "@ethersproject/bytes" "^5.7.0" @@ -304,21 +304,21 @@ "@ethersproject/bytes@5.7.0", "@ethersproject/bytes@^5.7.0": version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.7.0.tgz#a00f6ea8d7e7534d6d87f47188af1148d71f155d" + resolved "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.7.0.tgz" integrity sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A== dependencies: "@ethersproject/logger" "^5.7.0" "@ethersproject/constants@5.7.0", "@ethersproject/constants@^5.7.0": version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.7.0.tgz#df80a9705a7e08984161f09014ea012d1c75295e" + resolved "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.7.0.tgz" integrity sha512-DHI+y5dBNvkpYUMiRQyxRBYBefZkJfo70VUkUAsRjcPs47muV9evftfZ0PJVCXYbAiCgght0DtcF9srFQmIgWA== dependencies: "@ethersproject/bignumber" "^5.7.0" "@ethersproject/contracts@5.7.0": version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.7.0.tgz#c305e775abd07e48aa590e1a877ed5c316f8bd1e" + resolved "https://registry.npmjs.org/@ethersproject/contracts/-/contracts-5.7.0.tgz" integrity sha512-5GJbzEU3X+d33CdfPhcyS+z8MzsTrBGk/sc+G+59+tPa9yFkl6HQ9D6L0QMgNTA9q8dT0XKxxkyp883XsQvbbg== dependencies: "@ethersproject/abi" "^5.7.0" @@ -334,7 +334,7 @@ "@ethersproject/hash@5.7.0", "@ethersproject/hash@^5.7.0": version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.7.0.tgz#eb7aca84a588508369562e16e514b539ba5240a7" + resolved "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.7.0.tgz" integrity sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g== dependencies: "@ethersproject/abstract-signer" "^5.7.0" @@ -349,7 +349,7 @@ "@ethersproject/hdnode@5.7.0", "@ethersproject/hdnode@^5.7.0": version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/hdnode/-/hdnode-5.7.0.tgz#e627ddc6b466bc77aebf1a6b9e47405ca5aef9cf" + resolved "https://registry.npmjs.org/@ethersproject/hdnode/-/hdnode-5.7.0.tgz" integrity sha512-OmyYo9EENBPPf4ERhR7oj6uAtUAhYGqOnIS+jE5pTXvdKBS99ikzq1E7Iv0ZQZ5V36Lqx1qZLeak0Ra16qpeOg== dependencies: "@ethersproject/abstract-signer" "^5.7.0" @@ -367,7 +367,7 @@ "@ethersproject/json-wallets@5.7.0", "@ethersproject/json-wallets@^5.7.0": version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/json-wallets/-/json-wallets-5.7.0.tgz#5e3355287b548c32b368d91014919ebebddd5360" + resolved "https://registry.npmjs.org/@ethersproject/json-wallets/-/json-wallets-5.7.0.tgz" integrity sha512-8oee5Xgu6+RKgJTkvEMl2wDgSPSAQ9MB/3JYjFV9jlKvcYHUXZC+cQp0njgmxdHkYWn8s6/IqIZYm0YWCjO/0g== dependencies: "@ethersproject/abstract-signer" "^5.7.0" @@ -386,7 +386,7 @@ "@ethersproject/keccak256@5.7.0", "@ethersproject/keccak256@^5.7.0": version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.7.0.tgz#3186350c6e1cd6aba7940384ec7d6d9db01f335a" + resolved "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.7.0.tgz" integrity sha512-2UcPboeL/iW+pSg6vZ6ydF8tCnv3Iu/8tUmLLzWWGzxWKFFqOBQFLo6uLUv6BDrLgCDfN28RJ/wtByx+jZ4KBg== dependencies: "@ethersproject/bytes" "^5.7.0" @@ -394,19 +394,19 @@ "@ethersproject/logger@5.7.0", "@ethersproject/logger@^5.7.0": version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.7.0.tgz#6ce9ae168e74fecf287be17062b590852c311892" + resolved "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.7.0.tgz" integrity sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig== "@ethersproject/networks@5.7.1", "@ethersproject/networks@^5.7.0": version "5.7.1" - resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.7.1.tgz#118e1a981d757d45ccea6bb58d9fd3d9db14ead6" + resolved "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.7.1.tgz" integrity sha512-n/MufjFYv3yFcUyfhnXotyDlNdFb7onmkSy8aQERi2PjNcnWQ66xXxa3XlS8nCcA8aJKJjIIMNJTC7tu80GwpQ== dependencies: "@ethersproject/logger" "^5.7.0" "@ethersproject/pbkdf2@5.7.0", "@ethersproject/pbkdf2@^5.7.0": version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/pbkdf2/-/pbkdf2-5.7.0.tgz#d2267d0a1f6e123f3771007338c47cccd83d3102" + resolved "https://registry.npmjs.org/@ethersproject/pbkdf2/-/pbkdf2-5.7.0.tgz" integrity sha512-oR/dBRZR6GTyaofd86DehG72hY6NpAjhabkhxgr3X2FpJtJuodEl2auADWBZfhDHgVCbu3/H/Ocq2uC6dpNjjw== dependencies: "@ethersproject/bytes" "^5.7.0" @@ -414,14 +414,14 @@ "@ethersproject/properties@5.7.0", "@ethersproject/properties@^5.7.0": version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.7.0.tgz#a6e12cb0439b878aaf470f1902a176033067ed30" + resolved "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.7.0.tgz" integrity sha512-J87jy8suntrAkIZtecpxEPxY//szqr1mlBaYlQ0r4RCaiD2hjheqF9s1LVE8vVuJCXisjIP+JgtK/Do54ej4Sw== dependencies: "@ethersproject/logger" "^5.7.0" "@ethersproject/providers@5.7.2": version "5.7.2" - resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.7.2.tgz#f8b1a4f275d7ce58cf0a2eec222269a08beb18cb" + resolved "https://registry.npmjs.org/@ethersproject/providers/-/providers-5.7.2.tgz" integrity sha512-g34EWZ1WWAVgr4aptGlVBF8mhl3VWjv+8hoAnzStu8Ah22VHBsuGzP17eb6xDVRzw895G4W7vvx60lFFur/1Rg== dependencies: "@ethersproject/abstract-provider" "^5.7.0" @@ -447,7 +447,7 @@ "@ethersproject/random@5.7.0", "@ethersproject/random@^5.7.0": version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/random/-/random-5.7.0.tgz#af19dcbc2484aae078bb03656ec05df66253280c" + resolved "https://registry.npmjs.org/@ethersproject/random/-/random-5.7.0.tgz" integrity sha512-19WjScqRA8IIeWclFme75VMXSBvi4e6InrUNuaR4s5pTF2qNhcGdCUwdxUVGtDDqC00sDLCO93jPQoDUH4HVmQ== dependencies: "@ethersproject/bytes" "^5.7.0" @@ -455,7 +455,7 @@ "@ethersproject/rlp@5.7.0", "@ethersproject/rlp@^5.7.0": version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.7.0.tgz#de39e4d5918b9d74d46de93af80b7685a9c21304" + resolved "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.7.0.tgz" integrity sha512-rBxzX2vK8mVF7b0Tol44t5Tb8gomOHkj5guL+HhzQ1yBh/ydjGnpw6at+X6Iw0Kp3OzzzkcKp8N9r0W4kYSs9w== dependencies: "@ethersproject/bytes" "^5.7.0" @@ -463,7 +463,7 @@ "@ethersproject/sha2@5.7.0", "@ethersproject/sha2@^5.7.0": version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/sha2/-/sha2-5.7.0.tgz#9a5f7a7824ef784f7f7680984e593a800480c9fb" + resolved "https://registry.npmjs.org/@ethersproject/sha2/-/sha2-5.7.0.tgz" integrity sha512-gKlH42riwb3KYp0reLsFTokByAKoJdgFCwI+CCiX/k+Jm2mbNs6oOaCjYQSlI1+XBVejwH2KrmCbMAT/GnRDQw== dependencies: "@ethersproject/bytes" "^5.7.0" @@ -472,7 +472,7 @@ "@ethersproject/signing-key@5.7.0", "@ethersproject/signing-key@^5.7.0": version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.7.0.tgz#06b2df39411b00bc57c7c09b01d1e41cf1b16ab3" + resolved "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.7.0.tgz" integrity sha512-MZdy2nL3wO0u7gkB4nA/pEf8lu1TlFswPNmy8AiYkfKTdO6eXBJyUdmHO/ehm/htHw9K/qF8ujnTyUAD+Ry54Q== dependencies: "@ethersproject/bytes" "^5.7.0" @@ -484,7 +484,7 @@ "@ethersproject/solidity@5.7.0": version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/solidity/-/solidity-5.7.0.tgz#5e9c911d8a2acce2a5ebb48a5e2e0af20b631cb8" + resolved "https://registry.npmjs.org/@ethersproject/solidity/-/solidity-5.7.0.tgz" integrity sha512-HmabMd2Dt/raavyaGukF4XxizWKhKQ24DoLtdNbBmNKUOPqwjsKQSdV9GQtj9CBEea9DlzETlVER1gYeXXBGaA== dependencies: "@ethersproject/bignumber" "^5.7.0" @@ -496,7 +496,7 @@ "@ethersproject/strings@5.7.0", "@ethersproject/strings@^5.7.0": version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.7.0.tgz#54c9d2a7c57ae8f1205c88a9d3a56471e14d5ed2" + resolved "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.7.0.tgz" integrity sha512-/9nu+lj0YswRNSH0NXYqrh8775XNyEdUQAuf3f+SmOrnVewcJ5SBNAjF7lpgehKi4abvNNXyf+HX86czCdJ8Mg== dependencies: "@ethersproject/bytes" "^5.7.0" @@ -505,7 +505,7 @@ "@ethersproject/transactions@5.7.0", "@ethersproject/transactions@^5.7.0": version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.7.0.tgz#91318fc24063e057885a6af13fdb703e1f993d3b" + resolved "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.7.0.tgz" integrity sha512-kmcNicCp1lp8qanMTC3RIikGgoJ80ztTyvtsFvCYpSCfkjhD0jZ2LOrnbcuxuToLIUYYf+4XwD1rP+B/erDIhQ== dependencies: "@ethersproject/address" "^5.7.0" @@ -520,7 +520,7 @@ "@ethersproject/units@5.7.0": version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/units/-/units-5.7.0.tgz#637b563d7e14f42deeee39245275d477aae1d8b1" + resolved "https://registry.npmjs.org/@ethersproject/units/-/units-5.7.0.tgz" integrity sha512-pD3xLMy3SJu9kG5xDGI7+xhTEmGXlEqXU4OfNapmfnxLVY4EMSSRp7j1k7eezutBPH7RBN/7QPnwR7hzNlEFeg== dependencies: "@ethersproject/bignumber" "^5.7.0" @@ -529,7 +529,7 @@ "@ethersproject/wallet@5.7.0": version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/wallet/-/wallet-5.7.0.tgz#4e5d0790d96fe21d61d38fb40324e6c7ef350b2d" + resolved "https://registry.npmjs.org/@ethersproject/wallet/-/wallet-5.7.0.tgz" integrity sha512-MhmXlJXEJFBFVKrDLB4ZdDzxcBxQ3rLyCkhNqVu3CDYvR97E+8r01UgrI+TI99Le+aYm/in/0vp86guJuM7FCA== dependencies: "@ethersproject/abstract-provider" "^5.7.0" @@ -550,7 +550,7 @@ "@ethersproject/web@5.7.1", "@ethersproject/web@^5.7.0": version "5.7.1" - resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.7.1.tgz#de1f285b373149bee5928f4eb7bcb87ee5fbb4ae" + resolved "https://registry.npmjs.org/@ethersproject/web/-/web-5.7.1.tgz" integrity sha512-Gueu8lSvyjBWL4cYsWsjh6MtMwM0+H4HvqFPZfB6dV8ctbP9zFAO73VG1cMWae0FLPCtz0peKPpZY8/ugJJX2w== dependencies: "@ethersproject/base64" "^5.7.0" @@ -561,7 +561,7 @@ "@ethersproject/wordlists@5.7.0", "@ethersproject/wordlists@^5.7.0": version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/wordlists/-/wordlists-5.7.0.tgz#8fb2c07185d68c3e09eb3bfd6e779ba2774627f5" + resolved "https://registry.npmjs.org/@ethersproject/wordlists/-/wordlists-5.7.0.tgz" integrity sha512-S2TFNJNfHWVHNE6cNDjbVlZ6MgE17MIxMbMg2zv3wn+3XSJGosL1m9ZVv3GXCf/2ymSsQ+hRI5IzoMJTG6aoVA== dependencies: "@ethersproject/bytes" "^5.7.0" @@ -572,19 +572,19 @@ "@fastify/busboy@^2.0.0": version "2.1.1" - resolved "https://registry.yarnpkg.com/@fastify/busboy/-/busboy-2.1.1.tgz#b9da6a878a371829a0502c9b6c1c143ef6663f4d" + resolved "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz" integrity sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA== "@ganache/ethereum-address@0.1.4": version "0.1.4" - resolved "https://registry.yarnpkg.com/@ganache/ethereum-address/-/ethereum-address-0.1.4.tgz#0e6d66f4a24f64bf687cb3ff7358fb85b9d9005e" + resolved "https://registry.npmjs.org/@ganache/ethereum-address/-/ethereum-address-0.1.4.tgz" integrity sha512-sTkU0M9z2nZUzDeHRzzGlW724xhMLXo2LeX1hixbnjHWY1Zg1hkqORywVfl+g5uOO8ht8T0v+34IxNxAhmWlbw== dependencies: "@ganache/utils" "0.1.4" "@ganache/ethereum-options@0.1.4": version "0.1.4" - resolved "https://registry.yarnpkg.com/@ganache/ethereum-options/-/ethereum-options-0.1.4.tgz#6a559abb44225e2b8741a8f78a19a46714a71cd6" + resolved "https://registry.npmjs.org/@ganache/ethereum-options/-/ethereum-options-0.1.4.tgz" integrity sha512-i4l46taoK2yC41FPkcoDlEVoqHS52wcbHPqJtYETRWqpOaoj9hAg/EJIHLb1t6Nhva2CdTO84bG+qlzlTxjAHw== dependencies: "@ganache/ethereum-address" "0.1.4" @@ -596,7 +596,7 @@ "@ganache/ethereum-utils@0.1.4": version "0.1.4" - resolved "https://registry.yarnpkg.com/@ganache/ethereum-utils/-/ethereum-utils-0.1.4.tgz#fae4b5b9e642e751ff1fa0cd7316c92996317257" + resolved "https://registry.npmjs.org/@ganache/ethereum-utils/-/ethereum-utils-0.1.4.tgz" integrity sha512-FKXF3zcdDrIoCqovJmHLKZLrJ43234Em2sde/3urUT/10gSgnwlpFmrv2LUMAmSbX3lgZhW/aSs8krGhDevDAg== dependencies: "@ethereumjs/common" "2.6.0" @@ -611,7 +611,7 @@ "@ganache/options@0.1.4": version "0.1.4" - resolved "https://registry.yarnpkg.com/@ganache/options/-/options-0.1.4.tgz#325b07e6de85094667aaaaf3d653e32404a04b78" + resolved "https://registry.npmjs.org/@ganache/options/-/options-0.1.4.tgz" integrity sha512-zAe/craqNuPz512XQY33MOAG6Si1Xp0hCvfzkBfj2qkuPcbJCq6W/eQ5MB6SbXHrICsHrZOaelyqjuhSEmjXRw== dependencies: "@ganache/utils" "0.1.4" @@ -620,7 +620,7 @@ "@ganache/rlp@0.1.4": version "0.1.4" - resolved "https://registry.yarnpkg.com/@ganache/rlp/-/rlp-0.1.4.tgz#f4043afda83e1a14a4f80607b103daf166a9b374" + resolved "https://registry.npmjs.org/@ganache/rlp/-/rlp-0.1.4.tgz" integrity sha512-Do3D1H6JmhikB+6rHviGqkrNywou/liVeFiKIpOBLynIpvZhRCgn3SEDxyy/JovcaozTo/BynHumfs5R085MFQ== dependencies: "@ganache/utils" "0.1.4" @@ -628,7 +628,7 @@ "@ganache/utils@0.1.4": version "0.1.4" - resolved "https://registry.yarnpkg.com/@ganache/utils/-/utils-0.1.4.tgz#25d60d7689e3dda6a8a7ad70e3646f07c2c39a1f" + resolved "https://registry.npmjs.org/@ganache/utils/-/utils-0.1.4.tgz" integrity sha512-oatUueU3XuXbUbUlkyxeLLH3LzFZ4y5aSkNbx6tjSIhVTPeh+AuBKYt4eQ73FFcTB3nj/gZoslgAh5CN7O369w== dependencies: emittery "0.10.0" @@ -639,7 +639,7 @@ "@humanwhocodes/config-array@^0.11.14": version "0.11.14" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.14.tgz#d78e481a039f7566ecc9660b4ea7fe6b1fec442b" + resolved "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz" integrity sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg== dependencies: "@humanwhocodes/object-schema" "^2.0.2" @@ -648,27 +648,27 @@ "@humanwhocodes/module-importer@^1.0.1": version "1.0.1" - resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" + resolved "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz" integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== "@humanwhocodes/object-schema@^2.0.2": version "2.0.3" - resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz#4a2868d75d6d6963e423bcf90b7fd1be343409d3" + resolved "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz" integrity sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA== "@jridgewell/resolve-uri@^3.0.3": version "3.1.2" - resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6" + resolved "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz" integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== "@jridgewell/sourcemap-codec@^1.4.10": version "1.4.15" - resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" + resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz" integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== "@jridgewell/trace-mapping@0.3.9": version "0.3.9" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9" + resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz" integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ== dependencies: "@jridgewell/resolve-uri" "^3.0.3" @@ -676,12 +676,12 @@ "@matterlabs/eslint-config-typescript@^1.1.2": version "1.1.2" - resolved "https://registry.yarnpkg.com/@matterlabs/eslint-config-typescript/-/eslint-config-typescript-1.1.2.tgz#a9be4e56aedf298800f247c5049fc412f8b301a7" + resolved "https://registry.npmjs.org/@matterlabs/eslint-config-typescript/-/eslint-config-typescript-1.1.2.tgz" integrity sha512-AhiWJQr+MSE3RVfgp5XwGoMK7kNSKh6a18+T7hkNJtyycP0306I6IGmuFA5ZVbcakGb+K32fQWzepSkrNCTAGg== "@matterlabs/hardhat-zksync-chai-matchers@^0.2.0": version "0.2.1" - resolved "https://registry.yarnpkg.com/@matterlabs/hardhat-zksync-chai-matchers/-/hardhat-zksync-chai-matchers-0.2.1.tgz#d05136d6cf9a53c30f5e7ee9bae95abb72c1000d" + resolved "https://registry.npmjs.org/@matterlabs/hardhat-zksync-chai-matchers/-/hardhat-zksync-chai-matchers-0.2.1.tgz" integrity sha512-LXm5r53DLTQC/KXRXzSRmVp5mEJ4tsoKAKyGck2YLHQ9CBdPoC0paVjbyB2MaEuK/k8o4lZu4uaYKgWQNUXeyQ== dependencies: "@ethersproject/abi" "^5.1.2" @@ -696,7 +696,7 @@ "@matterlabs/hardhat-zksync-deploy@^0.6.5": version "0.6.6" - resolved "https://registry.yarnpkg.com/@matterlabs/hardhat-zksync-deploy/-/hardhat-zksync-deploy-0.6.6.tgz#5c86cf7da859844167d62300528c3e6013ee0286" + resolved "https://registry.npmjs.org/@matterlabs/hardhat-zksync-deploy/-/hardhat-zksync-deploy-0.6.6.tgz" integrity sha512-QpkxK2wnyQCgaTVLdFATpfiySfr7073yPre9eq5LfKA8VxXWD4WZAuBMq700GL5UyfW9yyHkCdkSzaGigmZ4/Q== dependencies: "@matterlabs/hardhat-zksync-solc" "0.4.2" @@ -705,7 +705,7 @@ "@matterlabs/hardhat-zksync-deploy@^0.7.0": version "0.7.0" - resolved "https://registry.yarnpkg.com/@matterlabs/hardhat-zksync-deploy/-/hardhat-zksync-deploy-0.7.0.tgz#e56b73d8f8fbd0f809a779d0028418ea7d914017" + resolved "https://registry.npmjs.org/@matterlabs/hardhat-zksync-deploy/-/hardhat-zksync-deploy-0.7.0.tgz" integrity sha512-PGZcuhKsVzZ2IWPt931pK2gA+HDxnCtye+7CwvoOnM6diHeO9tB1QHFX/ywR9ErOW9wpezhPYkVDx9myFrdoqQ== dependencies: "@matterlabs/hardhat-zksync-solc" "^1.0.5" @@ -714,7 +714,7 @@ "@matterlabs/hardhat-zksync-node@^0.0.1-beta.7": version "0.0.1" - resolved "https://registry.yarnpkg.com/@matterlabs/hardhat-zksync-node/-/hardhat-zksync-node-0.0.1.tgz#d44bda3c0069b149e2a67c9697eb81166b169ea6" + resolved "https://registry.npmjs.org/@matterlabs/hardhat-zksync-node/-/hardhat-zksync-node-0.0.1.tgz" integrity sha512-rMabl+I813lzXINqTq5OvujQ30wsfO9mTLMPDXuYzEEhEzvnXlaVxuqynKBXrgXAxjmr+G79rqvcWgeKygtwBA== dependencies: "@matterlabs/hardhat-zksync-solc" "^1.0.5" @@ -724,7 +724,7 @@ "@matterlabs/hardhat-zksync-node@^1.2.0": version "1.2.0" - resolved "https://registry.yarnpkg.com/@matterlabs/hardhat-zksync-node/-/hardhat-zksync-node-1.2.0.tgz#800b24d33ca3a35c92afdc75d1ab05a6a957b15f" + resolved "https://registry.npmjs.org/@matterlabs/hardhat-zksync-node/-/hardhat-zksync-node-1.2.0.tgz" integrity sha512-cTL8FrsolQEJMn2K25Nj/78rydRs/YiQyUu3Q1Rn5axrtVWXWATUP4z7hE5qH2lWk3VZcC9GYFrewP5c1Q+A9Q== dependencies: "@matterlabs/hardhat-zksync-solc" "^1.2.5" @@ -741,7 +741,7 @@ "@matterlabs/hardhat-zksync-solc@0.4.2": version "0.4.2" - resolved "https://registry.yarnpkg.com/@matterlabs/hardhat-zksync-solc/-/hardhat-zksync-solc-0.4.2.tgz#64121082e88c5ab22eb4e9594d120e504f6af499" + resolved "https://registry.npmjs.org/@matterlabs/hardhat-zksync-solc/-/hardhat-zksync-solc-0.4.2.tgz" integrity sha512-6NFWPSZiOAoo7wNuhMg4ztj7mMEH+tLrx09WuCbcURrHPijj/KxYNsJD6Uw5lapKr7G8H7SQISGid1/MTXVmXQ== dependencies: "@nomiclabs/hardhat-docker" "^2.0.0" @@ -753,7 +753,7 @@ "@matterlabs/hardhat-zksync-solc@1.0.6": version "1.0.6" - resolved "https://registry.yarnpkg.com/@matterlabs/hardhat-zksync-solc/-/hardhat-zksync-solc-1.0.6.tgz#7ef8438e6bb15244691600e2afa77aaff7dff9f0" + resolved "https://registry.npmjs.org/@matterlabs/hardhat-zksync-solc/-/hardhat-zksync-solc-1.0.6.tgz" integrity sha512-0icYSufXba/Bbb7v2iXuZJ+IbYsiNpR4Wy6UizHnGuFw3OMHgh+saebQphuaN9yyRL2UPGZbPkQFHWBLZj5/xQ== dependencies: "@nomiclabs/hardhat-docker" "^2.0.0" @@ -765,7 +765,7 @@ "@matterlabs/hardhat-zksync-solc@^0.3.15": version "0.3.17" - resolved "https://registry.yarnpkg.com/@matterlabs/hardhat-zksync-solc/-/hardhat-zksync-solc-0.3.17.tgz#72f199544dc89b268d7bfc06d022a311042752fd" + resolved "https://registry.npmjs.org/@matterlabs/hardhat-zksync-solc/-/hardhat-zksync-solc-0.3.17.tgz" integrity sha512-aZgQ0yfXW5xPkfuEH1d44ncWV4T2LzKZd0VVPo4PL5cUrYs2/II1FaEDp5zsf3FxOR1xT3mBsjuSrtJkk4AL8Q== dependencies: "@nomiclabs/hardhat-docker" "^2.0.0" @@ -774,7 +774,7 @@ "@matterlabs/hardhat-zksync-solc@^1.0.5", "@matterlabs/hardhat-zksync-solc@^1.1.4": version "1.1.4" - resolved "https://registry.yarnpkg.com/@matterlabs/hardhat-zksync-solc/-/hardhat-zksync-solc-1.1.4.tgz#04a2fad6fb6b6944c64ad969080ee65b9af3f617" + resolved "https://registry.npmjs.org/@matterlabs/hardhat-zksync-solc/-/hardhat-zksync-solc-1.1.4.tgz" integrity sha512-4/usbogh9neewR2/v8Dn2OzqVblZMUuT/iH2MyPZgPRZYQlL4SlZtMvokU9UQjZT6iSoaKCbbdWESHDHSzfUjA== dependencies: "@nomiclabs/hardhat-docker" "^2.0.0" @@ -791,7 +791,7 @@ "@matterlabs/hardhat-zksync-solc@^1.2.5": version "1.2.5" - resolved "https://registry.yarnpkg.com/@matterlabs/hardhat-zksync-solc/-/hardhat-zksync-solc-1.2.5.tgz#fbeeabc3fea0dd232fa3c8cb31bd93c103eba11a" + resolved "https://registry.npmjs.org/@matterlabs/hardhat-zksync-solc/-/hardhat-zksync-solc-1.2.5.tgz" integrity sha512-iZyznWl1Hoe/Z46hnUe1s2drBZBjJOS/eN+Ql2lIBX9B6NevBl9DYzkKzH5HEIMCLGnX9sWpRAJqUQJWy9UB6w== dependencies: "@nomiclabs/hardhat-docker" "^2.0.2" @@ -808,7 +808,7 @@ "@matterlabs/hardhat-zksync-verify@0.6.1": version "0.6.1" - resolved "https://registry.yarnpkg.com/@matterlabs/hardhat-zksync-verify/-/hardhat-zksync-verify-0.6.1.tgz#3fd83f4177ac0b138656ed93d4756ec27f1d329d" + resolved "https://registry.npmjs.org/@matterlabs/hardhat-zksync-verify/-/hardhat-zksync-verify-0.6.1.tgz" integrity sha512-W9gI4k1UnuQ2MaBnK1f7E8Z2C4uHxpeDkzmB/ZCKClai2A3vK2jAbfqiQbX0HvuLq2OOq4dbx83KehAXjXoHlw== dependencies: "@ethersproject/abi" "^5.1.2" @@ -828,7 +828,7 @@ "@matterlabs/hardhat-zksync-verify@^0.4.0": version "0.4.0" - resolved "https://registry.yarnpkg.com/@matterlabs/hardhat-zksync-verify/-/hardhat-zksync-verify-0.4.0.tgz#f812c19950022fc36728f3796f6bdae5633e2fcd" + resolved "https://registry.npmjs.org/@matterlabs/hardhat-zksync-verify/-/hardhat-zksync-verify-0.4.0.tgz" integrity sha512-GPZmAumFl3ZMPKbECX7Qw8CriwZKWd1DlCRhoG/6YYc6mFy4+MXkF1XsHLMs5r34N+GDOfbVZVMeftIlJC96Kg== dependencies: "@matterlabs/hardhat-zksync-solc" "^1.0.5" @@ -840,7 +840,7 @@ "@matterlabs/hardhat-zksync-verify@^1.4.3": version "1.4.3" - resolved "https://registry.yarnpkg.com/@matterlabs/hardhat-zksync-verify/-/hardhat-zksync-verify-1.4.3.tgz#fc36d2ea385eab553ce0b3c3fbc9e216c607873f" + resolved "https://registry.npmjs.org/@matterlabs/hardhat-zksync-verify/-/hardhat-zksync-verify-1.4.3.tgz" integrity sha512-TONID/+mG8KngZ9iI8yiOgC8VD+cus7M+ejCjF4bGNzsmmzsklGJwzry6bQpk8BXqzsMgbuV+4KjDT4JXiS/QA== dependencies: "@ethersproject/abi" "^5.1.2" @@ -859,17 +859,17 @@ "@matterlabs/prettier-config@^1.0.3": version "1.0.3" - resolved "https://registry.yarnpkg.com/@matterlabs/prettier-config/-/prettier-config-1.0.3.tgz#3e2eb559c0112bbe9671895f935700dad2a15d38" + resolved "https://registry.npmjs.org/@matterlabs/prettier-config/-/prettier-config-1.0.3.tgz" integrity sha512-JW7nHREPqEtjBWz3EfxLarkmJBD8vi7Kx/1AQ6eBZnz12eHc1VkOyrc6mpR5ogTf0dOUNXFAfZut+cDe2dn4kQ== "@matterlabs/zksync-contracts@^0.6.1": version "0.6.1" - resolved "https://registry.yarnpkg.com/@matterlabs/zksync-contracts/-/zksync-contracts-0.6.1.tgz#39f061959d5890fd0043a2f1ae710f764b172230" + resolved "https://registry.npmjs.org/@matterlabs/zksync-contracts/-/zksync-contracts-0.6.1.tgz" integrity sha512-+hucLw4DhGmTmQlXOTEtpboYCaOm/X2VJcWmnW4abNcOgQXEHX+mTxQrxEfPjIZT0ZE6z5FTUrOK9+RgUZwBMQ== "@metamask/eth-sig-util@^4.0.0": version "4.0.1" - resolved "https://registry.yarnpkg.com/@metamask/eth-sig-util/-/eth-sig-util-4.0.1.tgz#3ad61f6ea9ad73ba5b19db780d40d9aae5157088" + resolved "https://registry.npmjs.org/@metamask/eth-sig-util/-/eth-sig-util-4.0.1.tgz" integrity sha512-tghyZKLHZjcdlDqCA3gNZmLeR0XvOE9U1qoQO9ohyAZT6Pya+H9vkBPcsyXytmYLNgVoin7CKCmweo/R43V+tQ== dependencies: ethereumjs-abi "^0.6.8" @@ -880,34 +880,34 @@ "@noble/curves@1.3.0", "@noble/curves@~1.3.0": version "1.3.0" - resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.3.0.tgz#01be46da4fd195822dab821e72f71bf4aeec635e" + resolved "https://registry.npmjs.org/@noble/curves/-/curves-1.3.0.tgz" integrity sha512-t01iSXPuN+Eqzb4eBX0S5oubSqXbK/xXa1Ne18Hj8f9pStxztHCE2gfboSp/dZRLSqfuLpRK2nDXDK+W9puocA== dependencies: "@noble/hashes" "1.3.3" "@noble/hashes@1.2.0", "@noble/hashes@~1.2.0": version "1.2.0" - resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.2.0.tgz#a3150eeb09cc7ab207ebf6d7b9ad311a9bdbed12" + resolved "https://registry.npmjs.org/@noble/hashes/-/hashes-1.2.0.tgz" integrity sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ== "@noble/hashes@1.3.3", "@noble/hashes@~1.3.2": version "1.3.3" - resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.3.tgz#39908da56a4adc270147bb07968bf3b16cfe1699" + resolved "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.3.tgz" integrity sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA== "@noble/hashes@^1.4.0": version "1.4.0" - resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.4.0.tgz#45814aa329f30e4fe0ba49426f49dfccdd066426" + resolved "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz" integrity sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg== "@noble/secp256k1@1.7.1", "@noble/secp256k1@~1.7.0": version "1.7.1" - resolved "https://registry.yarnpkg.com/@noble/secp256k1/-/secp256k1-1.7.1.tgz#b251c70f824ce3ca7f8dc3df08d58f005cc0507c" + resolved "https://registry.npmjs.org/@noble/secp256k1/-/secp256k1-1.7.1.tgz" integrity sha512-hOUk6AyBFmqVrv7k5WAw/LpszxVbj9gGN4JRkIX52fdFAj1UA61KXmZDvqVEm+pOyec3+fIeZB02LYa/pWOArw== "@nodelib/fs.scandir@2.1.5": version "2.1.5" - resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" + resolved "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz" integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== dependencies: "@nodelib/fs.stat" "2.0.5" @@ -915,12 +915,12 @@ "@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": version "2.0.5" - resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" + resolved "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz" integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== "@nodelib/fs.walk@^1.2.3", "@nodelib/fs.walk@^1.2.8": version "1.2.8" - resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" + resolved "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz" integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== dependencies: "@nodelib/fs.scandir" "2.1.5" @@ -928,112 +928,42 @@ "@nomicfoundation/edr-darwin-arm64@0.3.7": version "0.3.7" - resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-darwin-arm64/-/edr-darwin-arm64-0.3.7.tgz#c204edc79643624dbd431b489b254778817d8244" + resolved "https://registry.npmjs.org/@nomicfoundation/edr-darwin-arm64/-/edr-darwin-arm64-0.3.7.tgz" integrity sha512-6tK9Lv/lSfyBvpEQ4nsTfgxyDT1y1Uv/x8Wa+aB+E8qGo3ToexQ1BMVjxJk6PChXCDOWxB3B4KhqaZFjdhl3Ow== -"@nomicfoundation/edr-darwin-arm64@0.4.0": - version "0.4.0" - resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-darwin-arm64/-/edr-darwin-arm64-0.4.0.tgz#bbb43f0e01f40839b0bd38c2c443cb6910ae955f" - integrity sha512-7+rraFk9tCqvfemv9Ita5vTlSBAeO/S5aDKOgGRgYt0JEKZlrX161nDW6UfzMPxWl9GOLEDUzCEaYuNmXseUlg== - -"@nomicfoundation/edr-darwin-arm64@0.5.2": - version "0.5.2" - resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-darwin-arm64/-/edr-darwin-arm64-0.5.2.tgz#72f7a826c9f0f2c91308edca562de3b9484ac079" - integrity sha512-Gm4wOPKhbDjGTIRyFA2QUAPfCXA1AHxYOKt3yLSGJkQkdy9a5WW+qtqKeEKHc/+4wpJSLtsGQfpzyIzggFfo/A== - "@nomicfoundation/edr-darwin-x64@0.3.7": version "0.3.7" resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-darwin-x64/-/edr-darwin-x64-0.3.7.tgz#c3b394445084270cc5250d6c1869b0574e7ef810" integrity sha512-1RrQ/1JPwxrYO69e0tglFv5H+ggour5Ii3bb727+yBpBShrxtOTQ7fZyfxA5h62LCN+0Z9wYOPeQ7XFcVurMaQ== -"@nomicfoundation/edr-darwin-x64@0.4.0": - version "0.4.0" - resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-darwin-x64/-/edr-darwin-x64-0.4.0.tgz#b1ffcd9142418fd8498de34a7336b3f977907c86" - integrity sha512-+Hrc0mP9L6vhICJSfyGo/2taOToy1AIzVZawO3lU8Lf7oDQXfhQ4UkZnkWAs9SVu1eUwHUGGGE0qB8644piYgg== - -"@nomicfoundation/edr-darwin-x64@0.5.2": - version "0.5.2" - resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-darwin-x64/-/edr-darwin-x64-0.5.2.tgz#6d0fedb219d664631c6feddc596ab8c3bbc36fa8" - integrity sha512-ClyABq2dFCsrYEED3/UIO0c7p4H1/4vvlswFlqUyBpOkJccr75qIYvahOSJRM62WgUFRhbSS0OJXFRwc/PwmVg== - "@nomicfoundation/edr-linux-arm64-gnu@0.3.7": version "0.3.7" resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-linux-arm64-gnu/-/edr-linux-arm64-gnu-0.3.7.tgz#6d65545a44d1323bb7ab08c3306947165d2071de" integrity sha512-ds/CKlBoVXIihjhflhgPn13EdKWed6r5bgvMs/YwRqT5wldQAQJZWAfA2+nYm0Yi2gMGh1RUpBcfkyl4pq7G+g== -"@nomicfoundation/edr-linux-arm64-gnu@0.4.0": - version "0.4.0" - resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-linux-arm64-gnu/-/edr-linux-arm64-gnu-0.4.0.tgz#8173d16d4f6f2b3e82ba7096d2a1ea3619d8bfa7" - integrity sha512-4HUDMchNClQrVRfVTqBeSX92hM/3khCgpZkXP52qrnJPqgbdCxosOehlQYZ65wu0b/kaaZSyvACgvCLSQ5oSzQ== - -"@nomicfoundation/edr-linux-arm64-gnu@0.5.2": - version "0.5.2" - resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-linux-arm64-gnu/-/edr-linux-arm64-gnu-0.5.2.tgz#60e4d52d963141bc2bb4a02639dc590a7fbdda2f" - integrity sha512-HWMTVk1iOabfvU2RvrKLDgtFjJZTC42CpHiw2h6rfpsgRqMahvIlx2jdjWYzFNy1jZKPTN1AStQ/91MRrg5KnA== - "@nomicfoundation/edr-linux-arm64-musl@0.3.7": version "0.3.7" resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-linux-arm64-musl/-/edr-linux-arm64-musl-0.3.7.tgz#5368534bceac1a8c18b1be6b908caca5d39b0c03" integrity sha512-e29udiRaPujhLkM3+R6ju7QISrcyOqpcaxb2FsDWBkuD7H8uU9JPZEyyUIpEp5uIY0Jh1eEJPKZKIXQmQAEAuw== -"@nomicfoundation/edr-linux-arm64-musl@0.4.0": - version "0.4.0" - resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-linux-arm64-musl/-/edr-linux-arm64-musl-0.4.0.tgz#b1ce293a7c3e0d9f70391e1aef1a82b83b997567" - integrity sha512-D4J935ZRL8xfnP3zIFlCI9jXInJ0loDUkCTLeCEbOf2uuDumWDghKNQlF1itUS+EHaR1pFVBbuwqq8hVK0dASg== - -"@nomicfoundation/edr-linux-arm64-musl@0.5.2": - version "0.5.2" - resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-linux-arm64-musl/-/edr-linux-arm64-musl-0.5.2.tgz#6676a09eab57c435a16ffc144658c896acca9baa" - integrity sha512-CwsQ10xFx/QAD5y3/g5alm9+jFVuhc7uYMhrZAu9UVF+KtVjeCvafj0PaVsZ8qyijjqVuVsJ8hD1x5ob7SMcGg== - "@nomicfoundation/edr-linux-x64-gnu@0.3.7": version "0.3.7" resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-linux-x64-gnu/-/edr-linux-x64-gnu-0.3.7.tgz#42349bf5941dbb54a5719942924c6e4e8cde348e" integrity sha512-/xkjmTyv+bbJ4akBCW0qzFKxPOV4AqLOmqurov+s9umHb16oOv72osSa3SdzJED2gHDaKmpMITT4crxbar4Axg== -"@nomicfoundation/edr-linux-x64-gnu@0.4.0": - version "0.4.0" - resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-linux-x64-gnu/-/edr-linux-x64-gnu-0.4.0.tgz#4c12c4e4bfd3d837f5663ad7cbf7cb6d5634ef83" - integrity sha512-6x7HPy+uN5Cb9N77e2XMmT6+QSJ+7mRbHnhkGJ8jm4cZvWuj2Io7npOaeHQ3YHK+TiQpTnlbkjoOIpEwpY3XZA== - -"@nomicfoundation/edr-linux-x64-gnu@0.5.2": - version "0.5.2" - resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-linux-x64-gnu/-/edr-linux-x64-gnu-0.5.2.tgz#f558d9697ce961410e7a7468f9ab8c8a601b9df6" - integrity sha512-CWVCEdhWJ3fmUpzWHCRnC0/VLBDbqtqTGTR6yyY1Ep3S3BOrHEAvt7h5gx85r2vLcztisu2vlDq51auie4IU1A== - "@nomicfoundation/edr-linux-x64-musl@0.3.7": version "0.3.7" resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-linux-x64-musl/-/edr-linux-x64-musl-0.3.7.tgz#e6babe11c9a8012f1284e6e48c3551861f2a7cd4" integrity sha512-QwBP9xlmsbf/ldZDGLcE4QiAb8Zt46E/+WLpxHBATFhGa7MrpJh6Zse+h2VlrT/SYLPbh2cpHgSmoSlqVxWG9g== -"@nomicfoundation/edr-linux-x64-musl@0.4.0": - version "0.4.0" - resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-linux-x64-musl/-/edr-linux-x64-musl-0.4.0.tgz#8842004aa1a47c504f10863687da28b65dca7baa" - integrity sha512-3HFIJSXgyubOiaN4MWGXx2xhTnhwlJk0PiSYNf9+L/fjBtcRkb2nM910ZJHTvqCb6OT98cUnaKuAYdXIW2amgw== - -"@nomicfoundation/edr-linux-x64-musl@0.5.2": - version "0.5.2" - resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-linux-x64-musl/-/edr-linux-x64-musl-0.5.2.tgz#c9c9cbb2997499f75c1d022be724b0551d44569f" - integrity sha512-+aJDfwhkddy2pP5u1ISg3IZVAm0dO836tRlDTFWtvvSMQ5hRGqPcWwlsbobhDQsIxhPJyT7phL0orCg5W3WMeA== - "@nomicfoundation/edr-win32-x64-msvc@0.3.7": version "0.3.7" resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-win32-x64-msvc/-/edr-win32-x64-msvc-0.3.7.tgz#1504b98f305f03be153b0220a546985660de9dc6" integrity sha512-j/80DEnkxrF2ewdbk/gQ2EOPvgF0XSsg8D0o4+6cKhUVAW6XwtWKzIphNL6dyD2YaWEPgIrNvqiJK/aln0ww4Q== -"@nomicfoundation/edr-win32-x64-msvc@0.4.0": - version "0.4.0" - resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-win32-x64-msvc/-/edr-win32-x64-msvc-0.4.0.tgz#29d8bbb2edf9912a95f5453855cf17cdcb269957" - integrity sha512-CP4GsllEfXEz+lidcGYxKe5rDJ60TM5/blB5z/04ELVvw6/CK9eLcYeku7HV0jvV7VE6dADYKSdQyUkvd0El+A== - -"@nomicfoundation/edr-win32-x64-msvc@0.5.2": - version "0.5.2" - resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-win32-x64-msvc/-/edr-win32-x64-msvc-0.5.2.tgz#f16db88bf4fe09a996af0a25096e09deecb72bfa" - integrity sha512-CcvvuA3sAv7liFNPsIR/68YlH6rrybKzYttLlMr80d4GKJjwJ5OKb3YgE6FdZZnOfP19HEHhsLcE0DPLtY3r0w== - "@nomicfoundation/edr@^0.3.1": version "0.3.7" - resolved "https://registry.yarnpkg.com/@nomicfoundation/edr/-/edr-0.3.7.tgz#9c75edf1fcf601617905b2c89acf103f4786d017" + resolved "https://registry.npmjs.org/@nomicfoundation/edr/-/edr-0.3.7.tgz" integrity sha512-v2JFWnFKRsnOa6PDUrD+sr8amcdhxnG/YbL7LzmgRGU1odWEyOF4/EwNeUajQr4ZNKVWrYnJ6XjydXtUge5OBQ== optionalDependencies: "@nomicfoundation/edr-darwin-arm64" "0.3.7" @@ -1044,47 +974,21 @@ "@nomicfoundation/edr-linux-x64-musl" "0.3.7" "@nomicfoundation/edr-win32-x64-msvc" "0.3.7" -"@nomicfoundation/edr@^0.4.0": - version "0.4.0" - resolved "https://registry.yarnpkg.com/@nomicfoundation/edr/-/edr-0.4.0.tgz#4895ecb6ef321136db837458949c37cce4a29459" - integrity sha512-T96DMSogO8TCdbKKctvxfsDljbhFOUKWc9fHJhSeUh71EEho2qR4951LKQF7t7UWEzguVYh/idQr5L/E3QeaMw== - dependencies: - "@nomicfoundation/edr-darwin-arm64" "0.4.0" - "@nomicfoundation/edr-darwin-x64" "0.4.0" - "@nomicfoundation/edr-linux-arm64-gnu" "0.4.0" - "@nomicfoundation/edr-linux-arm64-musl" "0.4.0" - "@nomicfoundation/edr-linux-x64-gnu" "0.4.0" - "@nomicfoundation/edr-linux-x64-musl" "0.4.0" - "@nomicfoundation/edr-win32-x64-msvc" "0.4.0" - -"@nomicfoundation/edr@^0.5.0": - version "0.5.2" - resolved "https://registry.yarnpkg.com/@nomicfoundation/edr/-/edr-0.5.2.tgz#e8c7b3d3dd4a312432ab3930dec60f76dc5c4926" - integrity sha512-hW/iLvUQZNTVjFyX/I40rtKvvDOqUEyIi96T28YaLfmPL+3LW2lxmYLUXEJ6MI14HzqxDqrLyhf6IbjAa2r3Dw== - dependencies: - "@nomicfoundation/edr-darwin-arm64" "0.5.2" - "@nomicfoundation/edr-darwin-x64" "0.5.2" - "@nomicfoundation/edr-linux-arm64-gnu" "0.5.2" - "@nomicfoundation/edr-linux-arm64-musl" "0.5.2" - "@nomicfoundation/edr-linux-x64-gnu" "0.5.2" - "@nomicfoundation/edr-linux-x64-musl" "0.5.2" - "@nomicfoundation/edr-win32-x64-msvc" "0.5.2" - "@nomicfoundation/ethereumjs-common@4.0.4": version "4.0.4" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-common/-/ethereumjs-common-4.0.4.tgz#9901f513af2d4802da87c66d6f255b510bef5acb" + resolved "https://registry.npmjs.org/@nomicfoundation/ethereumjs-common/-/ethereumjs-common-4.0.4.tgz" integrity sha512-9Rgb658lcWsjiicr5GzNCjI1llow/7r0k50dLL95OJ+6iZJcVbi15r3Y0xh2cIO+zgX0WIHcbzIu6FeQf9KPrg== dependencies: "@nomicfoundation/ethereumjs-util" "9.0.4" "@nomicfoundation/ethereumjs-rlp@5.0.4": version "5.0.4" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-rlp/-/ethereumjs-rlp-5.0.4.tgz#66c95256fc3c909f6fb18f6a586475fc9762fa30" + resolved "https://registry.npmjs.org/@nomicfoundation/ethereumjs-rlp/-/ethereumjs-rlp-5.0.4.tgz" integrity sha512-8H1S3s8F6QueOc/X92SdrA4RDenpiAEqMg5vJH99kcQaCy/a3Q6fgseo75mgWlbanGJXSlAPtnCeG9jvfTYXlw== "@nomicfoundation/ethereumjs-tx@5.0.4": version "5.0.4" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-tx/-/ethereumjs-tx-5.0.4.tgz#b0ceb58c98cc34367d40a30d255d6315b2f456da" + resolved "https://registry.npmjs.org/@nomicfoundation/ethereumjs-tx/-/ethereumjs-tx-5.0.4.tgz" integrity sha512-Xjv8wAKJGMrP1f0n2PeyfFCCojHd7iS3s/Ab7qzF1S64kxZ8Z22LCMynArYsVqiFx6rzYy548HNVEyI+AYN/kw== dependencies: "@nomicfoundation/ethereumjs-common" "4.0.4" @@ -1094,7 +998,7 @@ "@nomicfoundation/ethereumjs-util@9.0.4": version "9.0.4" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-util/-/ethereumjs-util-9.0.4.tgz#84c5274e82018b154244c877b76bc049a4ed7b38" + resolved "https://registry.npmjs.org/@nomicfoundation/ethereumjs-util/-/ethereumjs-util-9.0.4.tgz" integrity sha512-sLOzjnSrlx9Bb9EFNtHzK/FJFsfg2re6bsGqinFinH1gCqVfz9YYlXiMWwDM4C/L4ywuHFCYwfKTVr/QHQcU0Q== dependencies: "@nomicfoundation/ethereumjs-rlp" "5.0.4" @@ -1102,7 +1006,7 @@ "@nomicfoundation/hardhat-chai-matchers@^1.0.3", "@nomicfoundation/hardhat-chai-matchers@^1.0.6": version "1.0.6" - resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-chai-matchers/-/hardhat-chai-matchers-1.0.6.tgz#72a2e312e1504ee5dd73fe302932736432ba96bc" + resolved "https://registry.npmjs.org/@nomicfoundation/hardhat-chai-matchers/-/hardhat-chai-matchers-1.0.6.tgz" integrity sha512-f5ZMNmabZeZegEfuxn/0kW+mm7+yV7VNDxLpMOMGXWFJ2l/Ct3QShujzDRF9cOkK9Ui/hbDeOWGZqyQALDXVCQ== dependencies: "@ethersproject/abi" "^5.1.2" @@ -1113,7 +1017,7 @@ "@nomicfoundation/hardhat-ethers@^3.0.4": version "3.0.5" - resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-ethers/-/hardhat-ethers-3.0.5.tgz#0422c2123dec7c42e7fb2be8e1691f1d9708db56" + resolved "https://registry.npmjs.org/@nomicfoundation/hardhat-ethers/-/hardhat-ethers-3.0.5.tgz" integrity sha512-RNFe8OtbZK6Ila9kIlHp0+S80/0Bu/3p41HUpaRIoHLm6X3WekTd83vob3rE54Duufu1edCiBDxspBzi2rxHHw== dependencies: debug "^4.1.1" @@ -1121,7 +1025,7 @@ "@nomicfoundation/hardhat-verify@^1.0.2", "@nomicfoundation/hardhat-verify@^1.1.0": version "1.1.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-verify/-/hardhat-verify-1.1.1.tgz#6a433d777ce0172d1f0edf7f2d3e1df14b3ecfc1" + resolved "https://registry.npmjs.org/@nomicfoundation/hardhat-verify/-/hardhat-verify-1.1.1.tgz" integrity sha512-9QsTYD7pcZaQFEA3tBb/D/oCStYDiEVDN7Dxeo/4SCyHRSm86APypxxdOMEPlGmXsAvd+p1j/dTODcpxb8aztA== dependencies: "@ethersproject/abi" "^5.1.2" @@ -1136,7 +1040,7 @@ "@nomicfoundation/hardhat-verify@^2.0.0": version "2.0.6" - resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-verify/-/hardhat-verify-2.0.6.tgz#02623c431244c92a852c524008239fc616e1c658" + resolved "https://registry.npmjs.org/@nomicfoundation/hardhat-verify/-/hardhat-verify-2.0.6.tgz" integrity sha512-oKUI5fl8QC8jysE2LUBHE6rObzEmccJcc4b43Ov7LFMlCBZJE27qoqGIsg/++wX7L8Jdga+bkejPxl8NvsecpQ== dependencies: "@ethersproject/abi" "^5.1.2" @@ -1151,7 +1055,7 @@ "@nomicfoundation/solidity-analyzer-darwin-arm64@0.1.1": version "0.1.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-darwin-arm64/-/solidity-analyzer-darwin-arm64-0.1.1.tgz#4c858096b1c17fe58a474fe81b46815f93645c15" + resolved "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-darwin-arm64/-/solidity-analyzer-darwin-arm64-0.1.1.tgz" integrity sha512-KcTodaQw8ivDZyF+D76FokN/HdpgGpfjc/gFCImdLUyqB6eSWVaZPazMbeAjmfhx3R0zm/NYVzxwAokFKgrc0w== "@nomicfoundation/solidity-analyzer-darwin-x64@0.1.1": @@ -1201,7 +1105,7 @@ "@nomicfoundation/solidity-analyzer@^0.1.0": version "0.1.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer/-/solidity-analyzer-0.1.1.tgz#f5f4d36d3f66752f59a57e7208cd856f3ddf6f2d" + resolved "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer/-/solidity-analyzer-0.1.1.tgz" integrity sha512-1LMtXj1puAxyFusBgUIy5pZk3073cNXYnXUpuNKFghHbIit/xZgbk0AokpUADbNm3gyD6bFWl3LRFh3dhVdREg== optionalDependencies: "@nomicfoundation/solidity-analyzer-darwin-arm64" "0.1.1" @@ -1217,7 +1121,7 @@ "@nomiclabs/hardhat-docker@^2.0.0", "@nomiclabs/hardhat-docker@^2.0.2": version "2.0.2" - resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-docker/-/hardhat-docker-2.0.2.tgz#ae964be17951275a55859ff7358e9e7c77448846" + resolved "https://registry.npmjs.org/@nomiclabs/hardhat-docker/-/hardhat-docker-2.0.2.tgz" integrity sha512-XgGEpRT3wlA1VslyB57zyAHV+oll8KnV1TjwnxxC1tpAL04/lbdwpdO5KxInVN8irMSepqFpsiSkqlcnvbE7Ng== dependencies: dockerode "^2.5.8" @@ -1226,12 +1130,12 @@ "@nomiclabs/hardhat-ethers@^2.0.0": version "2.2.3" - resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-ethers/-/hardhat-ethers-2.2.3.tgz#b41053e360c31a32c2640c9a45ee981a7e603fe0" + resolved "https://registry.npmjs.org/@nomiclabs/hardhat-ethers/-/hardhat-ethers-2.2.3.tgz" integrity sha512-YhzPdzb612X591FOe68q+qXVXGG2ANZRvDo0RRUtimev85rCrAlv/TLMEZw5c+kq9AbzocLTVX/h2jVIFPL9Xg== "@nomiclabs/hardhat-etherscan@^3.1.0", "@nomiclabs/hardhat-etherscan@^3.1.7": version "3.1.8" - resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-etherscan/-/hardhat-etherscan-3.1.8.tgz#3c12ee90b3733e0775e05111146ef9418d4f5a38" + resolved "https://registry.npmjs.org/@nomiclabs/hardhat-etherscan/-/hardhat-etherscan-3.1.8.tgz" integrity sha512-v5F6IzQhrsjHh6kQz4uNrym49brK9K5bYCq2zQZ729RYRaifI9hHbtmK+KkIVevfhut7huQFEQ77JLRMAzWYjQ== dependencies: "@ethersproject/abi" "^5.1.2" @@ -1247,54 +1151,54 @@ "@nomiclabs/hardhat-waffle@^2.0.0": version "2.0.6" - resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-waffle/-/hardhat-waffle-2.0.6.tgz#d11cb063a5f61a77806053e54009c40ddee49a54" + resolved "https://registry.npmjs.org/@nomiclabs/hardhat-waffle/-/hardhat-waffle-2.0.6.tgz" integrity sha512-+Wz0hwmJGSI17B+BhU/qFRZ1l6/xMW82QGXE/Gi+WTmwgJrQefuBs1lIf7hzQ1hLk6hpkvb/zwcNkpVKRYTQYg== "@openzeppelin/contracts-upgradeable-v4@npm:@openzeppelin/contracts-upgradeable@4.9.5": version "4.9.5" - resolved "https://registry.yarnpkg.com/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-4.9.5.tgz#572b5da102fc9be1d73f34968e0ca56765969812" + resolved "https://registry.npmjs.org/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-4.9.5.tgz" integrity sha512-f7L1//4sLlflAN7fVzJLoRedrf5Na3Oal5PZfIq55NFcVZ90EpV1q5xOvL4lFvg3MNICSDr2hH0JUBxwlxcoPg== "@openzeppelin/contracts-upgradeable@4.9.5": version "4.9.5" - resolved "https://registry.yarnpkg.com/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-4.9.5.tgz#572b5da102fc9be1d73f34968e0ca56765969812" + resolved "https://registry.npmjs.org/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-4.9.5.tgz" integrity sha512-f7L1//4sLlflAN7fVzJLoRedrf5Na3Oal5PZfIq55NFcVZ90EpV1q5xOvL4lFvg3MNICSDr2hH0JUBxwlxcoPg== "@openzeppelin/contracts-v4@npm:@openzeppelin/contracts@4.9.5": version "4.9.5" - resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.9.5.tgz#1eed23d4844c861a1835b5d33507c1017fa98de8" + resolved "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-4.9.5.tgz" integrity sha512-ZK+W5mVhRppff9BE6YdR8CC52C8zAvsVAiWhEtQ5+oNxFE6h1WdeWo+FJSF8KKvtxxVYZ7MTP/5KoVpAU3aSWg== "@openzeppelin/contracts@4.9.5": version "4.9.5" - resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.9.5.tgz#1eed23d4844c861a1835b5d33507c1017fa98de8" + resolved "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-4.9.5.tgz" integrity sha512-ZK+W5mVhRppff9BE6YdR8CC52C8zAvsVAiWhEtQ5+oNxFE6h1WdeWo+FJSF8KKvtxxVYZ7MTP/5KoVpAU3aSWg== "@openzeppelin/contracts@^4.9.2": version "4.9.6" - resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.9.6.tgz#2a880a24eb19b4f8b25adc2a5095f2aa27f39677" + resolved "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-4.9.6.tgz" integrity sha512-xSmezSupL+y9VkHZJGDoCBpmnB2ogM13ccaYDWqJTfS3dbuHkgjuwDFUmaFauBCboQMGB/S5UqUl2y54X99BmA== "@pkgr/core@^0.1.0": version "0.1.1" - resolved "https://registry.yarnpkg.com/@pkgr/core/-/core-0.1.1.tgz#1ec17e2edbec25c8306d424ecfbf13c7de1aaa31" + resolved "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz" integrity sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA== "@pnpm/config.env-replace@^1.1.0": version "1.1.0" - resolved "https://registry.yarnpkg.com/@pnpm/config.env-replace/-/config.env-replace-1.1.0.tgz#ab29da53df41e8948a00f2433f085f54de8b3a4c" + resolved "https://registry.npmjs.org/@pnpm/config.env-replace/-/config.env-replace-1.1.0.tgz" integrity sha512-htyl8TWnKL7K/ESFa1oW2UB5lVDxuF5DpM7tBi6Hu2LNL3mWkIzNLG6N4zoCUP1lCKNxWy/3iu8mS8MvToGd6w== "@pnpm/network.ca-file@^1.0.1": version "1.0.2" - resolved "https://registry.yarnpkg.com/@pnpm/network.ca-file/-/network.ca-file-1.0.2.tgz#2ab05e09c1af0cdf2fcf5035bea1484e222f7983" + resolved "https://registry.npmjs.org/@pnpm/network.ca-file/-/network.ca-file-1.0.2.tgz" integrity sha512-YcPQ8a0jwYU9bTdJDpXjMi7Brhkr1mXsXrUJvjqM2mQDgkRiz8jFaQGOdaLxgjtUfQgZhKy/O3cG/YwmgKaxLA== dependencies: graceful-fs "4.2.10" "@pnpm/npm-conf@^2.1.0": version "2.2.2" - resolved "https://registry.yarnpkg.com/@pnpm/npm-conf/-/npm-conf-2.2.2.tgz#0058baf1c26cbb63a828f0193795401684ac86f0" + resolved "https://registry.npmjs.org/@pnpm/npm-conf/-/npm-conf-2.2.2.tgz" integrity sha512-UA91GwWPhFExt3IizW6bOeY/pQ0BkuNwKjk9iQW9KqxluGCrg4VenZ0/L+2Y0+ZOtme72EVvg6v0zo3AMQRCeA== dependencies: "@pnpm/config.env-replace" "^1.1.0" @@ -1303,7 +1207,7 @@ "@resolver-engine/core@^0.3.3": version "0.3.3" - resolved "https://registry.yarnpkg.com/@resolver-engine/core/-/core-0.3.3.tgz#590f77d85d45bc7ecc4e06c654f41345db6ca967" + resolved "https://registry.npmjs.org/@resolver-engine/core/-/core-0.3.3.tgz" integrity sha512-eB8nEbKDJJBi5p5SrvrvILn4a0h42bKtbCTri3ZxCGt6UvoQyp7HnGOfki944bUjBSHKK3RvgfViHn+kqdXtnQ== dependencies: debug "^3.1.0" @@ -1312,7 +1216,7 @@ "@resolver-engine/fs@^0.3.3": version "0.3.3" - resolved "https://registry.yarnpkg.com/@resolver-engine/fs/-/fs-0.3.3.tgz#fbf83fa0c4f60154a82c817d2fe3f3b0c049a973" + resolved "https://registry.npmjs.org/@resolver-engine/fs/-/fs-0.3.3.tgz" integrity sha512-wQ9RhPUcny02Wm0IuJwYMyAG8fXVeKdmhm8xizNByD4ryZlx6PP6kRen+t/haF43cMfmaV7T3Cx6ChOdHEhFUQ== dependencies: "@resolver-engine/core" "^0.3.3" @@ -1320,7 +1224,7 @@ "@resolver-engine/imports-fs@^0.3.3": version "0.3.3" - resolved "https://registry.yarnpkg.com/@resolver-engine/imports-fs/-/imports-fs-0.3.3.tgz#4085db4b8d3c03feb7a425fbfcf5325c0d1e6c1b" + resolved "https://registry.npmjs.org/@resolver-engine/imports-fs/-/imports-fs-0.3.3.tgz" integrity sha512-7Pjg/ZAZtxpeyCFlZR5zqYkz+Wdo84ugB5LApwriT8XFeQoLwGUj4tZFFvvCuxaNCcqZzCYbonJgmGObYBzyCA== dependencies: "@resolver-engine/fs" "^0.3.3" @@ -1329,7 +1233,7 @@ "@resolver-engine/imports@^0.3.3": version "0.3.3" - resolved "https://registry.yarnpkg.com/@resolver-engine/imports/-/imports-0.3.3.tgz#badfb513bb3ff3c1ee9fd56073e3144245588bcc" + resolved "https://registry.npmjs.org/@resolver-engine/imports/-/imports-0.3.3.tgz" integrity sha512-anHpS4wN4sRMwsAbMXhMfOD/y4a4Oo0Cw/5+rue7hSwGWsDOQaAU1ClK1OxjUC35/peazxEl8JaSRRS+Xb8t3Q== dependencies: "@resolver-engine/core" "^0.3.3" @@ -1340,12 +1244,12 @@ "@scure/base@~1.1.0", "@scure/base@~1.1.4": version "1.1.6" - resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.6.tgz#8ce5d304b436e4c84f896e0550c83e4d88cb917d" + resolved "https://registry.npmjs.org/@scure/base/-/base-1.1.6.tgz" integrity sha512-ok9AWwhcgYuGG3Zfhyqg+zwl+Wn5uE+dwC0NV/2qQkx4dABbb/bx96vWu8NSj+BNjjSjno+JRYRjle1jV08k3g== "@scure/bip32@1.1.5": version "1.1.5" - resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.1.5.tgz#d2ccae16dcc2e75bc1d75f5ef3c66a338d1ba300" + resolved "https://registry.npmjs.org/@scure/bip32/-/bip32-1.1.5.tgz" integrity sha512-XyNh1rB0SkEqd3tXcXMi+Xe1fvg+kUIcoRIEujP1Jgv7DqW2r9lg3Ah0NkFaCs9sTkQAQA8kw7xiRXzENi9Rtw== dependencies: "@noble/hashes" "~1.2.0" @@ -1354,7 +1258,7 @@ "@scure/bip32@1.3.3": version "1.3.3" - resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.3.3.tgz#a9624991dc8767087c57999a5d79488f48eae6c8" + resolved "https://registry.npmjs.org/@scure/bip32/-/bip32-1.3.3.tgz" integrity sha512-LJaN3HwRbfQK0X1xFSi0Q9amqOgzQnnDngIt+ZlsBC3Bm7/nE7K0kwshZHyaru79yIVRv/e1mQAjZyuZG6jOFQ== dependencies: "@noble/curves" "~1.3.0" @@ -1363,7 +1267,7 @@ "@scure/bip39@1.1.1": version "1.1.1" - resolved "https://registry.yarnpkg.com/@scure/bip39/-/bip39-1.1.1.tgz#b54557b2e86214319405db819c4b6a370cf340c5" + resolved "https://registry.npmjs.org/@scure/bip39/-/bip39-1.1.1.tgz" integrity sha512-t+wDck2rVkh65Hmv280fYdVdY25J9YeEUIgn2LG1WM6gxFkGzcksoDiUkWVpVp3Oex9xGC68JU2dSbUfwZ2jPg== dependencies: "@noble/hashes" "~1.2.0" @@ -1371,7 +1275,7 @@ "@scure/bip39@1.2.2": version "1.2.2" - resolved "https://registry.yarnpkg.com/@scure/bip39/-/bip39-1.2.2.tgz#f3426813f4ced11a47489cbcf7294aa963966527" + resolved "https://registry.npmjs.org/@scure/bip39/-/bip39-1.2.2.tgz" integrity sha512-HYf9TUXG80beW+hGAt3TRM8wU6pQoYur9iNypTROm42dorCGmLnFe3eWjz3gOq6G62H2WRh0FCzAR1PI+29zIA== dependencies: "@noble/hashes" "~1.3.2" @@ -1379,7 +1283,7 @@ "@sentry/core@5.30.0": version "5.30.0" - resolved "https://registry.yarnpkg.com/@sentry/core/-/core-5.30.0.tgz#6b203664f69e75106ee8b5a2fe1d717379b331f3" + resolved "https://registry.npmjs.org/@sentry/core/-/core-5.30.0.tgz" integrity sha512-TmfrII8w1PQZSZgPpUESqjB+jC6MvZJZdLtE/0hZ+SrnKhW3x5WlYLvTXZpcWePYBku7rl2wn1RZu6uT0qCTeg== dependencies: "@sentry/hub" "5.30.0" @@ -1390,7 +1294,7 @@ "@sentry/hub@5.30.0": version "5.30.0" - resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-5.30.0.tgz#2453be9b9cb903404366e198bd30c7ca74cdc100" + resolved "https://registry.npmjs.org/@sentry/hub/-/hub-5.30.0.tgz" integrity sha512-2tYrGnzb1gKz2EkMDQcfLrDTvmGcQPuWxLnJKXJvYTQDGLlEvi2tWz1VIHjunmOvJrB5aIQLhm+dcMRwFZDCqQ== dependencies: "@sentry/types" "5.30.0" @@ -1399,7 +1303,7 @@ "@sentry/minimal@5.30.0": version "5.30.0" - resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-5.30.0.tgz#ce3d3a6a273428e0084adcb800bc12e72d34637b" + resolved "https://registry.npmjs.org/@sentry/minimal/-/minimal-5.30.0.tgz" integrity sha512-BwWb/owZKtkDX+Sc4zCSTNcvZUq7YcH3uAVlmh/gtR9rmUvbzAA3ewLuB3myi4wWRAMEtny6+J/FN/x+2wn9Xw== dependencies: "@sentry/hub" "5.30.0" @@ -1408,7 +1312,7 @@ "@sentry/node@^5.18.1": version "5.30.0" - resolved "https://registry.yarnpkg.com/@sentry/node/-/node-5.30.0.tgz#4ca479e799b1021285d7fe12ac0858951c11cd48" + resolved "https://registry.npmjs.org/@sentry/node/-/node-5.30.0.tgz" integrity sha512-Br5oyVBF0fZo6ZS9bxbJZG4ApAjRqAnqFFurMVJJdunNb80brh7a5Qva2kjhm+U6r9NJAB5OmDyPkA1Qnt+QVg== dependencies: "@sentry/core" "5.30.0" @@ -1423,7 +1327,7 @@ "@sentry/tracing@5.30.0": version "5.30.0" - resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-5.30.0.tgz#501d21f00c3f3be7f7635d8710da70d9419d4e1f" + resolved "https://registry.npmjs.org/@sentry/tracing/-/tracing-5.30.0.tgz" integrity sha512-dUFowCr0AIMwiLD7Fs314Mdzcug+gBVo/+NCMyDw8tFxJkwWAKl7Qa2OZxLQ0ZHjakcj1hNKfCQJ9rhyfOl4Aw== dependencies: "@sentry/hub" "5.30.0" @@ -1434,12 +1338,12 @@ "@sentry/types@5.30.0": version "5.30.0" - resolved "https://registry.yarnpkg.com/@sentry/types/-/types-5.30.0.tgz#19709bbe12a1a0115bc790b8942917da5636f402" + resolved "https://registry.npmjs.org/@sentry/types/-/types-5.30.0.tgz" integrity sha512-R8xOqlSTZ+htqrfteCWU5Nk0CDN5ApUTvrlvBuiH1DyP6czDZ4ktbZB0hAgBlVcK0U+qpD3ag3Tqqpa5Q67rPw== "@sentry/utils@5.30.0": version "5.30.0" - resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-5.30.0.tgz#9a5bd7ccff85ccfe7856d493bffa64cabc41e980" + resolved "https://registry.npmjs.org/@sentry/utils/-/utils-5.30.0.tgz" integrity sha512-zaYmoH0NWWtvnJjC9/CBseXMtKHm/tm40sz3YfJRxeQjyzRqNQPgivpd9R/oDJCYj999mzdW382p/qi2ypjLww== dependencies: "@sentry/types" "5.30.0" @@ -1447,40 +1351,40 @@ "@sindresorhus/is@^5.2.0": version "5.6.0" - resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-5.6.0.tgz#41dd6093d34652cddb5d5bdeee04eafc33826668" + resolved "https://registry.npmjs.org/@sindresorhus/is/-/is-5.6.0.tgz" integrity sha512-TV7t8GKYaJWsn00tFDqBw8+Uqmr8A0fRU1tvTQhyZzGv0sJCGRQL3JGMI3ucuKo3XIZdUP+Lx7/gh2t3lewy7g== "@sinonjs/commons@^2.0.0": version "2.0.0" - resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-2.0.0.tgz#fd4ca5b063554307e8327b4564bd56d3b73924a3" + resolved "https://registry.npmjs.org/@sinonjs/commons/-/commons-2.0.0.tgz" integrity sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg== dependencies: type-detect "4.0.8" "@sinonjs/commons@^3.0.0", "@sinonjs/commons@^3.0.1": version "3.0.1" - resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-3.0.1.tgz#1029357e44ca901a615585f6d27738dbc89084cd" + resolved "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz" integrity sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ== dependencies: type-detect "4.0.8" "@sinonjs/fake-timers@11.2.2", "@sinonjs/fake-timers@^11.2.2": version "11.2.2" - resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-11.2.2.tgz#50063cc3574f4a27bd8453180a04171c85cc9699" + resolved "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-11.2.2.tgz" integrity sha512-G2piCSxQ7oWOxwGSAyFHfPIsyeJGXYtc6mFbnFA+kRXkiEnTl8c/8jul2S329iFBnDI9HGoeWWAZvuvOkZccgw== dependencies: "@sinonjs/commons" "^3.0.0" "@sinonjs/fake-timers@^13.0.1": version "13.0.2" - resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-13.0.2.tgz#3ffe88abb062067a580fdfba706ad00435a0f2a6" + resolved "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-13.0.2.tgz" integrity sha512-4Bb+oqXZTSTZ1q27Izly9lv8B9dlV61CROxPiVtywwzv5SnytJqhvYe6FclHYuXml4cd1VHPo1zd5PmTeJozvA== dependencies: "@sinonjs/commons" "^3.0.1" "@sinonjs/samsam@^8.0.0": version "8.0.0" - resolved "https://registry.yarnpkg.com/@sinonjs/samsam/-/samsam-8.0.0.tgz#0d488c91efb3fa1442e26abea81759dfc8b5ac60" + resolved "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-8.0.0.tgz" integrity sha512-Bp8KUVlLp8ibJZrnvq2foVhP0IVX2CIprMJPK0vqGqgrDa0OHVKeZyBykqskkrdxV6yKBPmGasO8LVjAKR3Gew== dependencies: "@sinonjs/commons" "^2.0.0" @@ -1489,29 +1393,29 @@ "@sinonjs/text-encoding@^0.7.2": version "0.7.2" - resolved "https://registry.yarnpkg.com/@sinonjs/text-encoding/-/text-encoding-0.7.2.tgz#5981a8db18b56ba38ef0efb7d995b12aa7b51918" + resolved "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.2.tgz" integrity sha512-sXXKG+uL9IrKqViTtao2Ws6dy0znu9sOaP1di/jKGW1M6VssO8vlpXCQcpZ+jisQ1tTFAC5Jo/EOzFbggBagFQ== "@sinonjs/text-encoding@^0.7.3": version "0.7.3" - resolved "https://registry.yarnpkg.com/@sinonjs/text-encoding/-/text-encoding-0.7.3.tgz#282046f03e886e352b2d5f5da5eb755e01457f3f" + resolved "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.3.tgz" integrity sha512-DE427ROAphMQzU4ENbliGYrBSYPXF+TtLg9S8vzeA+OF4ZKzoDdzfL8sxuMUGS/lgRhM6j1URSk9ghf7Xo1tyA== "@solidity-parser/parser@^0.14.0": version "0.14.5" - resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.14.5.tgz#87bc3cc7b068e08195c219c91cd8ddff5ef1a804" + resolved "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.14.5.tgz" integrity sha512-6dKnHZn7fg/iQATVEzqyUOyEidbn05q7YA2mQ9hC0MMXhhV3/JrsxmFSYZAcr7j1yUP700LLhTruvJ3MiQmjJg== dependencies: antlr4ts "^0.5.0-alpha.4" "@solidity-parser/parser@^0.17.0": version "0.17.0" - resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.17.0.tgz#52a2fcc97ff609f72011014e4c5b485ec52243ef" + resolved "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.17.0.tgz" integrity sha512-Nko8R0/kUo391jsEHHxrGM07QFdnPGvlmox4rmH0kNiNAashItAilhy4Mv4pK5gQmW5f4sXAF58fwJbmlkGcVw== "@solidity-parser/parser@^0.18.0": version "0.18.0" - resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.18.0.tgz#8e77a02a09ecce957255a2f48c9a7178ec191908" + resolved "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.18.0.tgz" integrity sha512-yfORGUIPgLck41qyN7nbwJRAx17/jAIXCTanHOJZhB6PJ1iAk/84b/xlsVKFSyNyLXIj0dhppoE0+CRws7wlzA== "@solidity-parser/parser@^0.20.0": @@ -1521,28 +1425,28 @@ "@szmarczak/http-timer@^5.0.1": version "5.0.1" - resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-5.0.1.tgz#c7c1bf1141cdd4751b0399c8fc7b8b664cd5be3a" + resolved "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-5.0.1.tgz" integrity sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw== dependencies: defer-to-connect "^2.0.1" "@trufflesuite/bigint-buffer@1.1.10": version "1.1.10" - resolved "https://registry.yarnpkg.com/@trufflesuite/bigint-buffer/-/bigint-buffer-1.1.10.tgz#a1d9ca22d3cad1a138b78baaf15543637a3e1692" + resolved "https://registry.npmjs.org/@trufflesuite/bigint-buffer/-/bigint-buffer-1.1.10.tgz" integrity sha512-pYIQC5EcMmID74t26GCC67946mgTJFiLXOT/BYozgrd4UEY2JHEGLhWi9cMiQCt5BSqFEvKkCHNnoj82SRjiEw== dependencies: node-gyp-build "4.4.0" "@trufflesuite/bigint-buffer@1.1.9": version "1.1.9" - resolved "https://registry.yarnpkg.com/@trufflesuite/bigint-buffer/-/bigint-buffer-1.1.9.tgz#e2604d76e1e4747b74376d68f1312f9944d0d75d" + resolved "https://registry.npmjs.org/@trufflesuite/bigint-buffer/-/bigint-buffer-1.1.9.tgz" integrity sha512-bdM5cEGCOhDSwminryHJbRmXc1x7dPKg6Pqns3qyTwFlxsqUgxE29lsERS3PlIW1HTjoIGMUqsk1zQQwST1Yxw== dependencies: node-gyp-build "4.3.0" "@ts-morph/common@~0.20.0": version "0.20.0" - resolved "https://registry.yarnpkg.com/@ts-morph/common/-/common-0.20.0.tgz#3f161996b085ba4519731e4d24c35f6cba5b80af" + resolved "https://registry.npmjs.org/@ts-morph/common/-/common-0.20.0.tgz" integrity sha512-7uKjByfbPpwuzkstL3L5MQyuXPSKdoNG93Fmi2JoDcTf3pEP731JdRFAduRVkOs8oqxPsXKA+ScrWkdQ8t/I+Q== dependencies: fast-glob "^3.2.12" @@ -1552,27 +1456,27 @@ "@tsconfig/node10@^1.0.7": version "1.0.11" - resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.11.tgz#6ee46400685f130e278128c7b38b7e031ff5b2f2" + resolved "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz" integrity sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw== "@tsconfig/node12@^1.0.7": version "1.0.11" - resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.11.tgz#ee3def1f27d9ed66dac6e46a295cffb0152e058d" + resolved "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz" integrity sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag== "@tsconfig/node14@^1.0.0": version "1.0.3" - resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.3.tgz#e4386316284f00b98435bf40f72f75a09dabf6c1" + resolved "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz" integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow== "@tsconfig/node16@^1.0.2": version "1.0.4" - resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.4.tgz#0b92dcc0cc1c81f6f306a381f28e31b1a56536e9" + resolved "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz" integrity sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA== "@typechain/ethers-v5@^10.0.0": version "10.2.1" - resolved "https://registry.yarnpkg.com/@typechain/ethers-v5/-/ethers-v5-10.2.1.tgz#50241e6957683281ecfa03fb5a6724d8a3ce2391" + resolved "https://registry.npmjs.org/@typechain/ethers-v5/-/ethers-v5-10.2.1.tgz" integrity sha512-n3tQmCZjRE6IU4h6lqUGiQ1j866n5MTCBJreNEHHVWXa2u9GJTaeYyU1/k+1qLutkyw+sS6VAN+AbeiTqsxd/A== dependencies: lodash "^4.17.15" @@ -1580,71 +1484,71 @@ "@typechain/ethers-v5@^2.0.0": version "2.0.0" - resolved "https://registry.yarnpkg.com/@typechain/ethers-v5/-/ethers-v5-2.0.0.tgz#cd3ca1590240d587ca301f4c029b67bfccd08810" + resolved "https://registry.npmjs.org/@typechain/ethers-v5/-/ethers-v5-2.0.0.tgz" integrity sha512-0xdCkyGOzdqh4h5JSf+zoWx85IusEjDcPIwNEHP8mrWSnCae4rvrqB+/gtpdNfX7zjlFlZiMeePn2r63EI3Lrw== dependencies: ethers "^5.0.2" "@types/abstract-leveldown@*": version "7.2.5" - resolved "https://registry.yarnpkg.com/@types/abstract-leveldown/-/abstract-leveldown-7.2.5.tgz#db2cf364c159fb1f12be6cd3549f56387eaf8d73" + resolved "https://registry.npmjs.org/@types/abstract-leveldown/-/abstract-leveldown-7.2.5.tgz" integrity sha512-/2B0nQF4UdupuxeKTJA2+Rj1D+uDemo6P4kMwKCpbfpnzeVaWSELTsAw4Lxn3VJD6APtRrZOCuYo+4nHUQfTfg== "@types/argparse@^1.0.36": version "1.0.38" - resolved "https://registry.yarnpkg.com/@types/argparse/-/argparse-1.0.38.tgz#a81fd8606d481f873a3800c6ebae4f1d768a56a9" + resolved "https://registry.npmjs.org/@types/argparse/-/argparse-1.0.38.tgz" integrity sha512-ebDJ9b0e702Yr7pWgB0jzm+CX4Srzz8RcXtLJDJB+BSccqMa36uyH/zUsSYao5+BD1ytv3k3rPYCq4mAE1hsXA== "@types/bn.js@*", "@types/bn.js@^5.1.0": version "5.1.5" - resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-5.1.5.tgz#2e0dacdcce2c0f16b905d20ff87aedbc6f7b4bf0" + resolved "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.5.tgz" integrity sha512-V46N0zwKRF5Q00AZ6hWtN0T8gGmDUaUzLWQvHFo5yThtVwK/VCenFY3wXVbOvNfajEpsTfQM4IN9k/d6gUVX3A== dependencies: "@types/node" "*" "@types/bn.js@^4.11.3": version "4.11.6" - resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-4.11.6.tgz#c306c70d9358aaea33cd4eda092a742b9505967c" + resolved "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz" integrity sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg== dependencies: "@types/node" "*" "@types/chai-as-promised@^7.1.3", "@types/chai-as-promised@^7.1.4": version "7.1.8" - resolved "https://registry.yarnpkg.com/@types/chai-as-promised/-/chai-as-promised-7.1.8.tgz#f2b3d82d53c59626b5d6bbc087667ccb4b677fe9" + resolved "https://registry.npmjs.org/@types/chai-as-promised/-/chai-as-promised-7.1.8.tgz" integrity sha512-ThlRVIJhr69FLlh6IctTXFkmhtP3NpMZ2QGq69StYLyKZFp/HOp1VdKZj7RvfNWYYcJ1xlbLGLLWj1UvP5u/Gw== dependencies: "@types/chai" "*" "@types/chai@*", "@types/chai@^4.2.21": version "4.3.14" - resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.14.tgz#ae3055ea2be43c91c9fd700a36d67820026d96e6" + resolved "https://registry.npmjs.org/@types/chai/-/chai-4.3.14.tgz" integrity sha512-Wj71sXE4Q4AkGdG9Tvq1u/fquNz9EdG4LIJMwVVII7ashjD/8cf8fyIfJAjRr6YcsXnSE8cOGQPq1gqeR8z+3w== "@types/concat-stream@^1.6.0": version "1.6.1" - resolved "https://registry.yarnpkg.com/@types/concat-stream/-/concat-stream-1.6.1.tgz#24bcfc101ecf68e886aaedce60dfd74b632a1b74" + resolved "https://registry.npmjs.org/@types/concat-stream/-/concat-stream-1.6.1.tgz" integrity sha512-eHE4cQPoj6ngxBZMvVf6Hw7Mh4jMW4U9lpGmS5GBPB9RYxlFg+CHaVN7ErNY4W9XfLIEn20b4VDYaIrbq0q4uA== dependencies: "@types/node" "*" "@types/elliptic@^6.4.18": version "6.4.18" - resolved "https://registry.yarnpkg.com/@types/elliptic/-/elliptic-6.4.18.tgz#bc96e26e1ccccbabe8b6f0e409c85898635482e1" + resolved "https://registry.npmjs.org/@types/elliptic/-/elliptic-6.4.18.tgz" integrity sha512-UseG6H5vjRiNpQvrhy4VF/JXdA3V/Fp5amvveaL+fs28BZ6xIKJBPnUPRlEaZpysD9MbpfaLi8lbl7PGUAkpWw== dependencies: "@types/bn.js" "*" "@types/form-data@0.0.33": version "0.0.33" - resolved "https://registry.yarnpkg.com/@types/form-data/-/form-data-0.0.33.tgz#c9ac85b2a5fd18435b8c85d9ecb50e6d6c893ff8" + resolved "https://registry.npmjs.org/@types/form-data/-/form-data-0.0.33.tgz" integrity sha512-8BSvG1kGm83cyJITQMZSulnl6QV8jqAGreJsc5tPu1Jq0vTSOiY/k24Wx82JRpWwZSqrala6sd5rWi6aNXvqcw== dependencies: "@types/node" "*" "@types/glob@^7.1.1": version "7.2.0" - resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.2.0.tgz#bc1b5bf3aa92f25bd5dd39f35c57361bdce5b2eb" + resolved "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz" integrity sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA== dependencies: "@types/minimatch" "*" @@ -1652,27 +1556,27 @@ "@types/http-cache-semantics@^4.0.2": version "4.0.4" - resolved "https://registry.yarnpkg.com/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz#b979ebad3919799c979b17c72621c0bc0a31c6c4" + resolved "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz" integrity sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA== "@types/json-schema@^7.0.12": version "7.0.15" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" + resolved "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz" integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== "@types/json5@^0.0.29": version "0.0.29" - resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" + resolved "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz" integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== "@types/level-errors@*": version "3.0.2" - resolved "https://registry.yarnpkg.com/@types/level-errors/-/level-errors-3.0.2.tgz#f33ec813c50780b547463da9ad8acac89ee457d9" + resolved "https://registry.npmjs.org/@types/level-errors/-/level-errors-3.0.2.tgz" integrity sha512-gyZHbcQ2X5hNXf/9KS2qGEmgDe9EN2WDM3rJ5Ele467C0nA1sLhtmv1bZiPMDYfAYCfPWft0uQIaTvXbASSTRA== "@types/levelup@^4.3.0": version "4.3.3" - resolved "https://registry.yarnpkg.com/@types/levelup/-/levelup-4.3.3.tgz#4dc2b77db079b1cf855562ad52321aa4241b8ef4" + resolved "https://registry.npmjs.org/@types/levelup/-/levelup-4.3.3.tgz" integrity sha512-K+OTIjJcZHVlZQN1HmU64VtrC0jC3dXWQozuEIR9zVvltIk90zaGPM2AgT+fIkChpzHhFE3YnvFLCbLtzAmexA== dependencies: "@types/abstract-leveldown" "*" @@ -1681,34 +1585,34 @@ "@types/lodash@^4.14.199": version "4.17.0" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.17.0.tgz#d774355e41f372d5350a4d0714abb48194a489c3" + resolved "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.0.tgz" integrity sha512-t7dhREVv6dbNj0q17X12j7yDG4bD/DHYX7o5/DbDxobP0HnGPgpRz2Ej77aL7TZT3DSw13fqUTj8J4mMnqa7WA== "@types/lru-cache@5.1.1", "@types/lru-cache@^5.1.0": version "5.1.1" - resolved "https://registry.yarnpkg.com/@types/lru-cache/-/lru-cache-5.1.1.tgz#c48c2e27b65d2a153b19bfc1a317e30872e01eef" + resolved "https://registry.npmjs.org/@types/lru-cache/-/lru-cache-5.1.1.tgz" integrity sha512-ssE3Vlrys7sdIzs5LOxCzTVMsU7i9oa/IaW92wF32JFb3CVczqOkru2xspuKczHEbG3nvmPY7IFqVmGGHdNbYw== "@types/minimatch@*": version "5.1.2" - resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-5.1.2.tgz#07508b45797cb81ec3f273011b054cd0755eddca" + resolved "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz" integrity sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA== "@types/mkdirp@^0.5.2": version "0.5.2" - resolved "https://registry.yarnpkg.com/@types/mkdirp/-/mkdirp-0.5.2.tgz#503aacfe5cc2703d5484326b1b27efa67a339c1f" + resolved "https://registry.npmjs.org/@types/mkdirp/-/mkdirp-0.5.2.tgz" integrity sha512-U5icWpv7YnZYGsN4/cmh3WD2onMY0aJIiTE6+51TwJCttdHvtCYmkBNOobHlXwrJRL0nkH9jH4kD+1FAdMN4Tg== dependencies: "@types/node" "*" "@types/mocha@^8.2.3": version "8.2.3" - resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-8.2.3.tgz#bbeb55fbc73f28ea6de601fbfa4613f58d785323" + resolved "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.3.tgz" integrity sha512-ekGvFhFgrc2zYQoX4JeZPmVzZxw6Dtllga7iGHzfbYIYkAMUx/sAFP2GdFpLff+vdHXu5fl7WX9AT+TtqYcsyw== "@types/node-fetch@^2.6.1": version "2.6.11" - resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.11.tgz#9b39b78665dae0e82a08f02f4967d62c66f95d24" + resolved "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.11.tgz" integrity sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g== dependencies: "@types/node" "*" @@ -1716,75 +1620,75 @@ "@types/node@*": version "20.12.6" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.12.6.tgz#72d068870518d7da1d97b49db401e2d6a1805294" + resolved "https://registry.npmjs.org/@types/node/-/node-20.12.6.tgz" integrity sha512-3KurE8taB8GCvZBPngVbp0lk5CKi8M9f9k1rsADh0Evdz5SzJ+Q+Hx9uHoFGsLnLnd1xmkDQr2hVhlA0Mn0lKQ== dependencies: undici-types "~5.26.4" "@types/node@11.11.6": version "11.11.6" - resolved "https://registry.yarnpkg.com/@types/node/-/node-11.11.6.tgz#df929d1bb2eee5afdda598a41930fe50b43eaa6a" + resolved "https://registry.npmjs.org/@types/node/-/node-11.11.6.tgz" integrity sha512-Exw4yUWMBXM3X+8oqzJNRqZSwUAaS4+7NdvHqQuFi/d+synz++xmX3QIf+BFqneW8N31R8Ky+sikfZUXq07ggQ== "@types/node@^10.0.3": version "10.17.60" - resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.60.tgz#35f3d6213daed95da7f0f73e75bcc6980e90597b" + resolved "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz" integrity sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw== "@types/node@^17.0.34": version "17.0.45" - resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.45.tgz#2c0fafd78705e7a18b7906b5201a522719dc5190" + resolved "https://registry.npmjs.org/@types/node/-/node-17.0.45.tgz" integrity sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw== "@types/node@^8.0.0": version "8.10.66" - resolved "https://registry.yarnpkg.com/@types/node/-/node-8.10.66.tgz#dd035d409df322acc83dff62a602f12a5783bbb3" + resolved "https://registry.npmjs.org/@types/node/-/node-8.10.66.tgz" integrity sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw== "@types/pbkdf2@^3.0.0": version "3.1.2" - resolved "https://registry.yarnpkg.com/@types/pbkdf2/-/pbkdf2-3.1.2.tgz#2dc43808e9985a2c69ff02e2d2027bd4fe33e8dc" + resolved "https://registry.npmjs.org/@types/pbkdf2/-/pbkdf2-3.1.2.tgz" integrity sha512-uRwJqmiXmh9++aSu1VNEn3iIxWOhd8AHXNSdlaLfdAAdSTY9jYVeGWnzejM3dvrkbqE3/hyQkQQ29IFATEGlew== dependencies: "@types/node" "*" "@types/prettier@^2.1.1": version "2.7.3" - resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.7.3.tgz#3e51a17e291d01d17d3fc61422015a933af7a08f" + resolved "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.3.tgz" integrity sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA== "@types/qs@^6.2.31": version "6.9.10" - resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.10.tgz#0af26845b5067e1c9a622658a51f60a3934d51e8" + resolved "https://registry.npmjs.org/@types/qs/-/qs-6.9.10.tgz" integrity sha512-3Gnx08Ns1sEoCrWssEgTSJs/rsT2vhGP+Ja9cnnk9k4ALxinORlQneLXFeFKOTJMOeZUFD1s7w+w2AphTpvzZw== "@types/resolve@^0.0.8": version "0.0.8" - resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-0.0.8.tgz#f26074d238e02659e323ce1a13d041eee280e194" + resolved "https://registry.npmjs.org/@types/resolve/-/resolve-0.0.8.tgz" integrity sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ== dependencies: "@types/node" "*" "@types/secp256k1@^4.0.1": version "4.0.6" - resolved "https://registry.yarnpkg.com/@types/secp256k1/-/secp256k1-4.0.6.tgz#d60ba2349a51c2cbc5e816dcd831a42029d376bf" + resolved "https://registry.npmjs.org/@types/secp256k1/-/secp256k1-4.0.6.tgz" integrity sha512-hHxJU6PAEUn0TP4S/ZOzuTUvJWuZ6eIKeNKb5RBpODvSl6hp1Wrw4s7ATY50rklRCScUDpHzVA/DQdSjJ3UoYQ== dependencies: "@types/node" "*" "@types/seedrandom@3.0.1": version "3.0.1" - resolved "https://registry.yarnpkg.com/@types/seedrandom/-/seedrandom-3.0.1.tgz#1254750a4fec4aff2ebec088ccd0bb02e91fedb4" + resolved "https://registry.npmjs.org/@types/seedrandom/-/seedrandom-3.0.1.tgz" integrity sha512-giB9gzDeiCeloIXDgzFBCgjj1k4WxcDrZtGl6h1IqmUPlxF+Nx8Ve+96QCyDZ/HseB/uvDsKbpib9hU5cU53pw== "@types/semver@^7.5.0": version "7.5.8" - resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.8.tgz#8268a8c57a3e4abd25c165ecd36237db7948a55e" + resolved "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz" integrity sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ== "@typescript-eslint/eslint-plugin@^6.7.4": version "6.21.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.21.0.tgz#30830c1ca81fd5f3c2714e524c4303e0194f9cd3" + resolved "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.21.0.tgz" integrity sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA== dependencies: "@eslint-community/regexpp" "^4.5.1" @@ -1801,7 +1705,7 @@ "@typescript-eslint/parser@^6.7.4": version "6.21.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.21.0.tgz#af8fcf66feee2edc86bc5d1cf45e33b0630bf35b" + resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.21.0.tgz" integrity sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ== dependencies: "@typescript-eslint/scope-manager" "6.21.0" @@ -1812,7 +1716,7 @@ "@typescript-eslint/scope-manager@6.21.0": version "6.21.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz#ea8a9bfc8f1504a6ac5d59a6df308d3a0630a2b1" + resolved "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz" integrity sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg== dependencies: "@typescript-eslint/types" "6.21.0" @@ -1820,7 +1724,7 @@ "@typescript-eslint/type-utils@6.21.0": version "6.21.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-6.21.0.tgz#6473281cfed4dacabe8004e8521cee0bd9d4c01e" + resolved "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.21.0.tgz" integrity sha512-rZQI7wHfao8qMX3Rd3xqeYSMCL3SoiSQLBATSiVKARdFGCYSRvmViieZjqc58jKgs8Y8i9YvVVhRbHSTA4VBag== dependencies: "@typescript-eslint/typescript-estree" "6.21.0" @@ -1830,12 +1734,12 @@ "@typescript-eslint/types@6.21.0": version "6.21.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.21.0.tgz#205724c5123a8fef7ecd195075fa6e85bac3436d" + resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.21.0.tgz" integrity sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg== "@typescript-eslint/typescript-estree@6.21.0": version "6.21.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz#c47ae7901db3b8bddc3ecd73daff2d0895688c46" + resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz" integrity sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ== dependencies: "@typescript-eslint/types" "6.21.0" @@ -1849,7 +1753,7 @@ "@typescript-eslint/utils@6.21.0": version "6.21.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.21.0.tgz#4714e7a6b39e773c1c8e97ec587f520840cd8134" + resolved "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.21.0.tgz" integrity sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ== dependencies: "@eslint-community/eslint-utils" "^4.4.0" @@ -1862,7 +1766,7 @@ "@typescript-eslint/visitor-keys@6.21.0": version "6.21.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz#87a99d077aa507e20e238b11d56cc26ade45fe47" + resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz" integrity sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A== dependencies: "@typescript-eslint/types" "6.21.0" @@ -1870,17 +1774,17 @@ "@ungap/promise-all-settled@1.1.2": version "1.1.2" - resolved "https://registry.yarnpkg.com/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44" + resolved "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz" integrity sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q== "@ungap/structured-clone@^1.2.0": version "1.2.0" - resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406" + resolved "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz" integrity sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ== JSONStream@1.3.2: version "1.3.2" - resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.2.tgz#c102371b6ec3a7cf3b847ca00c20bb0fce4c6dea" + resolved "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.2.tgz" integrity sha512-mn0KSip7N4e0UDPZHnqDsHECo5uGQrixQKnAskOM1BIB8hd7QKbd6il8IPRPudPHOeHiECoCFqhyMaRO9+nWyA== dependencies: jsonparse "^1.2.0" @@ -1888,17 +1792,17 @@ JSONStream@1.3.2: abbrev@1: version "1.1.1" - resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" + resolved "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz" integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== abbrev@1.0.x: version "1.0.9" - resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" + resolved "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz" integrity sha512-LEyx4aLEC3x6T0UguF6YILf+ntvmOaWsVfENmIW0E9H09vKlLDGelMjjSm0jkDHALj8A8quZ/HapKNigzwge+Q== abstract-leveldown@^6.2.1: version "6.3.0" - resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-6.3.0.tgz#d25221d1e6612f820c35963ba4bd739928f6026a" + resolved "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-6.3.0.tgz" integrity sha512-TU5nlYgta8YrBMNpc9FwQzRbiXsj49gsALsXadbGHt9CROPzX5fB0rWDR5mtdpOOKa5XqRFpbj1QroPAoPzVjQ== dependencies: buffer "^5.5.0" @@ -1909,7 +1813,7 @@ abstract-leveldown@^6.2.1: abstract-leveldown@^7.2.0: version "7.2.0" - resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-7.2.0.tgz#08d19d4e26fb5be426f7a57004851b39e1795a2e" + resolved "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-7.2.0.tgz" integrity sha512-DnhQwcFEaYsvYDnACLZhMmCWd3rkOeEvglpa4q5i/5Jlm3UIsWaxVzuXvDLFCSCWRO3yy2/+V/G7FusFgejnfQ== dependencies: buffer "^6.0.3" @@ -1921,7 +1825,7 @@ abstract-leveldown@^7.2.0: abstract-leveldown@~6.2.1: version "6.2.3" - resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-6.2.3.tgz#036543d87e3710f2528e47040bc3261b77a9a8eb" + resolved "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-6.2.3.tgz" integrity sha512-BsLm5vFMRUrrLeCcRc+G0t2qOaTzpoJQLOubq2XM72eNpjF5UdU5o/5NvlNhx95XHcAvcl8OMXr4mlg/fRgUXQ== dependencies: buffer "^5.5.0" @@ -1932,39 +1836,39 @@ abstract-leveldown@~6.2.1: acorn-jsx@^5.3.2: version "5.3.2" - resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" + resolved "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== acorn-walk@^8.1.1: version "8.3.2" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.2.tgz#7703af9415f1b6db9315d6895503862e231d34aa" + resolved "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.2.tgz" integrity sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A== acorn@^8.4.1, acorn@^8.9.0: version "8.11.3" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.3.tgz#71e0b14e13a4ec160724b38fb7b0f233b1b81d7a" + resolved "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz" integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg== adm-zip@^0.4.16: version "0.4.16" - resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.16.tgz#cf4c508fdffab02c269cbc7f471a875f05570365" + resolved "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.16.tgz" integrity sha512-TFi4HBKSGfIKsK5YCkKaaFG2m4PEDyViZmEwof3MTIgzimHLto6muaHVpbrljdIvIrFZzEq/p4nafOeLcYegrg== aes-js@3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.0.0.tgz#e21df10ad6c2053295bcbb8dab40b09dbea87e4d" + resolved "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz" integrity sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw== agent-base@6: version "6.0.2" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" + resolved "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz" integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== dependencies: debug "4" aggregate-error@^3.0.0: version "3.1.0" - resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a" + resolved "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz" integrity sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA== dependencies: clean-stack "^2.0.0" @@ -1972,7 +1876,7 @@ aggregate-error@^3.0.0: ajv@^6.12.3, ajv@^6.12.4, ajv@^6.12.6: version "6.12.6" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + resolved "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== dependencies: fast-deep-equal "^3.1.1" @@ -1982,7 +1886,7 @@ ajv@^6.12.3, ajv@^6.12.4, ajv@^6.12.6: ajv@^8.0.1: version "8.13.0" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.13.0.tgz#a3939eaec9fb80d217ddf0c3376948c023f28c91" + resolved "https://registry.npmjs.org/ajv/-/ajv-8.13.0.tgz" integrity sha512-PRA911Blj99jR5RMeTunVbNXMF6Lp4vZXnk5GQjcnUWUTsrXtekg/pnmFFI2u/I36Y/2bITGS30GZCXei6uNkA== dependencies: fast-deep-equal "^3.1.3" @@ -1992,70 +1896,70 @@ ajv@^8.0.1: amdefine@>=0.0.4: version "1.0.1" - resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" + resolved "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz" integrity sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg== ansi-align@^3.0.0: version "3.0.1" - resolved "https://registry.yarnpkg.com/ansi-align/-/ansi-align-3.0.1.tgz#0cdf12e111ace773a86e9a1fad1225c43cb19a59" + resolved "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz" integrity sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w== dependencies: string-width "^4.1.0" ansi-colors@4.1.1: version "4.1.1" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" + resolved "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz" integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== ansi-colors@^4.1.1: version "4.1.3" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" + resolved "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz" integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== ansi-escapes@^4.3.0: version "4.3.2" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" + resolved "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz" integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== dependencies: type-fest "^0.21.3" ansi-regex@^3.0.0: version "3.0.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.1.tgz#123d6479e92ad45ad897d4054e3c7ca7db4944e1" + resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz" integrity sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw== ansi-regex@^5.0.1: version "5.0.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz" integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== ansi-styles@^3.2.1: version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz" integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== dependencies: color-convert "^1.9.0" ansi-styles@^4.0.0, ansi-styles@^4.1.0: version "4.3.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz" integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== dependencies: color-convert "^2.0.1" antlr4@^4.13.1-patch-1: version "4.13.1-patch-1" - resolved "https://registry.yarnpkg.com/antlr4/-/antlr4-4.13.1-patch-1.tgz#946176f863f890964a050c4f18c47fd6f7e57602" + resolved "https://registry.npmjs.org/antlr4/-/antlr4-4.13.1-patch-1.tgz" integrity sha512-OjFLWWLzDMV9rdFhpvroCWR4ooktNg9/nvVYSA5z28wuVpU36QUNuioR1XLnQtcjVlf8npjyz593PxnU/f/Cow== antlr4ts@^0.5.0-alpha.4: version "0.5.0-alpha.4" - resolved "https://registry.yarnpkg.com/antlr4ts/-/antlr4ts-0.5.0-alpha.4.tgz#71702865a87478ed0b40c0709f422cf14d51652a" + resolved "https://registry.npmjs.org/antlr4ts/-/antlr4ts-0.5.0-alpha.4.tgz" integrity sha512-WPQDt1B74OfPv/IMS2ekXAKkTZIHl88uMetg6q3OTqgFxZ/dxDXI0EWLyZid/1Pe6hTftyg5N7gel5wNAGxXyQ== anymatch@~3.1.2: version "3.1.3" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" + resolved "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz" integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== dependencies: normalize-path "^3.0.0" @@ -2063,48 +1967,48 @@ anymatch@~3.1.2: arg@^4.1.0: version "4.1.3" - resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" + resolved "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz" integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== argparse@^1.0.10, argparse@^1.0.7: version "1.0.10" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + resolved "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz" integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== dependencies: sprintf-js "~1.0.2" argparse@^2.0.1: version "2.0.1" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + resolved "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz" integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== array-back@^1.0.3, array-back@^1.0.4: version "1.0.4" - resolved "https://registry.yarnpkg.com/array-back/-/array-back-1.0.4.tgz#644ba7f095f7ffcf7c43b5f0dc39d3c1f03c063b" + resolved "https://registry.npmjs.org/array-back/-/array-back-1.0.4.tgz" integrity sha512-1WxbZvrmyhkNoeYcizokbmh5oiOCIfyvGtcqbK3Ls1v1fKcquzxnQSceOx6tzq7jmai2kFLWIpGND2cLhH6TPw== dependencies: typical "^2.6.0" array-back@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/array-back/-/array-back-2.0.0.tgz#6877471d51ecc9c9bfa6136fb6c7d5fe69748022" + resolved "https://registry.npmjs.org/array-back/-/array-back-2.0.0.tgz" integrity sha512-eJv4pLLufP3g5kcZry0j6WXpIbzYw9GUB4mVJZno9wfwiBxbizTnHCw3VJb07cBihbFX48Y7oSrW9y+gt4glyw== dependencies: typical "^2.6.1" array-back@^3.0.1, array-back@^3.1.0: version "3.1.0" - resolved "https://registry.yarnpkg.com/array-back/-/array-back-3.1.0.tgz#b8859d7a508871c9a7b2cf42f99428f65e96bfb0" + resolved "https://registry.npmjs.org/array-back/-/array-back-3.1.0.tgz" integrity sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q== array-back@^4.0.1, array-back@^4.0.2: version "4.0.2" - resolved "https://registry.yarnpkg.com/array-back/-/array-back-4.0.2.tgz#8004e999a6274586beeb27342168652fdb89fa1e" + resolved "https://registry.npmjs.org/array-back/-/array-back-4.0.2.tgz" integrity sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg== array-buffer-byte-length@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz#1e5583ec16763540a27ae52eed99ff899223568f" + resolved "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz" integrity sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg== dependencies: call-bind "^1.0.5" @@ -2112,7 +2016,7 @@ array-buffer-byte-length@^1.0.1: array-includes@^3.1.7: version "3.1.8" - resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.8.tgz#5e370cbe172fdd5dd6530c1d4aadda25281ba97d" + resolved "https://registry.npmjs.org/array-includes/-/array-includes-3.1.8.tgz" integrity sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ== dependencies: call-bind "^1.0.7" @@ -2124,17 +2028,17 @@ array-includes@^3.1.7: array-union@^2.1.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" + resolved "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz" integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== array-uniq@1.0.3: version "1.0.3" - resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" + resolved "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz" integrity sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q== array.prototype.findlastindex@^1.2.3: version "1.2.5" - resolved "https://registry.yarnpkg.com/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.5.tgz#8c35a755c72908719453f87145ca011e39334d0d" + resolved "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.5.tgz" integrity sha512-zfETvRFA8o7EiNn++N5f/kaCw221hrpGsDmcpndVupkPzEc1Wuf3VgC0qby1BbHs7f5DVYjgtEU2LLh5bqeGfQ== dependencies: call-bind "^1.0.7" @@ -2146,7 +2050,7 @@ array.prototype.findlastindex@^1.2.3: array.prototype.flat@^1.3.2: version "1.3.2" - resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz#1476217df8cff17d72ee8f3ba06738db5b387d18" + resolved "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz" integrity sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA== dependencies: call-bind "^1.0.2" @@ -2156,7 +2060,7 @@ array.prototype.flat@^1.3.2: array.prototype.flatmap@^1.3.2: version "1.3.2" - resolved "https://registry.yarnpkg.com/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz#c9a7c6831db8e719d6ce639190146c24bbd3e527" + resolved "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz" integrity sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ== dependencies: call-bind "^1.0.2" @@ -2166,7 +2070,7 @@ array.prototype.flatmap@^1.3.2: arraybuffer.prototype.slice@^1.0.3: version "1.0.3" - resolved "https://registry.yarnpkg.com/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz#097972f4255e41bc3425e37dc3f6421cf9aefde6" + resolved "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz" integrity sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A== dependencies: array-buffer-byte-length "^1.0.1" @@ -2180,87 +2084,87 @@ arraybuffer.prototype.slice@^1.0.3: asap@~2.0.6: version "2.0.6" - resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" + resolved "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz" integrity sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA== asn1@^0.2.6, asn1@~0.2.3: version "0.2.6" - resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.6.tgz#0d3a7bb6e64e02a90c0303b31f292868ea09a08d" + resolved "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz" integrity sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ== dependencies: safer-buffer "~2.1.0" assert-plus@1.0.0, assert-plus@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + resolved "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz" integrity sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw== assertion-error@^1.1.0: version "1.1.0" - resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" + resolved "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz" integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== ast-parents@^0.0.1: version "0.0.1" - resolved "https://registry.yarnpkg.com/ast-parents/-/ast-parents-0.0.1.tgz#508fd0f05d0c48775d9eccda2e174423261e8dd3" + resolved "https://registry.npmjs.org/ast-parents/-/ast-parents-0.0.1.tgz" integrity sha512-XHusKxKz3zoYk1ic8Un640joHbFMhbqneyoZfoKnEGtf2ey9Uh/IdpcQplODdO/kENaMIWsD0nJm4+wX3UNLHA== astral-regex@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" + resolved "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz" integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== async-eventemitter@^0.2.4: version "0.2.4" - resolved "https://registry.yarnpkg.com/async-eventemitter/-/async-eventemitter-0.2.4.tgz#f5e7c8ca7d3e46aab9ec40a292baf686a0bafaca" + resolved "https://registry.npmjs.org/async-eventemitter/-/async-eventemitter-0.2.4.tgz" integrity sha512-pd20BwL7Yt1zwDFy+8MX8F1+WCT8aQeKj0kQnTrH9WaeRETlRamVhD0JtRPmrV4GfOJ2F9CvdQkZeZhnh2TuHw== dependencies: async "^2.4.0" async@1.x: version "1.5.2" - resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" + resolved "https://registry.npmjs.org/async/-/async-1.5.2.tgz" integrity sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w== async@^2.4.0: version "2.6.4" - resolved "https://registry.yarnpkg.com/async/-/async-2.6.4.tgz#706b7ff6084664cd7eae713f6f965433b5504221" + resolved "https://registry.npmjs.org/async/-/async-2.6.4.tgz" integrity sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA== dependencies: lodash "^4.17.14" asynckit@^0.4.0: version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + resolved "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz" integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== available-typed-arrays@^1.0.7: version "1.0.7" - resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz#a5cc375d6a03c2efc87a553f3e0b1522def14846" + resolved "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz" integrity sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ== dependencies: possible-typed-array-names "^1.0.0" aws-sign2@~0.7.0: version "0.7.0" - resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" + resolved "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz" integrity sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA== aws4@^1.8.0: version "1.12.0" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.12.0.tgz#ce1c9d143389679e253b314241ea9aa5cec980d3" + resolved "https://registry.npmjs.org/aws4/-/aws4-1.12.0.tgz" integrity sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg== axios@^0.21.1: version "0.21.4" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.4.tgz#c67b90dc0568e5c1cf2b0b858c43ba28e2eda575" + resolved "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz" integrity sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg== dependencies: follow-redirects "^1.14.0" axios@^1.4.0, axios@^1.5.1: version "1.6.8" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.6.8.tgz#66d294951f5d988a00e87a0ffb955316a619ea66" + resolved "https://registry.npmjs.org/axios/-/axios-1.6.8.tgz" integrity sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ== dependencies: follow-redirects "^1.15.6" @@ -2269,7 +2173,7 @@ axios@^1.4.0, axios@^1.5.1: axios@^1.6.2: version "1.7.2" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.2.tgz#b625db8a7051fbea61c35a3cbb3a1daa7b9c7621" + resolved "https://registry.npmjs.org/axios/-/axios-1.7.2.tgz" integrity sha512-2A8QhOMrbomlDuiLeK9XibIBzuHeRcqqNOHp0Cyp5EoJ1IFDh+XZH3A6BkXtv0K4gFGCI0Y4BM7B1wOEi0Rmgw== dependencies: follow-redirects "^1.15.6" @@ -2278,7 +2182,7 @@ axios@^1.6.2: axios@^1.7.2: version "1.7.7" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.7.tgz#2f554296f9892a72ac8d8e4c5b79c14a91d0a47f" + resolved "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz" integrity sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q== dependencies: follow-redirects "^1.15.6" @@ -2287,7 +2191,7 @@ axios@^1.7.2: babel-runtime@^6.26.0: version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" + resolved "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz" integrity sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g== dependencies: core-js "^2.4.0" @@ -2295,46 +2199,46 @@ babel-runtime@^6.26.0: balanced-match@^1.0.0: version "1.0.2" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== base-x@^3.0.2: version "3.0.9" - resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.9.tgz#6349aaabb58526332de9f60995e548a53fe21320" + resolved "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz" integrity sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ== dependencies: safe-buffer "^5.0.1" base64-js@^1.3.1: version "1.5.1" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" + resolved "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== bcrypt-pbkdf@^1.0.0, bcrypt-pbkdf@^1.0.2: version "1.0.2" - resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" + resolved "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz" integrity sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w== dependencies: tweetnacl "^0.14.3" bech32@1.1.4: version "1.1.4" - resolved "https://registry.yarnpkg.com/bech32/-/bech32-1.1.4.tgz#e38c9f37bf179b8eb16ae3a772b40c356d4832e9" + resolved "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz" integrity sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ== bignumber.js@^9.0.0, bignumber.js@^9.0.1: version "9.1.2" - resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.1.2.tgz#b7c4242259c008903b13707983b5f4bbd31eda0c" + resolved "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.2.tgz" integrity sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug== binary-extensions@^2.0.0: version "2.3.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.3.0.tgz#f6e14a97858d327252200242d4ccfe522c445522" + resolved "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz" integrity sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw== bip39@3.0.4: version "3.0.4" - resolved "https://registry.yarnpkg.com/bip39/-/bip39-3.0.4.tgz#5b11fed966840b5e1b8539f0f54ab6392969b2a0" + resolved "https://registry.npmjs.org/bip39/-/bip39-3.0.4.tgz" integrity sha512-YZKQlb752TrUWqHWj7XAwCSjYEgGAk+/Aas3V7NyjQeZYsztO8JnQUaCWhcnL4T+jL8nvB8typ2jRPzTlgugNw== dependencies: "@types/node" "11.11.6" @@ -2344,7 +2248,7 @@ bip39@3.0.4: bl@^1.0.0: version "1.2.3" - resolved "https://registry.yarnpkg.com/bl/-/bl-1.2.3.tgz#1e8dd80142eac80d7158c9dccc047fb620e035e7" + resolved "https://registry.npmjs.org/bl/-/bl-1.2.3.tgz" integrity sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww== dependencies: readable-stream "^2.3.5" @@ -2352,36 +2256,36 @@ bl@^1.0.0: bl@^4.0.3: version "4.1.0" - resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a" + resolved "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz" integrity sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w== dependencies: buffer "^5.5.0" inherits "^2.0.4" readable-stream "^3.4.0" -blakejs@^1.1.0: +blakejs@^1.1.0, blakejs@^1.2.1: version "1.2.1" - resolved "https://registry.yarnpkg.com/blakejs/-/blakejs-1.2.1.tgz#5057e4206eadb4a97f7c0b6e197a505042fc3814" + resolved "https://registry.npmjs.org/blakejs/-/blakejs-1.2.1.tgz" integrity sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ== bn.js@4.11.6: version "4.11.6" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.6.tgz#53344adb14617a13f6e8dd2ce28905d1c0ba3215" + resolved "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz" integrity sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA== bn.js@^4.0.0, bn.js@^4.11.0, bn.js@^4.11.1, bn.js@^4.11.8, bn.js@^4.11.9: version "4.12.0" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" + resolved "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz" integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== bn.js@^5.1.2, bn.js@^5.2.0, bn.js@^5.2.1: version "5.2.1" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" + resolved "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz" integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== boxen@^5.1.2: version "5.1.2" - resolved "https://registry.yarnpkg.com/boxen/-/boxen-5.1.2.tgz#788cb686fc83c1f486dfa8a40c68fc2b831d2b50" + resolved "https://registry.npmjs.org/boxen/-/boxen-5.1.2.tgz" integrity sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ== dependencies: ansi-align "^3.0.0" @@ -2395,7 +2299,7 @@ boxen@^5.1.2: brace-expansion@^1.1.7: version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz" integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== dependencies: balanced-match "^1.0.0" @@ -2403,31 +2307,31 @@ brace-expansion@^1.1.7: brace-expansion@^2.0.1: version "2.0.1" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" + resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz" integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== dependencies: balanced-match "^1.0.0" braces@^3.0.2, braces@~3.0.2: version "3.0.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + resolved "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz" integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== dependencies: fill-range "^7.0.1" brorand@^1.0.1, brorand@^1.1.0: version "1.1.0" - resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" + resolved "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz" integrity sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w== browser-stdout@1.3.1: version "1.3.1" - resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" + resolved "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz" integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== browserify-aes@^1.2.0: version "1.2.0" - resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" + resolved "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz" integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== dependencies: buffer-xor "^1.0.3" @@ -2439,14 +2343,14 @@ browserify-aes@^1.2.0: bs58@^4.0.0: version "4.0.1" - resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a" + resolved "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz" integrity sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw== dependencies: base-x "^3.0.2" bs58check@^2.1.2: version "2.1.2" - resolved "https://registry.yarnpkg.com/bs58check/-/bs58check-2.1.2.tgz#53b018291228d82a5aa08e7d796fdafda54aebfc" + resolved "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz" integrity sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA== dependencies: bs58 "^4.0.0" @@ -2455,12 +2359,12 @@ bs58check@^2.1.2: buffer-alloc-unsafe@^1.1.0: version "1.1.0" - resolved "https://registry.yarnpkg.com/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz#bd7dc26ae2972d0eda253be061dba992349c19f0" + resolved "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz" integrity sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg== buffer-alloc@^1.2.0: version "1.2.0" - resolved "https://registry.yarnpkg.com/buffer-alloc/-/buffer-alloc-1.2.0.tgz#890dd90d923a873e08e10e5fd51a57e5b7cce0ec" + resolved "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz" integrity sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow== dependencies: buffer-alloc-unsafe "^1.1.0" @@ -2468,39 +2372,39 @@ buffer-alloc@^1.2.0: buffer-equal-constant-time@1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819" + resolved "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz" integrity sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA== buffer-fill@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/buffer-fill/-/buffer-fill-1.0.0.tgz#f8f78b76789888ef39f205cd637f68e702122b2c" + resolved "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz" integrity sha512-T7zexNBwiiaCOGDg9xNX9PBmjrubblRkENuptryuI64URkXDFum9il/JGL8Lm8wYfAXpredVXXZz7eMHilimiQ== buffer-from@^1.0.0: version "1.1.2" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" + resolved "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz" integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== buffer-reverse@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/buffer-reverse/-/buffer-reverse-1.0.1.tgz#49283c8efa6f901bc01fa3304d06027971ae2f60" + resolved "https://registry.npmjs.org/buffer-reverse/-/buffer-reverse-1.0.1.tgz" integrity sha512-M87YIUBsZ6N924W57vDwT/aOu8hw7ZgdByz6ijksLjmHJELBASmYTTlNHRgjE+pTsT9oJXGaDSgqqwfdHotDUg== buffer-xor@^1.0.3: version "1.0.3" - resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" + resolved "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz" integrity sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ== buffer-xor@^2.0.1: version "2.0.2" - resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-2.0.2.tgz#34f7c64f04c777a1f8aac5e661273bb9dd320289" + resolved "https://registry.npmjs.org/buffer-xor/-/buffer-xor-2.0.2.tgz" integrity sha512-eHslX0bin3GB+Lx2p7lEYRShRewuNZL3fUl4qlVJGGiwoPGftmt8JQgk2Y9Ji5/01TnVDo33E5b5O3vUB1HdqQ== dependencies: safe-buffer "^5.1.1" buffer@^5.5.0, buffer@^5.6.0: version "5.7.1" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" + resolved "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz" integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== dependencies: base64-js "^1.3.1" @@ -2508,7 +2412,7 @@ buffer@^5.5.0, buffer@^5.6.0: buffer@^6.0.3: version "6.0.3" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" + resolved "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz" integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== dependencies: base64-js "^1.3.1" @@ -2516,29 +2420,29 @@ buffer@^6.0.3: bufferutil@4.0.5: version "4.0.5" - resolved "https://registry.yarnpkg.com/bufferutil/-/bufferutil-4.0.5.tgz#da9ea8166911cc276bf677b8aed2d02d31f59028" + resolved "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.5.tgz" integrity sha512-HTm14iMQKK2FjFLRTM5lAVcyaUzOnqbPtesFIvREgXpJHdQm8bWS+GkQgIkfaBYRHuCnea7w8UVNfwiAQhlr9A== dependencies: node-gyp-build "^4.3.0" buildcheck@~0.0.6: version "0.0.6" - resolved "https://registry.yarnpkg.com/buildcheck/-/buildcheck-0.0.6.tgz#89aa6e417cfd1e2196e3f8fe915eb709d2fe4238" + resolved "https://registry.npmjs.org/buildcheck/-/buildcheck-0.0.6.tgz" integrity sha512-8f9ZJCUXyT1M35Jx7MkBgmBMo3oHTTBIPLiY9xyL0pl3T5RwcPEY8cUHr5LBNfu/fk6c2T4DJZuVM/8ZZT2D2A== bytes@3.1.2: version "3.1.2" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" + resolved "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz" integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== cacheable-lookup@^7.0.0: version "7.0.0" - resolved "https://registry.yarnpkg.com/cacheable-lookup/-/cacheable-lookup-7.0.0.tgz#3476a8215d046e5a3202a9209dd13fec1f933a27" + resolved "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-7.0.0.tgz" integrity sha512-+qJyx4xiKra8mZrcwhjMRMUhD5NR1R8esPkzIYxX96JiecFoxAXFuz/GpR3+ev4PE1WamHip78wV0vcmPQtp8w== cacheable-request@^10.2.8: version "10.2.14" - resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-10.2.14.tgz#eb915b665fda41b79652782df3f553449c406b9d" + resolved "https://registry.npmjs.org/cacheable-request/-/cacheable-request-10.2.14.tgz" integrity sha512-zkDT5WAF4hSSoUgyfg5tFIxz8XQK+25W/TLVojJTMKBaxevLBBtLxgqguAuVQB8PVW79FVjHcU+GJ9tVbDZ9mQ== dependencies: "@types/http-cache-semantics" "^4.0.2" @@ -2551,7 +2455,7 @@ cacheable-request@^10.2.8: call-bind@^1.0.2, call-bind@^1.0.5, call-bind@^1.0.6, call-bind@^1.0.7: version "1.0.7" - resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9" + resolved "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz" integrity sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w== dependencies: es-define-property "^1.0.0" @@ -2562,41 +2466,41 @@ call-bind@^1.0.2, call-bind@^1.0.5, call-bind@^1.0.6, call-bind@^1.0.7: callsites@^3.0.0: version "3.1.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + resolved "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== camelcase@^6.0.0, camelcase@^6.2.0: version "6.3.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" + resolved "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== caseless@^0.12.0, caseless@~0.12.0: version "0.12.0" - resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + resolved "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz" integrity sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw== catering@^2.0.0, catering@^2.1.0: version "2.1.1" - resolved "https://registry.yarnpkg.com/catering/-/catering-2.1.1.tgz#66acba06ed5ee28d5286133982a927de9a04b510" + resolved "https://registry.npmjs.org/catering/-/catering-2.1.1.tgz" integrity sha512-K7Qy8O9p76sL3/3m7/zLKbRkyOlSZAgzEaLhyj2mXS8PsCud2Eo4hAb8aLtZqHh0QGqLcb9dlJSu6lHRVENm1w== cbor@^8.1.0: version "8.1.0" - resolved "https://registry.yarnpkg.com/cbor/-/cbor-8.1.0.tgz#cfc56437e770b73417a2ecbfc9caf6b771af60d5" + resolved "https://registry.npmjs.org/cbor/-/cbor-8.1.0.tgz" integrity sha512-DwGjNW9omn6EwP70aXsn7FQJx5kO12tX0bZkaTjzdVFM6/7nhA4t0EENocKGx6D2Bch9PE2KzCUf5SceBdeijg== dependencies: nofilter "^3.1.0" chai-as-promised@^7.1.1: version "7.1.1" - resolved "https://registry.yarnpkg.com/chai-as-promised/-/chai-as-promised-7.1.1.tgz#08645d825deb8696ee61725dbf590c012eb00ca0" + resolved "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-7.1.1.tgz" integrity sha512-azL6xMoi+uxu6z4rhWQ1jbdUhOMhis2PvscD/xjLqNMkv3BPPp2JyyuTHOrf9BOosGpNQ11v6BKv/g57RXbiaA== dependencies: check-error "^1.0.2" chai@^4.3.10, chai@^4.3.6, chai@^4.3.7: version "4.4.1" - resolved "https://registry.yarnpkg.com/chai/-/chai-4.4.1.tgz#3603fa6eba35425b0f2ac91a009fe924106e50d1" + resolved "https://registry.npmjs.org/chai/-/chai-4.4.1.tgz" integrity sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g== dependencies: assertion-error "^1.1.0" @@ -2609,7 +2513,7 @@ chai@^4.3.10, chai@^4.3.6, chai@^4.3.7: chai@^4.3.4: version "4.5.0" - resolved "https://registry.yarnpkg.com/chai/-/chai-4.5.0.tgz#707e49923afdd9b13a8b0b47d33d732d13812fd8" + resolved "https://registry.npmjs.org/chai/-/chai-4.5.0.tgz" integrity sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw== dependencies: assertion-error "^1.1.0" @@ -2622,7 +2526,7 @@ chai@^4.3.4: chalk@4.1.2, chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.2: version "4.1.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== dependencies: ansi-styles "^4.1.0" @@ -2630,7 +2534,7 @@ chalk@4.1.2, chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.2: chalk@^2.4.1, chalk@^2.4.2: version "2.4.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + resolved "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== dependencies: ansi-styles "^3.2.1" @@ -2639,19 +2543,19 @@ chalk@^2.4.1, chalk@^2.4.2: "charenc@>= 0.0.1": version "0.0.2" - resolved "https://registry.yarnpkg.com/charenc/-/charenc-0.0.2.tgz#c0a1d2f3a7092e03774bfa83f14c0fc5790a8667" + resolved "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz" integrity sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA== check-error@^1.0.2, check-error@^1.0.3: version "1.0.3" - resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.3.tgz#a6502e4312a7ee969f646e83bb3ddd56281bd694" + resolved "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz" integrity sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg== dependencies: get-func-name "^2.0.2" chokidar@3.5.3: version "3.5.3" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" + resolved "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz" integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== dependencies: anymatch "~3.1.2" @@ -2666,7 +2570,7 @@ chokidar@3.5.3: chokidar@^3.4.0: version "3.6.0" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.6.0.tgz#197c6cc669ef2a8dc5e7b4d97ee4e092c3eb0d5b" + resolved "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz" integrity sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw== dependencies: anymatch "~3.1.2" @@ -2681,17 +2585,17 @@ chokidar@^3.4.0: chownr@^1.0.1, chownr@^1.1.1: version "1.1.4" - resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" + resolved "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz" integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== ci-info@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" + resolved "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz" integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: version "1.0.4" - resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" + resolved "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz" integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== dependencies: inherits "^2.0.1" @@ -2699,17 +2603,17 @@ cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: clean-stack@^2.0.0: version "2.2.0" - resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" + resolved "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz" integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== cli-boxes@^2.2.1: version "2.2.1" - resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-2.2.1.tgz#ddd5035d25094fce220e9cab40a45840a440318f" + resolved "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz" integrity sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw== cli-table3@^0.5.0: version "0.5.1" - resolved "https://registry.yarnpkg.com/cli-table3/-/cli-table3-0.5.1.tgz#0252372d94dfc40dbd8df06005f48f31f656f202" + resolved "https://registry.npmjs.org/cli-table3/-/cli-table3-0.5.1.tgz" integrity sha512-7Qg2Jrep1S/+Q3EceiZtQcDPWxhAvBw+ERf1162v4sikJrvojMHFqXt8QIVha8UlH9rgU0BeWPytZ9/TzYqlUw== dependencies: object-assign "^4.1.0" @@ -2719,7 +2623,7 @@ cli-table3@^0.5.0: cli-table3@^0.6.0: version "0.6.4" - resolved "https://registry.yarnpkg.com/cli-table3/-/cli-table3-0.6.4.tgz#d1c536b8a3f2e7bec58f67ac9e5769b1b30088b0" + resolved "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.4.tgz" integrity sha512-Lm3L0p+/npIQWNIiyF/nAn7T5dnOwR3xNTHXYEBFBFVPXzCVNZ5lqEC/1eo/EVfpDsQ1I+TX4ORPQgp+UI0CRw== dependencies: string-width "^4.2.0" @@ -2728,7 +2632,7 @@ cli-table3@^0.6.0: cliui@^7.0.2: version "7.0.4" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" + resolved "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz" integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== dependencies: string-width "^4.2.0" @@ -2737,60 +2641,60 @@ cliui@^7.0.2: code-block-writer@^12.0.0: version "12.0.0" - resolved "https://registry.yarnpkg.com/code-block-writer/-/code-block-writer-12.0.0.tgz#4dd58946eb4234105aff7f0035977b2afdc2a770" + resolved "https://registry.npmjs.org/code-block-writer/-/code-block-writer-12.0.0.tgz" integrity sha512-q4dMFMlXtKR3XNBHyMHt/3pwYNA69EDk00lloMOaaUMKPUXBw6lpXtbu3MMVG6/uOihGnRDOlkyqsONEUj60+w== collections@^5.1.12: version "5.1.13" - resolved "https://registry.yarnpkg.com/collections/-/collections-5.1.13.tgz#eee204a93b67473c8e74e00e934a997cc2817585" + resolved "https://registry.npmjs.org/collections/-/collections-5.1.13.tgz" integrity sha512-SCb6Qd+d3Z02corWQ7/mqXiXeeTdHvkP6TeFSYfGYdCFp1WrjSNZ3j6y8Y3T/7osGEe0iOcU2g1d346l99m4Lg== dependencies: weak-map "~1.0.x" color-convert@^1.9.0: version "1.9.3" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + resolved "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz" integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== dependencies: color-name "1.1.3" color-convert@^2.0.1: version "2.0.1" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + resolved "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz" integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== dependencies: color-name "~1.1.4" color-name@1.1.3: version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz" integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== color-name@~1.1.4: version "1.1.4" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== colors@1.4.0, colors@^1.1.2: version "1.4.0" - resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" + resolved "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz" integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: version "1.0.8" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" + resolved "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz" integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== dependencies: delayed-stream "~1.0.0" command-exists@^1.2.8: version "1.2.9" - resolved "https://registry.yarnpkg.com/command-exists/-/command-exists-1.2.9.tgz#c50725af3808c8ab0260fd60b01fbfa25b954f69" + resolved "https://registry.npmjs.org/command-exists/-/command-exists-1.2.9.tgz" integrity sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w== command-line-args@^4.0.7: version "4.0.7" - resolved "https://registry.yarnpkg.com/command-line-args/-/command-line-args-4.0.7.tgz#f8d1916ecb90e9e121eda6428e41300bfb64cc46" + resolved "https://registry.npmjs.org/command-line-args/-/command-line-args-4.0.7.tgz" integrity sha512-aUdPvQRAyBvQd2n7jXcsMDz68ckBJELXNzBybCHOibUWEg0mWTnaYCSRU8h9R+aNRSvDihJtssSRCiDRpLaezA== dependencies: array-back "^2.0.0" @@ -2799,7 +2703,7 @@ command-line-args@^4.0.7: command-line-args@^5.1.1: version "5.2.1" - resolved "https://registry.yarnpkg.com/command-line-args/-/command-line-args-5.2.1.tgz#c44c32e437a57d7c51157696893c5909e9cec42e" + resolved "https://registry.npmjs.org/command-line-args/-/command-line-args-5.2.1.tgz" integrity sha512-H4UfQhZyakIjC74I9d34fGYDwk3XpSr17QhEd0Q3I9Xq1CETHo4Hcuo87WyWHpAF1aSLjLRf5lD9ZGX2qStUvg== dependencies: array-back "^3.1.0" @@ -2809,7 +2713,7 @@ command-line-args@^5.1.1: command-line-usage@^6.1.0: version "6.1.3" - resolved "https://registry.yarnpkg.com/command-line-usage/-/command-line-usage-6.1.3.tgz#428fa5acde6a838779dfa30e44686f4b6761d957" + resolved "https://registry.npmjs.org/command-line-usage/-/command-line-usage-6.1.3.tgz" integrity sha512-sH5ZSPr+7UStsloltmDh7Ce5fb8XPlHyoPzTpyyMuYCtervL65+ubVZ6Q61cFtFl62UyJlc8/JwERRbAFPUqgw== dependencies: array-back "^4.0.2" @@ -2819,42 +2723,42 @@ command-line-usage@^6.1.0: commander@3.0.2: version "3.0.2" - resolved "https://registry.yarnpkg.com/commander/-/commander-3.0.2.tgz#6837c3fb677ad9933d1cfba42dd14d5117d6b39e" + resolved "https://registry.npmjs.org/commander/-/commander-3.0.2.tgz" integrity sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow== commander@^10.0.0: version "10.0.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-10.0.1.tgz#881ee46b4f77d1c1dccc5823433aa39b022cbe06" + resolved "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz" integrity sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug== commander@^6.0.0: version "6.2.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c" + resolved "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz" integrity sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA== commander@^8.1.0, commander@^8.3.0: version "8.3.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66" + resolved "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz" integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww== commander@^9.4.1: version "9.5.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-9.5.0.tgz#bc08d1eb5cedf7ccb797a96199d41c7bc3e60d30" + resolved "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz" integrity sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ== commander@~9.4.1: version "9.4.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-9.4.1.tgz#d1dd8f2ce6faf93147295c0df13c7c21141cfbdd" + resolved "https://registry.npmjs.org/commander/-/commander-9.4.1.tgz" integrity sha512-5EEkTNyHNGFPD2H+c/dXXfQZYa/scCKasxWcXJaWnNJ99pnQN9Vnmqow+p+PlFPE63Q6mThaZws1T+HxfpgtPw== concat-map@0.0.1: version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== concat-stream@^1.6.0, concat-stream@^1.6.2, concat-stream@~1.6.2: version "1.6.2" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" + resolved "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz" integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== dependencies: buffer-from "^1.0.0" @@ -2864,7 +2768,7 @@ concat-stream@^1.6.0, concat-stream@^1.6.2, concat-stream@~1.6.2: config-chain@^1.1.11: version "1.1.13" - resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.13.tgz#fad0795aa6a6cdaff9ed1b68e9dff94372c232f4" + resolved "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz" integrity sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ== dependencies: ini "^1.3.4" @@ -2872,32 +2776,32 @@ config-chain@^1.1.11: cookie@^0.4.1: version "0.4.2" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.2.tgz#0e41f24de5ecf317947c82fc789e06a884824432" + resolved "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz" integrity sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA== core-js-pure@^3.0.1: version "3.36.1" - resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.36.1.tgz#1461c89e76116528b54eba20a0aff30164087a94" + resolved "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.36.1.tgz" integrity sha512-NXCvHvSVYSrewP0L5OhltzXeWFJLo2AL2TYnj6iLV3Bw8mM62wAQMNgUCRI6EBu6hVVpbCxmOPlxh1Ikw2PfUA== core-js@^2.4.0: version "2.6.12" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.12.tgz#d9333dfa7b065e347cc5682219d6f690859cc2ec" + resolved "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz" integrity sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ== core-util-is@1.0.2: version "1.0.2" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + resolved "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" integrity sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ== core-util-is@~1.0.0: version "1.0.3" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" + resolved "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz" integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== cosmiconfig@^8.0.0: version "8.3.6" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-8.3.6.tgz#060a2b871d66dba6c8538ea1118ba1ac16f5fae3" + resolved "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.3.6.tgz" integrity sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA== dependencies: import-fresh "^3.3.0" @@ -2907,7 +2811,7 @@ cosmiconfig@^8.0.0: cpu-features@~0.0.9: version "0.0.9" - resolved "https://registry.yarnpkg.com/cpu-features/-/cpu-features-0.0.9.tgz#5226b92f0f1c63122b0a3eb84cb8335a4de499fc" + resolved "https://registry.npmjs.org/cpu-features/-/cpu-features-0.0.9.tgz" integrity sha512-AKjgn2rP2yJyfbepsmLfiYcmtNn/2eUvocUyM/09yB0YDiz39HteK/5/T4Onf0pmdYDMgkBoGvRLvEguzyL7wQ== dependencies: buildcheck "~0.0.6" @@ -2915,12 +2819,12 @@ cpu-features@~0.0.9: crc-32@^1.2.0: version "1.2.2" - resolved "https://registry.yarnpkg.com/crc-32/-/crc-32-1.2.2.tgz#3cad35a934b8bf71f25ca524b6da51fb7eace2ff" + resolved "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz" integrity sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ== create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: version "1.2.0" - resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" + resolved "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz" integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== dependencies: cipher-base "^1.0.1" @@ -2931,7 +2835,7 @@ create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: create-hmac@^1.1.4, create-hmac@^1.1.7: version "1.1.7" - resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" + resolved "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz" integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== dependencies: cipher-base "^1.0.3" @@ -2943,12 +2847,12 @@ create-hmac@^1.1.4, create-hmac@^1.1.7: create-require@^1.1.0: version "1.1.1" - resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" + resolved "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz" integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== cross-spawn@^7.0.2: version "7.0.3" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" + resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz" integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== dependencies: path-key "^3.1.0" @@ -2957,24 +2861,24 @@ cross-spawn@^7.0.2: "crypt@>= 0.0.1": version "0.0.2" - resolved "https://registry.yarnpkg.com/crypt/-/crypt-0.0.2.tgz#88d7ff7ec0dfb86f713dc87bbb42d044d3e6c41b" + resolved "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz" integrity sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow== crypto-js@^4.2.0: version "4.2.0" - resolved "https://registry.yarnpkg.com/crypto-js/-/crypto-js-4.2.0.tgz#4d931639ecdfd12ff80e8186dba6af2c2e856631" + resolved "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz" integrity sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q== dashdash@^1.12.0: version "1.14.1" - resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + resolved "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz" integrity sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g== dependencies: assert-plus "^1.0.0" data-view-buffer@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/data-view-buffer/-/data-view-buffer-1.0.1.tgz#8ea6326efec17a2e42620696e671d7d5a8bc66b2" + resolved "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz" integrity sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA== dependencies: call-bind "^1.0.6" @@ -2983,7 +2887,7 @@ data-view-buffer@^1.0.1: data-view-byte-length@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz#90721ca95ff280677eb793749fce1011347669e2" + resolved "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz" integrity sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ== dependencies: call-bind "^1.0.7" @@ -2992,7 +2896,7 @@ data-view-byte-length@^1.0.1: data-view-byte-offset@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz#5e0bbfb4828ed2d1b9b400cd8a7d119bca0ff18a" + resolved "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz" integrity sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA== dependencies: call-bind "^1.0.6" @@ -3001,81 +2905,81 @@ data-view-byte-offset@^1.0.0: death@^1.1.0: version "1.1.0" - resolved "https://registry.yarnpkg.com/death/-/death-1.1.0.tgz#01aa9c401edd92750514470b8266390c66c67318" + resolved "https://registry.npmjs.org/death/-/death-1.1.0.tgz" integrity sha512-vsV6S4KVHvTGxbEcij7hkWRv0It+sGGWVOM67dQde/o5Xjnr+KmLjxWJii2uEObIrt1CcM9w0Yaovx+iOlIL+w== debug@4, debug@4.3.4, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4: version "4.3.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + resolved "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== dependencies: ms "2.1.2" debug@4.3.3: version "4.3.3" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.3.tgz#04266e0b70a98d4462e6e288e38259213332b664" + resolved "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz" integrity sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q== dependencies: ms "2.1.2" debug@^2.2.0: version "2.6.9" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + resolved "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz" integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== dependencies: ms "2.0.0" debug@^3.1.0, debug@^3.2.6, debug@^3.2.7: version "3.2.7" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" + resolved "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz" integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== dependencies: ms "^2.1.1" debug@^4.3.5: version "4.3.7" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.7.tgz#87945b4151a011d76d95a198d7111c865c360a52" + resolved "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz" integrity sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ== dependencies: ms "^2.1.3" decamelize@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" + resolved "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz" integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== decompress-response@^6.0.0: version "6.0.0" - resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-6.0.0.tgz#ca387612ddb7e104bd16d85aab00d5ecf09c66fc" + resolved "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz" integrity sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ== dependencies: mimic-response "^3.1.0" deep-eql@^4.0.1, deep-eql@^4.1.3: version "4.1.3" - resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-4.1.3.tgz#7c7775513092f7df98d8df9996dd085eb668cc6d" + resolved "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz" integrity sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw== dependencies: type-detect "^4.0.0" deep-extend@^0.6.0, deep-extend@~0.6.0: version "0.6.0" - resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" + resolved "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz" integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== deep-is@^0.1.3, deep-is@~0.1.3: version "0.1.4" - resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" + resolved "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz" integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== defer-to-connect@^2.0.1: version "2.0.1" - resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-2.0.1.tgz#8016bdb4143e4632b77a3449c6236277de520587" + resolved "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz" integrity sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg== deferred-leveldown@~5.3.0: version "5.3.0" - resolved "https://registry.yarnpkg.com/deferred-leveldown/-/deferred-leveldown-5.3.0.tgz#27a997ad95408b61161aa69bd489b86c71b78058" + resolved "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-5.3.0.tgz" integrity sha512-a59VOT+oDy7vtAbLRCZwWgxu2BaCfd5Hk7wxJd48ei7I+nsg8Orlb9CLG0PMZienk9BSUKgeAqkO2+Lw+1+Ukw== dependencies: abstract-leveldown "~6.2.1" @@ -3083,7 +2987,7 @@ deferred-leveldown@~5.3.0: define-data-property@^1.0.1, define-data-property@^1.1.4: version "1.1.4" - resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e" + resolved "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz" integrity sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A== dependencies: es-define-property "^1.0.0" @@ -3092,7 +2996,7 @@ define-data-property@^1.0.1, define-data-property@^1.1.4: define-properties@^1.2.0, define-properties@^1.2.1: version "1.2.1" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.1.tgz#10781cc616eb951a80a034bafcaa7377f6af2b6c" + resolved "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz" integrity sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg== dependencies: define-data-property "^1.0.1" @@ -3101,46 +3005,46 @@ define-properties@^1.2.0, define-properties@^1.2.1: delayed-stream@~1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + resolved "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz" integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== depd@2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" + resolved "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz" integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== diff@5.0.0: version "5.0.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" + resolved "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz" integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== diff@^4.0.1: version "4.0.2" - resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" + resolved "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz" integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== diff@^5.1.0, diff@^5.2.0: version "5.2.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-5.2.0.tgz#26ded047cd1179b78b9537d5ef725503ce1ae531" + resolved "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz" integrity sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A== difflib@^0.2.4: version "0.2.4" - resolved "https://registry.yarnpkg.com/difflib/-/difflib-0.2.4.tgz#b5e30361a6db023176d562892db85940a718f47e" + resolved "https://registry.npmjs.org/difflib/-/difflib-0.2.4.tgz" integrity sha512-9YVwmMb0wQHQNr5J9m6BSj6fk4pfGITGQOOs+D9Fl+INODWFOfvhIU1hNv6GgR1RBoC/9NJcwu77zShxV0kT7w== dependencies: heap ">= 0.2.0" dir-glob@^3.0.1: version "3.0.1" - resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" + resolved "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz" integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== dependencies: path-type "^4.0.0" docker-modem@^1.0.8: version "1.0.9" - resolved "https://registry.yarnpkg.com/docker-modem/-/docker-modem-1.0.9.tgz#a1f13e50e6afb6cf3431b2d5e7aac589db6aaba8" + resolved "https://registry.npmjs.org/docker-modem/-/docker-modem-1.0.9.tgz" integrity sha512-lVjqCSCIAUDZPAZIeyM125HXfNvOmYYInciphNrLrylUtKyW66meAjSPXWchKVzoIYZx69TPnAepVSSkeawoIw== dependencies: JSONStream "1.3.2" @@ -3150,7 +3054,7 @@ docker-modem@^1.0.8: docker-modem@^3.0.0: version "3.0.8" - resolved "https://registry.yarnpkg.com/docker-modem/-/docker-modem-3.0.8.tgz#ef62c8bdff6e8a7d12f0160988c295ea8705e77a" + resolved "https://registry.npmjs.org/docker-modem/-/docker-modem-3.0.8.tgz" integrity sha512-f0ReSURdM3pcKPNS30mxOHSbaFLcknGmQjwSfmbcdOw1XWKXVhukM3NJHhr7NpY9BIyyWQb0EBo3KQvvuU5egQ== dependencies: debug "^4.1.1" @@ -3160,7 +3064,7 @@ docker-modem@^3.0.0: docker-modem@^5.0.3: version "5.0.3" - resolved "https://registry.yarnpkg.com/docker-modem/-/docker-modem-5.0.3.tgz#50c06f11285289f58112b5c4c4d89824541c41d0" + resolved "https://registry.npmjs.org/docker-modem/-/docker-modem-5.0.3.tgz" integrity sha512-89zhop5YVhcPEt5FpUFGr3cDyceGhq/F9J+ZndQ4KfqNvfbJpPMfgeixFgUj5OjCYAboElqODxY5Z1EBsSa6sg== dependencies: debug "^4.1.1" @@ -3170,7 +3074,7 @@ docker-modem@^5.0.3: dockerode@^2.5.8: version "2.5.8" - resolved "https://registry.yarnpkg.com/dockerode/-/dockerode-2.5.8.tgz#1b661e36e1e4f860e25f56e0deabe9f87f1d0acc" + resolved "https://registry.npmjs.org/dockerode/-/dockerode-2.5.8.tgz" integrity sha512-+7iOUYBeDTScmOmQqpUYQaE7F4vvIt6+gIZNHWhqAQEI887tiPFB9OvXI/HzQYqfUNvukMK+9myLW63oTJPZpw== dependencies: concat-stream "~1.6.2" @@ -3179,7 +3083,7 @@ dockerode@^2.5.8: dockerode@^3.3.4: version "3.3.5" - resolved "https://registry.yarnpkg.com/dockerode/-/dockerode-3.3.5.tgz#7ae3f40f2bec53ae5e9a741ce655fff459745629" + resolved "https://registry.npmjs.org/dockerode/-/dockerode-3.3.5.tgz" integrity sha512-/0YNa3ZDNeLr/tSckmD69+Gq+qVNhvKfAHNeZJBnp7EOP6RGKV8ORrJHkUn20So5wU+xxT7+1n5u8PjHbfjbSA== dependencies: "@balena/dockerignore" "^1.0.2" @@ -3188,7 +3092,7 @@ dockerode@^3.3.4: dockerode@^4.0.0, dockerode@^4.0.2: version "4.0.2" - resolved "https://registry.yarnpkg.com/dockerode/-/dockerode-4.0.2.tgz#dedc8529a1db3ac46d186f5912389899bc309f7d" + resolved "https://registry.npmjs.org/dockerode/-/dockerode-4.0.2.tgz" integrity sha512-9wM1BVpVMFr2Pw3eJNXrYYt6DT9k0xMcsSCjtPvyQ+xa1iPg/Mo3T/gUcwI0B2cczqCeCYRPF8yFYDwtFXT0+w== dependencies: "@balena/dockerignore" "^1.0.2" @@ -3197,26 +3101,26 @@ dockerode@^4.0.0, dockerode@^4.0.2: doctrine@^2.1.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" + resolved "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz" integrity sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw== dependencies: esutils "^2.0.2" doctrine@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" + resolved "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz" integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== dependencies: esutils "^2.0.2" dotenv@^16.0.3: version "16.4.5" - resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.5.tgz#cdd3b3b604cb327e286b4762e13502f717cb099f" + resolved "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz" integrity sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg== ecc-jsbn@~0.1.1: version "0.1.2" - resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" + resolved "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz" integrity sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw== dependencies: jsbn "~0.1.0" @@ -3224,14 +3128,14 @@ ecc-jsbn@~0.1.1: ecdsa-sig-formatter@1.0.11: version "1.0.11" - resolved "https://registry.yarnpkg.com/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz#ae0f0fa2d85045ef14a817daa3ce9acd0489e5bf" + resolved "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz" integrity sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ== dependencies: safe-buffer "^5.0.1" elliptic@6.5.4: version "6.5.4" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" + resolved "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz" integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== dependencies: bn.js "^4.11.9" @@ -3244,7 +3148,7 @@ elliptic@6.5.4: elliptic@^6.5.2, elliptic@^6.5.4: version "6.5.5" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.5.tgz#c715e09f78b6923977610d4c2346d6ce22e6dded" + resolved "https://registry.npmjs.org/elliptic/-/elliptic-6.5.5.tgz" integrity sha512-7EjbcmUm17NQFu4Pmgmq2olYMj8nwMnpcddByChSUjArp8F5DQWcIcpriwO4ZToLNAJig0yiyjswfyGNje/ixw== dependencies: bn.js "^4.11.9" @@ -3257,17 +3161,17 @@ elliptic@^6.5.2, elliptic@^6.5.4: emittery@0.10.0: version "0.10.0" - resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.10.0.tgz#bb373c660a9d421bb44706ec4967ed50c02a8026" + resolved "https://registry.npmjs.org/emittery/-/emittery-0.10.0.tgz" integrity sha512-AGvFfs+d0JKCJQ4o01ASQLGPmSCxgfU9RFXvzPvZdjKK8oscynksuJhWrSTSw7j7Ep/sZct5b5ZhYCi8S/t0HQ== emoji-regex@^8.0.0: version "8.0.0" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz" integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== encoding-down@^6.3.0: version "6.3.0" - resolved "https://registry.yarnpkg.com/encoding-down/-/encoding-down-6.3.0.tgz#b1c4eb0e1728c146ecaef8e32963c549e76d082b" + resolved "https://registry.npmjs.org/encoding-down/-/encoding-down-6.3.0.tgz" integrity sha512-QKrV0iKR6MZVJV08QY0wp1e7vF6QbhnbQhb07bwpEyuz4uZiZgPlEGdkCROuFkUwdxlFaiPIhjyarH1ee/3vhw== dependencies: abstract-leveldown "^6.2.1" @@ -3277,14 +3181,14 @@ encoding-down@^6.3.0: end-of-stream@^1.0.0, end-of-stream@^1.1.0, end-of-stream@^1.4.1: version "1.4.4" - resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" + resolved "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz" integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== dependencies: once "^1.4.0" enhanced-resolve@^5.12.0: version "5.16.0" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.16.0.tgz#65ec88778083056cb32487faa9aef82ed0864787" + resolved "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.16.0.tgz" integrity sha512-O+QWCviPNSSLAD9Ucn8Awv+poAkqn3T1XY5/N7kR7rQO9yfSGWkYZDwpJ+iKF7B8rxaQKWngSqACpgzeapSyoA== dependencies: graceful-fs "^4.2.4" @@ -3292,7 +3196,7 @@ enhanced-resolve@^5.12.0: enquirer@^2.3.0: version "2.4.1" - resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.4.1.tgz#93334b3fbd74fc7097b224ab4a8fb7e40bf4ae56" + resolved "https://registry.npmjs.org/enquirer/-/enquirer-2.4.1.tgz" integrity sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ== dependencies: ansi-colors "^4.1.1" @@ -3300,31 +3204,31 @@ enquirer@^2.3.0: entities@~3.0.1: version "3.0.1" - resolved "https://registry.yarnpkg.com/entities/-/entities-3.0.1.tgz#2b887ca62585e96db3903482d336c1006c3001d4" + resolved "https://registry.npmjs.org/entities/-/entities-3.0.1.tgz" integrity sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q== env-paths@^2.2.0: version "2.2.1" - resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2" + resolved "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz" integrity sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A== errno@~0.1.1: version "0.1.8" - resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.8.tgz#8bb3e9c7d463be4976ff888f76b4809ebc2e811f" + resolved "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz" integrity sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A== dependencies: prr "~1.0.1" error-ex@^1.3.1: version "1.3.2" - resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" + resolved "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz" integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== dependencies: is-arrayish "^0.2.1" es-abstract@^1.22.1, es-abstract@^1.22.3, es-abstract@^1.23.0, es-abstract@^1.23.2: version "1.23.3" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.23.3.tgz#8f0c5a35cd215312573c5a27c87dfd6c881a0aa0" + resolved "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz" integrity sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A== dependencies: array-buffer-byte-length "^1.0.1" @@ -3376,26 +3280,26 @@ es-abstract@^1.22.1, es-abstract@^1.22.3, es-abstract@^1.23.0, es-abstract@^1.23 es-define-property@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.0.tgz#c7faefbdff8b2696cf5f46921edfb77cc4ba3845" + resolved "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz" integrity sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ== dependencies: get-intrinsic "^1.2.4" es-errors@^1.2.1, es-errors@^1.3.0: version "1.3.0" - resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" + resolved "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz" integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== es-object-atoms@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/es-object-atoms/-/es-object-atoms-1.0.0.tgz#ddb55cd47ac2e240701260bc2a8e31ecb643d941" + resolved "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz" integrity sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw== dependencies: es-errors "^1.3.0" es-set-tostringtag@^2.0.3: version "2.0.3" - resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz#8bb60f0a440c2e4281962428438d58545af39777" + resolved "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz" integrity sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ== dependencies: get-intrinsic "^1.2.4" @@ -3404,14 +3308,14 @@ es-set-tostringtag@^2.0.3: es-shim-unscopables@^1.0.0, es-shim-unscopables@^1.0.2: version "1.0.2" - resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz#1f6942e71ecc7835ed1c8a83006d8771a63a3763" + resolved "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz" integrity sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw== dependencies: hasown "^2.0.0" es-to-primitive@^1.2.1: version "1.2.1" - resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" + resolved "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz" integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== dependencies: is-callable "^1.1.4" @@ -3420,22 +3324,22 @@ es-to-primitive@^1.2.1: escalade@^3.1.1: version "3.1.2" - resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27" + resolved "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz" integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA== escape-string-regexp@4.0.0, escape-string-regexp@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== escape-string-regexp@^1.0.5: version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz" integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== escodegen@1.8.x: version "1.8.1" - resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.8.1.tgz#5a5b53af4693110bebb0867aa3430dd3b70a1018" + resolved "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz" integrity sha512-yhi5S+mNTOuRvyW4gWlg5W1byMaQGWWSYHXsuFZ7GBo7tpyOwi2EdzMP/QWxh9hwkD2m+wDVHJsxhRIj+v/b/A== dependencies: esprima "^2.7.1" @@ -3447,7 +3351,7 @@ escodegen@1.8.x: eslint-import-resolver-node@^0.3.9: version "0.3.9" - resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz#d4eaac52b8a2e7c3cd1903eb00f7e053356118ac" + resolved "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz" integrity sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g== dependencies: debug "^3.2.7" @@ -3456,7 +3360,7 @@ eslint-import-resolver-node@^0.3.9: eslint-import-resolver-typescript@^3.6.1: version "3.6.1" - resolved "https://registry.yarnpkg.com/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.6.1.tgz#7b983680edd3f1c5bce1a5829ae0bc2d57fe9efa" + resolved "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.6.1.tgz" integrity sha512-xgdptdoi5W3niYeuQxKmzVDTATvLYqhpwmykwsh7f6HIOStGWEIL9iqZgQDF9u9OEzrRwR8no5q2VT+bjAujTg== dependencies: debug "^4.3.4" @@ -3469,14 +3373,14 @@ eslint-import-resolver-typescript@^3.6.1: eslint-module-utils@^2.7.4, eslint-module-utils@^2.8.0: version "2.8.1" - resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.8.1.tgz#52f2404300c3bd33deece9d7372fb337cc1d7c34" + resolved "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.1.tgz" integrity sha512-rXDXR3h7cs7dy9RNpUlQf80nX31XWJEyGq1tRMo+6GsO5VmTe4UTwtmonAD4ZkAsrfMVDA2wlGJ3790Ys+D49Q== dependencies: debug "^3.2.7" eslint-plugin-import@^2.29.0: version "2.29.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz#d45b37b5ef5901d639c15270d74d46d161150643" + resolved "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz" integrity sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw== dependencies: array-includes "^3.1.7" @@ -3499,7 +3403,7 @@ eslint-plugin-import@^2.29.0: eslint-plugin-prettier@^5.0.1: version "5.1.3" - resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-5.1.3.tgz#17cfade9e732cef32b5f5be53bd4e07afd8e67e1" + resolved "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.1.3.tgz" integrity sha512-C9GCVAs4Eq7ZC/XFQHITLiHJxQngdtraXaM+LoUFoFp/lHNl2Zn8f3WQbe9HvTBBQ9YnKFB0/2Ajdqwo5D1EAw== dependencies: prettier-linter-helpers "^1.0.0" @@ -3507,7 +3411,7 @@ eslint-plugin-prettier@^5.0.1: eslint-scope@^7.2.2: version "7.2.2" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.2.2.tgz#deb4f92563390f32006894af62a22dba1c46423f" + resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz" integrity sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg== dependencies: esrecurse "^4.3.0" @@ -3515,12 +3419,12 @@ eslint-scope@^7.2.2: eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4.3: version "3.4.3" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" + resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz" integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== eslint@^8.51.0: version "8.57.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.57.0.tgz#c786a6fd0e0b68941aaf624596fb987089195668" + resolved "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz" integrity sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ== dependencies: "@eslint-community/eslint-utils" "^4.2.0" @@ -3564,7 +3468,7 @@ eslint@^8.51.0: espree@^9.6.0, espree@^9.6.1: version "9.6.1" - resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f" + resolved "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz" integrity sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ== dependencies: acorn "^8.9.0" @@ -3573,46 +3477,46 @@ espree@^9.6.0, espree@^9.6.1: esprima@2.7.x, esprima@^2.7.1: version "2.7.3" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" + resolved "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz" integrity sha512-OarPfz0lFCiW4/AV2Oy1Rp9qu0iusTKqykwTspGCZtPxmF81JR4MmIebvF1F9+UOKth2ZubLQ4XGGaU+hSn99A== esprima@^4.0.0: version "4.0.1" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + resolved "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== esquery@^1.4.2: version "1.5.0" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.5.0.tgz#6ce17738de8577694edd7361c57182ac8cb0db0b" + resolved "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz" integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg== dependencies: estraverse "^5.1.0" esrecurse@^4.3.0: version "4.3.0" - resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" + resolved "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz" integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== dependencies: estraverse "^5.2.0" estraverse@^1.9.1: version "1.9.3" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44" + resolved "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz" integrity sha512-25w1fMXQrGdoquWnScXZGckOv+Wes+JDnuN/+7ex3SauFRS72r2lFDec0EKPt2YD1wUJ/IrfEex+9yp4hfSOJA== estraverse@^5.1.0, estraverse@^5.2.0: version "5.3.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" + resolved "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz" integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== esutils@^2.0.2: version "2.0.3" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + resolved "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== eth-gas-reporter@^0.2.25: version "0.2.27" - resolved "https://registry.yarnpkg.com/eth-gas-reporter/-/eth-gas-reporter-0.2.27.tgz#928de8548a674ed64c7ba0bf5795e63079150d4e" + resolved "https://registry.npmjs.org/eth-gas-reporter/-/eth-gas-reporter-0.2.27.tgz" integrity sha512-femhvoAM7wL0GcI8ozTdxfuBtBFJ9qsyIAsmKVjlWAHUbdnnXHt+lKzz/kmldM5lA9jLuNHGwuIxorNpLbR1Zw== dependencies: "@solidity-parser/parser" "^0.14.0" @@ -3631,14 +3535,14 @@ eth-gas-reporter@^0.2.25: ethereum-bloom-filters@^1.0.6: version "1.1.0" - resolved "https://registry.yarnpkg.com/ethereum-bloom-filters/-/ethereum-bloom-filters-1.1.0.tgz#b3fc1eb789509ee30db0bf99a2988ccacb8d0397" + resolved "https://registry.npmjs.org/ethereum-bloom-filters/-/ethereum-bloom-filters-1.1.0.tgz" integrity sha512-J1gDRkLpuGNvWYzWslBQR9cDV4nd4kfvVTE/Wy4Kkm4yb3EYRSlyi0eB/inTsSTTVyA0+HyzHgbr95Fn/Z1fSw== dependencies: "@noble/hashes" "^1.4.0" ethereum-cryptography@0.1.3, ethereum-cryptography@^0.1.3: version "0.1.3" - resolved "https://registry.yarnpkg.com/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz#8d6143cfc3d74bf79bbd8edecdf29e4ae20dd191" + resolved "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz" integrity sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ== dependencies: "@types/pbkdf2" "^3.0.0" @@ -3659,7 +3563,7 @@ ethereum-cryptography@0.1.3, ethereum-cryptography@^0.1.3: ethereum-cryptography@^1.0.3: version "1.2.0" - resolved "https://registry.yarnpkg.com/ethereum-cryptography/-/ethereum-cryptography-1.2.0.tgz#5ccfa183e85fdaf9f9b299a79430c044268c9b3a" + resolved "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-1.2.0.tgz" integrity sha512-6yFQC9b5ug6/17CQpCyE3k9eKBMdhyVjzUy1WkiuY/E4vj/SXDBbCw8QEIaXqf0Mf2SnY6RmpDcwlUmBSS0EJw== dependencies: "@noble/hashes" "1.2.0" @@ -3669,7 +3573,7 @@ ethereum-cryptography@^1.0.3: ethereum-cryptography@^2.0.0, ethereum-cryptography@^2.1.2: version "2.1.3" - resolved "https://registry.yarnpkg.com/ethereum-cryptography/-/ethereum-cryptography-2.1.3.tgz#1352270ed3b339fe25af5ceeadcf1b9c8e30768a" + resolved "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.1.3.tgz" integrity sha512-BlwbIL7/P45W8FGW2r7LGuvoEZ+7PWsniMvQ4p5s2xCyw9tmaDlpfsN9HjAucbF+t/qpVHwZUisgfK24TCW8aA== dependencies: "@noble/curves" "1.3.0" @@ -3679,7 +3583,7 @@ ethereum-cryptography@^2.0.0, ethereum-cryptography@^2.1.2: ethereum-waffle@^4.0.10: version "4.0.10" - resolved "https://registry.yarnpkg.com/ethereum-waffle/-/ethereum-waffle-4.0.10.tgz#f1ef1564c0155236f1a66c6eae362a5d67c9f64c" + resolved "https://registry.npmjs.org/ethereum-waffle/-/ethereum-waffle-4.0.10.tgz" integrity sha512-iw9z1otq7qNkGDNcMoeNeLIATF9yKl1M8AIeu42ElfNBplq0e+5PeasQmm8ybY/elkZ1XyRO0JBQxQdVRb8bqQ== dependencies: "@ethereum-waffle/chai" "4.0.10" @@ -3691,7 +3595,7 @@ ethereum-waffle@^4.0.10: ethereumjs-abi@0.6.8, ethereumjs-abi@^0.6.8: version "0.6.8" - resolved "https://registry.yarnpkg.com/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz#71bc152db099f70e62f108b7cdfca1b362c6fcae" + resolved "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz" integrity sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA== dependencies: bn.js "^4.11.8" @@ -3699,7 +3603,7 @@ ethereumjs-abi@0.6.8, ethereumjs-abi@^0.6.8: ethereumjs-util@7.1.3: version "7.1.3" - resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-7.1.3.tgz#b55d7b64dde3e3e45749e4c41288238edec32d23" + resolved "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.3.tgz" integrity sha512-y+82tEbyASO0K0X1/SRhbJJoAlfcvq8JbrG4a5cjrOks7HS/36efU/0j2flxCPOUM++HFahk33kr/ZxyC4vNuw== dependencies: "@types/bn.js" "^5.1.0" @@ -3710,7 +3614,7 @@ ethereumjs-util@7.1.3: ethereumjs-util@^6.0.0, ethereumjs-util@^6.2.1: version "6.2.1" - resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz#fcb4e4dd5ceacb9d2305426ab1a5cd93e3163b69" + resolved "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz" integrity sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw== dependencies: "@types/bn.js" "^4.11.3" @@ -3723,7 +3627,7 @@ ethereumjs-util@^6.0.0, ethereumjs-util@^6.2.1: ethereumjs-util@^7.1.1, ethereumjs-util@^7.1.3, ethereumjs-util@^7.1.4, ethereumjs-util@^7.1.5: version "7.1.5" - resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-7.1.5.tgz#9ecf04861e4fbbeed7465ece5f23317ad1129181" + resolved "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.5.tgz" integrity sha512-SDl5kKrQAudFBUe5OJM9Ac6WmMyYmXX/6sTmLZ3ffG2eY6ZIGBes3pEDxNN6V72WyOw4CPD5RomKdsa8DAAwLg== dependencies: "@types/bn.js" "^5.1.0" @@ -3734,7 +3638,7 @@ ethereumjs-util@^7.1.1, ethereumjs-util@^7.1.3, ethereumjs-util@^7.1.4, ethereum ethers@^5.0.2, ethers@^5.7.0, ethers@^5.7.2, ethers@~5.7.0, ethers@~5.7.2: version "5.7.2" - resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.7.2.tgz#3a7deeabbb8c030d4126b24f84e525466145872e" + resolved "https://registry.npmjs.org/ethers/-/ethers-5.7.2.tgz" integrity sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg== dependencies: "@ethersproject/abi" "5.7.0" @@ -3770,7 +3674,7 @@ ethers@^5.0.2, ethers@^5.7.0, ethers@^5.7.2, ethers@~5.7.0, ethers@~5.7.2: ethjs-abi@0.2.0: version "0.2.0" - resolved "https://registry.yarnpkg.com/ethjs-abi/-/ethjs-abi-0.2.0.tgz#d3e2c221011520fc499b71682036c14fcc2f5b25" + resolved "https://registry.npmjs.org/ethjs-abi/-/ethjs-abi-0.2.0.tgz" integrity sha512-ELExSTNV7rm9WA22pA3kxNmaQz1o/peM8X1pZdWypEhuNzFjOR+hIV09Mcfw69Q0kbdd7JNGAFb5dyoL/bnItA== dependencies: bn.js "4.11.6" @@ -3779,7 +3683,7 @@ ethjs-abi@0.2.0: ethjs-abi@0.2.1: version "0.2.1" - resolved "https://registry.yarnpkg.com/ethjs-abi/-/ethjs-abi-0.2.1.tgz#e0a7a93a7e81163a94477bad56ede524ab6de533" + resolved "https://registry.npmjs.org/ethjs-abi/-/ethjs-abi-0.2.1.tgz" integrity sha512-g2AULSDYI6nEJyJaEVEXtTimRY2aPC2fi7ddSy0W+LXvEVL8Fe1y76o43ecbgdUKwZD+xsmEgX1yJr1Ia3r1IA== dependencies: bn.js "4.11.6" @@ -3788,7 +3692,7 @@ ethjs-abi@0.2.1: ethjs-contract@0.2.3: version "0.2.3" - resolved "https://registry.yarnpkg.com/ethjs-contract/-/ethjs-contract-0.2.3.tgz#f113ced8ed1c9c635b0b7ec71901340b64e8cded" + resolved "https://registry.npmjs.org/ethjs-contract/-/ethjs-contract-0.2.3.tgz" integrity sha512-fKsHm57wxwHrZhVlD8AHU2lC2G3c1fmvoEz15BpqIkuGWiTbjuvrQo2Avc+3EQpSsTFWNdyxC0h1WKRcn5kkyQ== dependencies: babel-runtime "^6.26.0" @@ -3799,12 +3703,12 @@ ethjs-contract@0.2.3: ethjs-filter@0.1.8: version "0.1.8" - resolved "https://registry.yarnpkg.com/ethjs-filter/-/ethjs-filter-0.1.8.tgz#2b02726b820ed4dd3860614d185c0c0f7ed1747f" + resolved "https://registry.npmjs.org/ethjs-filter/-/ethjs-filter-0.1.8.tgz" integrity sha512-qTDPskDL2UadHwjvM8A+WG9HwM4/FoSY3p3rMJORkHltYcAuiQZd2otzOYKcL5w2Q3sbAkW/E3yt/FPFL/AVXA== ethjs-format@0.2.7: version "0.2.7" - resolved "https://registry.yarnpkg.com/ethjs-format/-/ethjs-format-0.2.7.tgz#20c92f31c259a381588d069830d838b489774b86" + resolved "https://registry.npmjs.org/ethjs-format/-/ethjs-format-0.2.7.tgz" integrity sha512-uNYAi+r3/mvR3xYu2AfSXx5teP4ovy9z2FrRsblU+h2logsaIKZPi9V3bn3V7wuRcnG0HZ3QydgZuVaRo06C4Q== dependencies: bn.js "4.11.6" @@ -3816,14 +3720,14 @@ ethjs-format@0.2.7: ethjs-provider-http@0.1.6: version "0.1.6" - resolved "https://registry.yarnpkg.com/ethjs-provider-http/-/ethjs-provider-http-0.1.6.tgz#1ec5d9b4be257ef1d56a500b22a741985e889420" + resolved "https://registry.npmjs.org/ethjs-provider-http/-/ethjs-provider-http-0.1.6.tgz" integrity sha512-y054N5xyyx43KTQjgdkAEj2uEa/flwpENU5ldx/rmA0Q2yy0vyB2lsOIn/7V0uADMc4iRSHZfnFc9b9YS5Qkdw== dependencies: xhr2 "0.1.3" ethjs-query@0.3.8: version "0.3.8" - resolved "https://registry.yarnpkg.com/ethjs-query/-/ethjs-query-0.3.8.tgz#aa5af02887bdd5f3c78b3256d0f22ffd5d357490" + resolved "https://registry.npmjs.org/ethjs-query/-/ethjs-query-0.3.8.tgz" integrity sha512-/J5JydqrOzU8O7VBOwZKUWXxHDGr46VqNjBCJgBVNNda+tv7Xc8Y2uJc6aMHHVbeN3YOQ7YRElgIc0q1CI02lQ== dependencies: babel-runtime "^6.26.0" @@ -3833,19 +3737,19 @@ ethjs-query@0.3.8: ethjs-rpc@0.2.0: version "0.2.0" - resolved "https://registry.yarnpkg.com/ethjs-rpc/-/ethjs-rpc-0.2.0.tgz#3d0011e32cfff156ed6147818c6fb8f801701b4c" + resolved "https://registry.npmjs.org/ethjs-rpc/-/ethjs-rpc-0.2.0.tgz" integrity sha512-RINulkNZTKnj4R/cjYYtYMnFFaBcVALzbtEJEONrrka8IeoarNB9Jbzn+2rT00Cv8y/CxAI+GgY1d0/i2iQeOg== dependencies: promise-to-callback "^1.0.0" ethjs-schema@0.2.1: version "0.2.1" - resolved "https://registry.yarnpkg.com/ethjs-schema/-/ethjs-schema-0.2.1.tgz#47e138920421453617069034684642e26bb310f4" + resolved "https://registry.npmjs.org/ethjs-schema/-/ethjs-schema-0.2.1.tgz" integrity sha512-DXd8lwNrhT9sjsh/Vd2Z+4pfyGxhc0POVnLBUfwk5udtdoBzADyq+sK39dcb48+ZU+2VgtwHxtGWnLnCfmfW5g== ethjs-unit@0.1.6: version "0.1.6" - resolved "https://registry.yarnpkg.com/ethjs-unit/-/ethjs-unit-0.1.6.tgz#c665921e476e87bce2a9d588a6fe0405b2c41699" + resolved "https://registry.npmjs.org/ethjs-unit/-/ethjs-unit-0.1.6.tgz" integrity sha512-/Sn9Y0oKl0uqQuvgFk/zQgR7aw1g36qX/jzSQ5lSwlO0GigPymk4eGQfeNTD03w1dPOqfz8V77Cy43jH56pagw== dependencies: bn.js "4.11.6" @@ -3853,7 +3757,7 @@ ethjs-unit@0.1.6: ethjs-util@0.1.3: version "0.1.3" - resolved "https://registry.yarnpkg.com/ethjs-util/-/ethjs-util-0.1.3.tgz#dfd5ea4a400dc5e421a889caf47e081ada78bb55" + resolved "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.3.tgz" integrity sha512-QqpX2dsEG2geSMG9dTMJVhfP1kGRdGMNjiHPiTjkju+X5cB0PQIwUzRr5k21pFkgF5zuLccqe83p7Gh5fFM5tQ== dependencies: is-hex-prefixed "1.0.0" @@ -3861,7 +3765,7 @@ ethjs-util@0.1.3: ethjs-util@0.1.6, ethjs-util@^0.1.6: version "0.1.6" - resolved "https://registry.yarnpkg.com/ethjs-util/-/ethjs-util-0.1.6.tgz#f308b62f185f9fe6237132fb2a9818866a5cd536" + resolved "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.6.tgz" integrity sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w== dependencies: is-hex-prefixed "1.0.0" @@ -3869,7 +3773,7 @@ ethjs-util@0.1.6, ethjs-util@^0.1.6: ethjs@^0.4.0: version "0.4.0" - resolved "https://registry.yarnpkg.com/ethjs/-/ethjs-0.4.0.tgz#53e6312b6fe050620bd6c5813cb683191cfd6e4a" + resolved "https://registry.npmjs.org/ethjs/-/ethjs-0.4.0.tgz" integrity sha512-UnQeRMpQ+JETN2FviexEskUwByid+eO8rybjPnk2DNUzjUn0VKNrUbiCAud7Es6otDFwjUeOS58vMZwkZxIIog== dependencies: bn.js "4.11.6" @@ -3885,7 +3789,7 @@ ethjs@^0.4.0: evp_bytestokey@^1.0.3: version "1.0.3" - resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" + resolved "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz" integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== dependencies: md5.js "^1.3.4" @@ -3893,32 +3797,32 @@ evp_bytestokey@^1.0.3: extend@~3.0.2: version "3.0.2" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" + resolved "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz" integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== extsprintf@1.3.0: version "1.3.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + resolved "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz" integrity sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g== extsprintf@^1.2.0: version "1.4.1" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.1.tgz#8d172c064867f235c0c84a596806d279bf4bcc07" + resolved "https://registry.npmjs.org/extsprintf/-/extsprintf-1.4.1.tgz" integrity sha512-Wrk35e8ydCKDj/ArClo1VrPVmN8zph5V4AtHwIuHhvMXsKf73UT3BOD+azBIW+3wOJ4FhEH7zyaJCFvChjYvMA== fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + resolved "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== fast-diff@^1.1.2, fast-diff@^1.2.0: version "1.3.0" - resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.3.0.tgz#ece407fa550a64d638536cd727e129c61616e0f0" + resolved "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz" integrity sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw== fast-glob@^3.0.3, fast-glob@^3.2.12, fast-glob@^3.2.9, fast-glob@^3.3.1, fast-glob@^3.3.2: version "3.3.2" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129" + resolved "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz" integrity sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow== dependencies: "@nodelib/fs.stat" "^2.0.2" @@ -3929,31 +3833,31 @@ fast-glob@^3.0.3, fast-glob@^3.2.12, fast-glob@^3.2.9, fast-glob@^3.3.1, fast-gl fast-json-stable-stringify@^2.0.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + resolved "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: version "2.0.6" - resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + resolved "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz" integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== fastq@^1.6.0: version "1.17.1" - resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.17.1.tgz#2a523f07a4e7b1e81a42b91b8bf2254107753b47" + resolved "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz" integrity sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w== dependencies: reusify "^1.0.4" file-entry-cache@^6.0.1: version "6.0.1" - resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" + resolved "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz" integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== dependencies: flat-cache "^3.0.4" fill-keys@^1.0.2: version "1.0.2" - resolved "https://registry.yarnpkg.com/fill-keys/-/fill-keys-1.0.2.tgz#9a8fa36f4e8ad634e3bf6b4f3c8882551452eb20" + resolved "https://registry.npmjs.org/fill-keys/-/fill-keys-1.0.2.tgz" integrity sha512-tcgI872xXjwFF4xgQmLxi76GnwJG3g/3isB1l4/G5Z4zrbddGpBjqZCO9oEAcB5wX0Hj/5iQB3toxfO7in1hHA== dependencies: is-object "~1.0.1" @@ -3961,14 +3865,14 @@ fill-keys@^1.0.2: fill-range@^7.0.1: version "7.0.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + resolved "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz" integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== dependencies: to-regex-range "^5.0.1" find-replace@^1.0.3: version "1.0.3" - resolved "https://registry.yarnpkg.com/find-replace/-/find-replace-1.0.3.tgz#b88e7364d2d9c959559f388c66670d6130441fa0" + resolved "https://registry.npmjs.org/find-replace/-/find-replace-1.0.3.tgz" integrity sha512-KrUnjzDCD9426YnCP56zGYy/eieTnhtK6Vn++j+JJzmlsWWwEkDnsyVF575spT6HJ6Ow9tlbT3TQTDsa+O4UWA== dependencies: array-back "^1.0.4" @@ -3976,14 +3880,14 @@ find-replace@^1.0.3: find-replace@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/find-replace/-/find-replace-3.0.0.tgz#3e7e23d3b05167a76f770c9fbd5258b0def68c38" + resolved "https://registry.npmjs.org/find-replace/-/find-replace-3.0.0.tgz" integrity sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ== dependencies: array-back "^3.0.1" find-up@5.0.0, find-up@^5.0.0: version "5.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + resolved "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz" integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== dependencies: locate-path "^6.0.0" @@ -3991,14 +3895,14 @@ find-up@5.0.0, find-up@^5.0.0: find-up@^2.1.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" + resolved "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz" integrity sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ== dependencies: locate-path "^2.0.0" flat-cache@^3.0.4: version "3.2.0" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.2.0.tgz#2c0c2d5040c99b1632771a9d105725c0115363ee" + resolved "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz" integrity sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw== dependencies: flatted "^3.2.9" @@ -4007,39 +3911,39 @@ flat-cache@^3.0.4: flat@^5.0.2: version "5.0.2" - resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" + resolved "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz" integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== flatted@^3.2.9: version "3.3.1" - resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.3.1.tgz#21db470729a6734d4997002f439cb308987f567a" + resolved "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz" integrity sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw== follow-redirects@^1.12.1, follow-redirects@^1.14.0, follow-redirects@^1.15.6: version "1.15.6" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.6.tgz#7f815c0cda4249c74ff09e95ef97c23b5fd0399b" + resolved "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz" integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA== for-each@^0.3.3: version "0.3.3" - resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" + resolved "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz" integrity sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw== dependencies: is-callable "^1.1.3" forever-agent@~0.6.1: version "0.6.1" - resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + resolved "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz" integrity sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw== form-data-encoder@^2.1.2: version "2.1.4" - resolved "https://registry.yarnpkg.com/form-data-encoder/-/form-data-encoder-2.1.4.tgz#261ea35d2a70d48d30ec7a9603130fa5515e9cd5" + resolved "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-2.1.4.tgz" integrity sha512-yDYSgNMraqvnxiEXO4hi88+YZxaHC6QKzb5N84iRCTDeRO7ZALpir/lVmf/uXUhnwUr2O4HU8s/n6x+yNjQkHw== form-data@^2.2.0: version "2.5.1" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.5.1.tgz#f2cbec57b5e59e23716e128fe44d4e5dd23895f4" + resolved "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz" integrity sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA== dependencies: asynckit "^0.4.0" @@ -4048,7 +3952,7 @@ form-data@^2.2.0: form-data@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" + resolved "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz" integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== dependencies: asynckit "^0.4.0" @@ -4057,7 +3961,7 @@ form-data@^4.0.0: form-data@~2.3.2: version "2.3.3" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" + resolved "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz" integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== dependencies: asynckit "^0.4.0" @@ -4066,22 +3970,22 @@ form-data@~2.3.2: fp-ts@1.19.3: version "1.19.3" - resolved "https://registry.yarnpkg.com/fp-ts/-/fp-ts-1.19.3.tgz#261a60d1088fbff01f91256f91d21d0caaaaa96f" + resolved "https://registry.npmjs.org/fp-ts/-/fp-ts-1.19.3.tgz" integrity sha512-H5KQDspykdHuztLTg+ajGN0Z2qUjcEf3Ybxc6hLt0k7/zPkn29XnKnxlBPyW2XIddWrGaJBzBl4VLYOtk39yZg== fp-ts@^1.0.0: version "1.19.5" - resolved "https://registry.yarnpkg.com/fp-ts/-/fp-ts-1.19.5.tgz#3da865e585dfa1fdfd51785417357ac50afc520a" + resolved "https://registry.npmjs.org/fp-ts/-/fp-ts-1.19.5.tgz" integrity sha512-wDNqTimnzs8QqpldiId9OavWK2NptormjXnRJTQecNjzwfyp6P/8s/zG8e4h3ja3oqkKaY72UlTjQYt/1yXf9A== fs-constants@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" + resolved "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz" integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== fs-extra@^0.30.0: version "0.30.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.30.0.tgz#f233ffcc08d4da7d432daa449776989db1df93f0" + resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz" integrity sha512-UvSPKyhMn6LEd/WpUaV9C9t3zATuqoqfWc3QdPhPLb58prN9tqYPlPWi8Krxi44loBoUzlobqZ3+8tGpxxSzwA== dependencies: graceful-fs "^4.1.2" @@ -4092,7 +3996,7 @@ fs-extra@^0.30.0: fs-extra@^11.1.1, fs-extra@^11.2.0: version "11.2.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.2.0.tgz#e70e17dfad64232287d01929399e0ea7c86b0e5b" + resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz" integrity sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw== dependencies: graceful-fs "^4.2.0" @@ -4101,7 +4005,7 @@ fs-extra@^11.1.1, fs-extra@^11.2.0: fs-extra@^7.0.0, fs-extra@^7.0.1: version "7.0.1" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" + resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz" integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw== dependencies: graceful-fs "^4.1.2" @@ -4110,7 +4014,7 @@ fs-extra@^7.0.0, fs-extra@^7.0.1: fs-extra@^8.1.0: version "8.1.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" + resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz" integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== dependencies: graceful-fs "^4.2.0" @@ -4119,32 +4023,32 @@ fs-extra@^8.1.0: fs-readdir-recursive@^1.1.0: version "1.1.0" - resolved "https://registry.yarnpkg.com/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz#e32fc030a2ccee44a6b5371308da54be0b397d27" + resolved "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz" integrity sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA== fs.realpath@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== fs@^0.0.1-security: version "0.0.1-security" - resolved "https://registry.yarnpkg.com/fs/-/fs-0.0.1-security.tgz#8a7bd37186b6dddf3813f23858b57ecaaf5e41d4" + resolved "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz" integrity sha512-3XY9e1pP0CVEUCdj5BmfIZxRBTSDycnbqhIOGec9QYtmVH2fbLpj86CFWkrNOkt/Fvty4KZG5lTglL9j/gJ87w== fsevents@~2.3.2: version "2.3.3" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" + resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz" integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== function-bind@^1.1.2: version "1.1.2" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" + resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz" integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== function.prototype.name@^1.1.6: version "1.1.6" - resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.6.tgz#cdf315b7d90ee77a4c6ee216c3c3362da07533fd" + resolved "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz" integrity sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg== dependencies: call-bind "^1.0.2" @@ -4154,17 +4058,17 @@ function.prototype.name@^1.1.6: functional-red-black-tree@^1.0.1, functional-red-black-tree@~1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" + resolved "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz" integrity sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g== functions-have-names@^1.2.3: version "1.2.3" - resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" + resolved "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz" integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== ganache@7.4.3: version "7.4.3" - resolved "https://registry.yarnpkg.com/ganache/-/ganache-7.4.3.tgz#e995f1250697264efbb34d4241c374a2b0271415" + resolved "https://registry.npmjs.org/ganache/-/ganache-7.4.3.tgz" integrity sha512-RpEDUiCkqbouyE7+NMXG26ynZ+7sGiODU84Kz+FVoXUnQ4qQM4M8wif3Y4qUCt+D/eM1RVeGq0my62FPD6Y1KA== dependencies: "@trufflesuite/bigint-buffer" "1.1.10" @@ -4181,17 +4085,17 @@ ganache@7.4.3: get-caller-file@^2.0.5: version "2.0.5" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + resolved "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== get-func-name@^2.0.1, get-func-name@^2.0.2: version "2.0.2" - resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.2.tgz#0d7cf20cd13fda808669ffa88f4ffc7a3943fc41" + resolved "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz" integrity sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ== get-intrinsic@^1.1.3, get-intrinsic@^1.2.1, get-intrinsic@^1.2.3, get-intrinsic@^1.2.4: version "1.2.4" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.4.tgz#e385f5a4b5227d449c3eabbad05494ef0abbeadd" + resolved "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz" integrity sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ== dependencies: es-errors "^1.3.0" @@ -4202,22 +4106,22 @@ get-intrinsic@^1.1.3, get-intrinsic@^1.2.1, get-intrinsic@^1.2.3, get-intrinsic@ get-port@^3.1.0: version "3.2.0" - resolved "https://registry.yarnpkg.com/get-port/-/get-port-3.2.0.tgz#dd7ce7de187c06c8bf353796ac71e099f0980ebc" + resolved "https://registry.npmjs.org/get-port/-/get-port-3.2.0.tgz" integrity sha512-x5UJKlgeUiNT8nyo/AcnwLnZuZNcSjSw0kogRB+Whd1fjjFq4B1hySFxSFWWSn4mIBzg3sRNUDFYc4g5gjPoLg== get-stdin@~9.0.0: version "9.0.0" - resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-9.0.0.tgz#3983ff82e03d56f1b2ea0d3e60325f39d703a575" + resolved "https://registry.npmjs.org/get-stdin/-/get-stdin-9.0.0.tgz" integrity sha512-dVKBjfWisLAicarI2Sf+JuBE/DghV4UzNAVe9yhEJuzeREd3JhOTE9cUaJTeSa77fsbQUK3pcOpJfM59+VKZaA== get-stream@^6.0.1: version "6.0.1" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" + resolved "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz" integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== get-symbol-description@^1.0.2: version "1.0.2" - resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.2.tgz#533744d5aa20aca4e079c8e5daf7fd44202821f5" + resolved "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz" integrity sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg== dependencies: call-bind "^1.0.5" @@ -4226,21 +4130,21 @@ get-symbol-description@^1.0.2: get-tsconfig@^4.5.0: version "4.7.3" - resolved "https://registry.yarnpkg.com/get-tsconfig/-/get-tsconfig-4.7.3.tgz#0498163d98f7b58484dd4906999c0c9d5f103f83" + resolved "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.3.tgz" integrity sha512-ZvkrzoUA0PQZM6fy6+/Hce561s+faD1rsNwhnO5FelNjyy7EMGJ3Rz1AQ8GYDWjhRs/7dBLOEJvhK8MiEJOAFg== dependencies: resolve-pkg-maps "^1.0.0" getpass@^0.1.1: version "0.1.7" - resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + resolved "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz" integrity sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng== dependencies: assert-plus "^1.0.0" ghost-testrpc@^0.0.2: version "0.0.2" - resolved "https://registry.yarnpkg.com/ghost-testrpc/-/ghost-testrpc-0.0.2.tgz#c4de9557b1d1ae7b2d20bbe474a91378ca90ce92" + resolved "https://registry.npmjs.org/ghost-testrpc/-/ghost-testrpc-0.0.2.tgz" integrity sha512-i08dAEgJ2g8z5buJIrCTduwPIhih3DP+hOCTyyryikfV8T0bNvHnGXO67i0DD1H4GBDETTclPy9njZbfluQYrQ== dependencies: chalk "^2.4.2" @@ -4248,21 +4152,21 @@ ghost-testrpc@^0.0.2: glob-parent@^5.1.2, glob-parent@~5.1.2: version "5.1.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz" integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== dependencies: is-glob "^4.0.1" glob-parent@^6.0.2: version "6.0.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" + resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz" integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== dependencies: is-glob "^4.0.3" glob@7.1.7: version "7.1.7" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" + resolved "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz" integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== dependencies: fs.realpath "^1.0.0" @@ -4274,7 +4178,7 @@ glob@7.1.7: glob@7.2.0: version "7.2.0" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" + resolved "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz" integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== dependencies: fs.realpath "^1.0.0" @@ -4286,7 +4190,7 @@ glob@7.2.0: glob@8.1.0, glob@^8.0.3: version "8.1.0" - resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e" + resolved "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz" integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== dependencies: fs.realpath "^1.0.0" @@ -4297,7 +4201,7 @@ glob@8.1.0, glob@^8.0.3: glob@^5.0.15: version "5.0.15" - resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" + resolved "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz" integrity sha512-c9IPMazfRITpmAAKi22dK1VKxGDX9ehhqfABDriL/lzO92xcUKEJPQHrVA/2YHSNFB4iFlykVmWvwo48nr3OxA== dependencies: inflight "^1.0.4" @@ -4308,7 +4212,7 @@ glob@^5.0.15: glob@^7.0.0, glob@^7.1.2, glob@^7.1.3, glob@^7.1.6: version "7.2.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + resolved "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz" integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== dependencies: fs.realpath "^1.0.0" @@ -4320,7 +4224,7 @@ glob@^7.0.0, glob@^7.1.2, glob@^7.1.3, glob@^7.1.6: glob@~8.0.3: version "8.0.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-8.0.3.tgz#415c6eb2deed9e502c68fa44a272e6da6eeca42e" + resolved "https://registry.npmjs.org/glob/-/glob-8.0.3.tgz" integrity sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ== dependencies: fs.realpath "^1.0.0" @@ -4331,14 +4235,14 @@ glob@~8.0.3: global-modules@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-2.0.0.tgz#997605ad2345f27f51539bea26574421215c7780" + resolved "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz" integrity sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A== dependencies: global-prefix "^3.0.0" global-prefix@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-3.0.0.tgz#fc85f73064df69f50421f47f883fe5b913ba9b97" + resolved "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz" integrity sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg== dependencies: ini "^1.3.5" @@ -4347,14 +4251,14 @@ global-prefix@^3.0.0: globals@^13.19.0: version "13.24.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-13.24.0.tgz#8432a19d78ce0c1e833949c36adb345400bb1171" + resolved "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz" integrity sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ== dependencies: type-fest "^0.20.2" globalthis@^1.0.3: version "1.0.4" - resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.4.tgz#7430ed3a975d97bfb59bcce41f5cabbafa651236" + resolved "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz" integrity sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ== dependencies: define-properties "^1.2.1" @@ -4362,7 +4266,7 @@ globalthis@^1.0.3: globby@^10.0.1: version "10.0.2" - resolved "https://registry.yarnpkg.com/globby/-/globby-10.0.2.tgz#277593e745acaa4646c3ab411289ec47a0392543" + resolved "https://registry.npmjs.org/globby/-/globby-10.0.2.tgz" integrity sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg== dependencies: "@types/glob" "^7.1.1" @@ -4376,7 +4280,7 @@ globby@^10.0.1: globby@^11.1.0: version "11.1.0" - resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" + resolved "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz" integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== dependencies: array-union "^2.1.0" @@ -4388,14 +4292,14 @@ globby@^11.1.0: gopd@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" + resolved "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz" integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA== dependencies: get-intrinsic "^1.1.3" got@^12.1.0: version "12.6.1" - resolved "https://registry.yarnpkg.com/got/-/got-12.6.1.tgz#8869560d1383353204b5a9435f782df9c091f549" + resolved "https://registry.npmjs.org/got/-/got-12.6.1.tgz" integrity sha512-mThBblvlAF1d4O5oqyvN+ZxLAYwIJK7bpMxgYqPD9okW0C3qm5FFn7k811QrcuEBwaogR3ngOFoCfs6mRv7teQ== dependencies: "@sindresorhus/is" "^5.2.0" @@ -4412,27 +4316,27 @@ got@^12.1.0: graceful-fs@4.2.10: version "4.2.10" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" + resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz" integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, graceful-fs@^4.2.4: version "4.2.11" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" + resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== graphemer@^1.4.0: version "1.4.0" - resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" + resolved "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz" integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== growl@1.10.5: version "1.10.5" - resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" + resolved "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz" integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== handlebars@^4.0.1, handlebars@^4.7.6: version "4.7.8" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.8.tgz#41c42c18b1be2365439188c77c6afae71c0cd9e9" + resolved "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz" integrity sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ== dependencies: minimist "^1.2.5" @@ -4444,12 +4348,12 @@ handlebars@^4.0.1, handlebars@^4.7.6: har-schema@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" + resolved "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz" integrity sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q== har-validator@~5.1.3: version "5.1.5" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.5.tgz#1f0803b9f8cb20c0fa13822df1ecddb36bde1efd" + resolved "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz" integrity sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w== dependencies: ajv "^6.12.3" @@ -4457,7 +4361,7 @@ har-validator@~5.1.3: hardhat-contract-sizer@^2.0.2: version "2.10.0" - resolved "https://registry.yarnpkg.com/hardhat-contract-sizer/-/hardhat-contract-sizer-2.10.0.tgz#72646f43bfe50e9a5702c9720c9bc3e77d93a2c9" + resolved "https://registry.npmjs.org/hardhat-contract-sizer/-/hardhat-contract-sizer-2.10.0.tgz" integrity sha512-QiinUgBD5MqJZJh1hl1jc9dNnpJg7eE/w4/4GEnrcmZJJTDbVFNe3+/3Ep24XqISSkYxRz36czcPHKHd/a0dwA== dependencies: chalk "^4.0.0" @@ -4466,7 +4370,7 @@ hardhat-contract-sizer@^2.0.2: hardhat-gas-reporter@^1.0.9: version "1.0.10" - resolved "https://registry.yarnpkg.com/hardhat-gas-reporter/-/hardhat-gas-reporter-1.0.10.tgz#ebe5bda5334b5def312747580cd923c2b09aef1b" + resolved "https://registry.npmjs.org/hardhat-gas-reporter/-/hardhat-gas-reporter-1.0.10.tgz" integrity sha512-02N4+So/fZrzJ88ci54GqwVA3Zrf0C9duuTyGt0CFRIh/CdNwbnTgkXkRfojOMLBQ+6t+lBIkgbsOtqMvNwikA== dependencies: array-uniq "1.0.3" @@ -4475,12 +4379,12 @@ hardhat-gas-reporter@^1.0.9: hardhat-typechain@^0.3.3: version "0.3.5" - resolved "https://registry.yarnpkg.com/hardhat-typechain/-/hardhat-typechain-0.3.5.tgz#8e50616a9da348b33bd001168c8fda9c66b7b4af" + resolved "https://registry.npmjs.org/hardhat-typechain/-/hardhat-typechain-0.3.5.tgz" integrity sha512-w9lm8sxqTJACY+V7vijiH+NkPExnmtiQEjsV9JKD1KgMdVk2q8y+RhvU/c4B7+7b1+HylRUCxpOIvFuB3rE4+w== -hardhat@=2.22.2: +hardhat@=2.22.2, hardhat@^2.14.0, hardhat@^2.19.4: version "2.22.2" - resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.22.2.tgz#0cadd7ec93bf39bab09f81603e75bc5e92acea3d" + resolved "https://registry.npmjs.org/hardhat/-/hardhat-2.22.2.tgz" integrity sha512-0xZ7MdCZ5sJem4MrvpQWLR3R3zGDoHw5lsR+pBFimqwagimIOn3bWuZv69KA+veXClwI1s/zpqgwPwiFrd4Dxw== dependencies: "@ethersproject/abi" "^5.1.2" @@ -4527,151 +4431,53 @@ hardhat@=2.22.2: uuid "^8.3.2" ws "^7.4.6" -hardhat@^2.14.0: - version "2.22.7" - resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.22.7.tgz#3de0ce5074063cf468876c5e62f84c66d2408e8e" - integrity sha512-nrXQAl+qUr75TsCLDo8P41YXLc+5U7qQMMCIrbbmy1/uQaVPncdjDrD5BR0CENvHRj7EBqO+JkofpozXoIfJKg== - dependencies: - "@ethersproject/abi" "^5.1.2" - "@metamask/eth-sig-util" "^4.0.0" - "@nomicfoundation/edr" "^0.5.0" - "@nomicfoundation/ethereumjs-common" "4.0.4" - "@nomicfoundation/ethereumjs-tx" "5.0.4" - "@nomicfoundation/ethereumjs-util" "9.0.4" - "@nomicfoundation/solidity-analyzer" "^0.1.0" - "@sentry/node" "^5.18.1" - "@types/bn.js" "^5.1.0" - "@types/lru-cache" "^5.1.0" - adm-zip "^0.4.16" - aggregate-error "^3.0.0" - ansi-escapes "^4.3.0" - boxen "^5.1.2" - chalk "^2.4.2" - chokidar "^3.4.0" - ci-info "^2.0.0" - debug "^4.1.1" - enquirer "^2.3.0" - env-paths "^2.2.0" - ethereum-cryptography "^1.0.3" - 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.0.0-rc.12" - io-ts "1.10.4" - keccak "^3.0.2" - lodash "^4.17.11" - mnemonist "^0.38.0" - mocha "^10.0.0" - p-map "^4.0.0" - raw-body "^2.4.1" - resolve "1.17.0" - semver "^6.3.0" - solc "0.8.26" - source-map-support "^0.5.13" - stacktrace-parser "^0.1.10" - tsort "0.0.1" - undici "^5.14.0" - uuid "^8.3.2" - ws "^7.4.6" - -hardhat@^2.19.4: - version "2.22.5" - resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.22.5.tgz#7e1a4311fa9e34a1cfe337784eae06706f6469a5" - integrity sha512-9Zq+HonbXCSy6/a13GY1cgHglQRfh4qkzmj1tpPlhxJDwNVnhxlReV6K7hCWFKlOrV13EQwsdcD0rjcaQKWRZw== - dependencies: - "@ethersproject/abi" "^5.1.2" - "@metamask/eth-sig-util" "^4.0.0" - "@nomicfoundation/edr" "^0.4.0" - "@nomicfoundation/ethereumjs-common" "4.0.4" - "@nomicfoundation/ethereumjs-tx" "5.0.4" - "@nomicfoundation/ethereumjs-util" "9.0.4" - "@nomicfoundation/solidity-analyzer" "^0.1.0" - "@sentry/node" "^5.18.1" - "@types/bn.js" "^5.1.0" - "@types/lru-cache" "^5.1.0" - adm-zip "^0.4.16" - aggregate-error "^3.0.0" - ansi-escapes "^4.3.0" - boxen "^5.1.2" - chalk "^2.4.2" - chokidar "^3.4.0" - ci-info "^2.0.0" - debug "^4.1.1" - enquirer "^2.3.0" - env-paths "^2.2.0" - ethereum-cryptography "^1.0.3" - 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.0.0-rc.12" - io-ts "1.10.4" - keccak "^3.0.2" - lodash "^4.17.11" - mnemonist "^0.38.0" - mocha "^10.0.0" - p-map "^4.0.0" - raw-body "^2.4.1" - resolve "1.17.0" - semver "^6.3.0" - solc "0.7.3" - source-map-support "^0.5.13" - stacktrace-parser "^0.1.10" - tsort "0.0.1" - undici "^5.14.0" - uuid "^8.3.2" - ws "^7.4.6" - has-bigints@^1.0.1, has-bigints@^1.0.2: version "1.0.2" - resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa" + resolved "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz" integrity sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ== has-flag@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" + resolved "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz" integrity sha512-DyYHfIYwAJmjAjSSPKANxI8bFY9YtFrgkAfinBojQ8YJTOuOuav64tMUJv584SES4xl74PmuaevIyaLESHdTAA== has-flag@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + resolved "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz" integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== has-flag@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + resolved "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== has-property-descriptors@^1.0.0, has-property-descriptors@^1.0.2: version "1.0.2" - resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz#963ed7d071dc7bf5f084c5bfbe0d1b6222586854" + resolved "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz" integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg== dependencies: es-define-property "^1.0.0" has-proto@^1.0.1, has-proto@^1.0.3: version "1.0.3" - resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.3.tgz#b31ddfe9b0e6e9914536a6ab286426d0214f77fd" + resolved "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz" integrity sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q== has-symbols@^1.0.2, has-symbols@^1.0.3: version "1.0.3" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" + resolved "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz" integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== has-tostringtag@^1.0.0, has-tostringtag@^1.0.2: version "1.0.2" - resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz#2cdc42d40bef2e5b4eeab7c01a73c54ce7ab5abc" + resolved "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz" integrity sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw== dependencies: has-symbols "^1.0.3" hash-base@^3.0.0: version "3.1.0" - resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.1.0.tgz#55c381d9e06e1d2997a883b4a3fddfe7f0d3af33" + resolved "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz" integrity sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA== dependencies: inherits "^2.0.4" @@ -4680,7 +4486,7 @@ hash-base@^3.0.0: hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3, hash.js@^1.1.7: version "1.1.7" - resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" + resolved "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz" integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== dependencies: inherits "^2.0.3" @@ -4688,24 +4494,24 @@ hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3, hash.js@^1.1.7: hasown@^2.0.0, hasown@^2.0.1, hasown@^2.0.2: version "2.0.2" - resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" + resolved "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz" integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== dependencies: function-bind "^1.1.2" he@1.2.0: version "1.2.0" - resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" + resolved "https://registry.npmjs.org/he/-/he-1.2.0.tgz" integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== "heap@>= 0.2.0": version "0.2.7" - resolved "https://registry.yarnpkg.com/heap/-/heap-0.2.7.tgz#1e6adf711d3f27ce35a81fe3b7bd576c2260a8fc" + resolved "https://registry.npmjs.org/heap/-/heap-0.2.7.tgz" integrity sha512-2bsegYkkHO+h/9MGbn6KWcE45cHZgPANo5LXF7EvWdT0yT2EguSVO1nDgU5c8+ZOPwp2vMNa7YFsJhVcDR9Sdg== hmac-drbg@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" + resolved "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz" integrity sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg== dependencies: hash.js "^1.0.3" @@ -4714,12 +4520,12 @@ hmac-drbg@^1.0.1: hosted-git-info@^2.6.0: version "2.8.9" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" + resolved "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz" integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw== http-basic@^8.1.1: version "8.1.3" - resolved "https://registry.yarnpkg.com/http-basic/-/http-basic-8.1.3.tgz#a7cabee7526869b9b710136970805b1004261bbf" + resolved "https://registry.npmjs.org/http-basic/-/http-basic-8.1.3.tgz" integrity sha512-/EcDMwJZh3mABI2NhGfHOGOeOZITqfkEO4p/xK+l3NpyncIHUQBoMvCSF/b5GqvKtySC2srL/GGG3+EtlqlmCw== dependencies: caseless "^0.12.0" @@ -4729,12 +4535,12 @@ http-basic@^8.1.1: http-cache-semantics@^4.1.1: version "4.1.1" - resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz#abe02fcb2985460bf0323be664436ec3476a6d5a" + resolved "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz" integrity sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ== http-errors@2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3" + resolved "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz" integrity sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ== dependencies: depd "2.0.0" @@ -4745,14 +4551,14 @@ http-errors@2.0.0: http-response-object@^3.0.1: version "3.0.2" - resolved "https://registry.yarnpkg.com/http-response-object/-/http-response-object-3.0.2.tgz#7f435bb210454e4360d074ef1f989d5ea8aa9810" + resolved "https://registry.npmjs.org/http-response-object/-/http-response-object-3.0.2.tgz" integrity sha512-bqX0XTF6fnXSQcEJ2Iuyr75yVakyjIDCqroJQ/aHfSdlM743Cwqoi2nDYMzLGWUcuTWGWy8AAvOKXTfiv6q9RA== dependencies: "@types/node" "^10.0.3" http-signature@~1.2.0: version "1.2.0" - resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" + resolved "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz" integrity sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ== dependencies: assert-plus "^1.0.0" @@ -4761,7 +4567,7 @@ http-signature@~1.2.0: http2-wrapper@^2.1.10: version "2.2.1" - resolved "https://registry.yarnpkg.com/http2-wrapper/-/http2-wrapper-2.2.1.tgz#310968153dcdedb160d8b72114363ef5fce1f64a" + resolved "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-2.2.1.tgz" integrity sha512-V5nVw1PAOgfI3Lmeaj2Exmeg7fenjhRUgz1lPSezy1CuhPYbgQtbQj4jZfEAEMlaL+vupsvhjqCyjzob0yxsmQ== dependencies: quick-lru "^5.1.1" @@ -4769,7 +4575,7 @@ http2-wrapper@^2.1.10: https-proxy-agent@^5.0.0: version "5.0.1" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" + resolved "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz" integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA== dependencies: agent-base "6" @@ -4777,44 +4583,44 @@ https-proxy-agent@^5.0.0: iconv-lite@0.4.24: version "0.4.24" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + resolved "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz" integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== dependencies: safer-buffer ">= 2.1.2 < 3" ieee754@^1.1.13, ieee754@^1.2.1: version "1.2.1" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" + resolved "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== ignore@^5.1.1, ignore@^5.2.0, ignore@^5.2.4: version "5.3.1" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.1.tgz#5073e554cd42c5b33b394375f538b8593e34d4ef" + resolved "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz" integrity sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw== ignore@~5.2.4: version "5.2.4" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" + resolved "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz" integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== immediate@^3.2.3: version "3.3.0" - resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.3.0.tgz#1aef225517836bcdf7f2a2de2600c79ff0269266" + resolved "https://registry.npmjs.org/immediate/-/immediate-3.3.0.tgz" integrity sha512-HR7EVodfFUdQCTIeySw+WDRFJlPcLOJbXfwwZ7Oom6tjsvZ3bOkCDJHehQC3nxJrv7+f9XecwazynjU8e4Vw3Q== immediate@~3.2.3: version "3.2.3" - resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.2.3.tgz#d140fa8f614659bd6541233097ddaac25cdd991c" + resolved "https://registry.npmjs.org/immediate/-/immediate-3.2.3.tgz" integrity sha512-RrGCXRm/fRVqMIhqXrGEX9rRADavPiDFSoMb/k64i9XMk8uH4r/Omi5Ctierj6XzNecwDbO4WuFbDD1zmpl3Tg== immutable@^4.0.0-rc.12: version "4.3.5" - resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.3.5.tgz#f8b436e66d59f99760dc577f5c99a4fd2a5cc5a0" + resolved "https://registry.npmjs.org/immutable/-/immutable-4.3.5.tgz" integrity sha512-8eabxkth9gZatlwl5TBuJnCsoTADlL6ftEr7A4qgdaTsPyreilDSnUk57SO+jfKcNtxPa22U5KK6DSeAYhpBJw== import-fresh@^3.2.1, import-fresh@^3.3.0: version "3.3.0" - resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" + resolved "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz" integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== dependencies: parent-module "^1.0.0" @@ -4822,17 +4628,17 @@ import-fresh@^3.2.1, import-fresh@^3.3.0: imurmurhash@^0.1.4: version "0.1.4" - resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + resolved "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz" integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== indent-string@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" + resolved "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz" integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== inflight@^1.0.4: version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + resolved "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz" integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== dependencies: once "^1.3.0" @@ -4840,27 +4646,27 @@ inflight@^1.0.4: inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3: version "2.0.4" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== inherits@2.0.3: version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" integrity sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw== ini@^1.3.4, ini@^1.3.5, ini@~1.3.0: version "1.3.8" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" + resolved "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz" integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== ini@~3.0.0: version "3.0.1" - resolved "https://registry.yarnpkg.com/ini/-/ini-3.0.1.tgz#c76ec81007875bc44d544ff7a11a55d12294102d" + resolved "https://registry.npmjs.org/ini/-/ini-3.0.1.tgz" integrity sha512-it4HyVAUTKBc6m8e1iXWvXSTdndF7HbdN713+kvLrymxTaU4AUBWrJ4vEooP+V7fexnVD3LKcBshjGGPefSMUQ== internal-slot@^1.0.7: version "1.0.7" - resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.7.tgz#c06dcca3ed874249881007b0a5523b172a190802" + resolved "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz" integrity sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g== dependencies: es-errors "^1.3.0" @@ -4869,19 +4675,19 @@ internal-slot@^1.0.7: interpret@^1.0.0: version "1.4.0" - resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" + resolved "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz" integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA== io-ts@1.10.4: version "1.10.4" - resolved "https://registry.yarnpkg.com/io-ts/-/io-ts-1.10.4.tgz#cd5401b138de88e4f920adbcb7026e2d1967e6e2" + resolved "https://registry.npmjs.org/io-ts/-/io-ts-1.10.4.tgz" integrity sha512-b23PteSnYXSONJ6JQXRAlvJhuw8KOtkqa87W4wDtvMrud/DTJd5X+NpOOI+O/zZwVq6v0VLAaJ+1EDViKEuN9g== dependencies: fp-ts "^1.0.0" is-array-buffer@^3.0.4: version "3.0.4" - resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.4.tgz#7a1f92b3d61edd2bc65d24f130530ea93d7fae98" + resolved "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz" integrity sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw== dependencies: call-bind "^1.0.2" @@ -4889,26 +4695,26 @@ is-array-buffer@^3.0.4: is-arrayish@^0.2.1: version "0.2.1" - resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + resolved "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz" integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== is-bigint@^1.0.1: version "1.0.4" - resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.4.tgz#08147a1875bc2b32005d41ccd8291dffc6691df3" + resolved "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz" integrity sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg== dependencies: has-bigints "^1.0.1" is-binary-path@~2.1.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" + resolved "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz" integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== dependencies: binary-extensions "^2.0.0" is-boolean-object@^1.1.0: version "1.1.2" - resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.2.tgz#5c6dc200246dd9321ae4b885a114bb1f75f63719" + resolved "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz" integrity sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA== dependencies: call-bind "^1.0.2" @@ -4916,102 +4722,102 @@ is-boolean-object@^1.1.0: is-buffer@^2.0.5: version "2.0.5" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.5.tgz#ebc252e400d22ff8d77fa09888821a24a658c191" + resolved "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz" integrity sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ== is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7: version "1.2.7" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" + resolved "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz" integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== is-core-module@^2.11.0, is-core-module@^2.13.0, is-core-module@^2.13.1: version "2.13.1" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.1.tgz#ad0d7532c6fea9da1ebdc82742d74525c6273384" + resolved "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz" integrity sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw== dependencies: hasown "^2.0.0" is-data-view@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/is-data-view/-/is-data-view-1.0.1.tgz#4b4d3a511b70f3dc26d42c03ca9ca515d847759f" + resolved "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz" integrity sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w== dependencies: is-typed-array "^1.1.13" is-date-object@^1.0.1: version "1.0.5" - resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f" + resolved "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz" integrity sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ== dependencies: has-tostringtag "^1.0.0" is-extglob@^2.1.1: version "2.1.1" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + resolved "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz" integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== is-fn@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/is-fn/-/is-fn-1.0.0.tgz#9543d5de7bcf5b08a22ec8a20bae6e286d510d8c" + resolved "https://registry.npmjs.org/is-fn/-/is-fn-1.0.0.tgz" integrity sha512-XoFPJQmsAShb3jEQRfzf2rqXavq7fIqF/jOekp308JlThqrODnMpweVSGilKTCXELfLhltGP2AGgbQGVP8F1dg== is-fullwidth-code-point@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + resolved "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz" integrity sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w== is-fullwidth-code-point@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + resolved "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz" integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: version "4.0.3" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + resolved "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz" integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== dependencies: is-extglob "^2.1.1" is-hex-prefixed@1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz#7d8d37e6ad77e5d127148913c573e082d777f554" + resolved "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz" integrity sha512-WvtOiug1VFrE9v1Cydwm+FnXd3+w9GaeVUss5W4v/SLy3UW00vP+6iNF2SdnfiBoLy4bTqVdkftNGTUeOFVsbA== is-negative-zero@^2.0.3: version "2.0.3" - resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.3.tgz#ced903a027aca6381b777a5743069d7376a49747" + resolved "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz" integrity sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw== is-number-object@^1.0.4: version "1.0.7" - resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.7.tgz#59d50ada4c45251784e9904f5246c742f07a42fc" + resolved "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz" integrity sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ== dependencies: has-tostringtag "^1.0.0" is-number@^7.0.0: version "7.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + resolved "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz" integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== is-object@~1.0.1: version "1.0.2" - resolved "https://registry.yarnpkg.com/is-object/-/is-object-1.0.2.tgz#a56552e1c665c9e950b4a025461da87e72f86fcf" + resolved "https://registry.npmjs.org/is-object/-/is-object-1.0.2.tgz" integrity sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA== is-path-inside@^3.0.3: version "3.0.3" - resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" + resolved "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz" integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== is-plain-obj@^2.1.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" + resolved "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz" integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== is-regex@^1.1.4: version "1.1.4" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" + resolved "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz" integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== dependencies: call-bind "^1.0.2" @@ -5019,97 +4825,97 @@ is-regex@^1.1.4: is-shared-array-buffer@^1.0.2, is-shared-array-buffer@^1.0.3: version "1.0.3" - resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz#1237f1cba059cdb62431d378dcc37d9680181688" + resolved "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz" integrity sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg== dependencies: call-bind "^1.0.7" is-string@^1.0.5, is-string@^1.0.7: version "1.0.7" - resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" + resolved "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz" integrity sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg== dependencies: has-tostringtag "^1.0.0" is-symbol@^1.0.2, is-symbol@^1.0.3: version "1.0.4" - resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.4.tgz#a6dac93b635b063ca6872236de88910a57af139c" + resolved "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz" integrity sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg== dependencies: has-symbols "^1.0.2" is-typed-array@^1.1.13: version "1.1.13" - resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.13.tgz#d6c5ca56df62334959322d7d7dd1cca50debe229" + resolved "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz" integrity sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw== dependencies: which-typed-array "^1.1.14" is-typedarray@~1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + resolved "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz" integrity sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA== is-unicode-supported@^0.1.0: version "0.1.0" - resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" + resolved "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz" integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== is-url@^1.2.4: version "1.2.4" - resolved "https://registry.yarnpkg.com/is-url/-/is-url-1.2.4.tgz#04a4df46d28c4cff3d73d01ff06abeb318a1aa52" + resolved "https://registry.npmjs.org/is-url/-/is-url-1.2.4.tgz" integrity sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww== is-weakref@^1.0.2: version "1.0.2" - resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2" + resolved "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz" integrity sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ== dependencies: call-bind "^1.0.2" isarray@0.0.1: version "0.0.1" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + resolved "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" integrity sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ== isarray@^2.0.5: version "2.0.5" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723" + resolved "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz" integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw== isarray@~1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + resolved "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ== isexe@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz" integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== isstream@~0.1.2: version "0.1.2" - resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + resolved "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz" integrity sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g== js-sha3@0.5.5: version "0.5.5" - resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.5.5.tgz#baf0c0e8c54ad5903447df96ade7a4a1bca79a4a" + resolved "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.5.tgz" integrity sha512-yLLwn44IVeunwjpDVTDZmQeVbB0h+dZpY2eO68B/Zik8hu6dH+rKeLxwua79GGIvW6xr8NBAcrtiUbYrTjEFTA== js-sha3@0.8.0, js-sha3@^0.8.0: version "0.8.0" - resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" + resolved "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz" integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== js-tokens@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== js-yaml@3.x: version "3.14.1" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" + resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz" integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== dependencies: argparse "^1.0.7" @@ -5117,87 +4923,87 @@ js-yaml@3.x: js-yaml@4.1.0, js-yaml@^4.1.0: version "4.1.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz" integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== dependencies: argparse "^2.0.1" jsbn@~0.1.0: version "0.1.1" - resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + resolved "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz" integrity sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg== json-bigint@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/json-bigint/-/json-bigint-1.0.0.tgz#ae547823ac0cad8398667f8cd9ef4730f5b01ff1" + resolved "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz" integrity sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ== dependencies: bignumber.js "^9.0.0" json-buffer@3.0.1: version "3.0.1" - resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" + resolved "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz" integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== json-parse-even-better-errors@^2.3.0: version "2.3.1" - resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" + resolved "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz" integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== json-schema-traverse@^0.4.1: version "0.4.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + resolved "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz" integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== json-schema-traverse@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" + resolved "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz" integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== json-schema@0.4.0: version "0.4.0" - resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.4.0.tgz#f7de4cf6efab838ebaeb3236474cbba5a1930ab5" + resolved "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz" integrity sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA== json-stable-stringify-without-jsonify@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" + resolved "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz" integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== json-stringify-safe@~5.0.1: version "5.0.1" - resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + resolved "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz" integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA== json5@^1.0.2: version "1.0.2" - resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.2.tgz#63d98d60f21b313b77c4d6da18bfa69d80e1d593" + resolved "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz" integrity sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA== dependencies: minimist "^1.2.0" jsonc-parser@~3.2.0: version "3.2.1" - resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.1.tgz#031904571ccf929d7670ee8c547545081cb37f1a" + resolved "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.1.tgz" integrity sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA== jsonfile@^2.1.0: version "2.4.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" + resolved "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz" integrity sha512-PKllAqbgLgxHaj8TElYymKCAgrASebJrWpTnEkOaTowt23VKXXN0sUeriJ+eh7y6ufb/CC5ap11pz71/cM0hUw== optionalDependencies: graceful-fs "^4.1.6" jsonfile@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" + resolved "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz" integrity sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg== optionalDependencies: graceful-fs "^4.1.6" jsonfile@^6.0.1: version "6.1.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" + resolved "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz" integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== dependencies: universalify "^2.0.0" @@ -5206,17 +5012,17 @@ jsonfile@^6.0.1: jsonparse@^1.2.0: version "1.3.1" - resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" + resolved "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz" integrity sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg== jsonschema@^1.2.4: version "1.4.1" - resolved "https://registry.yarnpkg.com/jsonschema/-/jsonschema-1.4.1.tgz#cc4c3f0077fb4542982973d8a083b6b34f482dab" + resolved "https://registry.npmjs.org/jsonschema/-/jsonschema-1.4.1.tgz" integrity sha512-S6cATIPVv1z0IlxdN+zUk5EPjkGCdnhN4wVSBlvoUO1tOLJootbo9CquNJmbIh4yikWHiUedhRYrNPn1arpEmQ== jsonwebtoken@^8.5.1: version "8.5.1" - resolved "https://registry.yarnpkg.com/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz#00e71e0b8df54c2121a1f26137df2280673bcc0d" + resolved "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz" integrity sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w== dependencies: jws "^3.2.2" @@ -5232,7 +5038,7 @@ jsonwebtoken@^8.5.1: jsprim@^1.2.2: version "1.4.2" - resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.2.tgz#712c65533a15c878ba59e9ed5f0e26d5b77c5feb" + resolved "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz" integrity sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw== dependencies: assert-plus "1.0.0" @@ -5242,12 +5048,12 @@ jsprim@^1.2.2: just-extend@^6.2.0: version "6.2.0" - resolved "https://registry.yarnpkg.com/just-extend/-/just-extend-6.2.0.tgz#b816abfb3d67ee860482e7401564672558163947" + resolved "https://registry.npmjs.org/just-extend/-/just-extend-6.2.0.tgz" integrity sha512-cYofQu2Xpom82S6qD778jBDpwvvy39s1l/hrYij2u9AMdQcGRpaBu6kY4mVhuno5kJVi1DAz4aiphA2WI1/OAw== jwa@^1.4.1: version "1.4.1" - resolved "https://registry.yarnpkg.com/jwa/-/jwa-1.4.1.tgz#743c32985cb9e98655530d53641b66c8645b039a" + resolved "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz" integrity sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA== dependencies: buffer-equal-constant-time "1.0.1" @@ -5256,7 +5062,7 @@ jwa@^1.4.1: jws@^3.2.2: version "3.2.2" - resolved "https://registry.yarnpkg.com/jws/-/jws-3.2.2.tgz#001099f3639468c9414000e99995fa52fb478304" + resolved "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz" integrity sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA== dependencies: jwa "^1.4.1" @@ -5264,7 +5070,7 @@ jws@^3.2.2: keccak@3.0.1: version "3.0.1" - resolved "https://registry.yarnpkg.com/keccak/-/keccak-3.0.1.tgz#ae30a0e94dbe43414f741375cff6d64c8bea0bff" + resolved "https://registry.npmjs.org/keccak/-/keccak-3.0.1.tgz" integrity sha512-epq90L9jlFWCW7+pQa6JOnKn2Xgl2mtI664seYR6MHskvI9agt7AnDqmAlp9TqU4/caMYbA08Hi5DMZAl5zdkA== dependencies: node-addon-api "^2.0.0" @@ -5272,7 +5078,7 @@ keccak@3.0.1: keccak@3.0.2: version "3.0.2" - resolved "https://registry.yarnpkg.com/keccak/-/keccak-3.0.2.tgz#4c2c6e8c54e04f2670ee49fa734eb9da152206e0" + resolved "https://registry.npmjs.org/keccak/-/keccak-3.0.2.tgz" integrity sha512-PyKKjkH53wDMLGrvmRGSNWgmSxZOUqbnXwKL9tmgbFYA1iAYqW21kfR7mZXV0MlESiefxQQE9X9fTa3X+2MPDQ== dependencies: node-addon-api "^2.0.0" @@ -5281,7 +5087,7 @@ keccak@3.0.2: keccak@^3.0.0, keccak@^3.0.2: version "3.0.4" - resolved "https://registry.yarnpkg.com/keccak/-/keccak-3.0.4.tgz#edc09b89e633c0549da444432ecf062ffadee86d" + resolved "https://registry.npmjs.org/keccak/-/keccak-3.0.4.tgz" integrity sha512-3vKuW0jV8J3XNTzvfyicFR5qvxrSAGl7KIhvgOu5cmWwM7tZRj3fMbj/pfIf4be7aznbc+prBWGjywox/g2Y6Q== dependencies: node-addon-api "^2.0.0" @@ -5290,59 +5096,59 @@ keccak@^3.0.0, keccak@^3.0.2: keyv@^4.5.3: version "4.5.4" - resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93" + resolved "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz" integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== dependencies: json-buffer "3.0.1" kind-of@^6.0.2: version "6.0.3" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" + resolved "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz" integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== klaw@^1.0.0: version "1.3.1" - resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439" + resolved "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz" integrity sha512-TED5xi9gGQjGpNnvRWknrwAB1eL5GciPfVFOt3Vk1OJCVDQbzuSfrF3hkUQKlsgKrG1F+0t5W0m+Fje1jIt8rw== optionalDependencies: graceful-fs "^4.1.9" latest-version@^7.0.0: version "7.0.0" - resolved "https://registry.yarnpkg.com/latest-version/-/latest-version-7.0.0.tgz#843201591ea81a4d404932eeb61240fe04e9e5da" + resolved "https://registry.npmjs.org/latest-version/-/latest-version-7.0.0.tgz" integrity sha512-KvNT4XqAMzdcL6ka6Tl3i2lYeFDgXNCuIX+xNx6ZMVR1dFq+idXd9FLKNMOIx0t9mJ9/HudyX4oZWXZQ0UJHeg== dependencies: package-json "^8.1.0" level-codec@^9.0.0: version "9.0.2" - resolved "https://registry.yarnpkg.com/level-codec/-/level-codec-9.0.2.tgz#fd60df8c64786a80d44e63423096ffead63d8cbc" + resolved "https://registry.npmjs.org/level-codec/-/level-codec-9.0.2.tgz" integrity sha512-UyIwNb1lJBChJnGfjmO0OR+ezh2iVu1Kas3nvBS/BzGnx79dv6g7unpKIDNPMhfdTEGoc7mC8uAu51XEtX+FHQ== dependencies: buffer "^5.6.0" level-concat-iterator@^3.0.0: version "3.1.0" - resolved "https://registry.yarnpkg.com/level-concat-iterator/-/level-concat-iterator-3.1.0.tgz#5235b1f744bc34847ed65a50548aa88d22e881cf" + resolved "https://registry.npmjs.org/level-concat-iterator/-/level-concat-iterator-3.1.0.tgz" integrity sha512-BWRCMHBxbIqPxJ8vHOvKUsaO0v1sLYZtjN3K2iZJsRBYtp+ONsY6Jfi6hy9K3+zolgQRryhIn2NRZjZnWJ9NmQ== dependencies: catering "^2.1.0" level-concat-iterator@~2.0.0: version "2.0.1" - resolved "https://registry.yarnpkg.com/level-concat-iterator/-/level-concat-iterator-2.0.1.tgz#1d1009cf108340252cb38c51f9727311193e6263" + resolved "https://registry.npmjs.org/level-concat-iterator/-/level-concat-iterator-2.0.1.tgz" integrity sha512-OTKKOqeav2QWcERMJR7IS9CUo1sHnke2C0gkSmcR7QuEtFNLLzHQAvnMw8ykvEcv0Qtkg0p7FOwP1v9e5Smdcw== level-errors@^2.0.0, level-errors@~2.0.0: version "2.0.1" - resolved "https://registry.yarnpkg.com/level-errors/-/level-errors-2.0.1.tgz#2132a677bf4e679ce029f517c2f17432800c05c8" + resolved "https://registry.npmjs.org/level-errors/-/level-errors-2.0.1.tgz" integrity sha512-UVprBJXite4gPS+3VznfgDSU8PTRuVX0NXwoWW50KLxd2yw4Y1t2JUR5In1itQnudZqRMT9DlAM3Q//9NCjCFw== dependencies: errno "~0.1.1" level-iterator-stream@~4.0.0: version "4.0.2" - resolved "https://registry.yarnpkg.com/level-iterator-stream/-/level-iterator-stream-4.0.2.tgz#7ceba69b713b0d7e22fcc0d1f128ccdc8a24f79c" + resolved "https://registry.npmjs.org/level-iterator-stream/-/level-iterator-stream-4.0.2.tgz" integrity sha512-ZSthfEqzGSOMWoUGhTXdX9jv26d32XJuHz/5YnuHZzH6wldfWMOVwI9TBtKcya4BKTyTt3XVA0A3cF3q5CY30Q== dependencies: inherits "^2.0.4" @@ -5351,7 +5157,7 @@ level-iterator-stream@~4.0.0: level-mem@^5.0.1: version "5.0.1" - resolved "https://registry.yarnpkg.com/level-mem/-/level-mem-5.0.1.tgz#c345126b74f5b8aa376dc77d36813a177ef8251d" + resolved "https://registry.npmjs.org/level-mem/-/level-mem-5.0.1.tgz" integrity sha512-qd+qUJHXsGSFoHTziptAKXoLX87QjR7v2KMbqncDXPxQuCdsQlzmyX+gwrEHhlzn08vkf8TyipYyMmiC6Gobzg== dependencies: level-packager "^5.0.3" @@ -5359,7 +5165,7 @@ level-mem@^5.0.1: level-packager@^5.0.3: version "5.1.1" - resolved "https://registry.yarnpkg.com/level-packager/-/level-packager-5.1.1.tgz#323ec842d6babe7336f70299c14df2e329c18939" + resolved "https://registry.npmjs.org/level-packager/-/level-packager-5.1.1.tgz" integrity sha512-HMwMaQPlTC1IlcwT3+swhqf/NUO+ZhXVz6TY1zZIIZlIR0YSn8GtAAWmIvKjNY16ZkEg/JcpAuQskxsXqC0yOQ== dependencies: encoding-down "^6.3.0" @@ -5367,19 +5173,19 @@ level-packager@^5.0.3: level-supports@^2.0.1: version "2.1.0" - resolved "https://registry.yarnpkg.com/level-supports/-/level-supports-2.1.0.tgz#9af908d853597ecd592293b2fad124375be79c5f" + resolved "https://registry.npmjs.org/level-supports/-/level-supports-2.1.0.tgz" integrity sha512-E486g1NCjW5cF78KGPrMDRBYzPuueMZ6VBXHT6gC7A8UYWGiM14fGgp+s/L1oFfDWSPV/+SFkYCmZ0SiESkRKA== level-supports@~1.0.0: version "1.0.1" - resolved "https://registry.yarnpkg.com/level-supports/-/level-supports-1.0.1.tgz#2f530a596834c7301622521988e2c36bb77d122d" + resolved "https://registry.npmjs.org/level-supports/-/level-supports-1.0.1.tgz" integrity sha512-rXM7GYnW8gsl1vedTJIbzOrRv85c/2uCMpiiCzO2fndd06U/kUXEEU9evYn4zFggBOg36IsBW8LzqIpETwwQzg== dependencies: xtend "^4.0.2" level-ws@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/level-ws/-/level-ws-2.0.0.tgz#207a07bcd0164a0ec5d62c304b4615c54436d339" + resolved "https://registry.npmjs.org/level-ws/-/level-ws-2.0.0.tgz" integrity sha512-1iv7VXx0G9ec1isqQZ7y5LmoZo/ewAsyDHNA8EFDW5hqH2Kqovm33nSFkSdnLLAK+I5FlT+lo5Cw9itGe+CpQA== dependencies: inherits "^2.0.3" @@ -5388,7 +5194,7 @@ level-ws@^2.0.0: leveldown@6.1.0: version "6.1.0" - resolved "https://registry.yarnpkg.com/leveldown/-/leveldown-6.1.0.tgz#7ab1297706f70c657d1a72b31b40323aa612b9ee" + resolved "https://registry.npmjs.org/leveldown/-/leveldown-6.1.0.tgz" integrity sha512-8C7oJDT44JXxh04aSSsfcMI8YiaGRhOFI9/pMEL7nWJLVsWajDPTRxsSHTM2WcTVY5nXM+SuRHzPPi0GbnDX+w== dependencies: abstract-leveldown "^7.2.0" @@ -5397,7 +5203,7 @@ leveldown@6.1.0: levelup@^4.3.2: version "4.4.0" - resolved "https://registry.yarnpkg.com/levelup/-/levelup-4.4.0.tgz#f89da3a228c38deb49c48f88a70fb71f01cafed6" + resolved "https://registry.npmjs.org/levelup/-/levelup-4.4.0.tgz" integrity sha512-94++VFO3qN95cM/d6eBXvd894oJE0w3cInq9USsyQzzoJxmiYzPAocNcuGCPGGjoXqDVJcr3C1jzt1TSjyaiLQ== dependencies: deferred-leveldown "~5.3.0" @@ -5408,7 +5214,7 @@ levelup@^4.3.2: levn@^0.4.1: version "0.4.1" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" + resolved "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz" integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== dependencies: prelude-ls "^1.2.1" @@ -5416,7 +5222,7 @@ levn@^0.4.1: levn@~0.3.0: version "0.3.0" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + resolved "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz" integrity sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA== dependencies: prelude-ls "~1.1.2" @@ -5424,19 +5230,19 @@ levn@~0.3.0: lines-and-columns@^1.1.6: version "1.2.4" - resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" + resolved "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz" integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== linkify-it@^4.0.1: version "4.0.1" - resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-4.0.1.tgz#01f1d5e508190d06669982ba31a7d9f56a5751ec" + resolved "https://registry.npmjs.org/linkify-it/-/linkify-it-4.0.1.tgz" integrity sha512-C7bfi1UZmoj8+PQx22XyeXCuBlokoyWQL5pWSP+EI6nzRylyThouddufc2c1NDIcP9k5agmN9fLpA7VNJfIiqw== dependencies: uc.micro "^1.0.1" locate-path@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" + resolved "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz" integrity sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA== dependencies: p-locate "^2.0.0" @@ -5444,84 +5250,84 @@ locate-path@^2.0.0: locate-path@^6.0.0: version "6.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + resolved "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz" integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== dependencies: p-locate "^5.0.0" lodash.camelcase@^4.3.0: version "4.3.0" - resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" + resolved "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz" integrity sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA== lodash.clonedeep@^4.5.0: version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" + resolved "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz" integrity sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ== lodash.get@^4.4.2: version "4.4.2" - resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" + resolved "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz" integrity sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ== lodash.includes@^4.3.0: version "4.3.0" - resolved "https://registry.yarnpkg.com/lodash.includes/-/lodash.includes-4.3.0.tgz#60bb98a87cb923c68ca1e51325483314849f553f" + resolved "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz" integrity sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w== lodash.isboolean@^3.0.3: version "3.0.3" - resolved "https://registry.yarnpkg.com/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz#6c2e171db2a257cd96802fd43b01b20d5f5870f6" + resolved "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz" integrity sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg== lodash.isequal@^4.5.0: version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0" + resolved "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz" integrity sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ== lodash.isinteger@^4.0.4: version "4.0.4" - resolved "https://registry.yarnpkg.com/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz#619c0af3d03f8b04c31f5882840b77b11cd68343" + resolved "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz" integrity sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA== lodash.isnumber@^3.0.3: version "3.0.3" - resolved "https://registry.yarnpkg.com/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz#3ce76810c5928d03352301ac287317f11c0b1ffc" + resolved "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz" integrity sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw== lodash.isplainobject@^4.0.6: version "4.0.6" - resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" + resolved "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz" integrity sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA== lodash.isstring@^4.0.1: version "4.0.1" - resolved "https://registry.yarnpkg.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz#d527dfb5456eca7cc9bb95d5daeaf88ba54a5451" + resolved "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz" integrity sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw== lodash.merge@^4.6.2: version "4.6.2" - resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" + resolved "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== lodash.once@^4.0.0: version "4.1.1" - resolved "https://registry.yarnpkg.com/lodash.once/-/lodash.once-4.1.1.tgz#0dd3971213c7c56df880977d504c88fb471a97ac" + resolved "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz" integrity sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg== lodash.truncate@^4.4.2: version "4.4.2" - resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" + resolved "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz" integrity sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw== lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.21: version "4.17.21" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== log-symbols@4.1.0: version "4.1.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" + resolved "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz" integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== dependencies: chalk "^4.1.0" @@ -5529,48 +5335,48 @@ log-symbols@4.1.0: loupe@^2.3.6: version "2.3.7" - resolved "https://registry.yarnpkg.com/loupe/-/loupe-2.3.7.tgz#6e69b7d4db7d3ab436328013d37d1c8c3540c697" + resolved "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz" integrity sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA== dependencies: get-func-name "^2.0.1" lowercase-keys@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-3.0.0.tgz#c5e7d442e37ead247ae9db117a9d0a467c89d4f2" + resolved "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-3.0.0.tgz" integrity sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ== lru-cache@^5.1.1: version "5.1.1" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" + resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz" integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== dependencies: yallist "^3.0.2" lru-cache@^6.0.0: version "6.0.0" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz" integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== dependencies: yallist "^4.0.0" lru_map@^0.3.3: version "0.3.3" - resolved "https://registry.yarnpkg.com/lru_map/-/lru_map-0.3.3.tgz#b5c8351b9464cbd750335a79650a0ec0e56118dd" + resolved "https://registry.npmjs.org/lru_map/-/lru_map-0.3.3.tgz" integrity sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ== ltgt@~2.2.0: version "2.2.1" - resolved "https://registry.yarnpkg.com/ltgt/-/ltgt-2.2.1.tgz#f35ca91c493f7b73da0e07495304f17b31f87ee5" + resolved "https://registry.npmjs.org/ltgt/-/ltgt-2.2.1.tgz" integrity sha512-AI2r85+4MquTw9ZYqabu4nMwy9Oftlfa/e/52t9IjtfG+mGBbTNdAoZ3RQKLHR6r0wQnwZnPIEh/Ya6XTWAKNA== make-error@^1.1.1: version "1.3.6" - resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" + resolved "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz" integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== markdown-it@13.0.1: version "13.0.1" - resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-13.0.1.tgz#c6ecc431cacf1a5da531423fc6a42807814af430" + resolved "https://registry.npmjs.org/markdown-it/-/markdown-it-13.0.1.tgz" integrity sha512-lTlxriVoy2criHP0JKRhO2VDG9c2ypWCsT237eDiLqi09rmbKoUetyGHq2uOIRoRS//kfoJckS0eUzzkDR+k2Q== dependencies: argparse "^2.0.1" @@ -5581,12 +5387,12 @@ markdown-it@13.0.1: markdown-table@^1.1.3: version "1.1.3" - resolved "https://registry.yarnpkg.com/markdown-table/-/markdown-table-1.1.3.tgz#9fcb69bcfdb8717bfd0398c6ec2d93036ef8de60" + resolved "https://registry.npmjs.org/markdown-table/-/markdown-table-1.1.3.tgz" integrity sha512-1RUZVgQlpJSPWYbFSpmudq5nHY1doEIv89gBtF0s4gW1GF2XorxcA/70M5vq7rLv0a6mhOUccRsqkwhwLCIQ2Q== markdownlint-cli@^0.33.0: version "0.33.0" - resolved "https://registry.yarnpkg.com/markdownlint-cli/-/markdownlint-cli-0.33.0.tgz#703af1234c32c309ab52fcd0e8bc797a34e2b096" + resolved "https://registry.npmjs.org/markdownlint-cli/-/markdownlint-cli-0.33.0.tgz" integrity sha512-zMK1oHpjYkhjO+94+ngARiBBrRDEUMzooDHBAHtmEIJ9oYddd9l3chCReY2mPlecwH7gflQp1ApilTo+o0zopQ== dependencies: commander "~9.4.1" @@ -5601,19 +5407,19 @@ markdownlint-cli@^0.33.0: markdownlint@~0.27.0: version "0.27.0" - resolved "https://registry.yarnpkg.com/markdownlint/-/markdownlint-0.27.0.tgz#9dabf7710a4999e2835e3c68317f1acd0bc89049" + resolved "https://registry.npmjs.org/markdownlint/-/markdownlint-0.27.0.tgz" integrity sha512-HtfVr/hzJJmE0C198F99JLaeada+646B5SaG2pVoEakLFI6iRGsvMqrnnrflq8hm1zQgwskEgqSnhDW11JBp0w== dependencies: markdown-it "13.0.1" mcl-wasm@^0.7.1: version "0.7.9" - resolved "https://registry.yarnpkg.com/mcl-wasm/-/mcl-wasm-0.7.9.tgz#c1588ce90042a8700c3b60e40efb339fc07ab87f" + resolved "https://registry.npmjs.org/mcl-wasm/-/mcl-wasm-0.7.9.tgz" integrity sha512-iJIUcQWA88IJB/5L15GnJVnSQJmf/YaxxV6zRavv83HILHaJQb6y0iFyDMdDO0gN8X37tdxmAOrH/P8B6RB8sQ== md5.js@^1.3.4: version "1.3.5" - resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" + resolved "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz" integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== dependencies: hash-base "^3.0.0" @@ -5622,12 +5428,12 @@ md5.js@^1.3.4: mdurl@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e" + resolved "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz" integrity sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g== memdown@^5.0.0: version "5.1.0" - resolved "https://registry.yarnpkg.com/memdown/-/memdown-5.1.0.tgz#608e91a9f10f37f5b5fe767667a8674129a833cb" + resolved "https://registry.npmjs.org/memdown/-/memdown-5.1.0.tgz" integrity sha512-B3J+UizMRAlEArDjWHTMmadet+UKwHd3UjMgGBkZcKAxAYVPS9o0Yeiha4qvz7iGiL2Sb3igUft6p7nbFWctpw== dependencies: abstract-leveldown "~6.2.1" @@ -5639,22 +5445,22 @@ memdown@^5.0.0: memorystream@^0.3.1: version "0.3.1" - resolved "https://registry.yarnpkg.com/memorystream/-/memorystream-0.3.1.tgz#86d7090b30ce455d63fbae12dda51a47ddcaf9b2" + resolved "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz" integrity sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw== merge-descriptors@~1.0.0: version "1.0.3" - resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.3.tgz#d80319a65f3c7935351e5cfdac8f9318504dbed5" + resolved "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz" integrity sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ== merge2@^1.2.3, merge2@^1.3.0, merge2@^1.4.1: version "1.4.1" - resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" + resolved "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== merkle-patricia-tree@^4.2.2, merkle-patricia-tree@^4.2.4: version "4.2.4" - resolved "https://registry.yarnpkg.com/merkle-patricia-tree/-/merkle-patricia-tree-4.2.4.tgz#ff988d045e2bf3dfa2239f7fabe2d59618d57413" + resolved "https://registry.npmjs.org/merkle-patricia-tree/-/merkle-patricia-tree-4.2.4.tgz" integrity sha512-eHbf/BG6eGNsqqfbLED9rIqbsF4+sykEaBn6OLNs71tjclbMcMOk1tEPmJKcNcNCLkvbpY/lwyOlizWsqPNo8w== dependencies: "@types/levelup" "^4.3.0" @@ -5666,7 +5472,7 @@ merkle-patricia-tree@^4.2.2, merkle-patricia-tree@^4.2.4: merkletreejs@^0.3.11: version "0.3.11" - resolved "https://registry.yarnpkg.com/merkletreejs/-/merkletreejs-0.3.11.tgz#e0de05c3ca1fd368de05a12cb8efb954ef6fc04f" + resolved "https://registry.npmjs.org/merkletreejs/-/merkletreejs-0.3.11.tgz" integrity sha512-LJKTl4iVNTndhL+3Uz/tfkjD0klIWsHlUzgtuNnNrsf7bAlXR30m+xYB7lHr5Z/l6e/yAIsr26Dabx6Buo4VGQ== dependencies: bignumber.js "^9.0.1" @@ -5677,12 +5483,12 @@ merkletreejs@^0.3.11: micro-ftch@^0.3.1: version "0.3.1" - resolved "https://registry.yarnpkg.com/micro-ftch/-/micro-ftch-0.3.1.tgz#6cb83388de4c1f279a034fb0cf96dfc050853c5f" + resolved "https://registry.npmjs.org/micro-ftch/-/micro-ftch-0.3.1.tgz" integrity sha512-/0LLxhzP0tfiR5hcQebtudP56gUurs2CLkGarnCiB/OqEyUFQ6U3paQi/tgLv0hBJYt2rnr9MNpxz4fiiugstg== micromatch@^4.0.4: version "4.0.5" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" + resolved "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz" integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== dependencies: braces "^3.0.2" @@ -5690,7 +5496,7 @@ micromatch@^4.0.4: miller-rabin@^4.0.0: version "4.0.1" - resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" + resolved "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz" integrity sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA== dependencies: bn.js "^4.0.0" @@ -5698,115 +5504,115 @@ miller-rabin@^4.0.0: mime-db@1.52.0: version "1.52.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" + resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz" integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== mime-types@^2.1.12, mime-types@~2.1.19: version "2.1.35" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" + resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz" integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== dependencies: mime-db "1.52.0" mimic-response@^3.1.0: version "3.1.0" - resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9" + resolved "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz" integrity sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ== mimic-response@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-4.0.0.tgz#35468b19e7c75d10f5165ea25e75a5ceea7cf70f" + resolved "https://registry.npmjs.org/mimic-response/-/mimic-response-4.0.0.tgz" integrity sha512-e5ISH9xMYU0DzrT+jl8q2ze9D6eWBto+I8CNpe+VI+K2J/F/k3PdkdTdz4wvGVH4NTpo+NRYTVIuMQEMMcsLqg== minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" + resolved "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz" integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== minimalistic-crypto-utils@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" + resolved "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz" integrity sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg== "minimatch@2 || 3", minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== dependencies: brace-expansion "^1.1.7" minimatch@4.2.1: version "4.2.1" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-4.2.1.tgz#40d9d511a46bdc4e563c22c3080cde9c0d8299b4" + resolved "https://registry.npmjs.org/minimatch/-/minimatch-4.2.1.tgz" integrity sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g== dependencies: brace-expansion "^1.1.7" minimatch@5.0.1: version "5.0.1" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.0.1.tgz#fb9022f7528125187c92bd9e9b6366be1cf3415b" + resolved "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz" integrity sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g== dependencies: brace-expansion "^2.0.1" minimatch@9.0.3: version "9.0.3" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.3.tgz#a6e00c3de44c3a542bfaae70abfc22420a6da825" + resolved "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz" integrity sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg== dependencies: brace-expansion "^2.0.1" minimatch@^5.0.1, minimatch@~5.1.2: version "5.1.6" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" + resolved "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz" integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== dependencies: brace-expansion "^2.0.1" minimatch@^7.4.3: version "7.4.6" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-7.4.6.tgz#845d6f254d8f4a5e4fd6baf44d5f10c8448365fb" + resolved "https://registry.npmjs.org/minimatch/-/minimatch-7.4.6.tgz" integrity sha512-sBz8G/YjVniEz6lKPNpKxXwazJe4c19fEfV2GDMX6AjFz+MX9uDWIZW8XreVhkFW3fkIdTv/gxWr/Kks5FFAVw== dependencies: brace-expansion "^2.0.1" minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6, minimist@^1.2.8: version "1.2.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" + resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz" integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== mkdirp-classic@^0.5.2: version "0.5.3" - resolved "https://registry.yarnpkg.com/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz#fa10c9115cc6d8865be221ba47ee9bed78601113" + resolved "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz" integrity sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A== mkdirp@0.5.x, mkdirp@^0.5.1: version "0.5.6" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" + resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz" integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== dependencies: minimist "^1.2.6" mkdirp@^1.0.4: version "1.0.4" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" + resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== mkdirp@^2.1.6: version "2.1.6" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-2.1.6.tgz#964fbcb12b2d8c5d6fbc62a963ac95a273e2cc19" + resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-2.1.6.tgz" integrity sha512-+hEnITedc8LAtIP9u3HJDFIdcLV2vXP33sqLLIzkv1Db1zO/1OxbvYf0Y1OC/S/Qo5dxHXepofhmxL02PsKe+A== mnemonist@^0.38.0: version "0.38.5" - resolved "https://registry.yarnpkg.com/mnemonist/-/mnemonist-0.38.5.tgz#4adc7f4200491237fe0fa689ac0b86539685cade" + resolved "https://registry.npmjs.org/mnemonist/-/mnemonist-0.38.5.tgz" integrity sha512-bZTFT5rrPKtPJxj8KSV0WkPyNxl72vQepqqVUAW2ARUpUSF2qXMB6jZj7hW5/k7C1rtpzqbD/IIbJwLXUjCHeg== dependencies: obliterator "^2.0.0" mocha@^10.0.0, mocha@^10.2.0: version "10.4.0" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.4.0.tgz#ed03db96ee9cfc6d20c56f8e2af07b961dbae261" + resolved "https://registry.npmjs.org/mocha/-/mocha-10.4.0.tgz" integrity sha512-eqhGB8JKapEYcC4ytX/xrzKforgEc3j1pGlAXVy3eRwrtAy5/nIfT1SvgGzfN0XZZxeLq0aQWkOUAmqIJiv+bA== dependencies: ansi-colors "4.1.1" @@ -5832,7 +5638,7 @@ mocha@^10.0.0, mocha@^10.2.0: mocha@^9.0.2: version "9.2.2" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-9.2.2.tgz#d70db46bdb93ca57402c809333e5a84977a88fb9" + resolved "https://registry.npmjs.org/mocha/-/mocha-9.2.2.tgz" integrity sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g== dependencies: "@ungap/promise-all-settled" "1.1.2" @@ -5862,52 +5668,52 @@ mocha@^9.0.2: module-not-found-error@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/module-not-found-error/-/module-not-found-error-1.0.1.tgz#cf8b4ff4f29640674d6cdd02b0e3bc523c2bbdc0" + resolved "https://registry.npmjs.org/module-not-found-error/-/module-not-found-error-1.0.1.tgz" integrity sha512-pEk4ECWQXV6z2zjhRZUongnLJNUeGQJ3w6OQ5ctGwD+i5o93qjRQUk2Rt6VdNeu3sEP0AB4LcfvdebpxBRVr4g== ms@2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + resolved "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz" integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== ms@2.1.2: version "2.1.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== ms@2.1.3, ms@^2.1.1, ms@^2.1.3: version "2.1.3" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== nan@^2.17.0, nan@^2.18.0: version "2.19.0" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.19.0.tgz#bb58122ad55a6c5bc973303908d5b16cfdd5a8c0" + resolved "https://registry.npmjs.org/nan/-/nan-2.19.0.tgz" integrity sha512-nO1xXxfh/RWNxfd/XPfbIfFk5vgLsAxUR9y5O0cHMJu/AW9U95JLXqthYHjEp+8gQ5p96K9jUp8nbVOxCdRbtw== nanoid@3.3.1: version "3.3.1" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.1.tgz#6347a18cac88af88f58af0b3594b723d5e99bb35" + resolved "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz" integrity sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw== napi-macros@~2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/napi-macros/-/napi-macros-2.0.0.tgz#2b6bae421e7b96eb687aa6c77a7858640670001b" + resolved "https://registry.npmjs.org/napi-macros/-/napi-macros-2.0.0.tgz" integrity sha512-A0xLykHtARfueITVDernsAWdtIMbOJgKgcluwENp3AlsKN/PloyO10HtmoqnFAQAcxPkgZN7wdfPfEd0zNGxbg== natural-compare@^1.4.0: version "1.4.0" - resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + resolved "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz" integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== neo-async@^2.6.2: version "2.6.2" - resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" + resolved "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz" integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== nise@^5.1.5: version "5.1.9" - resolved "https://registry.yarnpkg.com/nise/-/nise-5.1.9.tgz#0cb73b5e4499d738231a473cd89bd8afbb618139" + resolved "https://registry.npmjs.org/nise/-/nise-5.1.9.tgz" integrity sha512-qOnoujW4SV6e40dYxJOb3uvuoPHtmLzIk4TFo+j0jPJoC+5Z9xja5qH5JZobEPsa8+YYphMrOSwnrshEhG2qww== dependencies: "@sinonjs/commons" "^3.0.0" @@ -5918,7 +5724,7 @@ nise@^5.1.5: nise@^6.0.0: version "6.1.1" - resolved "https://registry.yarnpkg.com/nise/-/nise-6.1.1.tgz#78ea93cc49be122e44cb7c8fdf597b0e8778b64a" + resolved "https://registry.npmjs.org/nise/-/nise-6.1.1.tgz" integrity sha512-aMSAzLVY7LyeM60gvBS423nBmIPP+Wy7St7hsb+8/fc1HmeoHJfLO8CKse4u3BtOZvQLJghYPI2i/1WZrEj5/g== dependencies: "@sinonjs/commons" "^3.0.1" @@ -5929,63 +5735,63 @@ nise@^6.0.0: node-addon-api@^2.0.0: version "2.0.2" - resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-2.0.2.tgz#432cfa82962ce494b132e9d72a15b29f71ff5d32" + resolved "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz" integrity sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA== node-emoji@^1.10.0: version "1.11.0" - resolved "https://registry.yarnpkg.com/node-emoji/-/node-emoji-1.11.0.tgz#69a0150e6946e2f115e9d7ea4df7971e2628301c" + resolved "https://registry.npmjs.org/node-emoji/-/node-emoji-1.11.0.tgz" integrity sha512-wo2DpQkQp7Sjm2A0cq+sN7EHKO6Sl0ctXeBdFZrL9T9+UywORbufTcTZxom8YqpLQt/FqNMUkOpkZrJVYSKD3A== dependencies: lodash "^4.17.21" node-fetch@^2.6.0, node-fetch@^2.6.7: version "2.7.0" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" + resolved "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz" integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== dependencies: whatwg-url "^5.0.0" node-gyp-build@4.3.0: version "4.3.0" - resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.3.0.tgz#9f256b03e5826150be39c764bf51e993946d71a3" + resolved "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.3.0.tgz" integrity sha512-iWjXZvmboq0ja1pUGULQBexmxq8CV4xBhX7VDOTbL7ZR4FOowwY/VOtRxBN/yKxmdGoIp4j5ysNT4u3S2pDQ3Q== node-gyp-build@4.4.0: version "4.4.0" - resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.4.0.tgz#42e99687ce87ddeaf3a10b99dc06abc11021f3f4" + resolved "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.4.0.tgz" integrity sha512-amJnQCcgtRVw9SvoebO3BKGESClrfXGCUTX9hSn1OuGQTQBOZmVd0Z0OlecpuRksKvbsUqALE8jls/ErClAPuQ== node-gyp-build@^4.2.0, node-gyp-build@^4.3.0: version "4.8.0" - resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.8.0.tgz#3fee9c1731df4581a3f9ead74664369ff00d26dd" + resolved "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.0.tgz" integrity sha512-u6fs2AEUljNho3EYTJNBfImO5QTo/J/1Etd+NVdCj7qWKUSN/bSLkZwhDv7I+w/MSC6qJ4cknepkAYykDdK8og== nofilter@^3.1.0: version "3.1.0" - resolved "https://registry.yarnpkg.com/nofilter/-/nofilter-3.1.0.tgz#c757ba68801d41ff930ba2ec55bab52ca184aa66" + resolved "https://registry.npmjs.org/nofilter/-/nofilter-3.1.0.tgz" integrity sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g== nopt@3.x: version "3.0.6" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" + resolved "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz" integrity sha512-4GUt3kSEYmk4ITxzB/b9vaIDfUVWN/Ml1Fwl11IlnIG2iaJ9O6WXZ9SrYM9NLI8OCBieN2Y8SWC2oJV0RQ7qYg== dependencies: abbrev "1" normalize-path@^3.0.0, normalize-path@~3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + resolved "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz" integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== normalize-url@^8.0.0: version "8.0.1" - resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-8.0.1.tgz#9b7d96af9836577c58f5883e939365fa15623a4a" + resolved "https://registry.npmjs.org/normalize-url/-/normalize-url-8.0.1.tgz" integrity sha512-IO9QvjUMWxPQQhs60oOu10CRkWCiZzSUkzbXGGV9pviYl1fXYcvkzQ5jV9z8Y6un8ARoVRl4EtC6v6jNqbaJ/w== number-to-bn@1.7.0: version "1.7.0" - resolved "https://registry.yarnpkg.com/number-to-bn/-/number-to-bn-1.7.0.tgz#bb3623592f7e5f9e0030b1977bd41a0c53fe1ea0" + resolved "https://registry.npmjs.org/number-to-bn/-/number-to-bn-1.7.0.tgz" integrity sha512-wsJ9gfSz1/s4ZsJN01lyonwuxA1tml6X1yBDnfpMglypcBRFZZkus26EdPSlqS5GJfYddVZa22p3VNb3z5m5Ig== dependencies: bn.js "4.11.6" @@ -5993,27 +5799,27 @@ number-to-bn@1.7.0: oauth-sign@~0.9.0: version "0.9.0" - resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" + resolved "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz" integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== object-assign@^4.1.0: version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + resolved "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz" integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== object-inspect@^1.13.1: version "1.13.1" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.1.tgz#b96c6109324ccfef6b12216a956ca4dc2ff94bc2" + resolved "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz" integrity sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ== object-keys@^1.1.1: version "1.1.1" - resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" + resolved "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz" integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== object.assign@^4.1.5: version "4.1.5" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.5.tgz#3a833f9ab7fdb80fc9e8d2300c803d216d8fdbb0" + resolved "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz" integrity sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ== dependencies: call-bind "^1.0.5" @@ -6023,7 +5829,7 @@ object.assign@^4.1.5: object.fromentries@^2.0.7: version "2.0.8" - resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.8.tgz#f7195d8a9b97bd95cbc1999ea939ecd1a2b00c65" + resolved "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz" integrity sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ== dependencies: call-bind "^1.0.7" @@ -6033,7 +5839,7 @@ object.fromentries@^2.0.7: object.groupby@^1.0.1: version "1.0.3" - resolved "https://registry.yarnpkg.com/object.groupby/-/object.groupby-1.0.3.tgz#9b125c36238129f6f7b61954a1e7176148d5002e" + resolved "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.3.tgz" integrity sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ== dependencies: call-bind "^1.0.7" @@ -6042,7 +5848,7 @@ object.groupby@^1.0.1: object.values@^1.1.7: version "1.2.0" - resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.2.0.tgz#65405a9d92cee68ac2d303002e0b8470a4d9ab1b" + resolved "https://registry.npmjs.org/object.values/-/object.values-1.2.0.tgz" integrity sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ== dependencies: call-bind "^1.0.7" @@ -6051,19 +5857,19 @@ object.values@^1.1.7: obliterator@^2.0.0: version "2.0.4" - resolved "https://registry.yarnpkg.com/obliterator/-/obliterator-2.0.4.tgz#fa650e019b2d075d745e44f1effeb13a2adbe816" + resolved "https://registry.npmjs.org/obliterator/-/obliterator-2.0.4.tgz" integrity sha512-lgHwxlxV1qIg1Eap7LgIeoBWIMFibOjbrYPIPJZcI1mmGAI2m3lNYpK12Y+GBdPQ0U1hRwSord7GIaawz962qQ== once@1.x, once@^1.3.0, once@^1.3.1, once@^1.4.0: version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + resolved "https://registry.npmjs.org/once/-/once-1.4.0.tgz" integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== dependencies: wrappy "1" optionator@^0.8.1: version "0.8.3" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" + resolved "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz" integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== dependencies: deep-is "~0.1.3" @@ -6075,7 +5881,7 @@ optionator@^0.8.1: optionator@^0.9.3: version "0.9.4" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.4.tgz#7ea1c1a5d91d764fb282139c88fe11e182a3a734" + resolved "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz" integrity sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g== dependencies: deep-is "^0.1.3" @@ -6087,69 +5893,69 @@ optionator@^0.9.3: ordinal@1.0.3, ordinal@^1.0.3: version "1.0.3" - resolved "https://registry.yarnpkg.com/ordinal/-/ordinal-1.0.3.tgz#1a3c7726a61728112f50944ad7c35c06ae3a0d4d" + resolved "https://registry.npmjs.org/ordinal/-/ordinal-1.0.3.tgz" integrity sha512-cMddMgb2QElm8G7vdaa02jhUNbTSrhsgAGUz1OokD83uJTwSUn+nKoNoKVVaRa08yF6sgfO7Maou1+bgLd9rdQ== os-tmpdir@~1.0.2: version "1.0.2" - resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + resolved "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz" integrity sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g== p-cancelable@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-3.0.0.tgz#63826694b54d61ca1c20ebcb6d3ecf5e14cd8050" + resolved "https://registry.npmjs.org/p-cancelable/-/p-cancelable-3.0.0.tgz" integrity sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw== p-limit@^1.1.0: version "1.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" + resolved "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz" integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== dependencies: p-try "^1.0.0" p-limit@^3.0.2: version "3.1.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + resolved "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz" integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== dependencies: yocto-queue "^0.1.0" p-limit@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-4.0.0.tgz#914af6544ed32bfa54670b061cafcbd04984b644" + resolved "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz" integrity sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ== dependencies: yocto-queue "^1.0.0" p-locate@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" + resolved "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz" integrity sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg== dependencies: p-limit "^1.1.0" p-locate@^5.0.0: version "5.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + resolved "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz" integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== dependencies: p-limit "^3.0.2" p-map@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b" + resolved "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz" integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ== dependencies: aggregate-error "^3.0.0" p-try@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" + resolved "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz" integrity sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww== package-json@^8.1.0: version "8.1.1" - resolved "https://registry.yarnpkg.com/package-json/-/package-json-8.1.1.tgz#3e9948e43df40d1e8e78a85485f1070bf8f03dc8" + resolved "https://registry.npmjs.org/package-json/-/package-json-8.1.1.tgz" integrity sha512-cbH9IAIJHNj9uXi196JVsRlt7cHKak6u/e6AkL/bkRelZ7rlL3X1YKxsZwa36xipOEKAsdtmaG6aAJoM1fx2zA== dependencies: got "^12.1.0" @@ -6159,19 +5965,19 @@ package-json@^8.1.0: parent-module@^1.0.0: version "1.0.1" - resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" + resolved "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz" integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== dependencies: callsites "^3.0.0" parse-cache-control@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/parse-cache-control/-/parse-cache-control-1.0.1.tgz#8eeab3e54fa56920fe16ba38f77fa21aacc2d74e" + resolved "https://registry.npmjs.org/parse-cache-control/-/parse-cache-control-1.0.1.tgz" integrity sha512-60zvsJReQPX5/QP0Kzfd/VrpjScIQ7SHBW6bFCYfEP+fp0Eppr1SHhIO5nd1PjZtvclzSzES9D/p5nFJurwfWg== parse-json@^5.2.0: version "5.2.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" + resolved "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz" integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== dependencies: "@babel/code-frame" "^7.0.0" @@ -6181,52 +5987,52 @@ parse-json@^5.2.0: path-browserify@^1.0.0, path-browserify@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-1.0.1.tgz#d98454a9c3753d5790860f16f68867b9e46be1fd" + resolved "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz" integrity sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g== path-exists@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + resolved "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz" integrity sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ== path-exists@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + resolved "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz" integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== path-is-absolute@^1.0.0: version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + resolved "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== path-key@^3.1.0: version "3.1.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + resolved "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== path-parse@^1.0.6, path-parse@^1.0.7: version "1.0.7" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + resolved "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== path-to-regexp@^6.2.1: version "6.2.2" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-6.2.2.tgz#324377a83e5049cbecadc5554d6a63a9a4866b36" + resolved "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.2.tgz" integrity sha512-GQX3SSMokngb36+whdpRXE+3f9V8UzyAorlYvOGx87ufGHehNTn5lCxrKtLyZ4Yl/wEKnNnr98ZzOwwDZV5ogw== path-to-regexp@^8.1.0: version "8.2.0" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-8.2.0.tgz#73990cc29e57a3ff2a0d914095156df5db79e8b4" + resolved "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.2.0.tgz" integrity sha512-TdrF7fW9Rphjq4RjrW0Kp2AW0Ahwu9sRGTkS6bvDi0SCwZlEZYmcfDbEsTz8RVk0EHIS/Vd1bv3JhG+1xZuAyQ== path-type@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" + resolved "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz" integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== path@^0.12.7: version "0.12.7" - resolved "https://registry.yarnpkg.com/path/-/path-0.12.7.tgz#d4dc2a506c4ce2197eb481ebfcd5b36c0140b10f" + resolved "https://registry.npmjs.org/path/-/path-0.12.7.tgz" integrity sha512-aXXC6s+1w7otVF9UletFkFcDsJeO7lSZBPUQhtb5O0xJe8LtYhj/GxldoL09bBj9+ZmE2hNoHqQSFMN5fikh4Q== dependencies: process "^0.11.1" @@ -6234,17 +6040,17 @@ path@^0.12.7: pathington@^1.1.7: version "1.1.7" - resolved "https://registry.yarnpkg.com/pathington/-/pathington-1.1.7.tgz#caf2d2db899a31fea4e81e3657af6acde5171903" + resolved "https://registry.npmjs.org/pathington/-/pathington-1.1.7.tgz" integrity sha512-JxzhUzagDfNIOm4qqwQqP3rWeo7rNNOfIahy4n+3GTEdwXLqw5cJHUR0soSopQtNEv763lzxb6eA2xBllpR8zw== pathval@^1.1.1: version "1.1.1" - resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" + resolved "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz" integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== pbkdf2@^3.0.17, pbkdf2@^3.0.9: version "3.1.2" - resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.2.tgz#dd822aa0887580e52f1a039dc3eda108efae3075" + resolved "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz" integrity sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA== dependencies: create-hash "^1.1.2" @@ -6255,61 +6061,61 @@ pbkdf2@^3.0.17, pbkdf2@^3.0.9: performance-now@^2.1.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" + resolved "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz" integrity sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow== picocolors@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" + resolved "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz" integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: version "2.3.1" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== pify@^4.0.1: version "4.0.1" - resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" + resolved "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz" integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== pluralize@^8.0.0: version "8.0.0" - resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-8.0.0.tgz#1a6fa16a38d12a1901e0320fa017051c539ce3b1" + resolved "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz" integrity sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA== possible-typed-array-names@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz#89bb63c6fada2c3e90adc4a647beeeb39cc7bf8f" + resolved "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz" integrity sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q== prelude-ls@^1.2.1: version "1.2.1" - resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" + resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz" integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== prelude-ls@~1.1.2: version "1.1.2" - resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" + resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz" integrity sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w== preprocess@^3.2.0: version "3.2.0" - resolved "https://registry.yarnpkg.com/preprocess/-/preprocess-3.2.0.tgz#36b3e2c52331fbc6fabb26d4fd5709304b7e3675" + resolved "https://registry.npmjs.org/preprocess/-/preprocess-3.2.0.tgz" integrity sha512-cO+Rf+Ose/eD+ze8Hxd9p9nS1xT8thYqv8owG/V8+IS/Remd7Z17SvaRK/oJxp08yaM8zb+QTckDKJUul2pk7g== dependencies: xregexp "3.1.0" prettier-linter-helpers@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b" + resolved "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz" integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w== dependencies: fast-diff "^1.1.2" prettier-plugin-solidity@^1.1.3: version "1.3.1" - resolved "https://registry.yarnpkg.com/prettier-plugin-solidity/-/prettier-plugin-solidity-1.3.1.tgz#59944d3155b249f7f234dee29f433524b9a4abcf" + resolved "https://registry.npmjs.org/prettier-plugin-solidity/-/prettier-plugin-solidity-1.3.1.tgz" integrity sha512-MN4OP5I2gHAzHZG1wcuJl0FsLS3c4Cc5494bbg+6oQWBPuEamjwDvmGfFMZ6NFzsh3Efd9UUxeT7ImgjNH4ozA== dependencies: "@solidity-parser/parser" "^0.17.0" @@ -6318,27 +6124,27 @@ prettier-plugin-solidity@^1.1.3: prettier@^2.1.2, prettier@^2.3.1, prettier@^2.8.3: version "2.8.8" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da" + resolved "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz" integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== prettier@^3.0.3: version "3.2.5" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.2.5.tgz#e52bc3090586e824964a8813b09aba6233b28368" + resolved "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz" integrity sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A== process-nextick-args@~2.0.0: version "2.0.1" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" + resolved "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz" integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== process@^0.11.1: version "0.11.10" - resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" + resolved "https://registry.npmjs.org/process/-/process-0.11.10.tgz" integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A== promise-to-callback@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/promise-to-callback/-/promise-to-callback-1.0.0.tgz#5d2a749010bfb67d963598fcd3960746a68feef7" + resolved "https://registry.npmjs.org/promise-to-callback/-/promise-to-callback-1.0.0.tgz" integrity sha512-uhMIZmKM5ZteDMfLgJnoSq9GCwsNKrYau73Awf1jIy6/eUcuuZ3P+CD9zUv0kJsIUbU+x6uLNIhXhLHDs1pNPA== dependencies: is-fn "^1.0.0" @@ -6346,14 +6152,14 @@ promise-to-callback@^1.0.0: promise@^8.0.0: version "8.3.0" - resolved "https://registry.yarnpkg.com/promise/-/promise-8.3.0.tgz#8cb333d1edeb61ef23869fbb8a4ea0279ab60e0a" + resolved "https://registry.npmjs.org/promise/-/promise-8.3.0.tgz" integrity sha512-rZPNPKTOYVNEEKFaq1HqTgOwZD+4/YHS5ukLzQCypkj+OkYx7iv0mA91lJlpPPZ8vMau3IIGj5Qlwrx+8iiSmg== dependencies: asap "~2.0.6" proper-lockfile@^4.1.2: version "4.1.2" - resolved "https://registry.yarnpkg.com/proper-lockfile/-/proper-lockfile-4.1.2.tgz#c8b9de2af6b2f1601067f98e01ac66baa223141f" + resolved "https://registry.npmjs.org/proper-lockfile/-/proper-lockfile-4.1.2.tgz" integrity sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA== dependencies: graceful-fs "^4.2.4" @@ -6362,17 +6168,17 @@ proper-lockfile@^4.1.2: proto-list@~1.2.1: version "1.2.4" - resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849" + resolved "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz" integrity sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA== proxy-from-env@^1.1.0: version "1.1.0" - resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" + resolved "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz" integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== proxyquire@^2.1.3: version "2.1.3" - resolved "https://registry.yarnpkg.com/proxyquire/-/proxyquire-2.1.3.tgz#2049a7eefa10a9a953346a18e54aab2b4268df39" + resolved "https://registry.npmjs.org/proxyquire/-/proxyquire-2.1.3.tgz" integrity sha512-BQWfCqYM+QINd+yawJz23tbBM40VIGXOdDw3X344KcclI/gtBbdWF6SlQ4nK/bYhF9d27KYug9WzljHC6B9Ysg== dependencies: fill-keys "^1.0.2" @@ -6381,17 +6187,17 @@ proxyquire@^2.1.3: prr@~1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" + resolved "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz" integrity sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw== psl@^1.1.28: version "1.9.0" - resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7" + resolved "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz" integrity sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag== pump@^1.0.0: version "1.0.3" - resolved "https://registry.yarnpkg.com/pump/-/pump-1.0.3.tgz#5dfe8311c33bbf6fc18261f9f34702c47c08a954" + resolved "https://registry.npmjs.org/pump/-/pump-1.0.3.tgz" integrity sha512-8k0JupWme55+9tCVE+FS5ULT3K6AbgqrGa58lTT49RpyfwwcGedHqaC5LlQNdEAumn/wFsu6aPwkuPMioy8kqw== dependencies: end-of-stream "^1.1.0" @@ -6399,7 +6205,7 @@ pump@^1.0.0: pump@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" + resolved "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz" integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== dependencies: end-of-stream "^1.1.0" @@ -6407,51 +6213,51 @@ pump@^3.0.0: punycode@^1.4.1: version "1.4.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + resolved "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz" integrity sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ== punycode@^2.1.0, punycode@^2.1.1: version "2.3.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" + resolved "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz" integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== qs@^6.11.2, qs@^6.4.0: version "6.12.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.12.0.tgz#edd40c3b823995946a8a0b1f208669c7a200db77" + resolved "https://registry.npmjs.org/qs/-/qs-6.12.0.tgz" integrity sha512-trVZiI6RMOkO476zLGaBIzszOdFPnCCXHPG9kn0yuS1uz6xdVxPfZdB3vUig9pxPFDM9BRAgz/YUIVQ1/vuiUg== dependencies: side-channel "^1.0.6" qs@~6.5.2: version "6.5.3" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.3.tgz#3aeeffc91967ef6e35c0e488ef46fb296ab76aad" + resolved "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz" integrity sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA== querystring@^0.2.0: version "0.2.1" - resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.1.tgz#40d77615bb09d16902a85c3e38aa8b5ed761c2dd" + resolved "https://registry.npmjs.org/querystring/-/querystring-0.2.1.tgz" integrity sha512-wkvS7mL/JMugcup3/rMitHmd9ecIGd2lhFhK9N3UUQ450h66d1r3Y9nvXzQAW1Lq+wyx61k/1pfKS5KuKiyEbg== queue-microtask@^1.2.2, queue-microtask@^1.2.3: version "1.2.3" - resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" + resolved "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz" integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== quick-lru@^5.1.1: version "5.1.1" - resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-5.1.1.tgz#366493e6b3e42a3a6885e2e99d18f80fb7a8c932" + resolved "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz" integrity sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA== randombytes@^2.0.1, randombytes@^2.1.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" + resolved "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz" integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== dependencies: safe-buffer "^5.1.0" raw-body@^2.4.1: version "2.5.2" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.2.tgz#99febd83b90e08975087e8f1f9419a149366b68a" + resolved "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz" integrity sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA== dependencies: bytes "3.1.2" @@ -6461,7 +6267,7 @@ raw-body@^2.4.1: rc@1.2.8: version "1.2.8" - resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" + resolved "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz" integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== dependencies: deep-extend "^0.6.0" @@ -6471,7 +6277,7 @@ rc@1.2.8: readable-stream@^2.2.2, readable-stream@^2.3.0, readable-stream@^2.3.5: version "2.3.8" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.8.tgz#91125e8042bba1b9887f49345f6277027ce8be9b" + resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz" integrity sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA== dependencies: core-util-is "~1.0.0" @@ -6484,7 +6290,7 @@ readable-stream@^2.2.2, readable-stream@^2.3.0, readable-stream@^2.3.5: readable-stream@^3.1.0, readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.5.0, readable-stream@^3.6.0: version "3.6.2" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" + resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz" integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== dependencies: inherits "^2.0.3" @@ -6493,7 +6299,7 @@ readable-stream@^3.1.0, readable-stream@^3.1.1, readable-stream@^3.4.0, readable readable-stream@~1.0.26-4: version "1.0.34" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" + resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz" integrity sha512-ok1qVCJuRkNmvebYikljxJA/UEsKwLl2nI1OmaqAu4/UE+h0wKCHok4XkL/gvi39OacXvw59RJUOFUkDib2rHg== dependencies: core-util-is "~1.0.0" @@ -6503,38 +6309,38 @@ readable-stream@~1.0.26-4: readdirp@~3.6.0: version "3.6.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" + resolved "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz" integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== dependencies: picomatch "^2.2.1" rechoir@^0.6.2: version "0.6.2" - resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" + resolved "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz" integrity sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw== dependencies: resolve "^1.1.6" recursive-readdir@^2.2.2: version "2.2.3" - resolved "https://registry.yarnpkg.com/recursive-readdir/-/recursive-readdir-2.2.3.tgz#e726f328c0d69153bcabd5c322d3195252379372" + resolved "https://registry.npmjs.org/recursive-readdir/-/recursive-readdir-2.2.3.tgz" integrity sha512-8HrF5ZsXk5FAH9dgsx3BlUer73nIhuj+9OrQwEbLTPOBzGkL1lsFCR01am+v+0m2Cmbs1nP12hLDl5FA7EszKA== dependencies: minimatch "^3.0.5" reduce-flatten@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/reduce-flatten/-/reduce-flatten-2.0.0.tgz#734fd84e65f375d7ca4465c69798c25c9d10ae27" + resolved "https://registry.npmjs.org/reduce-flatten/-/reduce-flatten-2.0.0.tgz" integrity sha512-EJ4UNY/U1t2P/2k6oqotuX2Cc3T6nxJwsM0N0asT7dhrtH1ltUxDn4NalSYmPE2rCkVpcf/X6R0wDwcFpzhd4w== regenerator-runtime@^0.11.0: version "0.11.1" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" + resolved "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz" integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg== regexp.prototype.flags@^1.5.2: version "1.5.2" - resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz#138f644a3350f981a858c44f6bb1a61ff59be334" + resolved "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz" integrity sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw== dependencies: call-bind "^1.0.6" @@ -6544,35 +6350,35 @@ regexp.prototype.flags@^1.5.2: registry-auth-token@^5.0.1: version "5.0.2" - resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-5.0.2.tgz#8b026cc507c8552ebbe06724136267e63302f756" + resolved "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-5.0.2.tgz" integrity sha512-o/3ikDxtXaA59BmZuZrJZDJv8NMDGSj+6j6XaeBmHw8eY1i1qd9+6H+LjVvQXx3HN6aRCGa1cUdJ9RaJZUugnQ== dependencies: "@pnpm/npm-conf" "^2.1.0" registry-url@^6.0.0: version "6.0.1" - resolved "https://registry.yarnpkg.com/registry-url/-/registry-url-6.0.1.tgz#056d9343680f2f64400032b1e199faa692286c58" + resolved "https://registry.npmjs.org/registry-url/-/registry-url-6.0.1.tgz" integrity sha512-+crtS5QjFRqFCoQmvGduwYWEBng99ZvmFvF+cUJkGYF1L1BfU8C6Zp9T7f5vPAwyLkUExpvK+ANVZmGU49qi4Q== dependencies: rc "1.2.8" req-cwd@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/req-cwd/-/req-cwd-2.0.0.tgz#d4082b4d44598036640fb73ddea01ed53db49ebc" + resolved "https://registry.npmjs.org/req-cwd/-/req-cwd-2.0.0.tgz" integrity sha512-ueoIoLo1OfB6b05COxAA9UpeoscNpYyM+BqYlA7H6LVF4hKGPXQQSSaD2YmvDVJMkk4UDpAHIeU1zG53IqjvlQ== dependencies: req-from "^2.0.0" req-from@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/req-from/-/req-from-2.0.0.tgz#d74188e47f93796f4aa71df6ee35ae689f3e0e70" + resolved "https://registry.npmjs.org/req-from/-/req-from-2.0.0.tgz" integrity sha512-LzTfEVDVQHBRfjOUMgNBA+V6DWsSnoeKzf42J7l0xa/B4jyPOuuF5MlNSmomLNGemWTnV2TIdjSSLnEn95fOQA== dependencies: resolve-from "^3.0.0" request@^2.85.0: version "2.88.2" - resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" + resolved "https://registry.npmjs.org/request/-/request-2.88.2.tgz" integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== dependencies: aws-sign2 "~0.7.0" @@ -6598,49 +6404,49 @@ request@^2.85.0: require-directory@^2.1.1: version "2.1.1" - resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + resolved "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz" integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== require-from-string@^2.0.0, require-from-string@^2.0.2: version "2.0.2" - resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" + resolved "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz" integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== resolve-alpn@^1.2.0: version "1.2.1" - resolved "https://registry.yarnpkg.com/resolve-alpn/-/resolve-alpn-1.2.1.tgz#b7adbdac3546aaaec20b45e7d8265927072726f9" + resolved "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz" integrity sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g== resolve-from@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" + resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz" integrity sha512-GnlH6vxLymXJNMBo7XP1fJIzBFbdYt49CuTwmB/6N53t+kMPRMFKz783LlQ4tv28XoQfMWinAJX6WCGf2IlaIw== resolve-from@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz" integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== resolve-pkg-maps@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz#616b3dc2c57056b5588c31cdf4b3d64db133720f" + resolved "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz" integrity sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw== resolve@1.1.x: version "1.1.7" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" + resolved "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz" integrity sha512-9znBF0vBcaSN3W2j7wKvdERPwqTxSpCq+if5C0WoTCyV9n24rua28jeuQ2pL/HOf+yUe/Mef+H/5p60K0Id3bg== resolve@1.17.0: version "1.17.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" + resolved "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz" integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== dependencies: path-parse "^1.0.6" resolve@^1.1.6, resolve@^1.11.1, resolve@^1.22.4, resolve@^1.8.1: version "1.22.8" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" + resolved "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz" integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== dependencies: is-core-module "^2.13.0" @@ -6649,38 +6455,38 @@ resolve@^1.1.6, resolve@^1.11.1, resolve@^1.22.4, resolve@^1.8.1: responselike@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/responselike/-/responselike-3.0.0.tgz#20decb6c298aff0dbee1c355ca95461d42823626" + resolved "https://registry.npmjs.org/responselike/-/responselike-3.0.0.tgz" integrity sha512-40yHxbNcl2+rzXvZuVkrYohathsSJlMTXKryG5y8uciHv1+xDLHQpgjG64JUO9nrEq2jGLH6IZ8BcZyw3wrweg== dependencies: lowercase-keys "^3.0.0" retry@^0.12.0: version "0.12.0" - resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b" + resolved "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz" integrity sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow== reusify@^1.0.4: version "1.0.4" - resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" + resolved "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== rimraf@^2.2.8: version "2.7.1" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" + resolved "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz" integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== dependencies: glob "^7.1.3" rimraf@^3.0.2: version "3.0.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + resolved "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz" integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== dependencies: glob "^7.1.3" ripemd160@^2.0.0, ripemd160@^2.0.1: version "2.0.2" - resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" + resolved "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz" integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== dependencies: hash-base "^3.0.0" @@ -6688,21 +6494,21 @@ ripemd160@^2.0.0, ripemd160@^2.0.1: rlp@2.2.6: version "2.2.6" - resolved "https://registry.yarnpkg.com/rlp/-/rlp-2.2.6.tgz#c80ba6266ac7a483ef1e69e8e2f056656de2fb2c" + resolved "https://registry.npmjs.org/rlp/-/rlp-2.2.6.tgz" integrity sha512-HAfAmL6SDYNWPUOJNrM500x4Thn4PZsEy5pijPh40U9WfNk0z15hUYzO9xVIMAdIHdFtD8CBDHd75Td1g36Mjg== dependencies: bn.js "^4.11.1" rlp@^2.2.3, rlp@^2.2.4: version "2.2.7" - resolved "https://registry.yarnpkg.com/rlp/-/rlp-2.2.7.tgz#33f31c4afac81124ac4b283e2bd4d9720b30beaf" + resolved "https://registry.npmjs.org/rlp/-/rlp-2.2.7.tgz" integrity sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ== dependencies: bn.js "^5.2.0" run-con@~1.2.11: version "1.2.12" - resolved "https://registry.yarnpkg.com/run-con/-/run-con-1.2.12.tgz#51c319910e45a3bd71ee773564a89d96635c8c64" + resolved "https://registry.npmjs.org/run-con/-/run-con-1.2.12.tgz" integrity sha512-5257ILMYIF4RztL9uoZ7V9Q97zHtNHn5bN3NobeAnzB1P3ASLgg8qocM2u+R18ttp+VEM78N2LK8XcNVtnSRrg== dependencies: deep-extend "^0.6.0" @@ -6712,19 +6518,19 @@ run-con@~1.2.11: run-parallel@^1.1.9: version "1.2.0" - resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" + resolved "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz" integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== dependencies: queue-microtask "^1.2.2" rustbn.js@~0.2.0: version "0.2.0" - resolved "https://registry.yarnpkg.com/rustbn.js/-/rustbn.js-0.2.0.tgz#8082cb886e707155fd1cb6f23bd591ab8d55d0ca" + resolved "https://registry.npmjs.org/rustbn.js/-/rustbn.js-0.2.0.tgz" integrity sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA== safe-array-concat@^1.1.2: version "1.1.2" - resolved "https://registry.yarnpkg.com/safe-array-concat/-/safe-array-concat-1.1.2.tgz#81d77ee0c4e8b863635227c721278dd524c20edb" + resolved "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz" integrity sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q== dependencies: call-bind "^1.0.7" @@ -6734,17 +6540,17 @@ safe-array-concat@^1.1.2: safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: version "5.2.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== safe-regex-test@^1.0.3: version "1.0.3" - resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.3.tgz#a5b4c0f06e0ab50ea2c395c14d8371232924c377" + resolved "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz" integrity sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw== dependencies: call-bind "^1.0.6" @@ -6753,12 +6559,12 @@ safe-regex-test@^1.0.3: "safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: version "2.1.2" - resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + resolved "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== sc-istanbul@^0.4.5: version "0.4.6" - resolved "https://registry.yarnpkg.com/sc-istanbul/-/sc-istanbul-0.4.6.tgz#cf6784355ff2076f92d70d59047d71c13703e839" + resolved "https://registry.npmjs.org/sc-istanbul/-/sc-istanbul-0.4.6.tgz" integrity sha512-qJFF/8tW/zJsbyfh/iT/ZM5QNHE3CXxtLJbZsL+CzdJLBsPD7SedJZoUA4d8iAcN2IoMp/Dx80shOOd2x96X/g== dependencies: abbrev "1.0.x" @@ -6778,12 +6584,12 @@ sc-istanbul@^0.4.5: scrypt-js@3.0.1, scrypt-js@^3.0.0: version "3.0.1" - resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-3.0.1.tgz#d314a57c2aef69d1ad98a138a21fe9eafa9ee312" + resolved "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz" integrity sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA== secp256k1@4.0.3, secp256k1@^4.0.1: version "4.0.3" - resolved "https://registry.yarnpkg.com/secp256k1/-/secp256k1-4.0.3.tgz#c4559ecd1b8d3c1827ed2d1b94190d69ce267303" + resolved "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.3.tgz" integrity sha512-NLZVf+ROMxwtEj3Xa562qgv2BK5e2WNmXPiOdVIPLgs6lyTzMvBq0aWTYMI5XCP9jZMVKOcqZLw/Wc4vDkuxhA== dependencies: elliptic "^6.5.4" @@ -6792,51 +6598,51 @@ secp256k1@4.0.3, secp256k1@^4.0.1: seedrandom@3.0.5: version "3.0.5" - resolved "https://registry.yarnpkg.com/seedrandom/-/seedrandom-3.0.5.tgz#54edc85c95222525b0c7a6f6b3543d8e0b3aa0a7" + resolved "https://registry.npmjs.org/seedrandom/-/seedrandom-3.0.5.tgz" integrity sha512-8OwmbklUNzwezjGInmZ+2clQmExQPvomqjL7LFqOYqtmuxRgQYqOD3mHaU+MvZn5FLUeVxVfQjwLZW/n/JFuqg== semaphore-async-await@^1.5.1: version "1.5.1" - resolved "https://registry.yarnpkg.com/semaphore-async-await/-/semaphore-async-await-1.5.1.tgz#857bef5e3644601ca4b9570b87e9df5ca12974fa" + resolved "https://registry.npmjs.org/semaphore-async-await/-/semaphore-async-await-1.5.1.tgz" integrity sha512-b/ptP11hETwYWpeilHXXQiV5UJNJl7ZWWooKRE5eBIYWoom6dZ0SluCIdCtKycsMtZgKWE01/qAw6jblw1YVhg== semver@^5.5.0, semver@^5.6.0: version "5.7.2" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8" + resolved "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz" integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== semver@^6.3.0, semver@^6.3.1: version "6.3.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" + resolved "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== semver@^7.3.4, semver@^7.5.1, semver@^7.5.2, semver@^7.5.4: version "7.6.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.0.tgz#1a46a4db4bffcccd97b743b5005c8325f23d4e2d" + resolved "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz" integrity sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg== dependencies: lru-cache "^6.0.0" semver@^7.3.7: version "7.6.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.1.tgz#60bfe090bf907a25aa8119a72b9f90ef7ca281b2" + resolved "https://registry.npmjs.org/semver/-/semver-7.6.1.tgz" integrity sha512-f/vbBsu+fOiYt+lmwZV0rVwJScl46HppnOA1ZvIuBWKOTlllpyJ3bfVax76/OrhCH38dyxoDIA8K7uB963IYgA== semver@^7.6.2: version "7.6.3" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" + resolved "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz" integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== serialize-javascript@6.0.0: version "6.0.0" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" + resolved "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz" integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== dependencies: randombytes "^2.1.0" set-function-length@^1.2.1: version "1.2.2" - resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" + resolved "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz" integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg== dependencies: define-data-property "^1.1.4" @@ -6848,7 +6654,7 @@ set-function-length@^1.2.1: set-function-name@^2.0.1: version "2.0.2" - resolved "https://registry.yarnpkg.com/set-function-name/-/set-function-name-2.0.2.tgz#16a705c5a0dc2f5e638ca96d8a8cd4e1c2b90985" + resolved "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz" integrity sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ== dependencies: define-data-property "^1.1.4" @@ -6858,22 +6664,22 @@ set-function-name@^2.0.1: set-immediate-shim@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" + resolved "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz" integrity sha512-Li5AOqrZWCVA2n5kryzEmqai6bKSIvpz5oUJHPVj6+dsbD3X1ixtsY5tEnsaNpH3pFAHmG8eIHUrtEtohrg+UQ== setimmediate@^1.0.5: version "1.0.5" - resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" + resolved "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz" integrity sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA== setprototypeof@1.2.0: version "1.2.0" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" + resolved "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz" integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== sha.js@^2.4.0, sha.js@^2.4.8: version "2.4.11" - resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" + resolved "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz" integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== dependencies: inherits "^2.0.1" @@ -6881,7 +6687,7 @@ sha.js@^2.4.0, sha.js@^2.4.8: sha1@^1.1.1: version "1.1.1" - resolved "https://registry.yarnpkg.com/sha1/-/sha1-1.1.1.tgz#addaa7a93168f393f19eb2b15091618e2700f848" + resolved "https://registry.npmjs.org/sha1/-/sha1-1.1.1.tgz" integrity sha512-dZBS6OrMjtgVkopB1Gmo4RQCDKiZsqcpAQpkV/aaj+FCrCg8r4I4qMkDPQjBgLIxlmu9k4nUbWq6ohXahOneYA== dependencies: charenc ">= 0.0.1" @@ -6889,19 +6695,19 @@ sha1@^1.1.1: shebang-command@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + resolved "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz" integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== dependencies: shebang-regex "^3.0.0" shebang-regex@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== shelljs@^0.8.3: version "0.8.5" - resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.5.tgz#de055408d8361bed66c669d2f000538ced8ee20c" + resolved "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz" integrity sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow== dependencies: glob "^7.0.0" @@ -6910,7 +6716,7 @@ shelljs@^0.8.3: side-channel@^1.0.4, side-channel@^1.0.6: version "1.0.6" - resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.6.tgz#abd25fb7cd24baf45466406b1096b7831c9215f2" + resolved "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz" integrity sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA== dependencies: call-bind "^1.0.7" @@ -6920,17 +6726,17 @@ side-channel@^1.0.4, side-channel@^1.0.6: signal-exit@^3.0.2: version "3.0.7" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" + resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== sinon-chai@^3.7.0: version "3.7.0" - resolved "https://registry.yarnpkg.com/sinon-chai/-/sinon-chai-3.7.0.tgz#cfb7dec1c50990ed18c153f1840721cf13139783" + resolved "https://registry.npmjs.org/sinon-chai/-/sinon-chai-3.7.0.tgz" integrity sha512-mf5NURdUaSdnatJx3uhoBOrY9dtL19fiOtAdT1Azxg3+lNJFiuN0uzaU3xX1LeAfL17kHQhTAJgpsfhbMJMY2g== sinon@^17.0.1: version "17.0.1" - resolved "https://registry.yarnpkg.com/sinon/-/sinon-17.0.1.tgz#26b8ef719261bf8df43f925924cccc96748e407a" + resolved "https://registry.npmjs.org/sinon/-/sinon-17.0.1.tgz" integrity sha512-wmwE19Lie0MLT+ZYNpDymasPHUKTaZHUH/pKEubRXIzySv9Atnlw+BUMGCzWgV7b7wO+Hw6f1TEOr0IUnmU8/g== dependencies: "@sinonjs/commons" "^3.0.0" @@ -6942,7 +6748,7 @@ sinon@^17.0.1: sinon@^18.0.0: version "18.0.1" - resolved "https://registry.yarnpkg.com/sinon/-/sinon-18.0.1.tgz#464334cdfea2cddc5eda9a4ea7e2e3f0c7a91c5e" + resolved "https://registry.npmjs.org/sinon/-/sinon-18.0.1.tgz" integrity sha512-a2N2TDY1uGviajJ6r4D1CyRAkzE9NNVlYOV1wX5xQDuAk0ONgzgRl0EjCQuRCPxOwp13ghsMwt9Gdldujs39qw== dependencies: "@sinonjs/commons" "^3.0.1" @@ -6954,12 +6760,12 @@ sinon@^18.0.0: slash@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + resolved "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== slice-ansi@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b" + resolved "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz" integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ== dependencies: ansi-styles "^4.0.0" @@ -6968,7 +6774,7 @@ slice-ansi@^4.0.0: solc@0.7.3: version "0.7.3" - resolved "https://registry.yarnpkg.com/solc/-/solc-0.7.3.tgz#04646961bd867a744f63d2b4e3c0701ffdc7d78a" + resolved "https://registry.npmjs.org/solc/-/solc-0.7.3.tgz" integrity sha512-GAsWNAjGzIDg7VxzP6mPjdurby3IkGCjQcM8GFYZT6RyaoUZKmMU6Y7YwG+tFGhv7dwZ8rmR4iwFDrrD99JwqA== dependencies: command-exists "^1.2.8" @@ -6983,7 +6789,7 @@ solc@0.7.3: solc@0.8.15: version "0.8.15" - resolved "https://registry.yarnpkg.com/solc/-/solc-0.8.15.tgz#d274dca4d5a8b7d3c9295d4cbdc9291ee1c52152" + resolved "https://registry.npmjs.org/solc/-/solc-0.8.15.tgz" integrity sha512-Riv0GNHNk/SddN/JyEuFKwbcWcEeho15iyupTSHw5Np6WuXA5D8kEHbyzDHi6sqmvLzu2l+8b1YmL8Ytple+8w== dependencies: command-exists "^1.2.8" @@ -6996,7 +6802,7 @@ solc@0.8.15: solc@0.8.17: version "0.8.17" - resolved "https://registry.yarnpkg.com/solc/-/solc-0.8.17.tgz#c748fec6a64bf029ec406aa9b37e75938d1115ae" + resolved "https://registry.npmjs.org/solc/-/solc-0.8.17.tgz" integrity sha512-Dtidk2XtTTmkB3IKdyeg6wLYopJnBVxdoykN8oP8VY3PQjN16BScYoUJTXFm2OP7P0hXNAqWiJNmmfuELtLf8g== dependencies: command-exists "^1.2.8" @@ -7007,22 +6813,9 @@ solc@0.8.17: semver "^5.5.0" tmp "0.0.33" -solc@0.8.26: - version "0.8.26" - resolved "https://registry.yarnpkg.com/solc/-/solc-0.8.26.tgz#afc78078953f6ab3e727c338a2fefcd80dd5b01a" - integrity sha512-yiPQNVf5rBFHwN6SIf3TUUvVAFKcQqmSUFeq+fb6pNRCo0ZCgpYOZDi3BVoezCPIAcKrVYd/qXlBLUP9wVrZ9g== - dependencies: - command-exists "^1.2.8" - commander "^8.1.0" - follow-redirects "^1.12.1" - js-sha3 "0.8.0" - memorystream "^0.3.1" - semver "^5.5.0" - tmp "0.0.33" - solhint-plugin-prettier@^0.0.5: version "0.0.5" - resolved "https://registry.yarnpkg.com/solhint-plugin-prettier/-/solhint-plugin-prettier-0.0.5.tgz#e3b22800ba435cd640a9eca805a7f8bc3e3e6a6b" + resolved "https://registry.npmjs.org/solhint-plugin-prettier/-/solhint-plugin-prettier-0.0.5.tgz" integrity sha512-7jmWcnVshIrO2FFinIvDQmhQpfpS2rRRn3RejiYgnjIE68xO2bvrYvjqVNfrio4xH9ghOqn83tKuTzLjEbmGIA== dependencies: prettier-linter-helpers "^1.0.0" @@ -7055,12 +6848,12 @@ solhint@^5.1.0: solidity-comments-extractor@^0.0.8: version "0.0.8" - resolved "https://registry.yarnpkg.com/solidity-comments-extractor/-/solidity-comments-extractor-0.0.8.tgz#f6e148ab0c49f30c1abcbecb8b8df01ed8e879f8" + resolved "https://registry.npmjs.org/solidity-comments-extractor/-/solidity-comments-extractor-0.0.8.tgz" integrity sha512-htM7Vn6LhHreR+EglVMd2s+sZhcXAirB1Zlyrv5zBuTxieCvjfnRpd7iZk75m/u6NOlEyQ94C6TWbBn2cY7w8g== solidity-coverage@^0.8.5: version "0.8.12" - resolved "https://registry.yarnpkg.com/solidity-coverage/-/solidity-coverage-0.8.12.tgz#c4fa2f64eff8ada7a1387b235d6b5b0e6c6985ed" + resolved "https://registry.npmjs.org/solidity-coverage/-/solidity-coverage-0.8.12.tgz" integrity sha512-8cOB1PtjnjFRqOgwFiD8DaUsYJtVJ6+YdXQtSZDrLGf8cdhhh8xzTtGzVTGeBf15kTv0v7lYPJlV/az7zLEPJw== dependencies: "@ethersproject/abi" "^5.0.9" @@ -7085,7 +6878,7 @@ solidity-coverage@^0.8.5: source-map-support@^0.5.13, source-map-support@^0.5.21: version "0.5.21" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" + resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz" integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== dependencies: buffer-from "^1.0.0" @@ -7093,29 +6886,29 @@ source-map-support@^0.5.13, source-map-support@^0.5.21: source-map@^0.6.0, source-map@^0.6.1: version "0.6.1" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== source-map@~0.2.0: version "0.2.0" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d" + resolved "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz" integrity sha512-CBdZ2oa/BHhS4xj5DlhjWNHcan57/5YuvfdLf17iVmIpd9KRm+DFLmC6nBNj+6Ua7Kt3TmOjDpQT1aTYOQtoUA== dependencies: amdefine ">=0.0.4" split-ca@^1.0.0, split-ca@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/split-ca/-/split-ca-1.0.1.tgz#6c83aff3692fa61256e0cd197e05e9de157691a6" + resolved "https://registry.npmjs.org/split-ca/-/split-ca-1.0.1.tgz" integrity sha512-Q5thBSxp5t8WPTTJQS59LrGqOZqOsrhDGDVm8azCqIBjSBd7nd9o2PM+mDulQQkh8h//4U6hFZnc/mul8t5pWQ== sprintf-js@~1.0.2: version "1.0.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + resolved "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz" integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== ssh2@^1.11.0, ssh2@^1.15.0: version "1.15.0" - resolved "https://registry.yarnpkg.com/ssh2/-/ssh2-1.15.0.tgz#2f998455036a7f89e0df5847efb5421748d9871b" + resolved "https://registry.npmjs.org/ssh2/-/ssh2-1.15.0.tgz" integrity sha512-C0PHgX4h6lBxYx7hcXwu3QWdh4tg6tZZsTfXcdvc5caW/EMxaB4H9dWsl7qk+F7LAW762hp8VbXOX7x4xUYvEw== dependencies: asn1 "^0.2.6" @@ -7126,7 +6919,7 @@ ssh2@^1.11.0, ssh2@^1.15.0: sshpk@^1.7.0: version "1.18.0" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.18.0.tgz#1663e55cddf4d688b86a46b77f0d5fe363aba028" + resolved "https://registry.npmjs.org/sshpk/-/sshpk-1.18.0.tgz" integrity sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ== dependencies: asn1 "~0.2.3" @@ -7141,24 +6934,24 @@ sshpk@^1.7.0: stacktrace-parser@^0.1.10: version "0.1.10" - resolved "https://registry.yarnpkg.com/stacktrace-parser/-/stacktrace-parser-0.1.10.tgz#29fb0cae4e0d0b85155879402857a1639eb6051a" + resolved "https://registry.npmjs.org/stacktrace-parser/-/stacktrace-parser-0.1.10.tgz" integrity sha512-KJP1OCML99+8fhOHxwwzyWrlUuVX5GQ0ZpJTd1DFXhdkrvg1szxfHhawXUZ3g9TkXORQd4/WG68jMlQZ2p8wlg== dependencies: type-fest "^0.7.1" statuses@2.0.1: version "2.0.1" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" + resolved "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz" integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== string-format@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/string-format/-/string-format-2.0.0.tgz#f2df2e7097440d3b65de31b6d40d54c96eaffb9b" + resolved "https://registry.npmjs.org/string-format/-/string-format-2.0.0.tgz" integrity sha512-bbEs3scLeYNXLecRRuk6uJxdXUSj6le/8rNPHChIJTn2V79aXVTR1EH2OH5zLKKoz0V02fOUKZZcw01pLUShZA== string-width@^2.1.1: version "2.1.1" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + resolved "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz" integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== dependencies: is-fullwidth-code-point "^2.0.0" @@ -7166,7 +6959,7 @@ string-width@^2.1.1: string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3: version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== dependencies: emoji-regex "^8.0.0" @@ -7175,7 +6968,7 @@ string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2 string.prototype.trim@^1.2.9: version "1.2.9" - resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz#b6fa326d72d2c78b6df02f7759c73f8f6274faa4" + resolved "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz" integrity sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw== dependencies: call-bind "^1.0.7" @@ -7185,7 +6978,7 @@ string.prototype.trim@^1.2.9: string.prototype.trimend@^1.0.8: version "1.0.8" - resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz#3651b8513719e8a9f48de7f2f77640b26652b229" + resolved "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz" integrity sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ== dependencies: call-bind "^1.0.7" @@ -7194,7 +6987,7 @@ string.prototype.trimend@^1.0.8: string.prototype.trimstart@^1.0.8: version "1.0.8" - resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz#7ee834dda8c7c17eff3118472bb35bfedaa34dde" + resolved "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz" integrity sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg== dependencies: call-bind "^1.0.7" @@ -7203,95 +6996,95 @@ string.prototype.trimstart@^1.0.8: string_decoder@^1.1.1: version "1.3.0" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" + resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz" integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== dependencies: safe-buffer "~5.2.0" string_decoder@~0.10.x: version "0.10.31" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" integrity sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ== string_decoder@~1.1.1: version "1.1.1" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz" integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== dependencies: safe-buffer "~5.1.0" strip-ansi@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz" integrity sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow== dependencies: ansi-regex "^3.0.0" strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== dependencies: ansi-regex "^5.0.1" strip-bom@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + resolved "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz" integrity sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA== strip-hex-prefix@1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz#0c5f155fef1151373377de9dbb588da05500e36f" + resolved "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz" integrity sha512-q8d4ue7JGEiVcypji1bALTos+0pWtyGlivAWyPuTkHzuTCJqrK9sWxYQZUq6Nq3cuyv3bm734IhHvHtGGURU6A== dependencies: is-hex-prefixed "1.0.0" strip-json-comments@3.1.1, strip-json-comments@^3.1.1, strip-json-comments@~3.1.1: version "3.1.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" + resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== strip-json-comments@~2.0.1: version "2.0.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz" integrity sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ== supports-color@8.1.1: version "8.1.1" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + resolved "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz" integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== dependencies: has-flag "^4.0.0" supports-color@^3.1.0: version "3.2.3" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" + resolved "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz" integrity sha512-Jds2VIYDrlp5ui7t8abHN2bjAu4LV/q4N2KivFPpGH0lrka0BMq/33AmECUXlKPcHigkNaqfXRENFju+rlcy+A== dependencies: has-flag "^1.0.0" supports-color@^5.3.0: version "5.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + resolved "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz" integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== dependencies: has-flag "^3.0.0" supports-color@^7, supports-color@^7.1.0, supports-color@^7.2.0: version "7.2.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + resolved "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz" integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== dependencies: has-flag "^4.0.0" supports-preserve-symlinks-flag@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" + resolved "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== sync-request@^6.0.0: version "6.1.0" - resolved "https://registry.yarnpkg.com/sync-request/-/sync-request-6.1.0.tgz#e96217565b5e50bbffe179868ba75532fb597e68" + resolved "https://registry.npmjs.org/sync-request/-/sync-request-6.1.0.tgz" integrity sha512-8fjNkrNlNCrVc/av+Jn+xxqfCjYaBoHqCsDz6mt030UMxJGr+GSfCV1dQt2gRtlL63+VPidwDVLr7V2OcTSdRw== dependencies: http-response-object "^3.0.1" @@ -7300,14 +7093,14 @@ sync-request@^6.0.0: sync-rpc@^1.2.1: version "1.3.6" - resolved "https://registry.yarnpkg.com/sync-rpc/-/sync-rpc-1.3.6.tgz#b2e8b2550a12ccbc71df8644810529deb68665a7" + resolved "https://registry.npmjs.org/sync-rpc/-/sync-rpc-1.3.6.tgz" integrity sha512-J8jTXuZzRlvU7HemDgHi3pGnh/rkoqR/OZSjhTyyZrEkkYQbk7Z33AXp37mkPfPpfdOuj7Ex3H/TJM1z48uPQw== dependencies: get-port "^3.1.0" synckit@^0.8.6: version "0.8.8" - resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.8.8.tgz#fe7fe446518e3d3d49f5e429f443cf08b6edfcd7" + resolved "https://registry.npmjs.org/synckit/-/synckit-0.8.8.tgz" integrity sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ== dependencies: "@pkgr/core" "^0.1.0" @@ -7315,7 +7108,7 @@ synckit@^0.8.6: table-layout@^1.0.2: version "1.0.2" - resolved "https://registry.yarnpkg.com/table-layout/-/table-layout-1.0.2.tgz#c4038a1853b0136d63365a734b6931cf4fad4a04" + resolved "https://registry.npmjs.org/table-layout/-/table-layout-1.0.2.tgz" integrity sha512-qd/R7n5rQTRFi+Zf2sk5XVVd9UQl6ZkduPFC3S7WEGJAmetDTjY3qPN50eSKzwuzEyQKy5TN2TiZdkIjos2L6A== dependencies: array-back "^4.0.1" @@ -7325,7 +7118,7 @@ table-layout@^1.0.2: table@^6.8.0, table@^6.8.1: version "6.8.2" - resolved "https://registry.yarnpkg.com/table/-/table-6.8.2.tgz#c5504ccf201213fa227248bdc8c5569716ac6c58" + resolved "https://registry.npmjs.org/table/-/table-6.8.2.tgz" integrity sha512-w2sfv80nrAh2VCbqR5AK27wswXhqcck2AhfnNW76beQXskGZ1V12GwS//yYVa3d3fcvAip2OUnbDAjW2k3v9fA== dependencies: ajv "^8.0.1" @@ -7336,12 +7129,12 @@ table@^6.8.0, table@^6.8.1: tapable@^2.2.0: version "2.2.1" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" + resolved "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz" integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== tar-fs@~1.16.3: version "1.16.3" - resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-1.16.3.tgz#966a628841da2c4010406a82167cbd5e0c72d509" + resolved "https://registry.npmjs.org/tar-fs/-/tar-fs-1.16.3.tgz" integrity sha512-NvCeXpYx7OsmOh8zIOP/ebG55zZmxLE0etfWRbWok+q2Qo8x/vOR/IJT1taADXPe+jsiu9axDb3X4B+iIgNlKw== dependencies: chownr "^1.0.1" @@ -7351,7 +7144,7 @@ tar-fs@~1.16.3: tar-fs@~2.0.1: version "2.0.1" - resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.0.1.tgz#e44086c1c60d31a4f0cf893b1c4e155dabfae9e2" + resolved "https://registry.npmjs.org/tar-fs/-/tar-fs-2.0.1.tgz" integrity sha512-6tzWDMeroL87uF/+lin46k+Q+46rAJ0SyPGz7OW7wTgblI273hsBqk2C1j0/xNadNLKDTUL9BukSjB7cwgmlPA== dependencies: chownr "^1.1.1" @@ -7361,7 +7154,7 @@ tar-fs@~2.0.1: tar-stream@^1.1.2: version "1.6.2" - resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-1.6.2.tgz#8ea55dab37972253d9a9af90fdcd559ae435c555" + resolved "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz" integrity sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A== dependencies: bl "^1.0.0" @@ -7374,7 +7167,7 @@ tar-stream@^1.1.2: tar-stream@^2.0.0: version "2.2.0" - resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.2.0.tgz#acad84c284136b060dc3faa64474aa9aebd77287" + resolved "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz" integrity sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ== dependencies: bl "^4.0.3" @@ -7385,7 +7178,7 @@ tar-stream@^2.0.0: template-file@^6.0.1: version "6.0.1" - resolved "https://registry.yarnpkg.com/template-file/-/template-file-6.0.1.tgz#ce4d1f48e56d637cc94bb97ec205e6e035bbb2a5" + resolved "https://registry.npmjs.org/template-file/-/template-file-6.0.1.tgz" integrity sha512-02hOa1psJUOsahWfx8w3p40CCulA2/InNFFPh5xLq5rUUm2XTzvmtOn/SXV+KZaq7ylG58SYSnT4yW3y/Smn4w== dependencies: "@blakek/deep" "^2.2.0" @@ -7395,7 +7188,7 @@ template-file@^6.0.1: test-value@^2.1.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/test-value/-/test-value-2.1.0.tgz#11da6ff670f3471a73b625ca4f3fdcf7bb748291" + resolved "https://registry.npmjs.org/test-value/-/test-value-2.1.0.tgz" integrity sha512-+1epbAxtKeXttkGFMTX9H42oqzOTufR1ceCF+GYA5aOmvaPq9wd4PUS8329fn2RRLGNeUkgRLnVpycjx8DsO2w== dependencies: array-back "^1.0.3" @@ -7403,12 +7196,12 @@ test-value@^2.1.0: text-table@^0.2.0: version "0.2.0" - resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + resolved "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz" integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== then-request@^6.0.0: version "6.0.2" - resolved "https://registry.yarnpkg.com/then-request/-/then-request-6.0.2.tgz#ec18dd8b5ca43aaee5cb92f7e4c1630e950d4f0c" + resolved "https://registry.npmjs.org/then-request/-/then-request-6.0.2.tgz" integrity sha512-3ZBiG7JvP3wbDzA9iNY5zJQcHL4jn/0BWtXIkagfz7QgOL/LqjCEOBQuJNZfu0XYnv5JhKh+cDxCPM4ILrqruA== dependencies: "@types/concat-stream" "^1.6.0" @@ -7425,41 +7218,41 @@ then-request@^6.0.0: "through@>=2.2.7 <3": version "2.3.8" - resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + resolved "https://registry.npmjs.org/through/-/through-2.3.8.tgz" integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== tmp@0.0.33: version "0.0.33" - resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" + resolved "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz" integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== dependencies: os-tmpdir "~1.0.2" to-buffer@^1.1.1: version "1.1.1" - resolved "https://registry.yarnpkg.com/to-buffer/-/to-buffer-1.1.1.tgz#493bd48f62d7c43fcded313a03dcadb2e1213a80" + resolved "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz" integrity sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg== to-regex-range@^5.0.1: version "5.0.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + resolved "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz" integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== dependencies: is-number "^7.0.0" toidentifier@1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" + resolved "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz" integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== toml@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/toml/-/toml-3.0.0.tgz#342160f1af1904ec9d204d03a5d61222d762c5ee" + resolved "https://registry.npmjs.org/toml/-/toml-3.0.0.tgz" integrity sha512-y/mWCZinnvxjTKYhJ+pYxwD0mRLVvOtdS2Awbgxln6iEnt4rk0yBxeSBHkGJcPucRiG0e55mwWp+g/05rsrd6w== tough-cookie@~2.5.0: version "2.5.0" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" + resolved "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz" integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== dependencies: psl "^1.1.28" @@ -7467,22 +7260,22 @@ tough-cookie@~2.5.0: tr46@~0.0.3: version "0.0.3" - resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" + resolved "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz" integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== treeify@^1.1.0: version "1.1.0" - resolved "https://registry.yarnpkg.com/treeify/-/treeify-1.1.0.tgz#4e31c6a463accd0943879f30667c4fdaff411bb8" + resolved "https://registry.npmjs.org/treeify/-/treeify-1.1.0.tgz" integrity sha512-1m4RA7xVAJrSGrrXGs0L3YTwyvBs2S8PbRHaLZAkFw7JR8oIFwYtysxlBZhYIa7xSyiYJKZ3iGrrk55cGA3i9A== ts-api-utils@^1.0.1: version "1.3.0" - resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.3.0.tgz#4b490e27129f1e8e686b45cc4ab63714dc60eea1" + resolved "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz" integrity sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ== ts-command-line-args@^2.2.0: version "2.5.1" - resolved "https://registry.yarnpkg.com/ts-command-line-args/-/ts-command-line-args-2.5.1.tgz#e64456b580d1d4f6d948824c274cf6fa5f45f7f0" + resolved "https://registry.npmjs.org/ts-command-line-args/-/ts-command-line-args-2.5.1.tgz" integrity sha512-H69ZwTw3rFHb5WYpQya40YAX2/w7Ut75uUECbgBIsLmM+BNuYnxsltfyyLMxy6sEeKxgijLTnQtLd0nKd6+IYw== dependencies: chalk "^4.1.0" @@ -7492,17 +7285,17 @@ ts-command-line-args@^2.2.0: ts-essentials@^1.0.0: version "1.0.4" - resolved "https://registry.yarnpkg.com/ts-essentials/-/ts-essentials-1.0.4.tgz#ce3b5dade5f5d97cf69889c11bf7d2da8555b15a" + resolved "https://registry.npmjs.org/ts-essentials/-/ts-essentials-1.0.4.tgz" integrity sha512-q3N1xS4vZpRouhYHDPwO0bDW3EZ6SK9CrrDHxi/D6BPReSjpVgWIOpLS2o0gSBZm+7q/wyKp6RVM1AeeW7uyfQ== ts-essentials@^7.0.1: version "7.0.3" - resolved "https://registry.yarnpkg.com/ts-essentials/-/ts-essentials-7.0.3.tgz#686fd155a02133eedcc5362dc8b5056cde3e5a38" + resolved "https://registry.npmjs.org/ts-essentials/-/ts-essentials-7.0.3.tgz" integrity sha512-8+gr5+lqO3G84KdiTSMRLtuyJ+nTBVRKuCrK4lidMPdVeEp0uqC875uE5NMcaA7YYMN7XsNiFQuMvasF8HT/xQ== ts-generator@^0.1.1: version "0.1.1" - resolved "https://registry.yarnpkg.com/ts-generator/-/ts-generator-0.1.1.tgz#af46f2fb88a6db1f9785977e9590e7bcd79220ab" + resolved "https://registry.npmjs.org/ts-generator/-/ts-generator-0.1.1.tgz" integrity sha512-N+ahhZxTLYu1HNTQetwWcx3so8hcYbkKBHTr4b4/YgObFTIKkOSSsaa+nal12w8mfrJAyzJfETXawbNjSfP2gQ== dependencies: "@types/mkdirp" "^0.5.2" @@ -7517,7 +7310,7 @@ ts-generator@^0.1.1: ts-morph@^19.0.0: version "19.0.0" - resolved "https://registry.yarnpkg.com/ts-morph/-/ts-morph-19.0.0.tgz#43e95fb0156c3fe3c77c814ac26b7d0be2f93169" + resolved "https://registry.npmjs.org/ts-morph/-/ts-morph-19.0.0.tgz" integrity sha512-D6qcpiJdn46tUqV45vr5UGM2dnIEuTGNxVhg0sk5NX11orcouwj6i1bMqZIz2mZTZB1Hcgy7C3oEVhAT+f6mbQ== dependencies: "@ts-morph/common" "~0.20.0" @@ -7525,7 +7318,7 @@ ts-morph@^19.0.0: ts-node@^10.1.0: version "10.9.2" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.2.tgz#70f021c9e185bccdca820e26dc413805c101c71f" + resolved "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz" integrity sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ== dependencies: "@cspotcode/source-map-support" "^0.8.0" @@ -7544,7 +7337,7 @@ ts-node@^10.1.0: tsconfig-paths@^3.15.0: version "3.15.0" - resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz#5299ec605e55b1abb23ec939ef15edaf483070d4" + resolved "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz" integrity sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg== dependencies: "@types/json5" "^0.0.29" @@ -7554,83 +7347,83 @@ tsconfig-paths@^3.15.0: tslib@^1.9.3: version "1.14.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" + resolved "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== tslib@^2.6.2: version "2.6.2" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" + resolved "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz" integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== tsort@0.0.1: version "0.0.1" - resolved "https://registry.yarnpkg.com/tsort/-/tsort-0.0.1.tgz#e2280f5e817f8bf4275657fd0f9aebd44f5a2786" + resolved "https://registry.npmjs.org/tsort/-/tsort-0.0.1.tgz" integrity sha512-Tyrf5mxF8Ofs1tNoxA13lFeZ2Zrbd6cKbuH3V+MQ5sb6DtBj5FjrXVsRWT8YvNAQTqNoz66dz1WsbigI22aEnw== tunnel-agent@^0.6.0: version "0.6.0" - resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + resolved "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz" integrity sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w== dependencies: safe-buffer "^5.0.1" tweetnacl-util@^0.15.1: version "0.15.1" - resolved "https://registry.yarnpkg.com/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz#b80fcdb5c97bcc508be18c44a4be50f022eea00b" + resolved "https://registry.npmjs.org/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz" integrity sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw== tweetnacl@^0.14.3, tweetnacl@~0.14.0: version "0.14.5" - resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + resolved "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz" integrity sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA== tweetnacl@^1.0.3: version "1.0.3" - resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-1.0.3.tgz#ac0af71680458d8a6378d0d0d050ab1407d35596" + resolved "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz" integrity sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw== type-check@^0.4.0, type-check@~0.4.0: version "0.4.0" - resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" + resolved "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz" integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== dependencies: prelude-ls "^1.2.1" type-check@~0.3.2: version "0.3.2" - resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + resolved "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz" integrity sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg== dependencies: prelude-ls "~1.1.2" type-detect@4.0.8, type-detect@^4.0.0, type-detect@^4.0.8: version "4.0.8" - resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" + resolved "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz" integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== type-detect@^4.1.0: version "4.1.0" - resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.1.0.tgz#deb2453e8f08dcae7ae98c626b13dddb0155906c" + resolved "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz" integrity sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw== type-fest@^0.20.2: version "0.20.2" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" + resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz" integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== type-fest@^0.21.3: version "0.21.3" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" + resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz" integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== type-fest@^0.7.1: version "0.7.1" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.7.1.tgz#8dda65feaf03ed78f0a3f9678f1869147f7c5c48" + resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.7.1.tgz" integrity sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg== typechain@^4.0.0: version "4.0.3" - resolved "https://registry.yarnpkg.com/typechain/-/typechain-4.0.3.tgz#e8fcd6c984676858c64eeeb155ea783a10b73779" + resolved "https://registry.npmjs.org/typechain/-/typechain-4.0.3.tgz" integrity sha512-tmoHQeXZWHxIdeLK+i6dU0CU0vOd9Cndr3jFTZIMzak5/YpFZ8XoiYpTZcngygGBqZo+Z1EUmttLbW9KkFZLgQ== dependencies: command-line-args "^4.0.7" @@ -7643,7 +7436,7 @@ typechain@^4.0.0: typechain@^8.0.0: version "8.3.2" - resolved "https://registry.yarnpkg.com/typechain/-/typechain-8.3.2.tgz#1090dd8d9c57b6ef2aed3640a516bdbf01b00d73" + resolved "https://registry.npmjs.org/typechain/-/typechain-8.3.2.tgz" integrity sha512-x/sQYr5w9K7yv3es7jo4KTX05CLxOf7TRWwoHlrjRh8H82G64g+k7VuWPJlgMo6qrjfCulOdfBjiaDtmhFYD/Q== dependencies: "@types/prettier" "^2.1.1" @@ -7659,7 +7452,7 @@ typechain@^8.0.0: typed-array-buffer@^1.0.2: version "1.0.2" - resolved "https://registry.yarnpkg.com/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz#1867c5d83b20fcb5ccf32649e5e2fc7424474ff3" + resolved "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz" integrity sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ== dependencies: call-bind "^1.0.7" @@ -7668,7 +7461,7 @@ typed-array-buffer@^1.0.2: typed-array-byte-length@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz#d92972d3cff99a3fa2e765a28fcdc0f1d89dec67" + resolved "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz" integrity sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw== dependencies: call-bind "^1.0.7" @@ -7679,7 +7472,7 @@ typed-array-byte-length@^1.0.1: typed-array-byte-offset@^1.0.2: version "1.0.2" - resolved "https://registry.yarnpkg.com/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz#f9ec1acb9259f395093e4567eb3c28a580d02063" + resolved "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz" integrity sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA== dependencies: available-typed-arrays "^1.0.7" @@ -7691,7 +7484,7 @@ typed-array-byte-offset@^1.0.2: typed-array-length@^1.0.6: version "1.0.6" - resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.6.tgz#57155207c76e64a3457482dfdc1c9d1d3c4c73a3" + resolved "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.6.tgz" integrity sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g== dependencies: call-bind "^1.0.7" @@ -7703,47 +7496,47 @@ typed-array-length@^1.0.6: typedarray@^0.0.6: version "0.0.6" - resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" + resolved "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz" integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA== typescript@^4.6.4: version "4.9.5" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" + resolved "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz" integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== typescript@^5.2.2: version "5.4.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.4.tgz#eb2471e7b0a5f1377523700a21669dce30c2d952" + resolved "https://registry.npmjs.org/typescript/-/typescript-5.4.4.tgz" integrity sha512-dGE2Vv8cpVvw28v8HCPqyb08EzbBURxDpuhJvTrusShUfGnhHBafDsLdS1EhhxyL6BJQE+2cT3dDPAv+MQ6oLw== typical@^2.6.0, typical@^2.6.1: version "2.6.1" - resolved "https://registry.yarnpkg.com/typical/-/typical-2.6.1.tgz#5c080e5d661cbbe38259d2e70a3c7253e873881d" + resolved "https://registry.npmjs.org/typical/-/typical-2.6.1.tgz" integrity sha512-ofhi8kjIje6npGozTip9Fr8iecmYfEbS06i0JnIg+rh51KakryWF4+jX8lLKZVhy6N+ID45WYSFCxPOdTWCzNg== typical@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/typical/-/typical-4.0.0.tgz#cbeaff3b9d7ae1e2bbfaf5a4e6f11eccfde94fc4" + resolved "https://registry.npmjs.org/typical/-/typical-4.0.0.tgz" integrity sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw== typical@^5.2.0: version "5.2.0" - resolved "https://registry.yarnpkg.com/typical/-/typical-5.2.0.tgz#4daaac4f2b5315460804f0acf6cb69c52bb93066" + resolved "https://registry.npmjs.org/typical/-/typical-5.2.0.tgz" integrity sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg== uc.micro@^1.0.1, uc.micro@^1.0.5: version "1.0.6" - resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.6.tgz#9c411a802a409a91fc6cf74081baba34b24499ac" + resolved "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz" integrity sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA== uglify-js@^3.1.4: version "3.17.4" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.17.4.tgz#61678cf5fa3f5b7eb789bb345df29afb8257c22c" + resolved "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz" integrity sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g== unbox-primitive@^1.0.2: version "1.0.2" - resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e" + resolved "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz" integrity sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw== dependencies: call-bind "^1.0.2" @@ -7753,46 +7546,46 @@ unbox-primitive@^1.0.2: undici-types@~5.26.4: version "5.26.5" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" + resolved "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz" integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== undici@^5.14.0: version "5.28.4" - resolved "https://registry.yarnpkg.com/undici/-/undici-5.28.4.tgz#6b280408edb6a1a604a9b20340f45b422e373068" + resolved "https://registry.npmjs.org/undici/-/undici-5.28.4.tgz" integrity sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g== dependencies: "@fastify/busboy" "^2.0.0" undici@^6.18.2: version "6.19.8" - resolved "https://registry.yarnpkg.com/undici/-/undici-6.19.8.tgz#002d7c8a28f8cc3a44ff33c3d4be4d85e15d40e1" + resolved "https://registry.npmjs.org/undici/-/undici-6.19.8.tgz" integrity sha512-U8uCCl2x9TK3WANvmBavymRzxbfFYG+tAu+fgx3zxQy3qdagQqBLwJVrdyO1TBfUXvfKveMKJZhpvUYoOjM+4g== universalify@^0.1.0: version "0.1.2" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" + resolved "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz" integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== universalify@^2.0.0: version "2.0.1" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.1.tgz#168efc2180964e6386d061e094df61afe239b18d" + resolved "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz" integrity sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw== unpipe@1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + resolved "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz" integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== uri-js@^4.2.2, uri-js@^4.4.1: version "4.4.1" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + resolved "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz" integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== dependencies: punycode "^2.1.0" url@^0.11.0: version "0.11.3" - resolved "https://registry.yarnpkg.com/url/-/url-0.11.3.tgz#6f495f4b935de40ce4a0a52faee8954244f3d3ad" + resolved "https://registry.npmjs.org/url/-/url-0.11.3.tgz" integrity sha512-6hxOLGfZASQK/cijlZnZJTq8OXAkt/3YGfQX45vvMYXpZoo8NdWZcY73K108Jf759lS1Bv/8wXnHDTSz17dSRw== dependencies: punycode "^1.4.1" @@ -7800,46 +7593,46 @@ url@^0.11.0: utf-8-validate@5.0.7: version "5.0.7" - resolved "https://registry.yarnpkg.com/utf-8-validate/-/utf-8-validate-5.0.7.tgz#c15a19a6af1f7ad9ec7ddc425747ca28c3644922" + resolved "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.7.tgz" integrity sha512-vLt1O5Pp+flcArHGIyKEQq883nBt8nN8tVBcoL0qUXj2XT1n7p70yGIq2VK98I5FdZ1YHc0wk/koOnHjnXWk1Q== dependencies: node-gyp-build "^4.3.0" utf8@3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/utf8/-/utf8-3.0.0.tgz#f052eed1364d696e769ef058b183df88c87f69d1" + resolved "https://registry.npmjs.org/utf8/-/utf8-3.0.0.tgz" integrity sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ== util-deprecate@^1.0.1, util-deprecate@~1.0.1: version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + resolved "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== util@^0.10.3: version "0.10.4" - resolved "https://registry.yarnpkg.com/util/-/util-0.10.4.tgz#3aa0125bfe668a4672de58857d3ace27ecb76901" + resolved "https://registry.npmjs.org/util/-/util-0.10.4.tgz" integrity sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A== dependencies: inherits "2.0.3" uuid@^3.3.2: version "3.4.0" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" + resolved "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== uuid@^8.3.2: version "8.3.2" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" + resolved "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== v8-compile-cache-lib@^3.0.1: version "3.0.1" - resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" + resolved "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz" integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== verror@1.10.0: version "1.10.0" - resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" + resolved "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz" integrity sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw== dependencies: assert-plus "^1.0.0" @@ -7848,12 +7641,12 @@ verror@1.10.0: weak-map@~1.0.x: version "1.0.8" - resolved "https://registry.yarnpkg.com/weak-map/-/weak-map-1.0.8.tgz#394c18a9e8262e790544ed8b55c6a4ddad1cb1a3" + resolved "https://registry.npmjs.org/weak-map/-/weak-map-1.0.8.tgz" integrity sha512-lNR9aAefbGPpHO7AEnY0hCFjz1eTkWCXYvkTRrTHs9qv8zJp+SkVYpzfLIFXQQiG3tVvbNFQgVg2bQS8YGgxyw== web3-utils@^1.3.4, web3-utils@^1.3.6: version "1.10.4" - resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.10.4.tgz#0daee7d6841641655d8b3726baf33b08eda1cbec" + resolved "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.4.tgz" integrity sha512-tsu8FiKJLk2PzhDl9fXbGUWTkkVXYhtTA+SmEFkKft+9BgwLxfCRpU96sWv7ICC8zixBNd3JURVoiR3dUXgP8A== dependencies: "@ethereumjs/util" "^8.1.0" @@ -7867,12 +7660,12 @@ web3-utils@^1.3.4, web3-utils@^1.3.6: webidl-conversions@^3.0.0: version "3.0.1" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" + resolved "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz" integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== whatwg-url@^5.0.0: version "5.0.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" + resolved "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz" integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw== dependencies: tr46 "~0.0.3" @@ -7880,7 +7673,7 @@ whatwg-url@^5.0.0: which-boxed-primitive@^1.0.2: version "1.0.2" - resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" + resolved "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz" integrity sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg== dependencies: is-bigint "^1.0.1" @@ -7891,7 +7684,7 @@ which-boxed-primitive@^1.0.2: which-typed-array@^1.1.14, which-typed-array@^1.1.15: version "1.1.15" - resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.15.tgz#264859e9b11a649b388bfaaf4f767df1f779b38d" + resolved "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz" integrity sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA== dependencies: available-typed-arrays "^1.0.7" @@ -7902,38 +7695,38 @@ which-typed-array@^1.1.14, which-typed-array@^1.1.15: which@2.0.2, which@^2.0.1: version "2.0.2" - resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + resolved "https://registry.npmjs.org/which/-/which-2.0.2.tgz" integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== dependencies: isexe "^2.0.0" which@^1.1.1, which@^1.3.1: version "1.3.1" - resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + resolved "https://registry.npmjs.org/which/-/which-1.3.1.tgz" integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== dependencies: isexe "^2.0.0" widest-line@^3.1.0: version "3.1.0" - resolved "https://registry.yarnpkg.com/widest-line/-/widest-line-3.1.0.tgz#8292333bbf66cb45ff0de1603b136b7ae1496eca" + resolved "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz" integrity sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg== dependencies: string-width "^4.0.0" word-wrap@^1.2.5, word-wrap@~1.2.3: version "1.2.5" - resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34" + resolved "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz" integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA== wordwrap@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" + resolved "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz" integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q== wordwrapjs@^4.0.0: version "4.0.1" - resolved "https://registry.yarnpkg.com/wordwrapjs/-/wordwrapjs-4.0.1.tgz#d9790bccfb110a0fc7836b5ebce0937b37a8b98f" + resolved "https://registry.npmjs.org/wordwrapjs/-/wordwrapjs-4.0.1.tgz" integrity sha512-kKlNACbvHrkpIw6oPeYDSmdCTu2hdMHoyXLTcUKala++lx5Y+wjJ/e474Jqv5abnVmwxw08DiTuHmw69lJGksA== dependencies: reduce-flatten "^2.0.0" @@ -7941,17 +7734,17 @@ wordwrapjs@^4.0.0: workerpool@6.2.0: version "6.2.0" - resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.0.tgz#827d93c9ba23ee2019c3ffaff5c27fccea289e8b" + resolved "https://registry.npmjs.org/workerpool/-/workerpool-6.2.0.tgz" integrity sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A== workerpool@6.2.1: version "6.2.1" - resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343" + resolved "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz" integrity sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw== wrap-ansi@^7.0.0: version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== dependencies: ansi-styles "^4.0.0" @@ -7960,67 +7753,67 @@ wrap-ansi@^7.0.0: wrappy@1: version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== ws@7.4.6: version "7.4.6" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c" + resolved "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz" integrity sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A== ws@^7.4.6: version "7.5.9" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.9.tgz#54fa7db29f4c7cec68b1ddd3a89de099942bb591" + resolved "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz" integrity sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q== xhr2@0.1.3: version "0.1.3" - resolved "https://registry.yarnpkg.com/xhr2/-/xhr2-0.1.3.tgz#cbfc4759a69b4a888e78cf4f20b051038757bd11" + resolved "https://registry.npmjs.org/xhr2/-/xhr2-0.1.3.tgz" integrity sha512-6RmGK22QwC7yXB1CRwyLWuS2opPcKOlAu0ViAnyZjDlzrEmCKL4kLHkfvB8oMRWeztMsNoDGAjsMZY15w/4tTw== xregexp@3.1.0: version "3.1.0" - resolved "https://registry.yarnpkg.com/xregexp/-/xregexp-3.1.0.tgz#14d8461e0bdd38224bfee5039a0898fc42fcd336" + resolved "https://registry.npmjs.org/xregexp/-/xregexp-3.1.0.tgz" integrity sha512-4Y1x6DyB8xRoxosooa6PlGWqmmSKatbzhrftZ7Purmm4B8R4qIEJG1A2hZsdz5DhmIqS0msC0I7KEq93GphEVg== xtend@^4.0.0, xtend@^4.0.1, xtend@^4.0.2, xtend@~4.0.0: version "4.0.2" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" + resolved "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== y18n@^5.0.5: version "5.0.8" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + resolved "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz" integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== yallist@^3.0.2: version "3.1.1" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" + resolved "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz" integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== yallist@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + resolved "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== yaml@^2.7.0: version "2.7.0" - resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.7.0.tgz#aef9bb617a64c937a9a748803786ad8d3ffe1e98" + resolved "https://registry.npmjs.org/yaml/-/yaml-2.7.0.tgz" integrity sha512-+hSoy/QHluxmC9kCIJyL/uyFmLmc+e5CFR5Wa+bpIhIj85LVb9ZH2nVnqrHoSvKogwODv0ClqZkmiSSaIH5LTA== yargs-parser@20.2.4: version "20.2.4" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" + resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz" integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== yargs-parser@^20.2.2: version "20.2.9" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" + resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz" integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== yargs-unparser@2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" + resolved "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz" integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== dependencies: camelcase "^6.0.0" @@ -8030,7 +7823,7 @@ yargs-unparser@2.0.0: yargs@16.2.0: version "16.2.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" + resolved "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz" integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== dependencies: cliui "^7.0.2" @@ -8043,36 +7836,29 @@ yargs@16.2.0: yn@3.1.1: version "3.1.1" - resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" + resolved "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz" integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== yocto-queue@^0.1.0: version "0.1.0" - resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + resolved "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz" integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== yocto-queue@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-1.0.0.tgz#7f816433fb2cbc511ec8bf7d263c3b58a1a3c251" + resolved "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.0.0.tgz" integrity sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g== zksync-ethers@5.8.0-beta.5: version "5.8.0-beta.5" - resolved "https://registry.yarnpkg.com/zksync-ethers/-/zksync-ethers-5.8.0-beta.5.tgz#4f70193a86bd1e41b25b0aa5aa32f6d41d52f7c6" + resolved "https://registry.npmjs.org/zksync-ethers/-/zksync-ethers-5.8.0-beta.5.tgz" integrity sha512-saT/3OwLgifqzrBG7OujvUMapzXnshAaLzAZMycUtdV20eLSSVkyLIARVwh1M6hMQIUvX2htV0JN82QRMyM3Ig== dependencies: ethers "~5.7.0" -zksync-ethers@^5.0.0: - version "5.8.0" - resolved "https://registry.yarnpkg.com/zksync-ethers/-/zksync-ethers-5.8.0.tgz#ff054345048f851c33cb6efcf2094f40d4da6063" - integrity sha512-/4qI5UElh0lspu0ew2IXBCO+O9kXEzZOM7JqvlfRWWGIUKZ+EDXnjIPgkH0y5/MnMT3FDq9koAAUCyZVWqHUJg== - dependencies: - ethers "~5.7.0" - -zksync-ethers@^5.9.0: +zksync-ethers@^5.0.0, zksync-ethers@^5.9.0: version "5.9.2" - resolved "https://registry.yarnpkg.com/zksync-ethers/-/zksync-ethers-5.9.2.tgz#1c5f34cb25ac0b040fd1a6118f2ba1c2c3bda090" + resolved "https://registry.npmjs.org/zksync-ethers/-/zksync-ethers-5.9.2.tgz" integrity sha512-Y2Mx6ovvxO6UdC2dePLguVzvNToOY8iLWeq5ne+jgGSJxAi/f4He/NF6FNsf6x1aWX0o8dy4Df8RcOQXAkj5qw== dependencies: ethers "~5.7.0"