From ee464caef68fdec325aa22758bb69e17dd039794 Mon Sep 17 00:00:00 2001 From: Daniel Wang <99078276+dantaik@users.noreply.github.com> Date: Wed, 28 Aug 2024 14:48:15 +0800 Subject: [PATCH] refactor(protocol): refactor tier provider & address caching and add ComposeVerifier (#17960) Co-authored-by: dantaik Co-authored-by: D <51912515+adaki2004@users.noreply.github.com> --- packages/protocol/contract_layout.md | 596 ++++++++++-------- .../contracts/L1/tiers/ITierProvider.sol | 22 - .../protocol/contracts/L1/tiers/LibTiers.sol | 34 + .../contracts/L1/tiers/TierProviderBase.sol | 144 ++--- .../contracts/L1/tiers/TierProviderV3.sol | 21 - .../protocol/contracts/common/LibStrings.sol | 6 +- .../mainnet/LibRollupAddressCache.sol | 55 -- .../mainnet/addrcache/AddressCache.sol | 43 ++ .../mainnet/addrcache/RollupAddressCache.sol | 59 ++ .../SharedAddressCache.sol} | 12 +- .../{ => rollup}/MainnetGuardianProver.sol | 9 +- .../mainnet/{ => rollup}/MainnetProverSet.sol | 9 +- .../MainnetRollupAddressManager.sol | 11 +- .../mainnet/{ => rollup}/MainnetTaikoL1.sol | 9 +- .../mainnet/{ => rollup}/MainnetTaikoL2.sol | 2 +- .../{ => rollup}/MainnetTierRouter.sol | 2 +- .../rollup/verifiers/MainnetRisc0Verifier.sol | 20 + .../verifiers/MainnetSP1Verifier.sol} | 11 +- .../verifiers}/MainnetSgxVerifier.sol | 9 +- .../verifiers/MainnetTeeAnyVerifier.sol | 13 + .../rollup/verifiers/MainnetZkAnyVerifier.sol | 13 + .../mainnet/{ => shared}/MainnetBridge.sol | 9 +- .../{ => shared}/MainnetERC1155Vault.sol | 9 +- .../{ => shared}/MainnetERC20Vault.sol | 9 +- .../{ => shared}/MainnetERC721Vault.sol | 9 +- .../MainnetSharedAddressManager.sol | 11 +- .../{ => shared}/MainnetSignalService.sol | 9 +- ...RiscZeroVerifier.sol => Risc0Verifier.sol} | 10 +- .../contracts/verifiers/SgxVerifier.sol | 2 +- .../verifiers/compose/ComposeVerifier.sol | 81 +++ .../verifiers/compose/TeeAnyVerifier.sol | 26 + .../verifiers/compose/ZkAnyVerifier.sol | 26 + packages/protocol/deployments/gen-layouts.sh | 9 +- packages/protocol/package.json | 2 +- packages/protocol/script/DeployOnL1.s.sol | 22 +- .../protocol/script/DeployRisc0Verifier.s.sol | 6 +- .../protocol/script/DeploySP1Verifier.s.sol | 4 +- .../script/upgrade/UpgradeRisc0Verifier.s.sol | 4 +- packages/protocol/test/L1/TaikoL1TestBase.sol | 2 +- .../protocol/test/L1/TestTierProvider.sol | 1 + packages/protocol/test/TaikoTest.sol | 2 +- ...ZeroVerifier.t.sol => Risc0Verifier.t.sol} | 18 +- .../verifiers/RiscZeroGroth16Verifier.t.sol | 8 +- .../protocol/test/verifiers/SP1Verifier.t.sol | 2 +- .../protocol/test/verifiers/SgxVerifier.t.sol | 45 -- .../verifiers/compose/ComposeVerifeir.t.sol | 217 +++++++ pnpm-lock.yaml | 84 +-- 47 files changed, 1097 insertions(+), 630 deletions(-) create mode 100644 packages/protocol/contracts/L1/tiers/LibTiers.sol delete mode 100644 packages/protocol/contracts/L1/tiers/TierProviderV3.sol delete mode 100644 packages/protocol/contracts/mainnet/LibRollupAddressCache.sol create mode 100644 packages/protocol/contracts/mainnet/addrcache/AddressCache.sol create mode 100644 packages/protocol/contracts/mainnet/addrcache/RollupAddressCache.sol rename packages/protocol/contracts/mainnet/{LibSharedAddressCache.sol => addrcache/SharedAddressCache.sol} (91%) rename packages/protocol/contracts/mainnet/{ => rollup}/MainnetGuardianProver.sol (59%) rename packages/protocol/contracts/mainnet/{ => rollup}/MainnetProverSet.sol (65%) rename packages/protocol/contracts/mainnet/{ => rollup}/MainnetRollupAddressManager.sol (57%) rename packages/protocol/contracts/mainnet/{ => rollup}/MainnetTaikoL1.sol (88%) rename packages/protocol/contracts/mainnet/{ => rollup}/MainnetTaikoL2.sol (90%) rename packages/protocol/contracts/mainnet/{ => rollup}/MainnetTierRouter.sol (91%) create mode 100644 packages/protocol/contracts/mainnet/rollup/verifiers/MainnetRisc0Verifier.sol rename packages/protocol/contracts/mainnet/{MainnetRiscZeroVerifier.sol => rollup/verifiers/MainnetSP1Verifier.sol} (61%) rename packages/protocol/contracts/mainnet/{ => rollup/verifiers}/MainnetSgxVerifier.sol (66%) create mode 100644 packages/protocol/contracts/mainnet/rollup/verifiers/MainnetTeeAnyVerifier.sol create mode 100644 packages/protocol/contracts/mainnet/rollup/verifiers/MainnetZkAnyVerifier.sol rename packages/protocol/contracts/mainnet/{ => shared}/MainnetBridge.sol (66%) rename packages/protocol/contracts/mainnet/{ => shared}/MainnetERC1155Vault.sol (65%) rename packages/protocol/contracts/mainnet/{ => shared}/MainnetERC20Vault.sol (65%) rename packages/protocol/contracts/mainnet/{ => shared}/MainnetERC721Vault.sol (65%) rename packages/protocol/contracts/mainnet/{ => shared}/MainnetSharedAddressManager.sol (57%) rename packages/protocol/contracts/mainnet/{ => shared}/MainnetSignalService.sol (65%) rename packages/protocol/contracts/verifiers/{RiscZeroVerifier.sol => Risc0Verifier.sol} (91%) create mode 100644 packages/protocol/contracts/verifiers/compose/ComposeVerifier.sol create mode 100644 packages/protocol/contracts/verifiers/compose/TeeAnyVerifier.sol create mode 100644 packages/protocol/contracts/verifiers/compose/ZkAnyVerifier.sol rename packages/protocol/test/verifiers/{RiscZeroVerifier.t.sol => Risc0Verifier.t.sol} (88%) create mode 100644 packages/protocol/test/verifiers/compose/ComposeVerifeir.t.sol diff --git a/packages/protocol/contract_layout.md b/packages/protocol/contract_layout.md index d2dfdddfdbd..de7f9bb4b8e 100644 --- a/packages/protocol/contract_layout.md +++ b/packages/protocol/contract_layout.md @@ -443,24 +443,43 @@ | addressRegistered | mapping(address => bool) | 253 | 0 | 32 | contracts/verifiers/SgxVerifier.sol:SgxVerifier | | __gap | uint256[47] | 254 | 0 | 1504 | contracts/verifiers/SgxVerifier.sol:SgxVerifier | -## RiscZeroVerifier -| Name | Type | Slot | Offset | Bytes | Contract | -|----------------|--------------------------|------|--------|-------|-----------------------------------------------------------| -| _initialized | uint8 | 0 | 0 | 1 | contracts/verifiers/RiscZeroVerifier.sol:RiscZeroVerifier | -| _initializing | bool | 0 | 1 | 1 | contracts/verifiers/RiscZeroVerifier.sol:RiscZeroVerifier | -| __gap | uint256[50] | 1 | 0 | 1600 | contracts/verifiers/RiscZeroVerifier.sol:RiscZeroVerifier | -| _owner | address | 51 | 0 | 20 | contracts/verifiers/RiscZeroVerifier.sol:RiscZeroVerifier | -| __gap | uint256[49] | 52 | 0 | 1568 | contracts/verifiers/RiscZeroVerifier.sol:RiscZeroVerifier | -| _pendingOwner | address | 101 | 0 | 20 | contracts/verifiers/RiscZeroVerifier.sol:RiscZeroVerifier | -| __gap | uint256[49] | 102 | 0 | 1568 | contracts/verifiers/RiscZeroVerifier.sol:RiscZeroVerifier | -| addressManager | address | 151 | 0 | 20 | contracts/verifiers/RiscZeroVerifier.sol:RiscZeroVerifier | -| __gap | uint256[49] | 152 | 0 | 1568 | contracts/verifiers/RiscZeroVerifier.sol:RiscZeroVerifier | -| __reentry | uint8 | 201 | 0 | 1 | contracts/verifiers/RiscZeroVerifier.sol:RiscZeroVerifier | -| __paused | uint8 | 201 | 1 | 1 | contracts/verifiers/RiscZeroVerifier.sol:RiscZeroVerifier | -| lastUnpausedAt | uint64 | 201 | 2 | 8 | contracts/verifiers/RiscZeroVerifier.sol:RiscZeroVerifier | -| __gap | uint256[49] | 202 | 0 | 1568 | contracts/verifiers/RiscZeroVerifier.sol:RiscZeroVerifier | -| isImageTrusted | mapping(bytes32 => bool) | 251 | 0 | 32 | contracts/verifiers/RiscZeroVerifier.sol:RiscZeroVerifier | -| __gap | uint256[49] | 252 | 0 | 1568 | contracts/verifiers/RiscZeroVerifier.sol:RiscZeroVerifier | +## Risc0Verifier +| Name | Type | Slot | Offset | Bytes | Contract | +|----------------|--------------------------|------|--------|-------|-----------------------------------------------------| +| _initialized | uint8 | 0 | 0 | 1 | contracts/verifiers/Risc0Verifier.sol:Risc0Verifier | +| _initializing | bool | 0 | 1 | 1 | contracts/verifiers/Risc0Verifier.sol:Risc0Verifier | +| __gap | uint256[50] | 1 | 0 | 1600 | contracts/verifiers/Risc0Verifier.sol:Risc0Verifier | +| _owner | address | 51 | 0 | 20 | contracts/verifiers/Risc0Verifier.sol:Risc0Verifier | +| __gap | uint256[49] | 52 | 0 | 1568 | contracts/verifiers/Risc0Verifier.sol:Risc0Verifier | +| _pendingOwner | address | 101 | 0 | 20 | contracts/verifiers/Risc0Verifier.sol:Risc0Verifier | +| __gap | uint256[49] | 102 | 0 | 1568 | contracts/verifiers/Risc0Verifier.sol:Risc0Verifier | +| addressManager | address | 151 | 0 | 20 | contracts/verifiers/Risc0Verifier.sol:Risc0Verifier | +| __gap | uint256[49] | 152 | 0 | 1568 | contracts/verifiers/Risc0Verifier.sol:Risc0Verifier | +| __reentry | uint8 | 201 | 0 | 1 | contracts/verifiers/Risc0Verifier.sol:Risc0Verifier | +| __paused | uint8 | 201 | 1 | 1 | contracts/verifiers/Risc0Verifier.sol:Risc0Verifier | +| lastUnpausedAt | uint64 | 201 | 2 | 8 | contracts/verifiers/Risc0Verifier.sol:Risc0Verifier | +| __gap | uint256[49] | 202 | 0 | 1568 | contracts/verifiers/Risc0Verifier.sol:Risc0Verifier | +| isImageTrusted | mapping(bytes32 => bool) | 251 | 0 | 32 | contracts/verifiers/Risc0Verifier.sol:Risc0Verifier | +| __gap | uint256[49] | 252 | 0 | 1568 | contracts/verifiers/Risc0Verifier.sol:Risc0Verifier | + +## SP1Verifier +| Name | Type | Slot | Offset | Bytes | Contract | +|------------------|--------------------------|------|--------|-------|-------------------------------------------------| +| _initialized | uint8 | 0 | 0 | 1 | contracts/verifiers/SP1Verifier.sol:SP1Verifier | +| _initializing | bool | 0 | 1 | 1 | contracts/verifiers/SP1Verifier.sol:SP1Verifier | +| __gap | uint256[50] | 1 | 0 | 1600 | contracts/verifiers/SP1Verifier.sol:SP1Verifier | +| _owner | address | 51 | 0 | 20 | contracts/verifiers/SP1Verifier.sol:SP1Verifier | +| __gap | uint256[49] | 52 | 0 | 1568 | contracts/verifiers/SP1Verifier.sol:SP1Verifier | +| _pendingOwner | address | 101 | 0 | 20 | contracts/verifiers/SP1Verifier.sol:SP1Verifier | +| __gap | uint256[49] | 102 | 0 | 1568 | contracts/verifiers/SP1Verifier.sol:SP1Verifier | +| addressManager | address | 151 | 0 | 20 | contracts/verifiers/SP1Verifier.sol:SP1Verifier | +| __gap | uint256[49] | 152 | 0 | 1568 | contracts/verifiers/SP1Verifier.sol:SP1Verifier | +| __reentry | uint8 | 201 | 0 | 1 | contracts/verifiers/SP1Verifier.sol:SP1Verifier | +| __paused | uint8 | 201 | 1 | 1 | contracts/verifiers/SP1Verifier.sol:SP1Verifier | +| lastUnpausedAt | uint64 | 201 | 2 | 8 | contracts/verifiers/SP1Verifier.sol:SP1Verifier | +| __gap | uint256[49] | 202 | 0 | 1568 | contracts/verifiers/SP1Verifier.sol:SP1Verifier | +| isProgramTrusted | mapping(bytes32 => bool) | 251 | 0 | 32 | contracts/verifiers/SP1Verifier.sol:SP1Verifier | +| __gap | uint256[49] | 252 | 0 | 1568 | contracts/verifiers/SP1Verifier.sol:SP1Verifier | ## QuotaManager | Name | Type | Slot | Offset | Bytes | Contract | @@ -524,6 +543,62 @@ | isProverSet | mapping(address => bool) | 253 | 0 | 32 | contracts/team/tokenunlock/TokenUnlock.sol:TokenUnlock | | __gap | uint256[47] | 254 | 0 | 1504 | contracts/team/tokenunlock/TokenUnlock.sol:TokenUnlock | +## ComposeVerifier +| Name | Type | Slot | Offset | Bytes | Contract | +|----------------|-------------|------|--------|-------|-----------------------------------------------------------------| +| _initialized | uint8 | 0 | 0 | 1 | contracts/verifiers/compose/ComposeVerifier.sol:ComposeVerifier | +| _initializing | bool | 0 | 1 | 1 | contracts/verifiers/compose/ComposeVerifier.sol:ComposeVerifier | +| __gap | uint256[50] | 1 | 0 | 1600 | contracts/verifiers/compose/ComposeVerifier.sol:ComposeVerifier | +| _owner | address | 51 | 0 | 20 | contracts/verifiers/compose/ComposeVerifier.sol:ComposeVerifier | +| __gap | uint256[49] | 52 | 0 | 1568 | contracts/verifiers/compose/ComposeVerifier.sol:ComposeVerifier | +| _pendingOwner | address | 101 | 0 | 20 | contracts/verifiers/compose/ComposeVerifier.sol:ComposeVerifier | +| __gap | uint256[49] | 102 | 0 | 1568 | contracts/verifiers/compose/ComposeVerifier.sol:ComposeVerifier | +| addressManager | address | 151 | 0 | 20 | contracts/verifiers/compose/ComposeVerifier.sol:ComposeVerifier | +| __gap | uint256[49] | 152 | 0 | 1568 | contracts/verifiers/compose/ComposeVerifier.sol:ComposeVerifier | +| __reentry | uint8 | 201 | 0 | 1 | contracts/verifiers/compose/ComposeVerifier.sol:ComposeVerifier | +| __paused | uint8 | 201 | 1 | 1 | contracts/verifiers/compose/ComposeVerifier.sol:ComposeVerifier | +| lastUnpausedAt | uint64 | 201 | 2 | 8 | contracts/verifiers/compose/ComposeVerifier.sol:ComposeVerifier | +| __gap | uint256[49] | 202 | 0 | 1568 | contracts/verifiers/compose/ComposeVerifier.sol:ComposeVerifier | +| __gap | uint256[50] | 251 | 0 | 1600 | contracts/verifiers/compose/ComposeVerifier.sol:ComposeVerifier | + +## TeeAnyVerifier +| Name | Type | Slot | Offset | Bytes | Contract | +|----------------|-------------|------|--------|-------|---------------------------------------------------------------| +| _initialized | uint8 | 0 | 0 | 1 | contracts/verifiers/compose/TeeAnyVerifier.sol:TeeAnyVerifier | +| _initializing | bool | 0 | 1 | 1 | contracts/verifiers/compose/TeeAnyVerifier.sol:TeeAnyVerifier | +| __gap | uint256[50] | 1 | 0 | 1600 | contracts/verifiers/compose/TeeAnyVerifier.sol:TeeAnyVerifier | +| _owner | address | 51 | 0 | 20 | contracts/verifiers/compose/TeeAnyVerifier.sol:TeeAnyVerifier | +| __gap | uint256[49] | 52 | 0 | 1568 | contracts/verifiers/compose/TeeAnyVerifier.sol:TeeAnyVerifier | +| _pendingOwner | address | 101 | 0 | 20 | contracts/verifiers/compose/TeeAnyVerifier.sol:TeeAnyVerifier | +| __gap | uint256[49] | 102 | 0 | 1568 | contracts/verifiers/compose/TeeAnyVerifier.sol:TeeAnyVerifier | +| addressManager | address | 151 | 0 | 20 | contracts/verifiers/compose/TeeAnyVerifier.sol:TeeAnyVerifier | +| __gap | uint256[49] | 152 | 0 | 1568 | contracts/verifiers/compose/TeeAnyVerifier.sol:TeeAnyVerifier | +| __reentry | uint8 | 201 | 0 | 1 | contracts/verifiers/compose/TeeAnyVerifier.sol:TeeAnyVerifier | +| __paused | uint8 | 201 | 1 | 1 | contracts/verifiers/compose/TeeAnyVerifier.sol:TeeAnyVerifier | +| lastUnpausedAt | uint64 | 201 | 2 | 8 | contracts/verifiers/compose/TeeAnyVerifier.sol:TeeAnyVerifier | +| __gap | uint256[49] | 202 | 0 | 1568 | contracts/verifiers/compose/TeeAnyVerifier.sol:TeeAnyVerifier | +| __gap | uint256[50] | 251 | 0 | 1600 | contracts/verifiers/compose/TeeAnyVerifier.sol:TeeAnyVerifier | +| __gap | uint256[50] | 301 | 0 | 1600 | contracts/verifiers/compose/TeeAnyVerifier.sol:TeeAnyVerifier | + +## ZkAnyVerifier +| Name | Type | Slot | Offset | Bytes | Contract | +|----------------|-------------|------|--------|-------|-------------------------------------------------------------| +| _initialized | uint8 | 0 | 0 | 1 | contracts/verifiers/compose/ZkAnyVerifier.sol:ZkAnyVerifier | +| _initializing | bool | 0 | 1 | 1 | contracts/verifiers/compose/ZkAnyVerifier.sol:ZkAnyVerifier | +| __gap | uint256[50] | 1 | 0 | 1600 | contracts/verifiers/compose/ZkAnyVerifier.sol:ZkAnyVerifier | +| _owner | address | 51 | 0 | 20 | contracts/verifiers/compose/ZkAnyVerifier.sol:ZkAnyVerifier | +| __gap | uint256[49] | 52 | 0 | 1568 | contracts/verifiers/compose/ZkAnyVerifier.sol:ZkAnyVerifier | +| _pendingOwner | address | 101 | 0 | 20 | contracts/verifiers/compose/ZkAnyVerifier.sol:ZkAnyVerifier | +| __gap | uint256[49] | 102 | 0 | 1568 | contracts/verifiers/compose/ZkAnyVerifier.sol:ZkAnyVerifier | +| addressManager | address | 151 | 0 | 20 | contracts/verifiers/compose/ZkAnyVerifier.sol:ZkAnyVerifier | +| __gap | uint256[49] | 152 | 0 | 1568 | contracts/verifiers/compose/ZkAnyVerifier.sol:ZkAnyVerifier | +| __reentry | uint8 | 201 | 0 | 1 | contracts/verifiers/compose/ZkAnyVerifier.sol:ZkAnyVerifier | +| __paused | uint8 | 201 | 1 | 1 | contracts/verifiers/compose/ZkAnyVerifier.sol:ZkAnyVerifier | +| lastUnpausedAt | uint64 | 201 | 2 | 8 | contracts/verifiers/compose/ZkAnyVerifier.sol:ZkAnyVerifier | +| __gap | uint256[49] | 202 | 0 | 1568 | contracts/verifiers/compose/ZkAnyVerifier.sol:ZkAnyVerifier | +| __gap | uint256[50] | 251 | 0 | 1600 | contracts/verifiers/compose/ZkAnyVerifier.sol:ZkAnyVerifier | +| __gap | uint256[50] | 301 | 0 | 1600 | contracts/verifiers/compose/ZkAnyVerifier.sol:ZkAnyVerifier | + ## HeklaTaikoL1 | Name | Type | Slot | Offset | Bytes | Contract | |----------------|------------------------|------|--------|-------|-----------------------------------------------| @@ -544,259 +619,278 @@ | __gap | uint256[50] | 301 | 0 | 1600 | contracts/hekla/HeklaTaikoL1.sol:HeklaTaikoL1 | ## MainnetBridge -| Name | Type | Slot | Offset | Bytes | Contract | -|----------------|-----------------------------------------|------|--------|-------|---------------------------------------------------| -| _initialized | uint8 | 0 | 0 | 1 | contracts/mainnet/MainnetBridge.sol:MainnetBridge | -| _initializing | bool | 0 | 1 | 1 | contracts/mainnet/MainnetBridge.sol:MainnetBridge | -| __gap | uint256[50] | 1 | 0 | 1600 | contracts/mainnet/MainnetBridge.sol:MainnetBridge | -| _owner | address | 51 | 0 | 20 | contracts/mainnet/MainnetBridge.sol:MainnetBridge | -| __gap | uint256[49] | 52 | 0 | 1568 | contracts/mainnet/MainnetBridge.sol:MainnetBridge | -| _pendingOwner | address | 101 | 0 | 20 | contracts/mainnet/MainnetBridge.sol:MainnetBridge | -| __gap | uint256[49] | 102 | 0 | 1568 | contracts/mainnet/MainnetBridge.sol:MainnetBridge | -| addressManager | address | 151 | 0 | 20 | contracts/mainnet/MainnetBridge.sol:MainnetBridge | -| __gap | uint256[49] | 152 | 0 | 1568 | contracts/mainnet/MainnetBridge.sol:MainnetBridge | -| __reentry | uint8 | 201 | 0 | 1 | contracts/mainnet/MainnetBridge.sol:MainnetBridge | -| __paused | uint8 | 201 | 1 | 1 | contracts/mainnet/MainnetBridge.sol:MainnetBridge | -| lastUnpausedAt | uint64 | 201 | 2 | 8 | contracts/mainnet/MainnetBridge.sol:MainnetBridge | -| __gap | uint256[49] | 202 | 0 | 1568 | contracts/mainnet/MainnetBridge.sol:MainnetBridge | -| __reserved1 | uint64 | 251 | 0 | 8 | contracts/mainnet/MainnetBridge.sol:MainnetBridge | -| nextMessageId | uint64 | 251 | 8 | 8 | contracts/mainnet/MainnetBridge.sol:MainnetBridge | -| messageStatus | mapping(bytes32 => enum IBridge.Status) | 252 | 0 | 32 | contracts/mainnet/MainnetBridge.sol:MainnetBridge | -| __ctx | struct IBridge.Context | 253 | 0 | 64 | contracts/mainnet/MainnetBridge.sol:MainnetBridge | -| __reserved2 | uint256 | 255 | 0 | 32 | contracts/mainnet/MainnetBridge.sol:MainnetBridge | -| __reserved3 | uint256 | 256 | 0 | 32 | contracts/mainnet/MainnetBridge.sol:MainnetBridge | -| __gap | uint256[44] | 257 | 0 | 1408 | contracts/mainnet/MainnetBridge.sol:MainnetBridge | +| Name | Type | Slot | Offset | Bytes | Contract | +|----------------|-----------------------------------------|------|--------|-------|----------------------------------------------------------| +| _initialized | uint8 | 0 | 0 | 1 | contracts/mainnet/shared/MainnetBridge.sol:MainnetBridge | +| _initializing | bool | 0 | 1 | 1 | contracts/mainnet/shared/MainnetBridge.sol:MainnetBridge | +| __gap | uint256[50] | 1 | 0 | 1600 | contracts/mainnet/shared/MainnetBridge.sol:MainnetBridge | +| _owner | address | 51 | 0 | 20 | contracts/mainnet/shared/MainnetBridge.sol:MainnetBridge | +| __gap | uint256[49] | 52 | 0 | 1568 | contracts/mainnet/shared/MainnetBridge.sol:MainnetBridge | +| _pendingOwner | address | 101 | 0 | 20 | contracts/mainnet/shared/MainnetBridge.sol:MainnetBridge | +| __gap | uint256[49] | 102 | 0 | 1568 | contracts/mainnet/shared/MainnetBridge.sol:MainnetBridge | +| addressManager | address | 151 | 0 | 20 | contracts/mainnet/shared/MainnetBridge.sol:MainnetBridge | +| __gap | uint256[49] | 152 | 0 | 1568 | contracts/mainnet/shared/MainnetBridge.sol:MainnetBridge | +| __reentry | uint8 | 201 | 0 | 1 | contracts/mainnet/shared/MainnetBridge.sol:MainnetBridge | +| __paused | uint8 | 201 | 1 | 1 | contracts/mainnet/shared/MainnetBridge.sol:MainnetBridge | +| lastUnpausedAt | uint64 | 201 | 2 | 8 | contracts/mainnet/shared/MainnetBridge.sol:MainnetBridge | +| __gap | uint256[49] | 202 | 0 | 1568 | contracts/mainnet/shared/MainnetBridge.sol:MainnetBridge | +| __reserved1 | uint64 | 251 | 0 | 8 | contracts/mainnet/shared/MainnetBridge.sol:MainnetBridge | +| nextMessageId | uint64 | 251 | 8 | 8 | contracts/mainnet/shared/MainnetBridge.sol:MainnetBridge | +| messageStatus | mapping(bytes32 => enum IBridge.Status) | 252 | 0 | 32 | contracts/mainnet/shared/MainnetBridge.sol:MainnetBridge | +| __ctx | struct IBridge.Context | 253 | 0 | 64 | contracts/mainnet/shared/MainnetBridge.sol:MainnetBridge | +| __reserved2 | uint256 | 255 | 0 | 32 | contracts/mainnet/shared/MainnetBridge.sol:MainnetBridge | +| __reserved3 | uint256 | 256 | 0 | 32 | contracts/mainnet/shared/MainnetBridge.sol:MainnetBridge | +| __gap | uint256[44] | 257 | 0 | 1408 | contracts/mainnet/shared/MainnetBridge.sol:MainnetBridge | ## MainnetERC1155Vault -| Name | Type | Slot | Offset | Bytes | Contract | -|--------------------|------------------------------------------------------|------|--------|-------|---------------------------------------------------------------| -| _initialized | uint8 | 0 | 0 | 1 | contracts/mainnet/MainnetERC1155Vault.sol:MainnetERC1155Vault | -| _initializing | bool | 0 | 1 | 1 | contracts/mainnet/MainnetERC1155Vault.sol:MainnetERC1155Vault | -| __gap | uint256[50] | 1 | 0 | 1600 | contracts/mainnet/MainnetERC1155Vault.sol:MainnetERC1155Vault | -| _owner | address | 51 | 0 | 20 | contracts/mainnet/MainnetERC1155Vault.sol:MainnetERC1155Vault | -| __gap | uint256[49] | 52 | 0 | 1568 | contracts/mainnet/MainnetERC1155Vault.sol:MainnetERC1155Vault | -| _pendingOwner | address | 101 | 0 | 20 | contracts/mainnet/MainnetERC1155Vault.sol:MainnetERC1155Vault | -| __gap | uint256[49] | 102 | 0 | 1568 | contracts/mainnet/MainnetERC1155Vault.sol:MainnetERC1155Vault | -| addressManager | address | 151 | 0 | 20 | contracts/mainnet/MainnetERC1155Vault.sol:MainnetERC1155Vault | -| __gap | uint256[49] | 152 | 0 | 1568 | contracts/mainnet/MainnetERC1155Vault.sol:MainnetERC1155Vault | -| __reentry | uint8 | 201 | 0 | 1 | contracts/mainnet/MainnetERC1155Vault.sol:MainnetERC1155Vault | -| __paused | uint8 | 201 | 1 | 1 | contracts/mainnet/MainnetERC1155Vault.sol:MainnetERC1155Vault | -| lastUnpausedAt | uint64 | 201 | 2 | 8 | contracts/mainnet/MainnetERC1155Vault.sol:MainnetERC1155Vault | -| __gap | uint256[49] | 202 | 0 | 1568 | contracts/mainnet/MainnetERC1155Vault.sol:MainnetERC1155Vault | -| __gap | uint256[50] | 251 | 0 | 1600 | contracts/mainnet/MainnetERC1155Vault.sol:MainnetERC1155Vault | -| bridgedToCanonical | mapping(address => struct BaseNFTVault.CanonicalNFT) | 301 | 0 | 32 | contracts/mainnet/MainnetERC1155Vault.sol:MainnetERC1155Vault | -| canonicalToBridged | mapping(uint256 => mapping(address => address)) | 302 | 0 | 32 | contracts/mainnet/MainnetERC1155Vault.sol:MainnetERC1155Vault | -| __gap | uint256[48] | 303 | 0 | 1536 | contracts/mainnet/MainnetERC1155Vault.sol:MainnetERC1155Vault | -| __gap | uint256[50] | 351 | 0 | 1600 | contracts/mainnet/MainnetERC1155Vault.sol:MainnetERC1155Vault | -| __gap | uint256[50] | 401 | 0 | 1600 | contracts/mainnet/MainnetERC1155Vault.sol:MainnetERC1155Vault | -| __gap | uint256[50] | 451 | 0 | 1600 | contracts/mainnet/MainnetERC1155Vault.sol:MainnetERC1155Vault | +| Name | Type | Slot | Offset | Bytes | Contract | +|--------------------|------------------------------------------------------|------|--------|-------|----------------------------------------------------------------------| +| _initialized | uint8 | 0 | 0 | 1 | contracts/mainnet/shared/MainnetERC1155Vault.sol:MainnetERC1155Vault | +| _initializing | bool | 0 | 1 | 1 | contracts/mainnet/shared/MainnetERC1155Vault.sol:MainnetERC1155Vault | +| __gap | uint256[50] | 1 | 0 | 1600 | contracts/mainnet/shared/MainnetERC1155Vault.sol:MainnetERC1155Vault | +| _owner | address | 51 | 0 | 20 | contracts/mainnet/shared/MainnetERC1155Vault.sol:MainnetERC1155Vault | +| __gap | uint256[49] | 52 | 0 | 1568 | contracts/mainnet/shared/MainnetERC1155Vault.sol:MainnetERC1155Vault | +| _pendingOwner | address | 101 | 0 | 20 | contracts/mainnet/shared/MainnetERC1155Vault.sol:MainnetERC1155Vault | +| __gap | uint256[49] | 102 | 0 | 1568 | contracts/mainnet/shared/MainnetERC1155Vault.sol:MainnetERC1155Vault | +| addressManager | address | 151 | 0 | 20 | contracts/mainnet/shared/MainnetERC1155Vault.sol:MainnetERC1155Vault | +| __gap | uint256[49] | 152 | 0 | 1568 | contracts/mainnet/shared/MainnetERC1155Vault.sol:MainnetERC1155Vault | +| __reentry | uint8 | 201 | 0 | 1 | contracts/mainnet/shared/MainnetERC1155Vault.sol:MainnetERC1155Vault | +| __paused | uint8 | 201 | 1 | 1 | contracts/mainnet/shared/MainnetERC1155Vault.sol:MainnetERC1155Vault | +| lastUnpausedAt | uint64 | 201 | 2 | 8 | contracts/mainnet/shared/MainnetERC1155Vault.sol:MainnetERC1155Vault | +| __gap | uint256[49] | 202 | 0 | 1568 | contracts/mainnet/shared/MainnetERC1155Vault.sol:MainnetERC1155Vault | +| __gap | uint256[50] | 251 | 0 | 1600 | contracts/mainnet/shared/MainnetERC1155Vault.sol:MainnetERC1155Vault | +| bridgedToCanonical | mapping(address => struct BaseNFTVault.CanonicalNFT) | 301 | 0 | 32 | contracts/mainnet/shared/MainnetERC1155Vault.sol:MainnetERC1155Vault | +| canonicalToBridged | mapping(uint256 => mapping(address => address)) | 302 | 0 | 32 | contracts/mainnet/shared/MainnetERC1155Vault.sol:MainnetERC1155Vault | +| __gap | uint256[48] | 303 | 0 | 1536 | contracts/mainnet/shared/MainnetERC1155Vault.sol:MainnetERC1155Vault | +| __gap | uint256[50] | 351 | 0 | 1600 | contracts/mainnet/shared/MainnetERC1155Vault.sol:MainnetERC1155Vault | +| __gap | uint256[50] | 401 | 0 | 1600 | contracts/mainnet/shared/MainnetERC1155Vault.sol:MainnetERC1155Vault | +| __gap | uint256[50] | 451 | 0 | 1600 | contracts/mainnet/shared/MainnetERC1155Vault.sol:MainnetERC1155Vault | ## MainnetERC20Vault -| Name | Type | Slot | Offset | Bytes | Contract | -|--------------------|------------------------------------------------------|------|--------|-------|-----------------------------------------------------------| -| _initialized | uint8 | 0 | 0 | 1 | contracts/mainnet/MainnetERC20Vault.sol:MainnetERC20Vault | -| _initializing | bool | 0 | 1 | 1 | contracts/mainnet/MainnetERC20Vault.sol:MainnetERC20Vault | -| __gap | uint256[50] | 1 | 0 | 1600 | contracts/mainnet/MainnetERC20Vault.sol:MainnetERC20Vault | -| _owner | address | 51 | 0 | 20 | contracts/mainnet/MainnetERC20Vault.sol:MainnetERC20Vault | -| __gap | uint256[49] | 52 | 0 | 1568 | contracts/mainnet/MainnetERC20Vault.sol:MainnetERC20Vault | -| _pendingOwner | address | 101 | 0 | 20 | contracts/mainnet/MainnetERC20Vault.sol:MainnetERC20Vault | -| __gap | uint256[49] | 102 | 0 | 1568 | contracts/mainnet/MainnetERC20Vault.sol:MainnetERC20Vault | -| addressManager | address | 151 | 0 | 20 | contracts/mainnet/MainnetERC20Vault.sol:MainnetERC20Vault | -| __gap | uint256[49] | 152 | 0 | 1568 | contracts/mainnet/MainnetERC20Vault.sol:MainnetERC20Vault | -| __reentry | uint8 | 201 | 0 | 1 | contracts/mainnet/MainnetERC20Vault.sol:MainnetERC20Vault | -| __paused | uint8 | 201 | 1 | 1 | contracts/mainnet/MainnetERC20Vault.sol:MainnetERC20Vault | -| lastUnpausedAt | uint64 | 201 | 2 | 8 | contracts/mainnet/MainnetERC20Vault.sol:MainnetERC20Vault | -| __gap | uint256[49] | 202 | 0 | 1568 | contracts/mainnet/MainnetERC20Vault.sol:MainnetERC20Vault | -| __gap | uint256[50] | 251 | 0 | 1600 | contracts/mainnet/MainnetERC20Vault.sol:MainnetERC20Vault | -| bridgedToCanonical | mapping(address => struct ERC20Vault.CanonicalERC20) | 301 | 0 | 32 | contracts/mainnet/MainnetERC20Vault.sol:MainnetERC20Vault | -| canonicalToBridged | mapping(uint256 => mapping(address => address)) | 302 | 0 | 32 | contracts/mainnet/MainnetERC20Vault.sol:MainnetERC20Vault | -| btokenDenylist | mapping(address => bool) | 303 | 0 | 32 | contracts/mainnet/MainnetERC20Vault.sol:MainnetERC20Vault | -| lastMigrationStart | mapping(uint256 => mapping(address => uint256)) | 304 | 0 | 32 | contracts/mainnet/MainnetERC20Vault.sol:MainnetERC20Vault | -| __gap | uint256[46] | 305 | 0 | 1472 | contracts/mainnet/MainnetERC20Vault.sol:MainnetERC20Vault | +| Name | Type | Slot | Offset | Bytes | Contract | +|--------------------|------------------------------------------------------|------|--------|-------|------------------------------------------------------------------| +| _initialized | uint8 | 0 | 0 | 1 | contracts/mainnet/shared/MainnetERC20Vault.sol:MainnetERC20Vault | +| _initializing | bool | 0 | 1 | 1 | contracts/mainnet/shared/MainnetERC20Vault.sol:MainnetERC20Vault | +| __gap | uint256[50] | 1 | 0 | 1600 | contracts/mainnet/shared/MainnetERC20Vault.sol:MainnetERC20Vault | +| _owner | address | 51 | 0 | 20 | contracts/mainnet/shared/MainnetERC20Vault.sol:MainnetERC20Vault | +| __gap | uint256[49] | 52 | 0 | 1568 | contracts/mainnet/shared/MainnetERC20Vault.sol:MainnetERC20Vault | +| _pendingOwner | address | 101 | 0 | 20 | contracts/mainnet/shared/MainnetERC20Vault.sol:MainnetERC20Vault | +| __gap | uint256[49] | 102 | 0 | 1568 | contracts/mainnet/shared/MainnetERC20Vault.sol:MainnetERC20Vault | +| addressManager | address | 151 | 0 | 20 | contracts/mainnet/shared/MainnetERC20Vault.sol:MainnetERC20Vault | +| __gap | uint256[49] | 152 | 0 | 1568 | contracts/mainnet/shared/MainnetERC20Vault.sol:MainnetERC20Vault | +| __reentry | uint8 | 201 | 0 | 1 | contracts/mainnet/shared/MainnetERC20Vault.sol:MainnetERC20Vault | +| __paused | uint8 | 201 | 1 | 1 | contracts/mainnet/shared/MainnetERC20Vault.sol:MainnetERC20Vault | +| lastUnpausedAt | uint64 | 201 | 2 | 8 | contracts/mainnet/shared/MainnetERC20Vault.sol:MainnetERC20Vault | +| __gap | uint256[49] | 202 | 0 | 1568 | contracts/mainnet/shared/MainnetERC20Vault.sol:MainnetERC20Vault | +| __gap | uint256[50] | 251 | 0 | 1600 | contracts/mainnet/shared/MainnetERC20Vault.sol:MainnetERC20Vault | +| bridgedToCanonical | mapping(address => struct ERC20Vault.CanonicalERC20) | 301 | 0 | 32 | contracts/mainnet/shared/MainnetERC20Vault.sol:MainnetERC20Vault | +| canonicalToBridged | mapping(uint256 => mapping(address => address)) | 302 | 0 | 32 | contracts/mainnet/shared/MainnetERC20Vault.sol:MainnetERC20Vault | +| btokenDenylist | mapping(address => bool) | 303 | 0 | 32 | contracts/mainnet/shared/MainnetERC20Vault.sol:MainnetERC20Vault | +| lastMigrationStart | mapping(uint256 => mapping(address => uint256)) | 304 | 0 | 32 | contracts/mainnet/shared/MainnetERC20Vault.sol:MainnetERC20Vault | +| __gap | uint256[46] | 305 | 0 | 1472 | contracts/mainnet/shared/MainnetERC20Vault.sol:MainnetERC20Vault | ## MainnetERC721Vault -| Name | Type | Slot | Offset | Bytes | Contract | -|--------------------|------------------------------------------------------|------|--------|-------|-------------------------------------------------------------| -| _initialized | uint8 | 0 | 0 | 1 | contracts/mainnet/MainnetERC721Vault.sol:MainnetERC721Vault | -| _initializing | bool | 0 | 1 | 1 | contracts/mainnet/MainnetERC721Vault.sol:MainnetERC721Vault | -| __gap | uint256[50] | 1 | 0 | 1600 | contracts/mainnet/MainnetERC721Vault.sol:MainnetERC721Vault | -| _owner | address | 51 | 0 | 20 | contracts/mainnet/MainnetERC721Vault.sol:MainnetERC721Vault | -| __gap | uint256[49] | 52 | 0 | 1568 | contracts/mainnet/MainnetERC721Vault.sol:MainnetERC721Vault | -| _pendingOwner | address | 101 | 0 | 20 | contracts/mainnet/MainnetERC721Vault.sol:MainnetERC721Vault | -| __gap | uint256[49] | 102 | 0 | 1568 | contracts/mainnet/MainnetERC721Vault.sol:MainnetERC721Vault | -| addressManager | address | 151 | 0 | 20 | contracts/mainnet/MainnetERC721Vault.sol:MainnetERC721Vault | -| __gap | uint256[49] | 152 | 0 | 1568 | contracts/mainnet/MainnetERC721Vault.sol:MainnetERC721Vault | -| __reentry | uint8 | 201 | 0 | 1 | contracts/mainnet/MainnetERC721Vault.sol:MainnetERC721Vault | -| __paused | uint8 | 201 | 1 | 1 | contracts/mainnet/MainnetERC721Vault.sol:MainnetERC721Vault | -| lastUnpausedAt | uint64 | 201 | 2 | 8 | contracts/mainnet/MainnetERC721Vault.sol:MainnetERC721Vault | -| __gap | uint256[49] | 202 | 0 | 1568 | contracts/mainnet/MainnetERC721Vault.sol:MainnetERC721Vault | -| __gap | uint256[50] | 251 | 0 | 1600 | contracts/mainnet/MainnetERC721Vault.sol:MainnetERC721Vault | -| bridgedToCanonical | mapping(address => struct BaseNFTVault.CanonicalNFT) | 301 | 0 | 32 | contracts/mainnet/MainnetERC721Vault.sol:MainnetERC721Vault | -| canonicalToBridged | mapping(uint256 => mapping(address => address)) | 302 | 0 | 32 | contracts/mainnet/MainnetERC721Vault.sol:MainnetERC721Vault | -| __gap | uint256[48] | 303 | 0 | 1536 | contracts/mainnet/MainnetERC721Vault.sol:MainnetERC721Vault | -| __gap | uint256[50] | 351 | 0 | 1600 | contracts/mainnet/MainnetERC721Vault.sol:MainnetERC721Vault | +| Name | Type | Slot | Offset | Bytes | Contract | +|--------------------|------------------------------------------------------|------|--------|-------|--------------------------------------------------------------------| +| _initialized | uint8 | 0 | 0 | 1 | contracts/mainnet/shared/MainnetERC721Vault.sol:MainnetERC721Vault | +| _initializing | bool | 0 | 1 | 1 | contracts/mainnet/shared/MainnetERC721Vault.sol:MainnetERC721Vault | +| __gap | uint256[50] | 1 | 0 | 1600 | contracts/mainnet/shared/MainnetERC721Vault.sol:MainnetERC721Vault | +| _owner | address | 51 | 0 | 20 | contracts/mainnet/shared/MainnetERC721Vault.sol:MainnetERC721Vault | +| __gap | uint256[49] | 52 | 0 | 1568 | contracts/mainnet/shared/MainnetERC721Vault.sol:MainnetERC721Vault | +| _pendingOwner | address | 101 | 0 | 20 | contracts/mainnet/shared/MainnetERC721Vault.sol:MainnetERC721Vault | +| __gap | uint256[49] | 102 | 0 | 1568 | contracts/mainnet/shared/MainnetERC721Vault.sol:MainnetERC721Vault | +| addressManager | address | 151 | 0 | 20 | contracts/mainnet/shared/MainnetERC721Vault.sol:MainnetERC721Vault | +| __gap | uint256[49] | 152 | 0 | 1568 | contracts/mainnet/shared/MainnetERC721Vault.sol:MainnetERC721Vault | +| __reentry | uint8 | 201 | 0 | 1 | contracts/mainnet/shared/MainnetERC721Vault.sol:MainnetERC721Vault | +| __paused | uint8 | 201 | 1 | 1 | contracts/mainnet/shared/MainnetERC721Vault.sol:MainnetERC721Vault | +| lastUnpausedAt | uint64 | 201 | 2 | 8 | contracts/mainnet/shared/MainnetERC721Vault.sol:MainnetERC721Vault | +| __gap | uint256[49] | 202 | 0 | 1568 | contracts/mainnet/shared/MainnetERC721Vault.sol:MainnetERC721Vault | +| __gap | uint256[50] | 251 | 0 | 1600 | contracts/mainnet/shared/MainnetERC721Vault.sol:MainnetERC721Vault | +| bridgedToCanonical | mapping(address => struct BaseNFTVault.CanonicalNFT) | 301 | 0 | 32 | contracts/mainnet/shared/MainnetERC721Vault.sol:MainnetERC721Vault | +| canonicalToBridged | mapping(uint256 => mapping(address => address)) | 302 | 0 | 32 | contracts/mainnet/shared/MainnetERC721Vault.sol:MainnetERC721Vault | +| __gap | uint256[48] | 303 | 0 | 1536 | contracts/mainnet/shared/MainnetERC721Vault.sol:MainnetERC721Vault | +| __gap | uint256[50] | 351 | 0 | 1600 | contracts/mainnet/shared/MainnetERC721Vault.sol:MainnetERC721Vault | ## MainnetGuardianProver -| Name | Type | Slot | Offset | Bytes | Contract | -|-------------------------|-------------------------------------------------|------|--------|-------|-------------------------------------------------------------------| -| _initialized | uint8 | 0 | 0 | 1 | contracts/mainnet/MainnetGuardianProver.sol:MainnetGuardianProver | -| _initializing | bool | 0 | 1 | 1 | contracts/mainnet/MainnetGuardianProver.sol:MainnetGuardianProver | -| __gap | uint256[50] | 1 | 0 | 1600 | contracts/mainnet/MainnetGuardianProver.sol:MainnetGuardianProver | -| _owner | address | 51 | 0 | 20 | contracts/mainnet/MainnetGuardianProver.sol:MainnetGuardianProver | -| __gap | uint256[49] | 52 | 0 | 1568 | contracts/mainnet/MainnetGuardianProver.sol:MainnetGuardianProver | -| _pendingOwner | address | 101 | 0 | 20 | contracts/mainnet/MainnetGuardianProver.sol:MainnetGuardianProver | -| __gap | uint256[49] | 102 | 0 | 1568 | contracts/mainnet/MainnetGuardianProver.sol:MainnetGuardianProver | -| addressManager | address | 151 | 0 | 20 | contracts/mainnet/MainnetGuardianProver.sol:MainnetGuardianProver | -| __gap | uint256[49] | 152 | 0 | 1568 | contracts/mainnet/MainnetGuardianProver.sol:MainnetGuardianProver | -| __reentry | uint8 | 201 | 0 | 1 | contracts/mainnet/MainnetGuardianProver.sol:MainnetGuardianProver | -| __paused | uint8 | 201 | 1 | 1 | contracts/mainnet/MainnetGuardianProver.sol:MainnetGuardianProver | -| lastUnpausedAt | uint64 | 201 | 2 | 8 | contracts/mainnet/MainnetGuardianProver.sol:MainnetGuardianProver | -| __gap | uint256[49] | 202 | 0 | 1568 | contracts/mainnet/MainnetGuardianProver.sol:MainnetGuardianProver | -| guardianIds | mapping(address => uint256) | 251 | 0 | 32 | contracts/mainnet/MainnetGuardianProver.sol:MainnetGuardianProver | -| approvals | mapping(uint256 => mapping(bytes32 => uint256)) | 252 | 0 | 32 | contracts/mainnet/MainnetGuardianProver.sol:MainnetGuardianProver | -| guardians | address[] | 253 | 0 | 32 | contracts/mainnet/MainnetGuardianProver.sol:MainnetGuardianProver | -| version | uint32 | 254 | 0 | 4 | contracts/mainnet/MainnetGuardianProver.sol:MainnetGuardianProver | -| minGuardians | uint32 | 254 | 4 | 4 | contracts/mainnet/MainnetGuardianProver.sol:MainnetGuardianProver | -| provingAutoPauseEnabled | bool | 254 | 8 | 1 | contracts/mainnet/MainnetGuardianProver.sol:MainnetGuardianProver | -| latestProofHash | mapping(uint256 => mapping(uint256 => bytes32)) | 255 | 0 | 32 | contracts/mainnet/MainnetGuardianProver.sol:MainnetGuardianProver | -| __gap | uint256[45] | 256 | 0 | 1440 | contracts/mainnet/MainnetGuardianProver.sol:MainnetGuardianProver | +| Name | Type | Slot | Offset | Bytes | Contract | +|-------------------------|-------------------------------------------------|------|--------|-------|--------------------------------------------------------------------------| +| _initialized | uint8 | 0 | 0 | 1 | contracts/mainnet/rollup/MainnetGuardianProver.sol:MainnetGuardianProver | +| _initializing | bool | 0 | 1 | 1 | contracts/mainnet/rollup/MainnetGuardianProver.sol:MainnetGuardianProver | +| __gap | uint256[50] | 1 | 0 | 1600 | contracts/mainnet/rollup/MainnetGuardianProver.sol:MainnetGuardianProver | +| _owner | address | 51 | 0 | 20 | contracts/mainnet/rollup/MainnetGuardianProver.sol:MainnetGuardianProver | +| __gap | uint256[49] | 52 | 0 | 1568 | contracts/mainnet/rollup/MainnetGuardianProver.sol:MainnetGuardianProver | +| _pendingOwner | address | 101 | 0 | 20 | contracts/mainnet/rollup/MainnetGuardianProver.sol:MainnetGuardianProver | +| __gap | uint256[49] | 102 | 0 | 1568 | contracts/mainnet/rollup/MainnetGuardianProver.sol:MainnetGuardianProver | +| addressManager | address | 151 | 0 | 20 | contracts/mainnet/rollup/MainnetGuardianProver.sol:MainnetGuardianProver | +| __gap | uint256[49] | 152 | 0 | 1568 | contracts/mainnet/rollup/MainnetGuardianProver.sol:MainnetGuardianProver | +| __reentry | uint8 | 201 | 0 | 1 | contracts/mainnet/rollup/MainnetGuardianProver.sol:MainnetGuardianProver | +| __paused | uint8 | 201 | 1 | 1 | contracts/mainnet/rollup/MainnetGuardianProver.sol:MainnetGuardianProver | +| lastUnpausedAt | uint64 | 201 | 2 | 8 | contracts/mainnet/rollup/MainnetGuardianProver.sol:MainnetGuardianProver | +| __gap | uint256[49] | 202 | 0 | 1568 | contracts/mainnet/rollup/MainnetGuardianProver.sol:MainnetGuardianProver | +| guardianIds | mapping(address => uint256) | 251 | 0 | 32 | contracts/mainnet/rollup/MainnetGuardianProver.sol:MainnetGuardianProver | +| approvals | mapping(uint256 => mapping(bytes32 => uint256)) | 252 | 0 | 32 | contracts/mainnet/rollup/MainnetGuardianProver.sol:MainnetGuardianProver | +| guardians | address[] | 253 | 0 | 32 | contracts/mainnet/rollup/MainnetGuardianProver.sol:MainnetGuardianProver | +| version | uint32 | 254 | 0 | 4 | contracts/mainnet/rollup/MainnetGuardianProver.sol:MainnetGuardianProver | +| minGuardians | uint32 | 254 | 4 | 4 | contracts/mainnet/rollup/MainnetGuardianProver.sol:MainnetGuardianProver | +| provingAutoPauseEnabled | bool | 254 | 8 | 1 | contracts/mainnet/rollup/MainnetGuardianProver.sol:MainnetGuardianProver | +| latestProofHash | mapping(uint256 => mapping(uint256 => bytes32)) | 255 | 0 | 32 | contracts/mainnet/rollup/MainnetGuardianProver.sol:MainnetGuardianProver | +| __gap | uint256[45] | 256 | 0 | 1440 | contracts/mainnet/rollup/MainnetGuardianProver.sol:MainnetGuardianProver | ## MainnetProverSet -| Name | Type | Slot | Offset | Bytes | Contract | -|----------------|--------------------------|------|--------|-------|---------------------------------------------------------| -| _initialized | uint8 | 0 | 0 | 1 | contracts/mainnet/MainnetProverSet.sol:MainnetProverSet | -| _initializing | bool | 0 | 1 | 1 | contracts/mainnet/MainnetProverSet.sol:MainnetProverSet | -| __gap | uint256[50] | 1 | 0 | 1600 | contracts/mainnet/MainnetProverSet.sol:MainnetProverSet | -| _owner | address | 51 | 0 | 20 | contracts/mainnet/MainnetProverSet.sol:MainnetProverSet | -| __gap | uint256[49] | 52 | 0 | 1568 | contracts/mainnet/MainnetProverSet.sol:MainnetProverSet | -| _pendingOwner | address | 101 | 0 | 20 | contracts/mainnet/MainnetProverSet.sol:MainnetProverSet | -| __gap | uint256[49] | 102 | 0 | 1568 | contracts/mainnet/MainnetProverSet.sol:MainnetProverSet | -| addressManager | address | 151 | 0 | 20 | contracts/mainnet/MainnetProverSet.sol:MainnetProverSet | -| __gap | uint256[49] | 152 | 0 | 1568 | contracts/mainnet/MainnetProverSet.sol:MainnetProverSet | -| __reentry | uint8 | 201 | 0 | 1 | contracts/mainnet/MainnetProverSet.sol:MainnetProverSet | -| __paused | uint8 | 201 | 1 | 1 | contracts/mainnet/MainnetProverSet.sol:MainnetProverSet | -| lastUnpausedAt | uint64 | 201 | 2 | 8 | contracts/mainnet/MainnetProverSet.sol:MainnetProverSet | -| __gap | uint256[49] | 202 | 0 | 1568 | contracts/mainnet/MainnetProverSet.sol:MainnetProverSet | -| isProver | mapping(address => bool) | 251 | 0 | 32 | contracts/mainnet/MainnetProverSet.sol:MainnetProverSet | -| admin | address | 252 | 0 | 20 | contracts/mainnet/MainnetProverSet.sol:MainnetProverSet | -| __gap | uint256[48] | 253 | 0 | 1536 | contracts/mainnet/MainnetProverSet.sol:MainnetProverSet | - -## MainnetRiscZeroVerifier -| Name | Type | Slot | Offset | Bytes | Contract | -|----------------|--------------------------|------|--------|-------|-----------------------------------------------------------------------| -| _initialized | uint8 | 0 | 0 | 1 | contracts/mainnet/MainnetRiscZeroVerifier.sol:MainnetRiscZeroVerifier | -| _initializing | bool | 0 | 1 | 1 | contracts/mainnet/MainnetRiscZeroVerifier.sol:MainnetRiscZeroVerifier | -| __gap | uint256[50] | 1 | 0 | 1600 | contracts/mainnet/MainnetRiscZeroVerifier.sol:MainnetRiscZeroVerifier | -| _owner | address | 51 | 0 | 20 | contracts/mainnet/MainnetRiscZeroVerifier.sol:MainnetRiscZeroVerifier | -| __gap | uint256[49] | 52 | 0 | 1568 | contracts/mainnet/MainnetRiscZeroVerifier.sol:MainnetRiscZeroVerifier | -| _pendingOwner | address | 101 | 0 | 20 | contracts/mainnet/MainnetRiscZeroVerifier.sol:MainnetRiscZeroVerifier | -| __gap | uint256[49] | 102 | 0 | 1568 | contracts/mainnet/MainnetRiscZeroVerifier.sol:MainnetRiscZeroVerifier | -| addressManager | address | 151 | 0 | 20 | contracts/mainnet/MainnetRiscZeroVerifier.sol:MainnetRiscZeroVerifier | -| __gap | uint256[49] | 152 | 0 | 1568 | contracts/mainnet/MainnetRiscZeroVerifier.sol:MainnetRiscZeroVerifier | -| __reentry | uint8 | 201 | 0 | 1 | contracts/mainnet/MainnetRiscZeroVerifier.sol:MainnetRiscZeroVerifier | -| __paused | uint8 | 201 | 1 | 1 | contracts/mainnet/MainnetRiscZeroVerifier.sol:MainnetRiscZeroVerifier | -| lastUnpausedAt | uint64 | 201 | 2 | 8 | contracts/mainnet/MainnetRiscZeroVerifier.sol:MainnetRiscZeroVerifier | -| __gap | uint256[49] | 202 | 0 | 1568 | contracts/mainnet/MainnetRiscZeroVerifier.sol:MainnetRiscZeroVerifier | -| isImageTrusted | mapping(bytes32 => bool) | 251 | 0 | 32 | contracts/mainnet/MainnetRiscZeroVerifier.sol:MainnetRiscZeroVerifier | -| __gap | uint256[49] | 252 | 0 | 1568 | contracts/mainnet/MainnetRiscZeroVerifier.sol:MainnetRiscZeroVerifier | +| Name | Type | Slot | Offset | Bytes | Contract | +|----------------|--------------------------|------|--------|-------|----------------------------------------------------------------| +| _initialized | uint8 | 0 | 0 | 1 | contracts/mainnet/rollup/MainnetProverSet.sol:MainnetProverSet | +| _initializing | bool | 0 | 1 | 1 | contracts/mainnet/rollup/MainnetProverSet.sol:MainnetProverSet | +| __gap | uint256[50] | 1 | 0 | 1600 | contracts/mainnet/rollup/MainnetProverSet.sol:MainnetProverSet | +| _owner | address | 51 | 0 | 20 | contracts/mainnet/rollup/MainnetProverSet.sol:MainnetProverSet | +| __gap | uint256[49] | 52 | 0 | 1568 | contracts/mainnet/rollup/MainnetProverSet.sol:MainnetProverSet | +| _pendingOwner | address | 101 | 0 | 20 | contracts/mainnet/rollup/MainnetProverSet.sol:MainnetProverSet | +| __gap | uint256[49] | 102 | 0 | 1568 | contracts/mainnet/rollup/MainnetProverSet.sol:MainnetProverSet | +| addressManager | address | 151 | 0 | 20 | contracts/mainnet/rollup/MainnetProverSet.sol:MainnetProverSet | +| __gap | uint256[49] | 152 | 0 | 1568 | contracts/mainnet/rollup/MainnetProverSet.sol:MainnetProverSet | +| __reentry | uint8 | 201 | 0 | 1 | contracts/mainnet/rollup/MainnetProverSet.sol:MainnetProverSet | +| __paused | uint8 | 201 | 1 | 1 | contracts/mainnet/rollup/MainnetProverSet.sol:MainnetProverSet | +| lastUnpausedAt | uint64 | 201 | 2 | 8 | contracts/mainnet/rollup/MainnetProverSet.sol:MainnetProverSet | +| __gap | uint256[49] | 202 | 0 | 1568 | contracts/mainnet/rollup/MainnetProverSet.sol:MainnetProverSet | +| isProver | mapping(address => bool) | 251 | 0 | 32 | contracts/mainnet/rollup/MainnetProverSet.sol:MainnetProverSet | +| admin | address | 252 | 0 | 20 | contracts/mainnet/rollup/MainnetProverSet.sol:MainnetProverSet | +| __gap | uint256[48] | 253 | 0 | 1536 | contracts/mainnet/rollup/MainnetProverSet.sol:MainnetProverSet | + +## MainnetRisc0Verifier +| Name | Type | Slot | Offset | Bytes | Contract | +|----------------|--------------------------|------|--------|-------|----------------------------------------------------------------------------------| +| _initialized | uint8 | 0 | 0 | 1 | contracts/mainnet/rollup/verifiers/MainnetRisc0Verifier.sol:MainnetRisc0Verifier | +| _initializing | bool | 0 | 1 | 1 | contracts/mainnet/rollup/verifiers/MainnetRisc0Verifier.sol:MainnetRisc0Verifier | +| __gap | uint256[50] | 1 | 0 | 1600 | contracts/mainnet/rollup/verifiers/MainnetRisc0Verifier.sol:MainnetRisc0Verifier | +| _owner | address | 51 | 0 | 20 | contracts/mainnet/rollup/verifiers/MainnetRisc0Verifier.sol:MainnetRisc0Verifier | +| __gap | uint256[49] | 52 | 0 | 1568 | contracts/mainnet/rollup/verifiers/MainnetRisc0Verifier.sol:MainnetRisc0Verifier | +| _pendingOwner | address | 101 | 0 | 20 | contracts/mainnet/rollup/verifiers/MainnetRisc0Verifier.sol:MainnetRisc0Verifier | +| __gap | uint256[49] | 102 | 0 | 1568 | contracts/mainnet/rollup/verifiers/MainnetRisc0Verifier.sol:MainnetRisc0Verifier | +| addressManager | address | 151 | 0 | 20 | contracts/mainnet/rollup/verifiers/MainnetRisc0Verifier.sol:MainnetRisc0Verifier | +| __gap | uint256[49] | 152 | 0 | 1568 | contracts/mainnet/rollup/verifiers/MainnetRisc0Verifier.sol:MainnetRisc0Verifier | +| __reentry | uint8 | 201 | 0 | 1 | contracts/mainnet/rollup/verifiers/MainnetRisc0Verifier.sol:MainnetRisc0Verifier | +| __paused | uint8 | 201 | 1 | 1 | contracts/mainnet/rollup/verifiers/MainnetRisc0Verifier.sol:MainnetRisc0Verifier | +| lastUnpausedAt | uint64 | 201 | 2 | 8 | contracts/mainnet/rollup/verifiers/MainnetRisc0Verifier.sol:MainnetRisc0Verifier | +| __gap | uint256[49] | 202 | 0 | 1568 | contracts/mainnet/rollup/verifiers/MainnetRisc0Verifier.sol:MainnetRisc0Verifier | +| isImageTrusted | mapping(bytes32 => bool) | 251 | 0 | 32 | contracts/mainnet/rollup/verifiers/MainnetRisc0Verifier.sol:MainnetRisc0Verifier | +| __gap | uint256[49] | 252 | 0 | 1568 | contracts/mainnet/rollup/verifiers/MainnetRisc0Verifier.sol:MainnetRisc0Verifier | + +## MainnetSP1Verifier +| Name | Type | Slot | Offset | Bytes | Contract | +|------------------|--------------------------|------|--------|-------|------------------------------------------------------------------------------| +| _initialized | uint8 | 0 | 0 | 1 | contracts/mainnet/rollup/verifiers/MainnetSP1Verifier.sol:MainnetSP1Verifier | +| _initializing | bool | 0 | 1 | 1 | contracts/mainnet/rollup/verifiers/MainnetSP1Verifier.sol:MainnetSP1Verifier | +| __gap | uint256[50] | 1 | 0 | 1600 | contracts/mainnet/rollup/verifiers/MainnetSP1Verifier.sol:MainnetSP1Verifier | +| _owner | address | 51 | 0 | 20 | contracts/mainnet/rollup/verifiers/MainnetSP1Verifier.sol:MainnetSP1Verifier | +| __gap | uint256[49] | 52 | 0 | 1568 | contracts/mainnet/rollup/verifiers/MainnetSP1Verifier.sol:MainnetSP1Verifier | +| _pendingOwner | address | 101 | 0 | 20 | contracts/mainnet/rollup/verifiers/MainnetSP1Verifier.sol:MainnetSP1Verifier | +| __gap | uint256[49] | 102 | 0 | 1568 | contracts/mainnet/rollup/verifiers/MainnetSP1Verifier.sol:MainnetSP1Verifier | +| addressManager | address | 151 | 0 | 20 | contracts/mainnet/rollup/verifiers/MainnetSP1Verifier.sol:MainnetSP1Verifier | +| __gap | uint256[49] | 152 | 0 | 1568 | contracts/mainnet/rollup/verifiers/MainnetSP1Verifier.sol:MainnetSP1Verifier | +| __reentry | uint8 | 201 | 0 | 1 | contracts/mainnet/rollup/verifiers/MainnetSP1Verifier.sol:MainnetSP1Verifier | +| __paused | uint8 | 201 | 1 | 1 | contracts/mainnet/rollup/verifiers/MainnetSP1Verifier.sol:MainnetSP1Verifier | +| lastUnpausedAt | uint64 | 201 | 2 | 8 | contracts/mainnet/rollup/verifiers/MainnetSP1Verifier.sol:MainnetSP1Verifier | +| __gap | uint256[49] | 202 | 0 | 1568 | contracts/mainnet/rollup/verifiers/MainnetSP1Verifier.sol:MainnetSP1Verifier | +| isProgramTrusted | mapping(bytes32 => bool) | 251 | 0 | 32 | contracts/mainnet/rollup/verifiers/MainnetSP1Verifier.sol:MainnetSP1Verifier | +| __gap | uint256[49] | 252 | 0 | 1568 | contracts/mainnet/rollup/verifiers/MainnetSP1Verifier.sol:MainnetSP1Verifier | ## MainnetRollupAddressManager -| Name | Type | Slot | Offset | Bytes | Contract | -|----------------|-------------------------------------------------|------|--------|-------|-------------------------------------------------------------------------------| -| _initialized | uint8 | 0 | 0 | 1 | contracts/mainnet/MainnetRollupAddressManager.sol:MainnetRollupAddressManager | -| _initializing | bool | 0 | 1 | 1 | contracts/mainnet/MainnetRollupAddressManager.sol:MainnetRollupAddressManager | -| __gap | uint256[50] | 1 | 0 | 1600 | contracts/mainnet/MainnetRollupAddressManager.sol:MainnetRollupAddressManager | -| _owner | address | 51 | 0 | 20 | contracts/mainnet/MainnetRollupAddressManager.sol:MainnetRollupAddressManager | -| __gap | uint256[49] | 52 | 0 | 1568 | contracts/mainnet/MainnetRollupAddressManager.sol:MainnetRollupAddressManager | -| _pendingOwner | address | 101 | 0 | 20 | contracts/mainnet/MainnetRollupAddressManager.sol:MainnetRollupAddressManager | -| __gap | uint256[49] | 102 | 0 | 1568 | contracts/mainnet/MainnetRollupAddressManager.sol:MainnetRollupAddressManager | -| addressManager | address | 151 | 0 | 20 | contracts/mainnet/MainnetRollupAddressManager.sol:MainnetRollupAddressManager | -| __gap | uint256[49] | 152 | 0 | 1568 | contracts/mainnet/MainnetRollupAddressManager.sol:MainnetRollupAddressManager | -| __reentry | uint8 | 201 | 0 | 1 | contracts/mainnet/MainnetRollupAddressManager.sol:MainnetRollupAddressManager | -| __paused | uint8 | 201 | 1 | 1 | contracts/mainnet/MainnetRollupAddressManager.sol:MainnetRollupAddressManager | -| lastUnpausedAt | uint64 | 201 | 2 | 8 | contracts/mainnet/MainnetRollupAddressManager.sol:MainnetRollupAddressManager | -| __gap | uint256[49] | 202 | 0 | 1568 | contracts/mainnet/MainnetRollupAddressManager.sol:MainnetRollupAddressManager | -| __addresses | mapping(uint256 => mapping(bytes32 => address)) | 251 | 0 | 32 | contracts/mainnet/MainnetRollupAddressManager.sol:MainnetRollupAddressManager | -| __gap | uint256[49] | 252 | 0 | 1568 | contracts/mainnet/MainnetRollupAddressManager.sol:MainnetRollupAddressManager | +| Name | Type | Slot | Offset | Bytes | Contract | +|----------------|-------------------------------------------------|------|--------|-------|--------------------------------------------------------------------------------------| +| _initialized | uint8 | 0 | 0 | 1 | contracts/mainnet/rollup/MainnetRollupAddressManager.sol:MainnetRollupAddressManager | +| _initializing | bool | 0 | 1 | 1 | contracts/mainnet/rollup/MainnetRollupAddressManager.sol:MainnetRollupAddressManager | +| __gap | uint256[50] | 1 | 0 | 1600 | contracts/mainnet/rollup/MainnetRollupAddressManager.sol:MainnetRollupAddressManager | +| _owner | address | 51 | 0 | 20 | contracts/mainnet/rollup/MainnetRollupAddressManager.sol:MainnetRollupAddressManager | +| __gap | uint256[49] | 52 | 0 | 1568 | contracts/mainnet/rollup/MainnetRollupAddressManager.sol:MainnetRollupAddressManager | +| _pendingOwner | address | 101 | 0 | 20 | contracts/mainnet/rollup/MainnetRollupAddressManager.sol:MainnetRollupAddressManager | +| __gap | uint256[49] | 102 | 0 | 1568 | contracts/mainnet/rollup/MainnetRollupAddressManager.sol:MainnetRollupAddressManager | +| addressManager | address | 151 | 0 | 20 | contracts/mainnet/rollup/MainnetRollupAddressManager.sol:MainnetRollupAddressManager | +| __gap | uint256[49] | 152 | 0 | 1568 | contracts/mainnet/rollup/MainnetRollupAddressManager.sol:MainnetRollupAddressManager | +| __reentry | uint8 | 201 | 0 | 1 | contracts/mainnet/rollup/MainnetRollupAddressManager.sol:MainnetRollupAddressManager | +| __paused | uint8 | 201 | 1 | 1 | contracts/mainnet/rollup/MainnetRollupAddressManager.sol:MainnetRollupAddressManager | +| lastUnpausedAt | uint64 | 201 | 2 | 8 | contracts/mainnet/rollup/MainnetRollupAddressManager.sol:MainnetRollupAddressManager | +| __gap | uint256[49] | 202 | 0 | 1568 | contracts/mainnet/rollup/MainnetRollupAddressManager.sol:MainnetRollupAddressManager | +| __addresses | mapping(uint256 => mapping(bytes32 => address)) | 251 | 0 | 32 | contracts/mainnet/rollup/MainnetRollupAddressManager.sol:MainnetRollupAddressManager | +| __gap | uint256[49] | 252 | 0 | 1568 | contracts/mainnet/rollup/MainnetRollupAddressManager.sol:MainnetRollupAddressManager | ## MainnetSgxVerifier -| Name | Type | Slot | Offset | Bytes | Contract | -|-------------------|-------------------------------------------------|------|--------|-------|-------------------------------------------------------------| -| _initialized | uint8 | 0 | 0 | 1 | contracts/mainnet/MainnetSgxVerifier.sol:MainnetSgxVerifier | -| _initializing | bool | 0 | 1 | 1 | contracts/mainnet/MainnetSgxVerifier.sol:MainnetSgxVerifier | -| __gap | uint256[50] | 1 | 0 | 1600 | contracts/mainnet/MainnetSgxVerifier.sol:MainnetSgxVerifier | -| _owner | address | 51 | 0 | 20 | contracts/mainnet/MainnetSgxVerifier.sol:MainnetSgxVerifier | -| __gap | uint256[49] | 52 | 0 | 1568 | contracts/mainnet/MainnetSgxVerifier.sol:MainnetSgxVerifier | -| _pendingOwner | address | 101 | 0 | 20 | contracts/mainnet/MainnetSgxVerifier.sol:MainnetSgxVerifier | -| __gap | uint256[49] | 102 | 0 | 1568 | contracts/mainnet/MainnetSgxVerifier.sol:MainnetSgxVerifier | -| addressManager | address | 151 | 0 | 20 | contracts/mainnet/MainnetSgxVerifier.sol:MainnetSgxVerifier | -| __gap | uint256[49] | 152 | 0 | 1568 | contracts/mainnet/MainnetSgxVerifier.sol:MainnetSgxVerifier | -| __reentry | uint8 | 201 | 0 | 1 | contracts/mainnet/MainnetSgxVerifier.sol:MainnetSgxVerifier | -| __paused | uint8 | 201 | 1 | 1 | contracts/mainnet/MainnetSgxVerifier.sol:MainnetSgxVerifier | -| lastUnpausedAt | uint64 | 201 | 2 | 8 | contracts/mainnet/MainnetSgxVerifier.sol:MainnetSgxVerifier | -| __gap | uint256[49] | 202 | 0 | 1568 | contracts/mainnet/MainnetSgxVerifier.sol:MainnetSgxVerifier | -| nextInstanceId | uint256 | 251 | 0 | 32 | contracts/mainnet/MainnetSgxVerifier.sol:MainnetSgxVerifier | -| instances | mapping(uint256 => struct SgxVerifier.Instance) | 252 | 0 | 32 | contracts/mainnet/MainnetSgxVerifier.sol:MainnetSgxVerifier | -| addressRegistered | mapping(address => bool) | 253 | 0 | 32 | contracts/mainnet/MainnetSgxVerifier.sol:MainnetSgxVerifier | -| __gap | uint256[47] | 254 | 0 | 1504 | contracts/mainnet/MainnetSgxVerifier.sol:MainnetSgxVerifier | +| Name | Type | Slot | Offset | Bytes | Contract | +|-------------------|-------------------------------------------------|------|--------|-------|------------------------------------------------------------------------------| +| _initialized | uint8 | 0 | 0 | 1 | contracts/mainnet/rollup/verifiers/MainnetSgxVerifier.sol:MainnetSgxVerifier | +| _initializing | bool | 0 | 1 | 1 | contracts/mainnet/rollup/verifiers/MainnetSgxVerifier.sol:MainnetSgxVerifier | +| __gap | uint256[50] | 1 | 0 | 1600 | contracts/mainnet/rollup/verifiers/MainnetSgxVerifier.sol:MainnetSgxVerifier | +| _owner | address | 51 | 0 | 20 | contracts/mainnet/rollup/verifiers/MainnetSgxVerifier.sol:MainnetSgxVerifier | +| __gap | uint256[49] | 52 | 0 | 1568 | contracts/mainnet/rollup/verifiers/MainnetSgxVerifier.sol:MainnetSgxVerifier | +| _pendingOwner | address | 101 | 0 | 20 | contracts/mainnet/rollup/verifiers/MainnetSgxVerifier.sol:MainnetSgxVerifier | +| __gap | uint256[49] | 102 | 0 | 1568 | contracts/mainnet/rollup/verifiers/MainnetSgxVerifier.sol:MainnetSgxVerifier | +| addressManager | address | 151 | 0 | 20 | contracts/mainnet/rollup/verifiers/MainnetSgxVerifier.sol:MainnetSgxVerifier | +| __gap | uint256[49] | 152 | 0 | 1568 | contracts/mainnet/rollup/verifiers/MainnetSgxVerifier.sol:MainnetSgxVerifier | +| __reentry | uint8 | 201 | 0 | 1 | contracts/mainnet/rollup/verifiers/MainnetSgxVerifier.sol:MainnetSgxVerifier | +| __paused | uint8 | 201 | 1 | 1 | contracts/mainnet/rollup/verifiers/MainnetSgxVerifier.sol:MainnetSgxVerifier | +| lastUnpausedAt | uint64 | 201 | 2 | 8 | contracts/mainnet/rollup/verifiers/MainnetSgxVerifier.sol:MainnetSgxVerifier | +| __gap | uint256[49] | 202 | 0 | 1568 | contracts/mainnet/rollup/verifiers/MainnetSgxVerifier.sol:MainnetSgxVerifier | +| nextInstanceId | uint256 | 251 | 0 | 32 | contracts/mainnet/rollup/verifiers/MainnetSgxVerifier.sol:MainnetSgxVerifier | +| instances | mapping(uint256 => struct SgxVerifier.Instance) | 252 | 0 | 32 | contracts/mainnet/rollup/verifiers/MainnetSgxVerifier.sol:MainnetSgxVerifier | +| addressRegistered | mapping(address => bool) | 253 | 0 | 32 | contracts/mainnet/rollup/verifiers/MainnetSgxVerifier.sol:MainnetSgxVerifier | +| __gap | uint256[47] | 254 | 0 | 1504 | contracts/mainnet/rollup/verifiers/MainnetSgxVerifier.sol:MainnetSgxVerifier | ## MainnetSharedAddressManager -| Name | Type | Slot | Offset | Bytes | Contract | -|----------------|-------------------------------------------------|------|--------|-------|-------------------------------------------------------------------------------| -| _initialized | uint8 | 0 | 0 | 1 | contracts/mainnet/MainnetSharedAddressManager.sol:MainnetSharedAddressManager | -| _initializing | bool | 0 | 1 | 1 | contracts/mainnet/MainnetSharedAddressManager.sol:MainnetSharedAddressManager | -| __gap | uint256[50] | 1 | 0 | 1600 | contracts/mainnet/MainnetSharedAddressManager.sol:MainnetSharedAddressManager | -| _owner | address | 51 | 0 | 20 | contracts/mainnet/MainnetSharedAddressManager.sol:MainnetSharedAddressManager | -| __gap | uint256[49] | 52 | 0 | 1568 | contracts/mainnet/MainnetSharedAddressManager.sol:MainnetSharedAddressManager | -| _pendingOwner | address | 101 | 0 | 20 | contracts/mainnet/MainnetSharedAddressManager.sol:MainnetSharedAddressManager | -| __gap | uint256[49] | 102 | 0 | 1568 | contracts/mainnet/MainnetSharedAddressManager.sol:MainnetSharedAddressManager | -| addressManager | address | 151 | 0 | 20 | contracts/mainnet/MainnetSharedAddressManager.sol:MainnetSharedAddressManager | -| __gap | uint256[49] | 152 | 0 | 1568 | contracts/mainnet/MainnetSharedAddressManager.sol:MainnetSharedAddressManager | -| __reentry | uint8 | 201 | 0 | 1 | contracts/mainnet/MainnetSharedAddressManager.sol:MainnetSharedAddressManager | -| __paused | uint8 | 201 | 1 | 1 | contracts/mainnet/MainnetSharedAddressManager.sol:MainnetSharedAddressManager | -| lastUnpausedAt | uint64 | 201 | 2 | 8 | contracts/mainnet/MainnetSharedAddressManager.sol:MainnetSharedAddressManager | -| __gap | uint256[49] | 202 | 0 | 1568 | contracts/mainnet/MainnetSharedAddressManager.sol:MainnetSharedAddressManager | -| __addresses | mapping(uint256 => mapping(bytes32 => address)) | 251 | 0 | 32 | contracts/mainnet/MainnetSharedAddressManager.sol:MainnetSharedAddressManager | -| __gap | uint256[49] | 252 | 0 | 1568 | contracts/mainnet/MainnetSharedAddressManager.sol:MainnetSharedAddressManager | +| Name | Type | Slot | Offset | Bytes | Contract | +|----------------|-------------------------------------------------|------|--------|-------|--------------------------------------------------------------------------------------| +| _initialized | uint8 | 0 | 0 | 1 | contracts/mainnet/shared/MainnetSharedAddressManager.sol:MainnetSharedAddressManager | +| _initializing | bool | 0 | 1 | 1 | contracts/mainnet/shared/MainnetSharedAddressManager.sol:MainnetSharedAddressManager | +| __gap | uint256[50] | 1 | 0 | 1600 | contracts/mainnet/shared/MainnetSharedAddressManager.sol:MainnetSharedAddressManager | +| _owner | address | 51 | 0 | 20 | contracts/mainnet/shared/MainnetSharedAddressManager.sol:MainnetSharedAddressManager | +| __gap | uint256[49] | 52 | 0 | 1568 | contracts/mainnet/shared/MainnetSharedAddressManager.sol:MainnetSharedAddressManager | +| _pendingOwner | address | 101 | 0 | 20 | contracts/mainnet/shared/MainnetSharedAddressManager.sol:MainnetSharedAddressManager | +| __gap | uint256[49] | 102 | 0 | 1568 | contracts/mainnet/shared/MainnetSharedAddressManager.sol:MainnetSharedAddressManager | +| addressManager | address | 151 | 0 | 20 | contracts/mainnet/shared/MainnetSharedAddressManager.sol:MainnetSharedAddressManager | +| __gap | uint256[49] | 152 | 0 | 1568 | contracts/mainnet/shared/MainnetSharedAddressManager.sol:MainnetSharedAddressManager | +| __reentry | uint8 | 201 | 0 | 1 | contracts/mainnet/shared/MainnetSharedAddressManager.sol:MainnetSharedAddressManager | +| __paused | uint8 | 201 | 1 | 1 | contracts/mainnet/shared/MainnetSharedAddressManager.sol:MainnetSharedAddressManager | +| lastUnpausedAt | uint64 | 201 | 2 | 8 | contracts/mainnet/shared/MainnetSharedAddressManager.sol:MainnetSharedAddressManager | +| __gap | uint256[49] | 202 | 0 | 1568 | contracts/mainnet/shared/MainnetSharedAddressManager.sol:MainnetSharedAddressManager | +| __addresses | mapping(uint256 => mapping(bytes32 => address)) | 251 | 0 | 32 | contracts/mainnet/shared/MainnetSharedAddressManager.sol:MainnetSharedAddressManager | +| __gap | uint256[49] | 252 | 0 | 1568 | contracts/mainnet/shared/MainnetSharedAddressManager.sol:MainnetSharedAddressManager | ## MainnetSignalService -| Name | Type | Slot | Offset | Bytes | Contract | -|----------------|-----------------------------------------------|------|--------|-------|-----------------------------------------------------------------| -| _initialized | uint8 | 0 | 0 | 1 | contracts/mainnet/MainnetSignalService.sol:MainnetSignalService | -| _initializing | bool | 0 | 1 | 1 | contracts/mainnet/MainnetSignalService.sol:MainnetSignalService | -| __gap | uint256[50] | 1 | 0 | 1600 | contracts/mainnet/MainnetSignalService.sol:MainnetSignalService | -| _owner | address | 51 | 0 | 20 | contracts/mainnet/MainnetSignalService.sol:MainnetSignalService | -| __gap | uint256[49] | 52 | 0 | 1568 | contracts/mainnet/MainnetSignalService.sol:MainnetSignalService | -| _pendingOwner | address | 101 | 0 | 20 | contracts/mainnet/MainnetSignalService.sol:MainnetSignalService | -| __gap | uint256[49] | 102 | 0 | 1568 | contracts/mainnet/MainnetSignalService.sol:MainnetSignalService | -| addressManager | address | 151 | 0 | 20 | contracts/mainnet/MainnetSignalService.sol:MainnetSignalService | -| __gap | uint256[49] | 152 | 0 | 1568 | contracts/mainnet/MainnetSignalService.sol:MainnetSignalService | -| __reentry | uint8 | 201 | 0 | 1 | contracts/mainnet/MainnetSignalService.sol:MainnetSignalService | -| __paused | uint8 | 201 | 1 | 1 | contracts/mainnet/MainnetSignalService.sol:MainnetSignalService | -| lastUnpausedAt | uint64 | 201 | 2 | 8 | contracts/mainnet/MainnetSignalService.sol:MainnetSignalService | -| __gap | uint256[49] | 202 | 0 | 1568 | contracts/mainnet/MainnetSignalService.sol:MainnetSignalService | -| topBlockId | mapping(uint64 => mapping(bytes32 => uint64)) | 251 | 0 | 32 | contracts/mainnet/MainnetSignalService.sol:MainnetSignalService | -| isAuthorized | mapping(address => bool) | 252 | 0 | 32 | contracts/mainnet/MainnetSignalService.sol:MainnetSignalService | -| __gap | uint256[48] | 253 | 0 | 1536 | contracts/mainnet/MainnetSignalService.sol:MainnetSignalService | +| Name | Type | Slot | Offset | Bytes | Contract | +|----------------|-----------------------------------------------|------|--------|-------|------------------------------------------------------------------------| +| _initialized | uint8 | 0 | 0 | 1 | contracts/mainnet/shared/MainnetSignalService.sol:MainnetSignalService | +| _initializing | bool | 0 | 1 | 1 | contracts/mainnet/shared/MainnetSignalService.sol:MainnetSignalService | +| __gap | uint256[50] | 1 | 0 | 1600 | contracts/mainnet/shared/MainnetSignalService.sol:MainnetSignalService | +| _owner | address | 51 | 0 | 20 | contracts/mainnet/shared/MainnetSignalService.sol:MainnetSignalService | +| __gap | uint256[49] | 52 | 0 | 1568 | contracts/mainnet/shared/MainnetSignalService.sol:MainnetSignalService | +| _pendingOwner | address | 101 | 0 | 20 | contracts/mainnet/shared/MainnetSignalService.sol:MainnetSignalService | +| __gap | uint256[49] | 102 | 0 | 1568 | contracts/mainnet/shared/MainnetSignalService.sol:MainnetSignalService | +| addressManager | address | 151 | 0 | 20 | contracts/mainnet/shared/MainnetSignalService.sol:MainnetSignalService | +| __gap | uint256[49] | 152 | 0 | 1568 | contracts/mainnet/shared/MainnetSignalService.sol:MainnetSignalService | +| __reentry | uint8 | 201 | 0 | 1 | contracts/mainnet/shared/MainnetSignalService.sol:MainnetSignalService | +| __paused | uint8 | 201 | 1 | 1 | contracts/mainnet/shared/MainnetSignalService.sol:MainnetSignalService | +| lastUnpausedAt | uint64 | 201 | 2 | 8 | contracts/mainnet/shared/MainnetSignalService.sol:MainnetSignalService | +| __gap | uint256[49] | 202 | 0 | 1568 | contracts/mainnet/shared/MainnetSignalService.sol:MainnetSignalService | +| topBlockId | mapping(uint64 => mapping(bytes32 => uint64)) | 251 | 0 | 32 | contracts/mainnet/shared/MainnetSignalService.sol:MainnetSignalService | +| isAuthorized | mapping(address => bool) | 252 | 0 | 32 | contracts/mainnet/shared/MainnetSignalService.sol:MainnetSignalService | +| __gap | uint256[48] | 253 | 0 | 1536 | contracts/mainnet/shared/MainnetSignalService.sol:MainnetSignalService | ## MainnetTaikoL1 -| Name | Type | Slot | Offset | Bytes | Contract | -|----------------|------------------------|------|--------|-------|-----------------------------------------------------| -| _initialized | uint8 | 0 | 0 | 1 | contracts/mainnet/MainnetTaikoL1.sol:MainnetTaikoL1 | -| _initializing | bool | 0 | 1 | 1 | contracts/mainnet/MainnetTaikoL1.sol:MainnetTaikoL1 | -| __gap | uint256[50] | 1 | 0 | 1600 | contracts/mainnet/MainnetTaikoL1.sol:MainnetTaikoL1 | -| _owner | address | 51 | 0 | 20 | contracts/mainnet/MainnetTaikoL1.sol:MainnetTaikoL1 | -| __gap | uint256[49] | 52 | 0 | 1568 | contracts/mainnet/MainnetTaikoL1.sol:MainnetTaikoL1 | -| _pendingOwner | address | 101 | 0 | 20 | contracts/mainnet/MainnetTaikoL1.sol:MainnetTaikoL1 | -| __gap | uint256[49] | 102 | 0 | 1568 | contracts/mainnet/MainnetTaikoL1.sol:MainnetTaikoL1 | -| addressManager | address | 151 | 0 | 20 | contracts/mainnet/MainnetTaikoL1.sol:MainnetTaikoL1 | -| __gap | uint256[49] | 152 | 0 | 1568 | contracts/mainnet/MainnetTaikoL1.sol:MainnetTaikoL1 | -| __reentry | uint8 | 201 | 0 | 1 | contracts/mainnet/MainnetTaikoL1.sol:MainnetTaikoL1 | -| __paused | uint8 | 201 | 1 | 1 | contracts/mainnet/MainnetTaikoL1.sol:MainnetTaikoL1 | -| lastUnpausedAt | uint64 | 201 | 2 | 8 | contracts/mainnet/MainnetTaikoL1.sol:MainnetTaikoL1 | -| __gap | uint256[49] | 202 | 0 | 1568 | contracts/mainnet/MainnetTaikoL1.sol:MainnetTaikoL1 | -| state | struct TaikoData.State | 251 | 0 | 1600 | contracts/mainnet/MainnetTaikoL1.sol:MainnetTaikoL1 | -| __gap | uint256[50] | 301 | 0 | 1600 | contracts/mainnet/MainnetTaikoL1.sol:MainnetTaikoL1 | +| Name | Type | Slot | Offset | Bytes | Contract | +|----------------|------------------------|------|--------|-------|------------------------------------------------------------| +| _initialized | uint8 | 0 | 0 | 1 | contracts/mainnet/rollup/MainnetTaikoL1.sol:MainnetTaikoL1 | +| _initializing | bool | 0 | 1 | 1 | contracts/mainnet/rollup/MainnetTaikoL1.sol:MainnetTaikoL1 | +| __gap | uint256[50] | 1 | 0 | 1600 | contracts/mainnet/rollup/MainnetTaikoL1.sol:MainnetTaikoL1 | +| _owner | address | 51 | 0 | 20 | contracts/mainnet/rollup/MainnetTaikoL1.sol:MainnetTaikoL1 | +| __gap | uint256[49] | 52 | 0 | 1568 | contracts/mainnet/rollup/MainnetTaikoL1.sol:MainnetTaikoL1 | +| _pendingOwner | address | 101 | 0 | 20 | contracts/mainnet/rollup/MainnetTaikoL1.sol:MainnetTaikoL1 | +| __gap | uint256[49] | 102 | 0 | 1568 | contracts/mainnet/rollup/MainnetTaikoL1.sol:MainnetTaikoL1 | +| addressManager | address | 151 | 0 | 20 | contracts/mainnet/rollup/MainnetTaikoL1.sol:MainnetTaikoL1 | +| __gap | uint256[49] | 152 | 0 | 1568 | contracts/mainnet/rollup/MainnetTaikoL1.sol:MainnetTaikoL1 | +| __reentry | uint8 | 201 | 0 | 1 | contracts/mainnet/rollup/MainnetTaikoL1.sol:MainnetTaikoL1 | +| __paused | uint8 | 201 | 1 | 1 | contracts/mainnet/rollup/MainnetTaikoL1.sol:MainnetTaikoL1 | +| lastUnpausedAt | uint64 | 201 | 2 | 8 | contracts/mainnet/rollup/MainnetTaikoL1.sol:MainnetTaikoL1 | +| __gap | uint256[49] | 202 | 0 | 1568 | contracts/mainnet/rollup/MainnetTaikoL1.sol:MainnetTaikoL1 | +| state | struct TaikoData.State | 251 | 0 | 1600 | contracts/mainnet/rollup/MainnetTaikoL1.sol:MainnetTaikoL1 | +| __gap | uint256[50] | 301 | 0 | 1600 | contracts/mainnet/rollup/MainnetTaikoL1.sol:MainnetTaikoL1 | ## MainnetTierRouter | Name | Type | Slot | Offset | Bytes | Contract | diff --git a/packages/protocol/contracts/L1/tiers/ITierProvider.sol b/packages/protocol/contracts/L1/tiers/ITierProvider.sol index 6039b632da6..2ca920354e3 100644 --- a/packages/protocol/contracts/L1/tiers/ITierProvider.sol +++ b/packages/protocol/contracts/L1/tiers/ITierProvider.sol @@ -33,25 +33,3 @@ interface ITierProvider { /// @return The tier id. function getMinTier(address proposer, uint256 rand) external view returns (uint16); } - -/// @dev Tier ID cannot be zero! -library LibTiers { - /// @notice Optimistic tier ID. - uint16 public constant TIER_OPTIMISTIC = 100; - - /// @notice SGX tier ID. - uint16 public constant TIER_SGX = 200; - uint16 public constant TIER_SGX2 = 200; - - // @notice ZKVM risc0 tier ID - uint16 public constant TIER_ZKVM_RISC0 = 290; - - /// @notice SGX + ZKVM tier ID. - uint16 public constant TIER_SGX_ZKVM = 300; - - /// @notice Guardian tier ID with minority approval. - uint16 public constant TIER_GUARDIAN_MINORITY = 900; - - /// @notice Guardian tier ID with majority approval. - uint16 public constant TIER_GUARDIAN = 1000; -} diff --git a/packages/protocol/contracts/L1/tiers/LibTiers.sol b/packages/protocol/contracts/L1/tiers/LibTiers.sol new file mode 100644 index 00000000000..28c9c5f7575 --- /dev/null +++ b/packages/protocol/contracts/L1/tiers/LibTiers.sol @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +/// @title LibTiers +/// @dev Tier ID cannot be zero! +/// @custom:security-contact security@taiko.xyz +library LibTiers { + /// @notice Optimistic tier ID. + uint16 public constant TIER_OPTIMISTIC = 100; + + /// @notice SGX proof + uint16 public constant TIER_SGX = 200; + + /// @notice TDX proof + uint16 public constant TIER_TDX = 200; + + /// @notice Any TEE proof + uint16 public constant TIER_TEE_ANY = 200; + + /// @notice Risc0's ZKVM proof + uint16 public constant TIER_ZKVM_RISC0 = 290; + + /// @notice SP1's ZKVM proof + uint16 public constant TIER_ZKVM_SP1 = 290; + + /// @notice Any ZKVM proof + uint16 public constant TIER_ZKVM_ANY = 290; + + /// @notice Guardian tier ID with minority approval. + uint16 public constant TIER_GUARDIAN_MINORITY = 900; + + /// @notice Guardian tier ID with majority approval. + uint16 public constant TIER_GUARDIAN = 1000; +} diff --git a/packages/protocol/contracts/L1/tiers/TierProviderBase.sol b/packages/protocol/contracts/L1/tiers/TierProviderBase.sol index bbf4fc2ec16..fbccae3cee8 100644 --- a/packages/protocol/contracts/L1/tiers/TierProviderBase.sol +++ b/packages/protocol/contracts/L1/tiers/TierProviderBase.sol @@ -3,6 +3,7 @@ pragma solidity 0.8.24; import "../../common/LibStrings.sol"; import "./ITierProvider.sol"; +import "./LibTiers.sol"; /// @title TierProviderBase /// @custom:security-contact security@taiko.xyz @@ -12,97 +13,86 @@ abstract contract TierProviderBase is ITierProvider { /// service may be paused if gas prices are excessively high. Since block proving is /// asynchronous, this grace period allows provers to defer submissions until gas /// prices become more favorable, potentially reducing transaction costs. - uint16 public constant GRACE_PERIOD = 240; // 4 hours + uint16 public constant GRACE_PERIOD = 240; // minutes + uint96 public constant BOND_UNIT = 75 ether; // TAIKO tokens /// @inheritdoc ITierProvider - /// @notice Each tier, except the top tier, has a validity bond that is 50 TAIKO higher than the + /// @notice Each tier, except the top tier, has a validity bond that is 75 TAIKO higher than the /// previous tier. Additionally, each tier's contest bond is 6.5625 times its validity bond. - function getTier( - uint16 _tierId - ) - public - pure - virtual - override - returns (ITierProvider.Tier memory) - { + function getTier(uint16 _tierId) public pure virtual returns (ITierProvider.Tier memory) { if (_tierId == LibTiers.TIER_OPTIMISTIC) { - return ITierProvider.Tier({ - verifierName: "", - validityBond: 100 ether, // TAIKO - contestBond: 656.25 ether, // = 100 TAIKO * 6.5625 - cooldownWindow: 1440, // 24 hours - provingWindow: GRACE_PERIOD + 15, // 15 minutes - maxBlocksToVerifyPerProof: 0 - }); - } - - if (_tierId == LibTiers.TIER_SGX) { - return ITierProvider.Tier({ - verifierName: LibStrings.B_TIER_SGX, - validityBond: 150 ether, // TAIKO - contestBond: 984.375 ether, // = 150 TAIKO * 6.5625 - cooldownWindow: 1440, // 24 hours - provingWindow: GRACE_PERIOD + 60, // 1 hour - maxBlocksToVerifyPerProof: 0 - }); + // cooldownWindow is 1440 minutes and provingWindow is 15 minutes + return _buildTier("", BOND_UNIT, 1440, 15); } - if (_tierId == LibTiers.TIER_SGX2) { - return ITierProvider.Tier({ - verifierName: LibStrings.B_TIER_SGX2, - validityBond: 150 ether, // TAIKO - contestBond: 984.375 ether, // = 150 TAIKO * 6.5625 - cooldownWindow: 1440, // 24 hours - provingWindow: GRACE_PERIOD + 60, // 1 hour - maxBlocksToVerifyPerProof: 0 - }); - } - - if (_tierId == LibTiers.TIER_ZKVM_RISC0) { - return ITierProvider.Tier({ - verifierName: LibStrings.B_TIER_ZKVM_RISC0, - validityBond: 250 ether, // TAIKO - contestBond: 1640.625 ether, // = 250 TAIKO * 6.5625 - cooldownWindow: 1440, // 24 hours - provingWindow: GRACE_PERIOD + 180, // 3 hours - maxBlocksToVerifyPerProof: 0 - }); - } + // TEE Tiers + if (_tierId == LibTiers.TIER_SGX) return _buildTeeTier(LibStrings.B_TIER_SGX); + if (_tierId == LibTiers.TIER_TDX) return _buildTeeTier(LibStrings.B_TIER_TDX); + if (_tierId == LibTiers.TIER_TEE_ANY) return _buildTeeTier(LibStrings.B_TIER_TEE_ANY); - if (_tierId == LibTiers.TIER_SGX_ZKVM) { - return ITierProvider.Tier({ - verifierName: LibStrings.B_TIER_SGX_ZKVM, - validityBond: 300 ether, // TAIKO - contestBond: 1968.75 ether, // = 300 TAIKO * 6.5625 - cooldownWindow: 1440, // 24 hours - provingWindow: GRACE_PERIOD + 240, // 4 hours - maxBlocksToVerifyPerProof: 0 - }); - } + // ZKVM Tiers + if (_tierId == LibTiers.TIER_ZKVM_RISC0) return _buildZkTier(LibStrings.B_TIER_ZKVM_RISC0); + if (_tierId == LibTiers.TIER_ZKVM_SP1) return _buildZkTier(LibStrings.B_TIER_ZKVM_SP1); + if (_tierId == LibTiers.TIER_ZKVM_ANY) return _buildZkTier(LibStrings.B_TIER_ZKVM_ANY); if (_tierId == LibTiers.TIER_GUARDIAN_MINORITY) { - return ITierProvider.Tier({ - verifierName: LibStrings.B_TIER_GUARDIAN_MINORITY, - validityBond: 350 ether, // TAIKO - contestBond: 2296.875 ether, // = 350 TAIKO * 6.5625 - cooldownWindow: GRACE_PERIOD + 240, // 4 hours - provingWindow: 2880, // 48 hours - maxBlocksToVerifyPerProof: 0 - }); + // cooldownWindow is 240 minutes and provingWindow is 2880 minutes + return _buildTier(LibStrings.B_TIER_GUARDIAN_MINORITY, BOND_UNIT * 4, 240, 2880); } if (_tierId == LibTiers.TIER_GUARDIAN) { - return ITierProvider.Tier({ - verifierName: LibStrings.B_TIER_GUARDIAN, - validityBond: 0, // must be 0 for top tier - contestBond: 0, // must be 0 for top tier - cooldownWindow: 1440, // 24 hours - provingWindow: GRACE_PERIOD + 2880, // 48 hours - maxBlocksToVerifyPerProof: 0 - }); + // cooldownWindow is 1440 minutes and provingWindow is 2880 minutes + return _buildTier(LibStrings.B_TIER_GUARDIAN, 0, 1440, 2880); } revert TIER_NOT_FOUND(); } + + /// @dev Builds a TEE tier with a specific verifier name. + /// @param _verifierName The name of the verifier. + /// @return A Tier struct with predefined parameters for TEE. + function _buildTeeTier( + bytes32 _verifierName + ) + private + pure + returns (ITierProvider.Tier memory) + { + // cooldownWindow is 1440 minutes and provingWindow is 60 minutes + return _buildTier(_verifierName, BOND_UNIT * 2, 1440, 60); + } + + /// @dev Builds a ZK tier with a specific verifier name. + /// @param _verifierName The name of the verifier. + /// @return A Tier struct with predefined parameters for ZK. + function _buildZkTier(bytes32 _verifierName) private pure returns (ITierProvider.Tier memory) { + // cooldownWindow is 1440 minutes and provingWindow is 180 minutes + return _buildTier(_verifierName, BOND_UNIT * 3, 1440, 180); + } + + /// @dev Builds a generic tier with specified parameters. + /// @param _verifierName The name of the verifier. + /// @param _validityBond The validity bond amount. + /// @param _cooldownWindow The cooldown window duration in minutes. + /// @param _provingWindow The proving window duration in minutes. + /// @return A Tier struct with the provided parameters. + function _buildTier( + bytes32 _verifierName, + uint96 _validityBond, + uint16 _cooldownWindow, + uint16 _provingWindow + ) + private + pure + returns (ITierProvider.Tier memory) + { + return ITierProvider.Tier({ + verifierName: _verifierName, + validityBond: _validityBond, + contestBond: _validityBond / 10_000 * 65_625, + cooldownWindow: _cooldownWindow, + provingWindow: GRACE_PERIOD + _provingWindow, + maxBlocksToVerifyPerProof: 0 + }); + } } diff --git a/packages/protocol/contracts/L1/tiers/TierProviderV3.sol b/packages/protocol/contracts/L1/tiers/TierProviderV3.sol deleted file mode 100644 index 3e5db0f41ff..00000000000 --- a/packages/protocol/contracts/L1/tiers/TierProviderV3.sol +++ /dev/null @@ -1,21 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.24; - -import "./TierProviderBase.sol"; - -/// @title TierProviderV3 -/// @custom:security-contact security@taiko.xyz -contract TierProviderV3 is TierProviderBase { - /// @inheritdoc ITierProvider - function getTierIds() public pure override returns (uint16[] memory tiers_) { - tiers_ = new uint16[](3); - tiers_[0] = LibTiers.TIER_SGX2; - tiers_[1] = LibTiers.TIER_GUARDIAN_MINORITY; - tiers_[2] = LibTiers.TIER_GUARDIAN; - } - - /// @inheritdoc ITierProvider - function getMinTier(address, uint256) public pure override returns (uint16) { - return LibTiers.TIER_SGX2; - } -} diff --git a/packages/protocol/contracts/common/LibStrings.sol b/packages/protocol/contracts/common/LibStrings.sol index c6cd9576a64..e171cc22a4d 100644 --- a/packages/protocol/contracts/common/LibStrings.sol +++ b/packages/protocol/contracts/common/LibStrings.sol @@ -27,9 +27,11 @@ library LibStrings { bytes32 internal constant B_TIER_GUARDIAN_MINORITY = bytes32("tier_guardian_minority"); bytes32 internal constant B_TIER_ROUTER = bytes32("tier_router"); bytes32 internal constant B_TIER_SGX = bytes32("tier_sgx"); - bytes32 internal constant B_TIER_SGX2 = bytes32("tier_sgx2"); + bytes32 internal constant B_TIER_TDX = bytes32("tier_tdx"); + bytes32 internal constant B_TIER_TEE_ANY = bytes32("tier_tee_any"); bytes32 internal constant B_TIER_ZKVM_RISC0 = bytes32("tier_zkvm_risc0"); - bytes32 internal constant B_TIER_SGX_ZKVM = bytes32("tier_sgx_zkvm"); + bytes32 internal constant B_TIER_ZKVM_SP1 = bytes32("tier_zkvm_sp1"); + bytes32 internal constant B_TIER_ZKVM_ANY = bytes32("tier_zkvm_any"); bytes32 internal constant B_RISCZERO_GROTH16_VERIFIER = bytes32("risc0_groth16_verifier"); bytes32 internal constant B_WITHDRAWER = bytes32("withdrawer"); bytes32 internal constant H_RETURN_LIVENESS_BOND = keccak256("RETURN_LIVENESS_BOND"); diff --git a/packages/protocol/contracts/mainnet/LibRollupAddressCache.sol b/packages/protocol/contracts/mainnet/LibRollupAddressCache.sol deleted file mode 100644 index 98e4a27b9d9..00000000000 --- a/packages/protocol/contracts/mainnet/LibRollupAddressCache.sol +++ /dev/null @@ -1,55 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.24; - -import "../common/LibStrings.sol"; -import "../libs/LibNetwork.sol"; - -/// @title LibRollupAddressCache -/// @custom:security-contact security@taiko.xyz -library LibRollupAddressCache { - function getAddress( - uint64 _chainId, - bytes32 _name - ) - internal - pure - returns (bool found, address addr) - { - if (_chainId == LibNetwork.ETHEREUM_MAINNET) { - if (_name == LibStrings.B_TAIKO_TOKEN) { - return (true, 0x10dea67478c5F8C5E2D90e5E9B26dBe60c54d800); - } - if (_name == LibStrings.B_SIGNAL_SERVICE) { - return (true, 0x9e0a24964e5397B566c1ed39258e21aB5E35C77C); - } - if (_name == LibStrings.B_BRIDGE) { - return (true, 0xd60247c6848B7Ca29eDdF63AA924E53dB6Ddd8EC); - } - if (_name == LibStrings.B_TAIKO) { - return (true, 0x06a9Ab27c7e2255df1815E6CC0168d7755Feb19a); - } - if (_name == LibStrings.B_TIER_ROUTER) { - return (true, 0x6E997f1F22C40ba37F633B08f3b07E10Ed43155a); - } - if (_name == LibStrings.B_TIER_SGX) { - return (true, 0xb0f3186FC1963f774f52ff455DC86aEdD0b31F81); - } - if (_name == LibStrings.B_TIER_GUARDIAN_MINORITY) { - return (true, 0x579A8d63a2Db646284CBFE31FE5082c9989E985c); - } - if (_name == LibStrings.B_TIER_GUARDIAN) { - return (true, 0xE3D777143Ea25A6E031d1e921F396750885f43aC); - } - if (_name == LibStrings.B_AUTOMATA_DCAP_ATTESTATION) { - return (true, 0x8d7C954960a36a7596d7eA4945dDf891967ca8A3); - } - if (_name == LibStrings.B_BLOCK_PROPOSER) { - return (true, address(0)); - } - if (_name == LibStrings.B_CHAIN_WATCHDOG) { - return (true, address(0)); - } - } - return (false, address(0)); - } -} diff --git a/packages/protocol/contracts/mainnet/addrcache/AddressCache.sol b/packages/protocol/contracts/mainnet/addrcache/AddressCache.sol new file mode 100644 index 00000000000..ec722cb30ea --- /dev/null +++ b/packages/protocol/contracts/mainnet/addrcache/AddressCache.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +/// @title AddressCache +/// @custom:security-contact security@taiko.xyz +abstract contract AddressCache { + /// @notice This function retrieves the address associated with a given chain ID and name. + /// If the address is not found in the cache, it falls back to the provided function. + /// @param _chainId The chain ID for which the address is to be retrieved. + /// @param _name The name associated with the address to be retrieved. + /// @param _fallbackFunc The fallback function to be used if the address is not found in the + /// cache. + /// @return The address associated with the given chain ID and name. + function getAddress( + uint64 _chainId, + bytes32 _name, + function (uint64, bytes32) view returns (address) _fallbackFunc + ) + internal + view + returns (address) + { + (bool found, address addr) = getCachedAddress(_chainId, _name); + return found ? addr : _fallbackFunc(_chainId, _name); + } + + /// @notice This function retrieves the cached address associated with a given chain ID and + /// name. + /// @dev This function is virtual and should be overridden in derived contracts. + /// @param _chainId The chain ID for which the address is to be retrieved. + /// @param _name The name associated with the address to be retrieved. + /// @return found_ A boolean indicating whether the address was found in the cache. + /// @return addr_ The address associated with the given chain ID and name, if found in the + /// cache. + function getCachedAddress( + uint64 _chainId, + bytes32 _name + ) + internal + pure + virtual + returns (bool found_, address addr_); +} diff --git a/packages/protocol/contracts/mainnet/addrcache/RollupAddressCache.sol b/packages/protocol/contracts/mainnet/addrcache/RollupAddressCache.sol new file mode 100644 index 00000000000..e407cb4fe14 --- /dev/null +++ b/packages/protocol/contracts/mainnet/addrcache/RollupAddressCache.sol @@ -0,0 +1,59 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +import "../../common/LibStrings.sol"; +import "../../libs/LibNetwork.sol"; +import "./AddressCache.sol"; + +/// @title RollupAddressCache +/// @custom:security-contact security@taiko.xyz +contract RollupAddressCache is AddressCache { + function getCachedAddress( + uint64 _chainId, + bytes32 _name + ) + internal + pure + override + returns (bool found, address addr) + { + if (_chainId != LibNetwork.ETHEREUM_MAINNET) { + return (false, address(0)); + } + + if (_name == LibStrings.B_TAIKO_TOKEN) { + return (true, 0x10dea67478c5F8C5E2D90e5E9B26dBe60c54d800); + } + if (_name == LibStrings.B_SIGNAL_SERVICE) { + return (true, 0x9e0a24964e5397B566c1ed39258e21aB5E35C77C); + } + if (_name == LibStrings.B_BRIDGE) { + return (true, 0xd60247c6848B7Ca29eDdF63AA924E53dB6Ddd8EC); + } + if (_name == LibStrings.B_TAIKO) { + return (true, 0x06a9Ab27c7e2255df1815E6CC0168d7755Feb19a); + } + if (_name == LibStrings.B_TIER_ROUTER) { + return (true, 0x6E997f1F22C40ba37F633B08f3b07E10Ed43155a); + } + if (_name == LibStrings.B_TIER_SGX) { + return (true, 0xb0f3186FC1963f774f52ff455DC86aEdD0b31F81); + } + if (_name == LibStrings.B_TIER_GUARDIAN_MINORITY) { + return (true, 0x579A8d63a2Db646284CBFE31FE5082c9989E985c); + } + if (_name == LibStrings.B_TIER_GUARDIAN) { + return (true, 0xE3D777143Ea25A6E031d1e921F396750885f43aC); + } + if (_name == LibStrings.B_AUTOMATA_DCAP_ATTESTATION) { + return (true, 0x8d7C954960a36a7596d7eA4945dDf891967ca8A3); + } + if (_name == LibStrings.B_BLOCK_PROPOSER) { + return (true, address(0)); + } + if (_name == LibStrings.B_CHAIN_WATCHDOG) { + return (true, address(0)); + } + return (false, address(0)); + } +} diff --git a/packages/protocol/contracts/mainnet/LibSharedAddressCache.sol b/packages/protocol/contracts/mainnet/addrcache/SharedAddressCache.sol similarity index 91% rename from packages/protocol/contracts/mainnet/LibSharedAddressCache.sol rename to packages/protocol/contracts/mainnet/addrcache/SharedAddressCache.sol index c361f275e5b..a6fcca4c500 100644 --- a/packages/protocol/contracts/mainnet/LibSharedAddressCache.sol +++ b/packages/protocol/contracts/mainnet/addrcache/SharedAddressCache.sol @@ -1,18 +1,20 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.24; -import "../common/LibStrings.sol"; -import "../libs/LibNetwork.sol"; +import "../../common/LibStrings.sol"; +import "../../libs/LibNetwork.sol"; +import "./AddressCache.sol"; -/// @title LibSharedAddressCache +/// @title SharedAddressCache /// @custom:security-contact security@taiko.xyz -library LibSharedAddressCache { - function getAddress( +contract SharedAddressCache is AddressCache { + function getCachedAddress( uint64 _chainId, bytes32 _name ) internal pure + override returns (bool found, address addr) { if (_chainId == LibNetwork.ETHEREUM_MAINNET) { diff --git a/packages/protocol/contracts/mainnet/MainnetGuardianProver.sol b/packages/protocol/contracts/mainnet/rollup/MainnetGuardianProver.sol similarity index 59% rename from packages/protocol/contracts/mainnet/MainnetGuardianProver.sol rename to packages/protocol/contracts/mainnet/rollup/MainnetGuardianProver.sol index 7d8849cb28e..3fded817961 100644 --- a/packages/protocol/contracts/mainnet/MainnetGuardianProver.sol +++ b/packages/protocol/contracts/mainnet/rollup/MainnetGuardianProver.sol @@ -1,17 +1,16 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.24; -import "../L1/provers/GuardianProver.sol"; -import "./LibRollupAddressCache.sol"; +import "../../L1/provers/GuardianProver.sol"; +import "../addrcache/RollupAddressCache.sol"; /// @title MainnetGuardianProver /// @dev This contract shall be deployed to replace its parent contract on Ethereum for Taiko /// mainnet to reduce gas cost. /// @notice See the documentation in {GuardianProver}. /// @custom:security-contact security@taiko.xyz -contract MainnetGuardianProver is GuardianProver { +contract MainnetGuardianProver is GuardianProver, RollupAddressCache { function _getAddress(uint64 _chainId, bytes32 _name) internal view override returns (address) { - (bool found, address addr) = LibRollupAddressCache.getAddress(_chainId, _name); - return found ? addr : super._getAddress(_chainId, _name); + return getAddress(_chainId, _name, super._getAddress); } } diff --git a/packages/protocol/contracts/mainnet/MainnetProverSet.sol b/packages/protocol/contracts/mainnet/rollup/MainnetProverSet.sol similarity index 65% rename from packages/protocol/contracts/mainnet/MainnetProverSet.sol rename to packages/protocol/contracts/mainnet/rollup/MainnetProverSet.sol index e28f6924717..e19f31952ab 100644 --- a/packages/protocol/contracts/mainnet/MainnetProverSet.sol +++ b/packages/protocol/contracts/mainnet/rollup/MainnetProverSet.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.24; -import "../team/proving/ProverSet.sol"; -import "./LibRollupAddressCache.sol"; +import "../../team/proving/ProverSet.sol"; +import "../addrcache/RollupAddressCache.sol"; /// @title MainnetProverSet /// @dev This contract shall be deployed to replace its parent contract on Ethereum for Taiko @@ -10,9 +10,8 @@ import "./LibRollupAddressCache.sol"; /// not well testee nor necessary. /// @notice See the documentation in {ProverSet}. /// @custom:security-contact security@taiko.xyz -contract MainnetProverSet is ProverSet { +contract MainnetProverSet is ProverSet, RollupAddressCache { function _getAddress(uint64 _chainId, bytes32 _name) internal view override returns (address) { - (bool found, address addr) = LibRollupAddressCache.getAddress(_chainId, _name); - return found ? addr : super._getAddress(_chainId, _name); + return getAddress(_chainId, _name, super._getAddress); } } diff --git a/packages/protocol/contracts/mainnet/MainnetRollupAddressManager.sol b/packages/protocol/contracts/mainnet/rollup/MainnetRollupAddressManager.sol similarity index 57% rename from packages/protocol/contracts/mainnet/MainnetRollupAddressManager.sol rename to packages/protocol/contracts/mainnet/rollup/MainnetRollupAddressManager.sol index a29dbda0eb0..a2ddc64d3ba 100644 --- a/packages/protocol/contracts/mainnet/MainnetRollupAddressManager.sol +++ b/packages/protocol/contracts/mainnet/rollup/MainnetRollupAddressManager.sol @@ -1,18 +1,17 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.24; -import "../common/AddressManager.sol"; -import "../common/LibStrings.sol"; -import "./LibRollupAddressCache.sol"; +import "../../common/AddressManager.sol"; +import "../../common/LibStrings.sol"; +import "../addrcache/RollupAddressCache.sol"; /// @title MainnetRollupAddressManager /// @dev This contract shall be deployed to replace its parent contract on Ethereum for Taiko /// mainnet to reduce gas cost. /// @notice See the documentation in {IAddressManager}. /// @custom:security-contact security@taiko.xyz -contract MainnetRollupAddressManager is AddressManager { +contract MainnetRollupAddressManager is AddressManager, RollupAddressCache { function _getAddress(uint64 _chainId, bytes32 _name) internal view override returns (address) { - (bool found, address addr) = LibRollupAddressCache.getAddress(_chainId, _name); - return found ? addr : super._getAddress(_chainId, _name); + return getAddress(_chainId, _name, super._getAddress); } } diff --git a/packages/protocol/contracts/mainnet/MainnetTaikoL1.sol b/packages/protocol/contracts/mainnet/rollup/MainnetTaikoL1.sol similarity index 88% rename from packages/protocol/contracts/mainnet/MainnetTaikoL1.sol rename to packages/protocol/contracts/mainnet/rollup/MainnetTaikoL1.sol index fe42d19df33..d7977c48553 100644 --- a/packages/protocol/contracts/mainnet/MainnetTaikoL1.sol +++ b/packages/protocol/contracts/mainnet/rollup/MainnetTaikoL1.sol @@ -1,15 +1,15 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.24; -import "../L1/TaikoL1.sol"; -import "./LibRollupAddressCache.sol"; +import "../../L1/TaikoL1.sol"; +import "../addrcache/RollupAddressCache.sol"; /// @title MainnetTaikoL1 /// @dev This contract shall be deployed to replace its parent contract on Ethereum for Taiko /// mainnet to reduce gas cost. /// @notice See the documentation in {TaikoL1}. /// @custom:security-contact security@taiko.xyz -contract MainnetTaikoL1 is TaikoL1 { +contract MainnetTaikoL1 is TaikoL1, RollupAddressCache { /// @inheritdoc ITaikoL1 function getConfig() public pure override returns (TaikoData.Config memory) { // All hard-coded configurations: @@ -42,7 +42,6 @@ contract MainnetTaikoL1 is TaikoL1 { } function _getAddress(uint64 _chainId, bytes32 _name) internal view override returns (address) { - (bool found, address addr) = LibRollupAddressCache.getAddress(_chainId, _name); - return found ? addr : super._getAddress(_chainId, _name); + return getAddress(_chainId, _name, super._getAddress); } } diff --git a/packages/protocol/contracts/mainnet/MainnetTaikoL2.sol b/packages/protocol/contracts/mainnet/rollup/MainnetTaikoL2.sol similarity index 90% rename from packages/protocol/contracts/mainnet/MainnetTaikoL2.sol rename to packages/protocol/contracts/mainnet/rollup/MainnetTaikoL2.sol index 6600050a1df..9dda22e81ff 100644 --- a/packages/protocol/contracts/mainnet/MainnetTaikoL2.sol +++ b/packages/protocol/contracts/mainnet/rollup/MainnetTaikoL2.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.24; -import "../L2/TaikoL2.sol"; +import "../../L2/TaikoL2.sol"; /// @title MainnetTaikoL2 /// @custom:security-contact security@taiko.xyz diff --git a/packages/protocol/contracts/mainnet/MainnetTierRouter.sol b/packages/protocol/contracts/mainnet/rollup/MainnetTierRouter.sol similarity index 91% rename from packages/protocol/contracts/mainnet/MainnetTierRouter.sol rename to packages/protocol/contracts/mainnet/rollup/MainnetTierRouter.sol index f3e2dc6cfab..e98809a3900 100644 --- a/packages/protocol/contracts/mainnet/MainnetTierRouter.sol +++ b/packages/protocol/contracts/mainnet/rollup/MainnetTierRouter.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.24; -import "../L1/tiers/ITierRouter.sol"; +import "../../L1/tiers/ITierRouter.sol"; /// @title MainnetTierRouter /// @dev Labeled in AddressResolver as "tier_router" diff --git a/packages/protocol/contracts/mainnet/rollup/verifiers/MainnetRisc0Verifier.sol b/packages/protocol/contracts/mainnet/rollup/verifiers/MainnetRisc0Verifier.sol new file mode 100644 index 00000000000..58c11bd8b47 --- /dev/null +++ b/packages/protocol/contracts/mainnet/rollup/verifiers/MainnetRisc0Verifier.sol @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +import "../../../verifiers/Risc0Verifier.sol"; +import "../../addrcache/RollupAddressCache.sol"; + +/// @title MainnetRisc0Verifier +/// @dev This contract shall be deployed to replace its parent contract on Ethereum for Taiko +/// mainnet to reduce gas cost. +/// @notice See the documentation in {Risc0Verifier}. +/// @custom:security-contact security@taiko.xyz +contract MainnetRisc0Verifier is Risc0Verifier, RollupAddressCache { + function _getAddress(uint64 _chainId, bytes32 _name) internal view override returns (address) { + return getAddress(_chainId, _name, super._getAddress); + } + + function taikoChainId() internal pure override returns (uint64) { + return LibNetwork.TAIKO_MAINNET; + } +} diff --git a/packages/protocol/contracts/mainnet/MainnetRiscZeroVerifier.sol b/packages/protocol/contracts/mainnet/rollup/verifiers/MainnetSP1Verifier.sol similarity index 61% rename from packages/protocol/contracts/mainnet/MainnetRiscZeroVerifier.sol rename to packages/protocol/contracts/mainnet/rollup/verifiers/MainnetSP1Verifier.sol index 8421497c924..4edf3a45567 100644 --- a/packages/protocol/contracts/mainnet/MainnetRiscZeroVerifier.sol +++ b/packages/protocol/contracts/mainnet/rollup/verifiers/MainnetSP1Verifier.sol @@ -1,18 +1,17 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.24; -import "../verifiers/RiscZeroVerifier.sol"; -import "./LibRollupAddressCache.sol"; +import "../../../verifiers/SP1Verifier.sol"; +import "../../addrcache/RollupAddressCache.sol"; -/// @title MainnetRiscZeroVerifier +/// @title MainnetSP1Verifier /// @dev This contract shall be deployed to replace its parent contract on Ethereum for Taiko /// mainnet to reduce gas cost. /// @notice See the documentation in {RiscZeroVerifier}. /// @custom:security-contact security@taiko.xyz -contract MainnetRiscZeroVerifier is RiscZeroVerifier { +contract MainnetSP1Verifier is SP1Verifier, RollupAddressCache { function _getAddress(uint64 _chainId, bytes32 _name) internal view override returns (address) { - (bool found, address addr) = LibRollupAddressCache.getAddress(_chainId, _name); - return found ? addr : super._getAddress(_chainId, _name); + return getAddress(_chainId, _name, super._getAddress); } function taikoChainId() internal pure override returns (uint64) { diff --git a/packages/protocol/contracts/mainnet/MainnetSgxVerifier.sol b/packages/protocol/contracts/mainnet/rollup/verifiers/MainnetSgxVerifier.sol similarity index 66% rename from packages/protocol/contracts/mainnet/MainnetSgxVerifier.sol rename to packages/protocol/contracts/mainnet/rollup/verifiers/MainnetSgxVerifier.sol index 5788b6375bb..5f2d5431673 100644 --- a/packages/protocol/contracts/mainnet/MainnetSgxVerifier.sol +++ b/packages/protocol/contracts/mainnet/rollup/verifiers/MainnetSgxVerifier.sol @@ -1,18 +1,17 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.24; -import "../verifiers/SgxVerifier.sol"; -import "./LibRollupAddressCache.sol"; +import "../../../verifiers/SgxVerifier.sol"; +import "../../addrcache/RollupAddressCache.sol"; /// @title MainnetSgxVerifier /// @dev This contract shall be deployed to replace its parent contract on Ethereum for Taiko /// mainnet to reduce gas cost. /// @notice See the documentation in {SgxVerifier}. /// @custom:security-contact security@taiko.xyz -contract MainnetSgxVerifier is SgxVerifier { +contract MainnetSgxVerifier is SgxVerifier, RollupAddressCache { function _getAddress(uint64 _chainId, bytes32 _name) internal view override returns (address) { - (bool found, address addr) = LibRollupAddressCache.getAddress(_chainId, _name); - return found ? addr : super._getAddress(_chainId, _name); + return getAddress(_chainId, _name, super._getAddress); } function taikoChainId() internal pure override returns (uint64) { diff --git a/packages/protocol/contracts/mainnet/rollup/verifiers/MainnetTeeAnyVerifier.sol b/packages/protocol/contracts/mainnet/rollup/verifiers/MainnetTeeAnyVerifier.sol new file mode 100644 index 00000000000..5b47d3cd981 --- /dev/null +++ b/packages/protocol/contracts/mainnet/rollup/verifiers/MainnetTeeAnyVerifier.sol @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +import "../../../verifiers/compose/TeeAnyVerifier.sol"; +import "../../addrcache/RollupAddressCache.sol"; + +/// @title MainnetTeeAnyVerifier +/// @custom:security-contact security@taiko.xyz +contract MainnetTeeAnyVerifier is TeeAnyVerifier, RollupAddressCache { + function _getAddress(uint64 _chainId, bytes32 _name) internal view override returns (address) { + return getAddress(_chainId, _name, super._getAddress); + } +} diff --git a/packages/protocol/contracts/mainnet/rollup/verifiers/MainnetZkAnyVerifier.sol b/packages/protocol/contracts/mainnet/rollup/verifiers/MainnetZkAnyVerifier.sol new file mode 100644 index 00000000000..225016f93c1 --- /dev/null +++ b/packages/protocol/contracts/mainnet/rollup/verifiers/MainnetZkAnyVerifier.sol @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +import "../../../verifiers/compose/ZkAnyVerifier.sol"; +import "../../addrcache/RollupAddressCache.sol"; + +/// @title MainnetZkAnyVerifier +/// @custom:security-contact security@taiko.xyz +contract MainnetZkAnyVerifier is ZkAnyVerifier, RollupAddressCache { + function _getAddress(uint64 _chainId, bytes32 _name) internal view override returns (address) { + return getAddress(_chainId, _name, super._getAddress); + } +} diff --git a/packages/protocol/contracts/mainnet/MainnetBridge.sol b/packages/protocol/contracts/mainnet/shared/MainnetBridge.sol similarity index 66% rename from packages/protocol/contracts/mainnet/MainnetBridge.sol rename to packages/protocol/contracts/mainnet/shared/MainnetBridge.sol index db538fee0d3..e803408ab22 100644 --- a/packages/protocol/contracts/mainnet/MainnetBridge.sol +++ b/packages/protocol/contracts/mainnet/shared/MainnetBridge.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.24; -import "../bridge/Bridge.sol"; -import "./LibSharedAddressCache.sol"; +import "../../bridge/Bridge.sol"; +import "../addrcache/SharedAddressCache.sol"; /// @title MainnetBridge /// @dev This contract shall be deployed to replace its parent contract on Ethereum for Taiko @@ -10,9 +10,8 @@ import "./LibSharedAddressCache.sol"; /// not well testee nor necessary. /// @notice See the documentation in {Bridge}. /// @custom:security-contact security@taiko.xyz -contract MainnetBridge is Bridge { +contract MainnetBridge is Bridge, SharedAddressCache { function _getAddress(uint64 _chainId, bytes32 _name) internal view override returns (address) { - (bool found, address addr) = LibSharedAddressCache.getAddress(_chainId, _name); - return found ? addr : super._getAddress(_chainId, _name); + return getAddress(_chainId, _name, super._getAddress); } } diff --git a/packages/protocol/contracts/mainnet/MainnetERC1155Vault.sol b/packages/protocol/contracts/mainnet/shared/MainnetERC1155Vault.sol similarity index 65% rename from packages/protocol/contracts/mainnet/MainnetERC1155Vault.sol rename to packages/protocol/contracts/mainnet/shared/MainnetERC1155Vault.sol index e8071a2f9f9..a4643992f48 100644 --- a/packages/protocol/contracts/mainnet/MainnetERC1155Vault.sol +++ b/packages/protocol/contracts/mainnet/shared/MainnetERC1155Vault.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.24; -import "../tokenvault/ERC1155Vault.sol"; -import "./LibSharedAddressCache.sol"; +import "../../tokenvault/ERC1155Vault.sol"; +import "../addrcache/SharedAddressCache.sol"; /// @title MainnetERC1155Vault /// @dev This contract shall be deployed to replace its parent contract on Ethereum for Taiko @@ -10,9 +10,8 @@ import "./LibSharedAddressCache.sol"; /// not well testee nor necessary. /// @notice See the documentation in {ER1155Vault}. /// @custom:security-contact security@taiko.xyz -contract MainnetERC1155Vault is ERC1155Vault { +contract MainnetERC1155Vault is ERC1155Vault, SharedAddressCache { function _getAddress(uint64 _chainId, bytes32 _name) internal view override returns (address) { - (bool found, address addr) = LibSharedAddressCache.getAddress(_chainId, _name); - return found ? addr : super._getAddress(_chainId, _name); + return getAddress(_chainId, _name, super._getAddress); } } diff --git a/packages/protocol/contracts/mainnet/MainnetERC20Vault.sol b/packages/protocol/contracts/mainnet/shared/MainnetERC20Vault.sol similarity index 65% rename from packages/protocol/contracts/mainnet/MainnetERC20Vault.sol rename to packages/protocol/contracts/mainnet/shared/MainnetERC20Vault.sol index 380aa35073a..6de9f8ba7b0 100644 --- a/packages/protocol/contracts/mainnet/MainnetERC20Vault.sol +++ b/packages/protocol/contracts/mainnet/shared/MainnetERC20Vault.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.24; -import "../tokenvault/ERC20Vault.sol"; -import "./LibSharedAddressCache.sol"; +import "../../tokenvault/ERC20Vault.sol"; +import "../addrcache/SharedAddressCache.sol"; /// @title MainnetERC20Vault /// @dev This contract shall be deployed to replace its parent contract on Ethereum for Taiko @@ -10,9 +10,8 @@ import "./LibSharedAddressCache.sol"; /// not well testee nor necessary. /// @notice See the documentation in {ER20Vault}. /// @custom:security-contact security@taiko.xyz -contract MainnetERC20Vault is ERC20Vault { +contract MainnetERC20Vault is ERC20Vault, SharedAddressCache { function _getAddress(uint64 _chainId, bytes32 _name) internal view override returns (address) { - (bool found, address addr) = LibSharedAddressCache.getAddress(_chainId, _name); - return found ? addr : super._getAddress(_chainId, _name); + return getAddress(_chainId, _name, super._getAddress); } } diff --git a/packages/protocol/contracts/mainnet/MainnetERC721Vault.sol b/packages/protocol/contracts/mainnet/shared/MainnetERC721Vault.sol similarity index 65% rename from packages/protocol/contracts/mainnet/MainnetERC721Vault.sol rename to packages/protocol/contracts/mainnet/shared/MainnetERC721Vault.sol index 5c9444065ec..04896625d33 100644 --- a/packages/protocol/contracts/mainnet/MainnetERC721Vault.sol +++ b/packages/protocol/contracts/mainnet/shared/MainnetERC721Vault.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.24; -import "../tokenvault/ERC721Vault.sol"; -import "./LibSharedAddressCache.sol"; +import "../../tokenvault/ERC721Vault.sol"; +import "../addrcache/SharedAddressCache.sol"; /// @title MainnetERC721Vault /// @dev This contract shall be deployed to replace its parent contract on Ethereum for Taiko @@ -10,9 +10,8 @@ import "./LibSharedAddressCache.sol"; /// not well testee nor necessary. /// @notice See the documentation in {ER721Vault}. /// @custom:security-contact security@taiko.xyz -contract MainnetERC721Vault is ERC721Vault { +contract MainnetERC721Vault is ERC721Vault, SharedAddressCache { function _getAddress(uint64 _chainId, bytes32 _name) internal view override returns (address) { - (bool found, address addr) = LibSharedAddressCache.getAddress(_chainId, _name); - return found ? addr : super._getAddress(_chainId, _name); + return getAddress(_chainId, _name, super._getAddress); } } diff --git a/packages/protocol/contracts/mainnet/MainnetSharedAddressManager.sol b/packages/protocol/contracts/mainnet/shared/MainnetSharedAddressManager.sol similarity index 57% rename from packages/protocol/contracts/mainnet/MainnetSharedAddressManager.sol rename to packages/protocol/contracts/mainnet/shared/MainnetSharedAddressManager.sol index 1ce27eeb68a..c04104637e7 100644 --- a/packages/protocol/contracts/mainnet/MainnetSharedAddressManager.sol +++ b/packages/protocol/contracts/mainnet/shared/MainnetSharedAddressManager.sol @@ -1,18 +1,17 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.24; -import "../common/AddressManager.sol"; -import "../common/LibStrings.sol"; -import "./LibSharedAddressCache.sol"; +import "../../common/AddressManager.sol"; +import "../../common/LibStrings.sol"; +import "../addrcache/SharedAddressCache.sol"; /// @title MainnetSharedAddressManager /// @dev This contract shall be deployed to replace its parent contract on Ethereum for Taiko /// mainnet to reduce gas cost. /// @notice See the documentation in {IAddressManager}. /// @custom:security-contact security@taiko.xyz -contract MainnetSharedAddressManager is AddressManager { +contract MainnetSharedAddressManager is AddressManager, SharedAddressCache { function _getAddress(uint64 _chainId, bytes32 _name) internal view override returns (address) { - (bool found, address addr) = LibSharedAddressCache.getAddress(_chainId, _name); - return found ? addr : super._getAddress(_chainId, _name); + return getAddress(_chainId, _name, super._getAddress); } } diff --git a/packages/protocol/contracts/mainnet/MainnetSignalService.sol b/packages/protocol/contracts/mainnet/shared/MainnetSignalService.sol similarity index 65% rename from packages/protocol/contracts/mainnet/MainnetSignalService.sol rename to packages/protocol/contracts/mainnet/shared/MainnetSignalService.sol index 8dc61ecbe48..3d797512cff 100644 --- a/packages/protocol/contracts/mainnet/MainnetSignalService.sol +++ b/packages/protocol/contracts/mainnet/shared/MainnetSignalService.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.24; -import "../signal/SignalService.sol"; -import "./LibSharedAddressCache.sol"; +import "../../signal/SignalService.sol"; +import "../addrcache/SharedAddressCache.sol"; /// @title MainnetSignalService /// @dev This contract shall be deployed to replace its parent contract on Ethereum for Taiko @@ -10,9 +10,8 @@ import "./LibSharedAddressCache.sol"; /// not well testee nor necessary. /// @notice See the documentation in {SignalService}. /// @custom:security-contact security@taiko.xyz -contract MainnetSignalService is SignalService { +contract MainnetSignalService is SignalService, SharedAddressCache { function _getAddress(uint64 _chainId, bytes32 _name) internal view override returns (address) { - (bool found, address addr) = LibSharedAddressCache.getAddress(_chainId, _name); - return found ? addr : super._getAddress(_chainId, _name); + return getAddress(_chainId, _name, super._getAddress); } } diff --git a/packages/protocol/contracts/verifiers/RiscZeroVerifier.sol b/packages/protocol/contracts/verifiers/Risc0Verifier.sol similarity index 91% rename from packages/protocol/contracts/verifiers/RiscZeroVerifier.sol rename to packages/protocol/contracts/verifiers/Risc0Verifier.sol index def44adfa64..92b9ec9e028 100644 --- a/packages/protocol/contracts/verifiers/RiscZeroVerifier.sol +++ b/packages/protocol/contracts/verifiers/Risc0Verifier.sol @@ -8,9 +8,9 @@ import "../L1/ITaikoL1.sol"; import "./IVerifier.sol"; import "./libs/LibPublicInput.sol"; -/// @title RiscZeroVerifier +/// @title Risc0Verifier /// @custom:security-contact security@taiko.xyz -contract RiscZeroVerifier is EssentialContract, IVerifier { +contract Risc0Verifier is EssentialContract, IVerifier { // [32, 0, 0, 0] -- big-endian uint32(32) for hash bytes len bytes private constant FIXED_JOURNAL_HEADER = hex"20000000"; @@ -24,9 +24,6 @@ contract RiscZeroVerifier is EssentialContract, IVerifier { /// @param trusted True if trusted, false otherwise event ImageTrusted(bytes32 imageId, bool trusted); - /// @dev Emitted when a proof is verified - event ProofVerified(bytes32 metaHash, bytes32 publicInputHash); - error RISC_ZERO_INVALID_IMAGE_ID(); error RISC_ZERO_INVALID_PROOF(); @@ -53,6 +50,7 @@ contract RiscZeroVerifier is EssentialContract, IVerifier { TaikoData.TierProof calldata _proof ) external + view { // Do not run proof verification to contest an existing proof if (_ctx.isContesting) return; @@ -78,8 +76,6 @@ contract RiscZeroVerifier is EssentialContract, IVerifier { if (!success) { revert RISC_ZERO_INVALID_PROOF(); } - - emit ProofVerified(_ctx.metaHash, publicInputHash); } function taikoChainId() internal view virtual returns (uint64) { diff --git a/packages/protocol/contracts/verifiers/SgxVerifier.sol b/packages/protocol/contracts/verifiers/SgxVerifier.sol index b1971182022..9dd5cc75264 100644 --- a/packages/protocol/contracts/verifiers/SgxVerifier.sol +++ b/packages/protocol/contracts/verifiers/SgxVerifier.sol @@ -149,7 +149,7 @@ contract SgxVerifier is EssentialContract, IVerifier { TaikoData.TierProof calldata _proof ) external - onlyFromNamed(LibStrings.B_TAIKO) + onlyFromNamedEither(LibStrings.B_TAIKO, LibStrings.B_TIER_TEE_ANY) { // Do not run proof verification to contest an existing proof if (_ctx.isContesting) return; diff --git a/packages/protocol/contracts/verifiers/compose/ComposeVerifier.sol b/packages/protocol/contracts/verifiers/compose/ComposeVerifier.sol new file mode 100644 index 00000000000..dac33e90776 --- /dev/null +++ b/packages/protocol/contracts/verifiers/compose/ComposeVerifier.sol @@ -0,0 +1,81 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +import "../../common/EssentialContract.sol"; +import "../../common/LibStrings.sol"; +import "../IVerifier.sol"; + +/// @title ComposeVerifier +/// @notice This contract is an abstract verifier that composes multiple sub-verifiers to validate +/// proofs. +/// It ensures that a set of sub-proofs are verified by their respective verifiers before +/// considering the overall proof as valid. +/// @custom:security-contact security@taiko.xyz +abstract contract ComposeVerifier is EssentialContract, IVerifier { + uint256[50] private __gap; + + struct SubProof { + address verifier; + bytes proof; + } + + error CV_DUPLICATE_SUBPROOF(); + error CV_INVALID_CALLER(); + error CV_INVALID_SUB_VERIFIER(); + error CV_INVALID_SUBPROOF_LENGTH(); + error CV_SUB_VERIFIER_NOT_FOUND(); + + /// @notice Initializes the contract. + /// @param _owner The owner of this contract. msg.sender will be used if this value is zero. + /// @param _rollupAddressManager The address of the {AddressManager} contract. + function init(address _owner, address _rollupAddressManager) external initializer { + __Essential_init(_owner, _rollupAddressManager); + } + + /// @notice Verifies one or more sub-proofs. + /// @param _ctx The context of the proof verification. + /// @param _tran The transition to verify. + /// @param _proof The proof to verify. + function verifyProof( + Context calldata _ctx, + TaikoData.Transition calldata _tran, + TaikoData.TierProof calldata _proof + ) + external + onlyFromNamed(LibStrings.B_TAIKO) + nonReentrant + { + (address[] memory verifiers, uint256 numSubProofs_) = getSubVerifiersAndThreshold(); + + SubProof[] memory subProofs = abi.decode(_proof.data, (SubProof[])); + if (subProofs.length != numSubProofs_) revert CV_INVALID_SUBPROOF_LENGTH(); + + for (uint256 i; i < subProofs.length; ++i) { + if (subProofs[i].verifier == address(0)) revert CV_INVALID_SUB_VERIFIER(); + + // find the verifier + bool verifierFound; + for (uint256 j; j < verifiers.length; ++j) { + if (verifiers[j] == subProofs[i].verifier) { + verifierFound = true; + verifiers[j] = address(0); + } + } + + if (!verifierFound) revert CV_SUB_VERIFIER_NOT_FOUND(); + + IVerifier(subProofs[i].verifier).verifyProof( + _ctx, _tran, TaikoData.TierProof(_proof.tier, subProofs[i].proof) + ); + } + } + + /// @notice Returns the list of sub-verifiers and calculates the threshold. + /// @return verifiers_ An array of addresses of sub-verifiers. + /// @return numSubProofs_ The number of sub proofs required. + function getSubVerifiersAndThreshold() + public + view + virtual + returns (address[] memory verifiers_, uint256 numSubProofs_); +} diff --git a/packages/protocol/contracts/verifiers/compose/TeeAnyVerifier.sol b/packages/protocol/contracts/verifiers/compose/TeeAnyVerifier.sol new file mode 100644 index 00000000000..ab9c8590b02 --- /dev/null +++ b/packages/protocol/contracts/verifiers/compose/TeeAnyVerifier.sol @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +import "../../common/LibStrings.sol"; +import "./ComposeVerifier.sol"; + +/// @title TeeAnyVerifier +/// @notice This contract is a verifier for the Mainnet TEE proofs that composes SGX and TDX +/// Verifiers. +/// @custom:security-contact security@taiko.xyz +contract TeeAnyVerifier is ComposeVerifier { + uint256[50] private __gap; + + /// @inheritdoc ComposeVerifier + function getSubVerifiersAndThreshold() + public + view + override + returns (address[] memory verifiers_, uint256 numSubProofs_) + { + verifiers_ = new address[](2); + verifiers_[0] = resolve(LibStrings.B_TIER_SGX, false); + verifiers_[1] = resolve(LibStrings.B_TIER_TDX, false); + numSubProofs_ = 1; + } +} diff --git a/packages/protocol/contracts/verifiers/compose/ZkAnyVerifier.sol b/packages/protocol/contracts/verifiers/compose/ZkAnyVerifier.sol new file mode 100644 index 00000000000..d574ca086f7 --- /dev/null +++ b/packages/protocol/contracts/verifiers/compose/ZkAnyVerifier.sol @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +import "../../common/LibStrings.sol"; +import "./ComposeVerifier.sol"; + +/// @title ZkAnyVerifier +/// @notice This contract is a verifier for the Mainnet ZkVM that composes RiscZero and SP1 +/// Verifiers. +/// @custom:security-contact security@taiko.xyz +contract ZkAnyVerifier is ComposeVerifier { + uint256[50] private __gap; + + /// @inheritdoc ComposeVerifier + function getSubVerifiersAndThreshold() + public + view + override + returns (address[] memory verifiers_, uint256 numSubProofs_) + { + verifiers_ = new address[](2); + verifiers_[0] = resolve(LibStrings.B_TIER_ZKVM_RISC0, false); + verifiers_[1] = resolve(LibStrings.B_TIER_ZKVM_SP1, false); + numSubProofs_ = 1; + } +} diff --git a/packages/protocol/deployments/gen-layouts.sh b/packages/protocol/deployments/gen-layouts.sh index 54551126c12..4070e434ccf 100755 --- a/packages/protocol/deployments/gen-layouts.sh +++ b/packages/protocol/deployments/gen-layouts.sh @@ -20,10 +20,14 @@ contracts=( "BridgedERC1155" "AutomataDcapV3Attestation" "SgxVerifier" - "RiscZeroVerifier" + "Risc0Verifier" + "SP1Verifier" "QuotaManager" "ProverSet" "TokenUnlock" + "ComposeVerifier" + "TeeAnyVerifier" + "ZkAnyVerifier" # Hekla contracts "HeklaTaikoL1" # Mainnet contracts @@ -33,7 +37,8 @@ contracts=( "MainnetERC721Vault" "MainnetGuardianProver" "MainnetProverSet" - "MainnetRiscZeroVerifier" + "MainnetRisc0Verifier" + "MainnetSP1Verifier" "MainnetRollupAddressManager" "MainnetSgxVerifier" "MainnetSharedAddressManager" diff --git a/packages/protocol/package.json b/packages/protocol/package.json index df9cd01bf8e..f0c3e65ff76 100644 --- a/packages/protocol/package.json +++ b/packages/protocol/package.json @@ -31,7 +31,7 @@ "eslint-plugin-promise": "^6.1.1", "ethers": "^5.7.2", "solc": "0.8.24", - "solhint": "^5.0.1", + "solhint": "^5.0.3", "ts-node": "^10.9.2", "typescript": "^5.2.2" }, diff --git a/packages/protocol/script/DeployOnL1.s.sol b/packages/protocol/script/DeployOnL1.s.sol index a912b8cf374..6f5501e956f 100644 --- a/packages/protocol/script/DeployOnL1.s.sol +++ b/packages/protocol/script/DeployOnL1.s.sol @@ -12,30 +12,30 @@ import "@p256-verifier/contracts/P256Verifier.sol"; import "../contracts/common/LibStrings.sol"; import "../contracts/tko/TaikoToken.sol"; -import "../contracts/mainnet/MainnetTaikoL1.sol"; +import "../contracts/mainnet/rollup/MainnetTaikoL1.sol"; import "../contracts/devnet/DevnetTaikoL1.sol"; import "../contracts/L1/provers/GuardianProver.sol"; import "../contracts/L1/tiers/DevnetTierProvider.sol"; import "../contracts/L1/tiers/TierProviderV2.sol"; -import "../contracts/mainnet/MainnetBridge.sol"; +import "../contracts/mainnet/shared/MainnetBridge.sol"; import "../contracts/tokenvault/BridgedERC20.sol"; import "../contracts/tokenvault/BridgedERC721.sol"; import "../contracts/tokenvault/BridgedERC1155.sol"; -import "../contracts/mainnet/MainnetERC20Vault.sol"; -import "../contracts/mainnet/MainnetERC1155Vault.sol"; -import "../contracts/mainnet/MainnetERC721Vault.sol"; -import "../contracts/mainnet/MainnetSignalService.sol"; -import "../contracts/mainnet/MainnetGuardianProver.sol"; +import "../contracts/mainnet/shared/MainnetERC20Vault.sol"; +import "../contracts/mainnet/shared/MainnetERC1155Vault.sol"; +import "../contracts/mainnet/shared/MainnetERC721Vault.sol"; +import "../contracts/mainnet/shared/MainnetSignalService.sol"; +import "../contracts/mainnet/rollup/MainnetGuardianProver.sol"; import "../contracts/automata-attestation/AutomataDcapV3Attestation.sol"; import "../contracts/automata-attestation/utils/SigVerifyLib.sol"; import "../contracts/automata-attestation/lib/PEMCertChainLib.sol"; -import "../contracts/mainnet/MainnetSgxVerifier.sol"; +import "../contracts/mainnet/rollup/verifiers/MainnetSgxVerifier.sol"; import "../contracts/team/proving/ProverSet.sol"; import "../test/common/erc20/FreeMintERC20.sol"; import "../test/common/erc20/MayFailFreeMintERC20.sol"; import "../test/L1/TestTierProvider.sol"; import "../test/DeployCapability.sol"; -import "../contracts/verifiers/RiscZeroVerifier.sol"; +import "../contracts/verifiers/Risc0Verifier.sol"; /// @title DeployOnL1 /// @notice This script deploys the core Taiko protocol smart contract on L1, @@ -402,8 +402,8 @@ contract DeployOnL1 is DeployCapability { deployProxy({ name: "tier_zkvm_risc0", - impl: address(new RiscZeroVerifier()), - data: abi.encodeCall(RiscZeroVerifier.init, (owner, rollupAddressManager)), + impl: address(new Risc0Verifier()), + data: abi.encodeCall(Risc0Verifier.init, (owner, rollupAddressManager)), registerTo: rollupAddressManager }); } diff --git a/packages/protocol/script/DeployRisc0Verifier.s.sol b/packages/protocol/script/DeployRisc0Verifier.s.sol index 04a6fc71b4d..7b4882c9a8d 100644 --- a/packages/protocol/script/DeployRisc0Verifier.s.sol +++ b/packages/protocol/script/DeployRisc0Verifier.s.sol @@ -3,7 +3,7 @@ pragma solidity 0.8.24; import "@risc0/contracts/groth16/RiscZeroGroth16Verifier.sol"; import "../test/DeployCapability.sol"; -import "../contracts/verifiers/RiscZeroVerifier.sol"; +import "../contracts/verifiers/Risc0Verifier.sol"; contract DeployRisc0Verifier is DeployCapability { uint256 public deployerPrivKey = vm.envUint("PRIVATE_KEY"); @@ -19,8 +19,8 @@ contract DeployRisc0Verifier is DeployCapability { register(rollupAddressManager, "risc0_groth16_verifier", address(verifier)); deployProxy({ name: "tier_zkvm_risc0", - impl: address(new RiscZeroVerifier()), - data: abi.encodeCall(RiscZeroVerifier.init, (address(0), rollupAddressManager)), + impl: address(new Risc0Verifier()), + data: abi.encodeCall(Risc0Verifier.init, (address(0), rollupAddressManager)), registerTo: rollupAddressManager }); vm.stopBroadcast(); diff --git a/packages/protocol/script/DeploySP1Verifier.s.sol b/packages/protocol/script/DeploySP1Verifier.s.sol index 39ac680a8f1..f3a38459ad2 100644 --- a/packages/protocol/script/DeploySP1Verifier.s.sol +++ b/packages/protocol/script/DeploySP1Verifier.s.sol @@ -29,7 +29,7 @@ contract DeploySP1Verifier is DeployCapability { }); console2.log(); - console2.log("Deployed Sp1Verifier impl at address: %s", sp1Verifier); - console2.log("Deployed Sp1Verifier proxy at address: %s", proxy); + console2.log("Deployed SP1Verifier impl at address: %s", sp1Verifier); + console2.log("Deployed SP1Verifier proxy at address: %s", proxy); } } diff --git a/packages/protocol/script/upgrade/UpgradeRisc0Verifier.s.sol b/packages/protocol/script/upgrade/UpgradeRisc0Verifier.s.sol index 0cb9b2edfb0..80a7f9dc86c 100644 --- a/packages/protocol/script/upgrade/UpgradeRisc0Verifier.s.sol +++ b/packages/protocol/script/upgrade/UpgradeRisc0Verifier.s.sol @@ -5,10 +5,10 @@ import "forge-std/src/Script.sol"; import "forge-std/src/console2.sol"; import "./UpgradeScript.s.sol"; -import { RiscZeroVerifier } from "../../contracts/verifiers/RiscZeroVerifier.sol"; +import "../../contracts/verifiers/Risc0Verifier.sol"; contract UpgradeRisc0Verifier is UpgradeScript { function run() external setUp { - upgrade("Risc0Verifier", address(new RiscZeroVerifier())); + upgrade("Risc0Verifier", address(new Risc0Verifier())); } } diff --git a/packages/protocol/test/L1/TaikoL1TestBase.sol b/packages/protocol/test/L1/TaikoL1TestBase.sol index 71e437ae980..6b30d04ed1a 100644 --- a/packages/protocol/test/L1/TaikoL1TestBase.sol +++ b/packages/protocol/test/L1/TaikoL1TestBase.sol @@ -10,7 +10,7 @@ abstract contract TaikoL1TestBase is TaikoTest { TaikoL1 public L1; TaikoData.Config conf; uint256 internal logCount; - RiscZeroVerifier public rv; + Risc0Verifier public rv; SP1Verifier public sp1; SgxVerifier public sv; GuardianProver public gp; diff --git a/packages/protocol/test/L1/TestTierProvider.sol b/packages/protocol/test/L1/TestTierProvider.sol index 7c9042ce27b..410d4a620bb 100644 --- a/packages/protocol/test/L1/TestTierProvider.sol +++ b/packages/protocol/test/L1/TestTierProvider.sol @@ -3,6 +3,7 @@ pragma solidity 0.8.24; import "../../contracts/common/LibStrings.sol"; import "../../contracts/L1/tiers/ITierProvider.sol"; +import "../../contracts/L1/tiers/LibTiers.sol"; import "../../contracts/L1/tiers/ITierRouter.sol"; /// @title TestTierProvider diff --git a/packages/protocol/test/TaikoTest.sol b/packages/protocol/test/TaikoTest.sol index da43480621b..3b5eea92b5e 100644 --- a/packages/protocol/test/TaikoTest.sol +++ b/packages/protocol/test/TaikoTest.sol @@ -17,7 +17,7 @@ import "../contracts/tko/TaikoToken.sol"; import "../contracts/L1/TaikoL1.sol"; import "../contracts/verifiers/SgxVerifier.sol"; import "../contracts/verifiers/SP1Verifier.sol"; -import "../contracts/verifiers/RiscZeroVerifier.sol"; +import "../contracts/verifiers/Risc0Verifier.sol"; import "../test/L1/TestTierProvider.sol"; import "../contracts/L1/provers/GuardianProver.sol"; import "../contracts/bridge/QuotaManager.sol"; diff --git a/packages/protocol/test/verifiers/RiscZeroVerifier.t.sol b/packages/protocol/test/verifiers/Risc0Verifier.t.sol similarity index 88% rename from packages/protocol/test/verifiers/RiscZeroVerifier.t.sol rename to packages/protocol/test/verifiers/Risc0Verifier.t.sol index d39966fd6dd..bfe95777305 100644 --- a/packages/protocol/test/verifiers/RiscZeroVerifier.t.sol +++ b/packages/protocol/test/verifiers/Risc0Verifier.t.sol @@ -3,7 +3,7 @@ pragma solidity 0.8.24; import "../L1/TaikoL1TestBase.sol"; -contract MockRiscZeroRemoteVerifier is IRiscZeroVerifier { +contract MockRisc0RemoteVerifier is IRiscZeroVerifier { // To simulate failing and succeeding bool public verifying; @@ -28,7 +28,7 @@ contract MockRiscZeroRemoteVerifier is IRiscZeroVerifier { } contract TestRiscZeroVerifier is TaikoL1TestBase { - MockRiscZeroRemoteVerifier riscZeroRemoteVerifier; + MockRisc0RemoteVerifier riscZeroRemoteVerifier; function deployTaikoL1() internal override returns (TaikoL1) { return @@ -39,17 +39,17 @@ contract TestRiscZeroVerifier is TaikoL1TestBase { // Call the TaikoL1TestBase setUp() super.setUp(); - riscZeroRemoteVerifier = new MockRiscZeroRemoteVerifier(); + riscZeroRemoteVerifier = new MockRisc0RemoteVerifier(); riscZeroRemoteVerifier.setVerifier(true); registerAddress("risc0_groth16_verifier", address(riscZeroRemoteVerifier)); // Deploy Taiko's RiscZero proof verifier - rv = RiscZeroVerifier( + rv = Risc0Verifier( deployProxy({ - name: "tier_risc_zero", - impl: address(new RiscZeroVerifier()), - data: abi.encodeCall(RiscZeroVerifier.init, (address(0), address(addressManager))) + name: "tier_zkvm_risc0", + impl: address(new Risc0Verifier()), + data: abi.encodeCall(Risc0Verifier.init, (address(0), address(addressManager))) }) ); @@ -105,7 +105,7 @@ contract TestRiscZeroVerifier is TaikoL1TestBase { (IVerifier.Context memory ctx, TaikoData.Transition memory transition) = _getDummyContextAndTransition(); - vm.expectRevert(RiscZeroVerifier.RISC_ZERO_INVALID_IMAGE_ID.selector); + vm.expectRevert(Risc0Verifier.RISC_ZERO_INVALID_IMAGE_ID.selector); rv.verifyProof(ctx, transition, proof); vm.stopPrank(); @@ -131,7 +131,7 @@ contract TestRiscZeroVerifier is TaikoL1TestBase { (IVerifier.Context memory ctx, TaikoData.Transition memory transition) = _getDummyContextAndTransition(); - vm.expectRevert(RiscZeroVerifier.RISC_ZERO_INVALID_PROOF.selector); + vm.expectRevert(Risc0Verifier.RISC_ZERO_INVALID_PROOF.selector); rv.verifyProof(ctx, transition, proof); vm.stopPrank(); diff --git a/packages/protocol/test/verifiers/RiscZeroGroth16Verifier.t.sol b/packages/protocol/test/verifiers/RiscZeroGroth16Verifier.t.sol index 0ff7677e0f7..0f27ba0c8af 100644 --- a/packages/protocol/test/verifiers/RiscZeroGroth16Verifier.t.sol +++ b/packages/protocol/test/verifiers/RiscZeroGroth16Verifier.t.sol @@ -22,11 +22,11 @@ contract RiscZeroGroth16VerifierTest is TaikoL1TestBase { registerAddress("risc0_groth16_verifier", address(verifier)); // Deploy Taiko's RiscZero proof verifier - rv = RiscZeroVerifier( + rv = Risc0Verifier( deployProxy({ - name: "tier_risc_zero", - impl: address(new RiscZeroVerifier()), - data: abi.encodeCall(RiscZeroVerifier.init, (address(0), address(addressManager))) + name: "tier_zkvm_risc0", + impl: address(new Risc0Verifier()), + data: abi.encodeCall(Risc0Verifier.init, (address(0), address(addressManager))) }) ); diff --git a/packages/protocol/test/verifiers/SP1Verifier.t.sol b/packages/protocol/test/verifiers/SP1Verifier.t.sol index 49b375c3ffb..2c00877142d 100644 --- a/packages/protocol/test/verifiers/SP1Verifier.t.sol +++ b/packages/protocol/test/verifiers/SP1Verifier.t.sol @@ -43,7 +43,7 @@ contract TestSP1Verifier is TaikoL1TestBase { // Deploy Taiko's SP1 proof verifier ('remitter') sp1 = SP1Verifier( deployProxy({ - name: "tier_sp1", + name: "tier_zkvm_sp1", impl: address(new SP1Verifier()), data: abi.encodeCall(SP1Verifier.init, (address(0), address(addressManager))) }) diff --git a/packages/protocol/test/verifiers/SgxVerifier.t.sol b/packages/protocol/test/verifiers/SgxVerifier.t.sol index 116c9e6c119..3ce3d2c49dc 100644 --- a/packages/protocol/test/verifiers/SgxVerifier.t.sol +++ b/packages/protocol/test/verifiers/SgxVerifier.t.sol @@ -380,49 +380,4 @@ contract TestSgxVerifier is TaikoL1TestBase, AttestationBase { vm.stopPrank(); } - - // Test `verifyProof()` call is not taiko or higher tier proof - function test_verifyProof_invalidCaller() public { - vm.startPrank(Alice); // invalid caller - - // Context - IVerifier.Context memory ctx = IVerifier.Context({ - metaHash: bytes32("ab"), - blobHash: bytes32("cd"), - prover: Alice, - msgSender: Alice, - blockId: 10, - isContesting: false, - blobUsed: false - }); - - // Transition - TaikoData.Transition memory transition = TaikoData.Transition({ - parentHash: bytes32("12"), - blockHash: bytes32("34"), - stateRoot: bytes32("56"), - graffiti: bytes32("78") - }); - - // TierProof - uint32 id = 0; - address newInstance = address(0x33); - - uint64 chainId = L1.getConfig().chainId; - bytes32 signedHash = LibPublicInput.hashPublicInputs( - transition, address(sv), newInstance, ctx.prover, ctx.metaHash, chainId - ); - - (uint8 v, bytes32 r, bytes32 s) = vm.sign(KNOWN_ADDRESS_PRIV_KEY, signedHash); - bytes memory signature = abi.encodePacked(r, s, v); - - bytes memory data = abi.encodePacked(id, newInstance, signature); - TaikoData.TierProof memory proof = TaikoData.TierProof({ tier: 100, data: data }); - - // `verifyProof()` - vm.expectRevert(AddressResolver.RESOLVER_DENIED.selector); - sv.verifyProof(ctx, transition, proof); - - vm.stopPrank(); - } } diff --git a/packages/protocol/test/verifiers/compose/ComposeVerifeir.t.sol b/packages/protocol/test/verifiers/compose/ComposeVerifeir.t.sol new file mode 100644 index 00000000000..0b6b9949e6f --- /dev/null +++ b/packages/protocol/test/verifiers/compose/ComposeVerifeir.t.sol @@ -0,0 +1,217 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +import "../../TaikoTest.sol"; +import "../../../contracts/verifiers/compose/ComposeVerifier.sol"; + +contract ComposeVerifierForTest is ComposeVerifier { + uint256 private threshold; + address[] private verifiers; + + function setThreshold(uint256 _threshold) external { + threshold = _threshold; + } + + function getSubVerifiersAndThreshold() + public + view + override + returns (address[] memory, uint256) + { + return (verifiers, threshold); + } + + function addSubVerifier(address _verifier) external { + verifiers.push(_verifier); + } + + function _getAddress(uint64, bytes32 _name) internal view override returns (address) { + if (_name == LibStrings.B_TAIKO) return msg.sender; + else return address(0); + } +} + +contract MockVerifier is IVerifier { + bool private shouldSucceed; + + constructor(bool _shouldSucceed) { + shouldSucceed = _shouldSucceed; + } + + function verifyProof( + Context calldata, + TaikoData.Transition calldata, + TaikoData.TierProof calldata + ) + external + view + override + { + if (!shouldSucceed) { + revert("MockVerifier: Verification failed"); + } + } +} + +contract ComposeVerifierTest is TaikoTest { + IVerifier.Context private ctx; + TaikoData.Transition private tran; + + function test_composeVerifeir_invalid_subproof_length() public { + ComposeVerifierForTest composeVerifier = new ComposeVerifierForTest(); + address verifier1 = address(new MockVerifier(true)); + address verifier2 = address(new MockVerifier(true)); + address verifier3 = address(new MockVerifier(true)); + + composeVerifier.addSubVerifier(verifier1); + composeVerifier.addSubVerifier(verifier2); + composeVerifier.addSubVerifier(verifier3); + + ComposeVerifier.SubProof[] memory subProofs = new ComposeVerifier.SubProof[](2); + subProofs[0] = ComposeVerifier.SubProof(verifier1, ""); + subProofs[1] = ComposeVerifier.SubProof(verifier1, ""); + + TaikoData.TierProof memory proof = + TaikoData.TierProof({ tier: 1, data: abi.encode(subProofs) }); + + composeVerifier.setThreshold(1); + + vm.expectRevert(ComposeVerifier.CV_INVALID_SUBPROOF_LENGTH.selector); + composeVerifier.verifyProof(ctx, tran, proof); + } + + function test_composeVerifeir_1_outof_3() public { + ComposeVerifierForTest composeVerifier = new ComposeVerifierForTest(); + address verifier1 = address(new MockVerifier(true)); + address verifier2 = address(new MockVerifier(true)); + address verifier3 = address(new MockVerifier(true)); + + composeVerifier.addSubVerifier(verifier1); + composeVerifier.addSubVerifier(verifier2); + composeVerifier.addSubVerifier(verifier3); + + ComposeVerifier.SubProof[] memory subProofs = new ComposeVerifier.SubProof[](1); + subProofs[0] = ComposeVerifier.SubProof(verifier1, ""); + + TaikoData.TierProof memory proof = + TaikoData.TierProof({ tier: 1, data: abi.encode(subProofs) }); + + composeVerifier.setThreshold(1); + composeVerifier.verifyProof(ctx, tran, proof); + } + + function test_composeVerifeir_2_outof_3() public { + ComposeVerifierForTest composeVerifier = new ComposeVerifierForTest(); + address verifier1 = address(new MockVerifier(true)); + address verifier2 = address(new MockVerifier(true)); + address verifier3 = address(new MockVerifier(true)); + + composeVerifier.addSubVerifier(verifier1); + composeVerifier.addSubVerifier(verifier2); + composeVerifier.addSubVerifier(verifier3); + + ComposeVerifier.SubProof[] memory subProofs = new ComposeVerifier.SubProof[](2); + subProofs[0] = ComposeVerifier.SubProof(verifier1, ""); + subProofs[1] = ComposeVerifier.SubProof(verifier2, ""); + + TaikoData.TierProof memory proof = + TaikoData.TierProof({ tier: 1, data: abi.encode(subProofs) }); + + composeVerifier.setThreshold(2); + composeVerifier.verifyProof(ctx, tran, proof); + } + + function test_composeVerifeir_3_outof_3() public { + ComposeVerifierForTest composeVerifier = new ComposeVerifierForTest(); + address verifier1 = address(new MockVerifier(true)); + address verifier2 = address(new MockVerifier(true)); + address verifier3 = address(new MockVerifier(true)); + + composeVerifier.addSubVerifier(verifier1); + composeVerifier.addSubVerifier(verifier2); + composeVerifier.addSubVerifier(verifier3); + + ComposeVerifier.SubProof[] memory subProofs = new ComposeVerifier.SubProof[](3); + subProofs[0] = ComposeVerifier.SubProof(verifier1, ""); + subProofs[1] = ComposeVerifier.SubProof(verifier2, ""); + subProofs[2] = ComposeVerifier.SubProof(verifier3, ""); + + TaikoData.TierProof memory proof = + TaikoData.TierProof({ tier: 1, data: abi.encode(subProofs) }); + + composeVerifier.setThreshold(3); + composeVerifier.verifyProof(ctx, tran, proof); + } + + function test_composeVerifeir_subproof_failure() public { + ComposeVerifierForTest composeVerifier = new ComposeVerifierForTest(); + address verifier1 = address(new MockVerifier(true)); + address verifier2 = address(new MockVerifier(true)); + address verifier3 = address(new MockVerifier(false)); + + composeVerifier.addSubVerifier(verifier1); + composeVerifier.addSubVerifier(verifier2); + composeVerifier.addSubVerifier(verifier3); + + ComposeVerifier.SubProof[] memory subProofs = new ComposeVerifier.SubProof[](3); + subProofs[0] = ComposeVerifier.SubProof(verifier1, ""); + subProofs[1] = ComposeVerifier.SubProof(verifier2, ""); + subProofs[2] = ComposeVerifier.SubProof(verifier3, ""); + + TaikoData.TierProof memory proof = + TaikoData.TierProof({ tier: 1, data: abi.encode(subProofs) }); + + composeVerifier.setThreshold(3); + + // Expect the verification to fail because one sub proof is invalid + vm.expectRevert("MockVerifier: Verification failed"); + composeVerifier.verifyProof(ctx, tran, proof); + } + + function test_composeVerifeir_2_outof_3_duplicate_subproof() public { + ComposeVerifierForTest composeVerifier = new ComposeVerifierForTest(); + address verifier1 = address(new MockVerifier(true)); + address verifier2 = address(new MockVerifier(true)); + address verifier3 = address(new MockVerifier(true)); + + composeVerifier.addSubVerifier(verifier1); + composeVerifier.addSubVerifier(verifier2); + composeVerifier.addSubVerifier(verifier3); + + ComposeVerifier.SubProof[] memory subProofs = new ComposeVerifier.SubProof[](2); + subProofs[0] = ComposeVerifier.SubProof(verifier1, ""); + subProofs[1] = ComposeVerifier.SubProof(verifier1, ""); + + TaikoData.TierProof memory proof = + TaikoData.TierProof({ tier: 1, data: abi.encode(subProofs) }); + + composeVerifier.setThreshold(2); + vm.expectRevert(ComposeVerifier.CV_SUB_VERIFIER_NOT_FOUND.selector); + composeVerifier.verifyProof(ctx, tran, proof); + } + + function test_composeVerifeir_subproof_verifier_not_found() public { + ComposeVerifierForTest composeVerifier = new ComposeVerifierForTest(); + address verifier1 = address(new MockVerifier(true)); + address verifier2 = address(new MockVerifier(true)); + address verifier3 = address(new MockVerifier(true)); + + composeVerifier.addSubVerifier(verifier1); + composeVerifier.addSubVerifier(verifier2); + composeVerifier.addSubVerifier(verifier3); + + ComposeVerifier.SubProof[] memory subProofs = new ComposeVerifier.SubProof[](3); + subProofs[0] = ComposeVerifier.SubProof(verifier1, ""); + subProofs[1] = ComposeVerifier.SubProof(verifier2, ""); + subProofs[2] = ComposeVerifier.SubProof(address((123)), ""); + + TaikoData.TierProof memory proof = + TaikoData.TierProof({ tier: 1, data: abi.encode(subProofs) }); + + composeVerifier.setThreshold(3); + + // Expect the verification to fail because one sub proof is invalid + vm.expectRevert(ComposeVerifier.CV_SUB_VERIFIER_NOT_FOUND.selector); + composeVerifier.verifyProof(ctx, tran, proof); + } +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 59f91f1f276..0384c6979a0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -36,7 +36,7 @@ importers: version: 2.6.2(@types/react@18.3.3)(react@18.3.1) '@web3modal/wagmi': specifier: ^4.1.11 - version: 4.1.11(465hcphkttv2p5txznqylpmnwa) + version: 4.1.11(@types/react@18.3.3)(@wagmi/connectors@4.3.3(@types/react@18.3.3)(@wagmi/core@2.9.1(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.9.31(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8))(bufferutil@4.0.8)(encoding@0.1.13)(react-dom@18.3.1(react@18.3.1))(react-i18next@13.5.0(i18next@23.11.5)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.24.5(@babel/core@7.25.2))(@types/react@18.3.3)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.24.5(@babel/core@7.25.2))(@types/react@18.3.3)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.17.2)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.9.31(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8))(@wagmi/core@2.9.1(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.9.31(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(viem@2.9.31(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8)) '@zerodevx/svelte-toast': specifier: ^0.9.5 version: 0.9.5(svelte@4.2.15) @@ -474,8 +474,8 @@ importers: specifier: 0.8.24 version: 0.8.24 solhint: - specifier: ^5.0.1 - version: 5.0.1(typescript@5.4.5) + specifier: ^5.0.3 + version: 5.0.3(typescript@5.4.5) ts-node: specifier: ^10.9.2 version: 10.9.2(@types/node@20.12.8)(typescript@5.4.5) @@ -736,7 +736,7 @@ importers: version: 4.1.11 '@web3modal/wagmi': specifier: ^4.1.1 - version: 4.1.11(nhv3btjcneav7vr3ub73tnaqau) + version: 4.1.11(@types/react@18.3.3)(@wagmi/connectors@4.3.3(@types/react@18.3.3)(@wagmi/core@2.9.1(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.18.8(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.6))(zod@3.23.6))(bufferutil@4.0.8)(encoding@0.1.13)(react-dom@18.3.1(react@18.3.1))(react-i18next@13.5.0(i18next@22.5.1)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.24.5(@babel/core@7.25.2))(@types/react@18.3.3)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.24.5(@babel/core@7.25.2))(@types/react@18.3.3)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.17.2)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.18.8(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.6))(zod@3.23.6))(@wagmi/core@2.9.1(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.18.8(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.6))(zod@3.23.6))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(viem@2.18.8(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.6)) '@zerodevx/svelte-toast': specifier: ^0.9.5 version: 0.9.5(svelte@4.2.15) @@ -10094,8 +10094,8 @@ packages: resolution: {integrity: sha512-Cu1XiJXub2q1eCr9kkJ9VPv1sGcmj3V7Zb76B0CoezDOB9bu3DxKIFFH7ggCl9fWpEPD6xBmRLfZrYijkVmujQ==} hasBin: true - solhint@5.0.1: - resolution: {integrity: sha512-QeQLS9HGCnIiibt+xiOa/+MuP7BWz9N7C5+Mj9pLHshdkNhuo3AzCpWmjfWVZBUuwIUO3YyCRVIcYLR3YOKGfg==} + solhint@5.0.3: + resolution: {integrity: sha512-OLCH6qm/mZTCpplTXzXTJGId1zrtNuDYP5c2e6snIv/hdRVxPfBBz/bAlL91bY/Accavkayp2Zp2BaDSrLVXTQ==} hasBin: true solidity-stringutils@git+https://git@github.com:Arachnid/solidity-stringutils.git#4b2fcc43fa0426e19ce88b1f1ec16f5903a2e461: @@ -11750,10 +11750,10 @@ snapshots: '@aws-crypto/sha1-browser': 3.0.0 '@aws-crypto/sha256-browser': 3.0.0 '@aws-crypto/sha256-js': 3.0.0 - '@aws-sdk/client-sso-oidc': 3.577.0 - '@aws-sdk/client-sts': 3.577.0(@aws-sdk/client-sso-oidc@3.577.0) + '@aws-sdk/client-sso-oidc': 3.577.0(@aws-sdk/client-sts@3.577.0) + '@aws-sdk/client-sts': 3.577.0 '@aws-sdk/core': 3.576.0 - '@aws-sdk/credential-provider-node': 3.577.0(@aws-sdk/client-sso-oidc@3.577.0)(@aws-sdk/client-sts@3.577.0(@aws-sdk/client-sso-oidc@3.577.0)) + '@aws-sdk/credential-provider-node': 3.577.0(@aws-sdk/client-sso-oidc@3.577.0(@aws-sdk/client-sts@3.577.0))(@aws-sdk/client-sts@3.577.0) '@aws-sdk/middleware-bucket-endpoint': 3.577.0 '@aws-sdk/middleware-expect-continue': 3.577.0 '@aws-sdk/middleware-flexible-checksums': 3.577.0 @@ -11808,13 +11808,13 @@ snapshots: transitivePeerDependencies: - aws-crt - '@aws-sdk/client-sso-oidc@3.577.0': + '@aws-sdk/client-sso-oidc@3.577.0(@aws-sdk/client-sts@3.577.0)': dependencies: '@aws-crypto/sha256-browser': 3.0.0 '@aws-crypto/sha256-js': 3.0.0 - '@aws-sdk/client-sts': 3.577.0(@aws-sdk/client-sso-oidc@3.577.0) + '@aws-sdk/client-sts': 3.577.0 '@aws-sdk/core': 3.576.0 - '@aws-sdk/credential-provider-node': 3.577.0(@aws-sdk/client-sso-oidc@3.577.0)(@aws-sdk/client-sts@3.577.0(@aws-sdk/client-sso-oidc@3.577.0)) + '@aws-sdk/credential-provider-node': 3.577.0(@aws-sdk/client-sso-oidc@3.577.0(@aws-sdk/client-sts@3.577.0))(@aws-sdk/client-sts@3.577.0) '@aws-sdk/middleware-host-header': 3.577.0 '@aws-sdk/middleware-logger': 3.577.0 '@aws-sdk/middleware-recursion-detection': 3.577.0 @@ -11851,6 +11851,7 @@ snapshots: '@smithy/util-utf8': 3.0.0 tslib: 2.6.2 transitivePeerDependencies: + - '@aws-sdk/client-sts' - aws-crt '@aws-sdk/client-sso@3.577.0': @@ -11896,13 +11897,13 @@ snapshots: transitivePeerDependencies: - aws-crt - '@aws-sdk/client-sts@3.577.0(@aws-sdk/client-sso-oidc@3.577.0)': + '@aws-sdk/client-sts@3.577.0': dependencies: '@aws-crypto/sha256-browser': 3.0.0 '@aws-crypto/sha256-js': 3.0.0 - '@aws-sdk/client-sso-oidc': 3.577.0 + '@aws-sdk/client-sso-oidc': 3.577.0(@aws-sdk/client-sts@3.577.0) '@aws-sdk/core': 3.576.0 - '@aws-sdk/credential-provider-node': 3.577.0(@aws-sdk/client-sso-oidc@3.577.0)(@aws-sdk/client-sts@3.577.0(@aws-sdk/client-sso-oidc@3.577.0)) + '@aws-sdk/credential-provider-node': 3.577.0(@aws-sdk/client-sso-oidc@3.577.0(@aws-sdk/client-sts@3.577.0))(@aws-sdk/client-sts@3.577.0) '@aws-sdk/middleware-host-header': 3.577.0 '@aws-sdk/middleware-logger': 3.577.0 '@aws-sdk/middleware-recursion-detection': 3.577.0 @@ -11939,7 +11940,6 @@ snapshots: '@smithy/util-utf8': 3.0.0 tslib: 2.6.2 transitivePeerDependencies: - - '@aws-sdk/client-sso-oidc' - aws-crt '@aws-sdk/core@3.576.0': @@ -11971,13 +11971,13 @@ snapshots: '@smithy/util-stream': 3.0.1 tslib: 2.6.2 - '@aws-sdk/credential-provider-ini@3.577.0(@aws-sdk/client-sso-oidc@3.577.0)(@aws-sdk/client-sts@3.577.0(@aws-sdk/client-sso-oidc@3.577.0))': + '@aws-sdk/credential-provider-ini@3.577.0(@aws-sdk/client-sso-oidc@3.577.0(@aws-sdk/client-sts@3.577.0))(@aws-sdk/client-sts@3.577.0)': dependencies: - '@aws-sdk/client-sts': 3.577.0(@aws-sdk/client-sso-oidc@3.577.0) + '@aws-sdk/client-sts': 3.577.0 '@aws-sdk/credential-provider-env': 3.577.0 '@aws-sdk/credential-provider-process': 3.577.0 - '@aws-sdk/credential-provider-sso': 3.577.0(@aws-sdk/client-sso-oidc@3.577.0) - '@aws-sdk/credential-provider-web-identity': 3.577.0(@aws-sdk/client-sts@3.577.0(@aws-sdk/client-sso-oidc@3.577.0)) + '@aws-sdk/credential-provider-sso': 3.577.0(@aws-sdk/client-sso-oidc@3.577.0(@aws-sdk/client-sts@3.577.0)) + '@aws-sdk/credential-provider-web-identity': 3.577.0(@aws-sdk/client-sts@3.577.0) '@aws-sdk/types': 3.577.0 '@smithy/credential-provider-imds': 3.0.0 '@smithy/property-provider': 3.0.0 @@ -11988,14 +11988,14 @@ snapshots: - '@aws-sdk/client-sso-oidc' - aws-crt - '@aws-sdk/credential-provider-node@3.577.0(@aws-sdk/client-sso-oidc@3.577.0)(@aws-sdk/client-sts@3.577.0(@aws-sdk/client-sso-oidc@3.577.0))': + '@aws-sdk/credential-provider-node@3.577.0(@aws-sdk/client-sso-oidc@3.577.0(@aws-sdk/client-sts@3.577.0))(@aws-sdk/client-sts@3.577.0)': dependencies: '@aws-sdk/credential-provider-env': 3.577.0 '@aws-sdk/credential-provider-http': 3.577.0 - '@aws-sdk/credential-provider-ini': 3.577.0(@aws-sdk/client-sso-oidc@3.577.0)(@aws-sdk/client-sts@3.577.0(@aws-sdk/client-sso-oidc@3.577.0)) + '@aws-sdk/credential-provider-ini': 3.577.0(@aws-sdk/client-sso-oidc@3.577.0(@aws-sdk/client-sts@3.577.0))(@aws-sdk/client-sts@3.577.0) '@aws-sdk/credential-provider-process': 3.577.0 - '@aws-sdk/credential-provider-sso': 3.577.0(@aws-sdk/client-sso-oidc@3.577.0) - '@aws-sdk/credential-provider-web-identity': 3.577.0(@aws-sdk/client-sts@3.577.0(@aws-sdk/client-sso-oidc@3.577.0)) + '@aws-sdk/credential-provider-sso': 3.577.0(@aws-sdk/client-sso-oidc@3.577.0(@aws-sdk/client-sts@3.577.0)) + '@aws-sdk/credential-provider-web-identity': 3.577.0(@aws-sdk/client-sts@3.577.0) '@aws-sdk/types': 3.577.0 '@smithy/credential-provider-imds': 3.0.0 '@smithy/property-provider': 3.0.0 @@ -12015,10 +12015,10 @@ snapshots: '@smithy/types': 3.0.0 tslib: 2.6.2 - '@aws-sdk/credential-provider-sso@3.577.0(@aws-sdk/client-sso-oidc@3.577.0)': + '@aws-sdk/credential-provider-sso@3.577.0(@aws-sdk/client-sso-oidc@3.577.0(@aws-sdk/client-sts@3.577.0))': dependencies: '@aws-sdk/client-sso': 3.577.0 - '@aws-sdk/token-providers': 3.577.0(@aws-sdk/client-sso-oidc@3.577.0) + '@aws-sdk/token-providers': 3.577.0(@aws-sdk/client-sso-oidc@3.577.0(@aws-sdk/client-sts@3.577.0)) '@aws-sdk/types': 3.577.0 '@smithy/property-provider': 3.0.0 '@smithy/shared-ini-file-loader': 3.0.0 @@ -12028,9 +12028,9 @@ snapshots: - '@aws-sdk/client-sso-oidc' - aws-crt - '@aws-sdk/credential-provider-web-identity@3.577.0(@aws-sdk/client-sts@3.577.0(@aws-sdk/client-sso-oidc@3.577.0))': + '@aws-sdk/credential-provider-web-identity@3.577.0(@aws-sdk/client-sts@3.577.0)': dependencies: - '@aws-sdk/client-sts': 3.577.0(@aws-sdk/client-sso-oidc@3.577.0) + '@aws-sdk/client-sts': 3.577.0 '@aws-sdk/types': 3.577.0 '@smithy/property-provider': 3.0.0 '@smithy/types': 3.0.0 @@ -12155,9 +12155,9 @@ snapshots: '@smithy/types': 3.0.0 tslib: 2.6.2 - '@aws-sdk/token-providers@3.577.0(@aws-sdk/client-sso-oidc@3.577.0)': + '@aws-sdk/token-providers@3.577.0(@aws-sdk/client-sso-oidc@3.577.0(@aws-sdk/client-sts@3.577.0))': dependencies: - '@aws-sdk/client-sso-oidc': 3.577.0 + '@aws-sdk/client-sso-oidc': 3.577.0(@aws-sdk/client-sts@3.577.0) '@aws-sdk/types': 3.577.0 '@smithy/property-provider': 3.0.0 '@smithy/shared-ini-file-loader': 3.0.0 @@ -18986,34 +18986,34 @@ snapshots: lit: 3.1.0 qrcode: 1.5.3 - '@web3modal/wagmi@4.1.11(465hcphkttv2p5txznqylpmnwa)': - dependencies: - '@wagmi/connectors': 4.3.3(@types/react@18.3.3)(@wagmi/core@2.9.1(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.9.31(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8))(bufferutil@4.0.8)(encoding@0.1.13)(react-dom@18.3.1(react@18.3.1))(react-i18next@13.5.0(i18next@23.11.5)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.24.5(@babel/core@7.25.2))(@types/react@18.3.3)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.24.5(@babel/core@7.25.2))(@types/react@18.3.3)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.17.2)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.9.31(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) - '@wagmi/core': 2.9.1(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.9.31(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) + ? '@web3modal/wagmi@4.1.11(@types/react@18.3.3)(@wagmi/connectors@4.3.3(@types/react@18.3.3)(@wagmi/core@2.9.1(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.18.8(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.6))(zod@3.23.6))(bufferutil@4.0.8)(encoding@0.1.13)(react-dom@18.3.1(react@18.3.1))(react-i18next@13.5.0(i18next@22.5.1)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.24.5(@babel/core@7.25.2))(@types/react@18.3.3)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.24.5(@babel/core@7.25.2))(@types/react@18.3.3)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.17.2)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.18.8(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.6))(zod@3.23.6))(@wagmi/core@2.9.1(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.18.8(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.6))(zod@3.23.6))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(viem@2.18.8(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.6))' + : dependencies: + '@wagmi/connectors': 4.3.3(@types/react@18.3.3)(@wagmi/core@2.9.1(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.18.8(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.6))(zod@3.23.6))(bufferutil@4.0.8)(encoding@0.1.13)(react-dom@18.3.1(react@18.3.1))(react-i18next@13.5.0(i18next@22.5.1)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.24.5(@babel/core@7.25.2))(@types/react@18.3.3)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.24.5(@babel/core@7.25.2))(@types/react@18.3.3)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.17.2)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.18.8(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.6))(zod@3.23.6) + '@wagmi/core': 2.9.1(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.18.8(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.6))(zod@3.23.6) '@web3modal/polyfills': 4.1.11 '@web3modal/scaffold': 4.1.11(@types/react@18.3.3)(react@18.3.1) '@web3modal/scaffold-react': 4.1.11(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@web3modal/scaffold-utils': 4.1.11(@types/react@18.3.3)(react@18.3.1) '@web3modal/scaffold-vue': 4.1.11(@types/react@18.3.3)(react@18.3.1) '@web3modal/siwe': 4.1.11(@types/react@18.3.3)(react@18.3.1) - viem: 2.9.31(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8) + viem: 2.18.8(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.6) optionalDependencies: react: 18.3.1 react-dom: 18.3.1(react@18.3.1) transitivePeerDependencies: - '@types/react' - '@web3modal/wagmi@4.1.11(nhv3btjcneav7vr3ub73tnaqau)': - dependencies: - '@wagmi/connectors': 4.3.3(@types/react@18.3.3)(@wagmi/core@2.9.1(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.18.8(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.6))(zod@3.23.6))(bufferutil@4.0.8)(encoding@0.1.13)(react-dom@18.3.1(react@18.3.1))(react-i18next@13.5.0(i18next@22.5.1)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.24.5(@babel/core@7.25.2))(@types/react@18.3.3)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.24.5(@babel/core@7.25.2))(@types/react@18.3.3)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.17.2)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.18.8(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.6))(zod@3.23.6) - '@wagmi/core': 2.9.1(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.18.8(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.6))(zod@3.23.6) + ? '@web3modal/wagmi@4.1.11(@types/react@18.3.3)(@wagmi/connectors@4.3.3(@types/react@18.3.3)(@wagmi/core@2.9.1(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.9.31(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8))(bufferutil@4.0.8)(encoding@0.1.13)(react-dom@18.3.1(react@18.3.1))(react-i18next@13.5.0(i18next@23.11.5)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.24.5(@babel/core@7.25.2))(@types/react@18.3.3)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.24.5(@babel/core@7.25.2))(@types/react@18.3.3)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.17.2)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.9.31(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8))(@wagmi/core@2.9.1(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.9.31(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(viem@2.9.31(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))' + : dependencies: + '@wagmi/connectors': 4.3.3(@types/react@18.3.3)(@wagmi/core@2.9.1(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.9.31(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8))(bufferutil@4.0.8)(encoding@0.1.13)(react-dom@18.3.1(react@18.3.1))(react-i18next@13.5.0(i18next@23.11.5)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.24.5(@babel/core@7.25.2))(@types/react@18.3.3)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.24.5(@babel/core@7.25.2))(@types/react@18.3.3)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.17.2)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.9.31(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) + '@wagmi/core': 2.9.1(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.9.31(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) '@web3modal/polyfills': 4.1.11 '@web3modal/scaffold': 4.1.11(@types/react@18.3.3)(react@18.3.1) '@web3modal/scaffold-react': 4.1.11(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@web3modal/scaffold-utils': 4.1.11(@types/react@18.3.3)(react@18.3.1) '@web3modal/scaffold-vue': 4.1.11(@types/react@18.3.3)(react@18.3.1) '@web3modal/siwe': 4.1.11(@types/react@18.3.3)(react@18.3.1) - viem: 2.18.8(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.6) + viem: 2.9.31(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8) optionalDependencies: react: 18.3.1 react-dom: 18.3.1(react@18.3.1) @@ -25425,7 +25425,7 @@ snapshots: transitivePeerDependencies: - typescript - solhint@5.0.1(typescript@5.4.5): + solhint@5.0.3(typescript@5.4.5): dependencies: '@solidity-parser/parser': 0.18.0 ajv: 6.12.6 @@ -25441,7 +25441,7 @@ snapshots: latest-version: 7.0.0 lodash: 4.17.21 pluralize: 8.0.0 - semver: 7.6.0 + semver: 7.6.3 strip-ansi: 6.0.1 table: 6.8.2 text-table: 0.2.0