diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index bd65c55089..aaa9525d6b 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -16,7 +16,7 @@ jobs: - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 with: - version: nightly + version: stable - name: Setup node/yarn uses: actions/setup-node@v3 @@ -77,7 +77,7 @@ jobs: - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 with: - version: nightly + version: stable - name: Setup node/yarn uses: actions/setup-node@v3 diff --git a/README.md b/README.md index cabc4a1656..2fade72f61 100644 --- a/README.md +++ b/README.md @@ -12,13 +12,13 @@ See the [developer documentation](https://developer.arbitrum.io/asset-bridging) See security audit reports [here](./audits). -This repository is offered under the Apache 2.0 license. See LICENSE for details. +This repository is offered under the Apache 2.0 license. See [LICENSE](https://github.com/OffchainLabs/token-bridge-contracts/blob/main/LICENSE) for details. ## Deployment Check [this doc](./docs/deployment.md) for instructions on deployment and verification of token bridge. ## Contact -Discord - [Arbitrum](https://discord.com/invite/5KE54JwyTs) +Discord: [Arbitrum](https://discord.com/invite/5KE54JwyTs) Twitter: [Arbitrum](https://twitter.com/arbitrum) diff --git a/package.json b/package.json index e958d3dd01..7cc704d5da 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@arbitrum/token-bridge-contracts", - "version": "1.2.3", + "version": "1.2.5", "license": "Apache-2.0", "scripts": { "prepublishOnly": "hardhat clean && hardhat compile", @@ -19,8 +19,8 @@ "test:l2": "hardhat test test/*.l2.ts", "test:unit": "forge test", "test:e2e:local-env": "yarn hardhat test test-e2e/*", - "test:storage": "./scripts/storage_layout_test.bash", - "test:signatures": "./scripts/signatures_test.bash", + "test:storage": "./test/storage/test-storage.bash", + "test:signatures": "./test/signatures/test-sigs.bash", "test:mutation": "ts-node test-mutation/gambitTester.ts", "test:unused:errors": "./test/unused-errors/find_unused_errors.sh", "deploy:local:token-bridge": "ts-node ./scripts/local-deployment/deployCreatorAndCreateTokenBridge.ts", @@ -50,7 +50,7 @@ "@openzeppelin/contracts-upgradeable": "4.8.3" }, "devDependencies": { - "@arbitrum/sdk": "^3.5.1", + "@arbitrum/sdk": "^4.0.4", "@nomiclabs/hardhat-ethers": "^2.0.1", "@nomiclabs/hardhat-etherscan": "^3.1.0", "@nomiclabs/hardhat-waffle": "^2.0.1", diff --git a/scripts/atomicTokenBridgeDeployer.ts b/scripts/atomicTokenBridgeDeployer.ts index cda26fa09e..47a375ac2a 100644 --- a/scripts/atomicTokenBridgeDeployer.ts +++ b/scripts/atomicTokenBridgeDeployer.ts @@ -33,18 +33,18 @@ import { } from '@offchainlabs/upgrade-executor/build/contracts/src/UpgradeExecutor.sol/UpgradeExecutor.json' import { JsonRpcProvider } from '@ethersproject/providers' import { - L1ToL2MessageGasEstimator, - L1ToL2MessageStatus, - L1TransactionReceipt, + ParentToChildMessageGasEstimator, + ParentToChildMessageStatus, + ParentTransactionReceipt, + ParentContractCallTransactionReceipt } from '@arbitrum/sdk' import { exit } from 'process' import { getBaseFee } from '@arbitrum/sdk/dist/lib/utils/lib' import { RollupAdminLogic__factory } from '@arbitrum/sdk/dist/lib/abi/factories/RollupAdminLogic__factory' import { ContractVerifier } from './contractVerifier' import { OmitTyped } from '@arbitrum/sdk/dist/lib/utils/types' -import { L1ToL2MessageGasParams } from '@arbitrum/sdk/dist/lib/message/L1ToL2MessageCreator' -import { L1ContractCallTransactionReceipt } from '@arbitrum/sdk/dist/lib/message/L1Transaction' import { _getScaledAmount } from './local-deployment/localDeploymentLib' +import { ParentToChildMessageGasParams } from '@arbitrum/sdk/dist/lib/message/ParentToChildMessageCreator' /** * Dummy non-zero address which is provided to logic contracts initializers @@ -168,25 +168,25 @@ export const createTokenBridge = async ( console.log('Deployment TX:', receipt.transactionHash) /// wait for execution of both tickets - const l1TxReceipt = new L1TransactionReceipt(receipt) - const messages = await l1TxReceipt.getL1ToL2Messages(l2Provider) + const l1TxReceipt = new ParentTransactionReceipt(receipt) + const messages = await l1TxReceipt.getParentToChildMessages(l2Provider) const messageResults = await Promise.all( messages.map(message => message.waitForStatus()) ) // if both tickets are not redeemed log it and exit if ( - messageResults[0].status !== L1ToL2MessageStatus.REDEEMED || - messageResults[1].status !== L1ToL2MessageStatus.REDEEMED + messageResults[0].status !== ParentToChildMessageStatus.REDEEMED || + messageResults[1].status !== ParentToChildMessageStatus.REDEEMED ) { console.log( `Retryable ticket (ID ${messages[0].retryableCreationId}) status: ${ - L1ToL2MessageStatus[messageResults[0].status] + ParentToChildMessageStatus[messageResults[0].status] }` ) console.log( `Retryable ticket (ID ${messages[1].retryableCreationId}) status: ${ - L1ToL2MessageStatus[messageResults[1].status] + ParentToChildMessageStatus[messageResults[1].status] }` ) exit() @@ -195,7 +195,7 @@ export const createTokenBridge = async ( /// pick up L2 factory address from 1st ticket const l2AtomicTokenBridgeFactory = L2AtomicTokenBridgeFactory__factory.connect( - messageResults[0].l2TxReceipt.contractAddress, + messageResults[0].childTxReceipt.contractAddress, l2Provider ) console.log('L2AtomicTokenBridgeFactory', l2AtomicTokenBridgeFactory.address) @@ -603,7 +603,7 @@ export const registerGateway = async ( const executorAddress = await l1Executor.getAddress() - const buildCall = (params: OmitTyped) => { + const buildCall = (params: OmitTyped) => { const routerCalldata = L1GatewayRouter__factory.createInterface().encodeFunctionData( 'setGateways', @@ -628,13 +628,13 @@ export const registerGateway = async ( } } - const estimator = new L1ToL2MessageGasEstimator(l2Provider) + const estimator = new ParentToChildMessageGasEstimator(l2Provider) const txRequest = await estimator.populateFunctionParams( buildCall, l1Executor.provider! ) - const receipt = new L1ContractCallTransactionReceipt( + const receipt = new ParentContractCallTransactionReceipt( await ( await l1Executor.sendTransaction({ to: txRequest.to, @@ -645,12 +645,12 @@ export const registerGateway = async ( ) // wait for execution of ticket - const message = (await receipt.getL1ToL2Messages(l2Provider))[0] + const message = (await receipt.getParentToChildMessages(l2Provider))[0] const messageResult = await message.waitForStatus() - if (messageResult.status !== L1ToL2MessageStatus.REDEEMED) { + if (messageResult.status !== ParentToChildMessageStatus.REDEEMED) { console.log( `Retryable ticket (ID ${message.retryableCreationId}) status: ${ - L1ToL2MessageStatus[messageResult.status] + ParentToChildMessageStatus[messageResult.status] }` ) exit() @@ -663,7 +663,7 @@ export const getEstimateForDeployingFactory = async ( ) => { //// run retryable estimate for deploying L2 factory const l1DeployerAddress = await l1Deployer.getAddress() - const l1ToL2MsgGasEstimate = new L1ToL2MessageGasEstimator(l2Provider) + const l1ToL2MsgGasEstimate = new ParentToChildMessageGasEstimator(l2Provider) const deployFactoryGasParams = await l1ToL2MsgGasEstimate.estimateAll( { from: ethers.Wallet.createRandom().address, diff --git a/scripts/deployment/createTokenBridge.ts b/scripts/deployment/createTokenBridge.ts index 0e30a8cf73..69d274e0ea 100644 --- a/scripts/deployment/createTokenBridge.ts +++ b/scripts/deployment/createTokenBridge.ts @@ -1,5 +1,5 @@ import { JsonRpcProvider } from '@ethersproject/providers' -import { L1Network, L2Network, addCustomNetwork } from '@arbitrum/sdk' +import { ArbitrumNetwork, registerCustomArbitrumNetwork } from '@arbitrum/sdk' import { RollupAdminLogic__factory } from '@arbitrum/sdk/dist/lib/abi/factories/RollupAdminLogic__factory' import { createTokenBridge, getSigner } from '../atomicTokenBridgeDeployer' import dotenv from 'dotenv' @@ -51,7 +51,7 @@ export const createTokenBridgeOnTargetChain = async () => { const l1Deployer = getSigner(l1Provider, envVars.baseChainDeployerKey) const l2Provider = new JsonRpcProvider(envVars.childChainRpc) - const { l1Network, l2Network: corel2Network } = await registerNetworks( + const { l2Network: corel2Network } = await registerNetworks( l1Provider, l2Provider, envVars.rollupAddress @@ -72,29 +72,28 @@ export const createTokenBridgeOnTargetChain = async () => { envVars.rollupOwner ) - const l2Network = { + const l2Network: ArbitrumNetwork = { ...corel2Network, tokenBridge: { - l1CustomGateway: l1Deployment.customGateway, - l1ERC20Gateway: l1Deployment.standardGateway, - l1GatewayRouter: l1Deployment.router, - l1MultiCall: l1MultiCall, - l1ProxyAdmin: l1ProxyAdmin, - l1Weth: l1Deployment.weth, - l1WethGateway: l1Deployment.wethGateway, - - l2CustomGateway: l2Deployment.customGateway, - l2ERC20Gateway: l2Deployment.standardGateway, - l2GatewayRouter: l2Deployment.router, - l2Multicall: l2Deployment.multicall, - l2ProxyAdmin: l2Deployment.proxyAdmin, - l2Weth: l2Deployment.weth, - l2WethGateway: l2Deployment.wethGateway, + parentCustomGateway: l1Deployment.customGateway, + parentErc20Gateway: l1Deployment.standardGateway, + parentGatewayRouter: l1Deployment.router, + parentMultiCall: l1MultiCall, + parentProxyAdmin: l1ProxyAdmin, + parentWeth: l1Deployment.weth, + parentWethGateway: l1Deployment.wethGateway, + + childCustomGateway: l2Deployment.customGateway, + childErc20Gateway: l2Deployment.standardGateway, + childGatewayRouter: l2Deployment.router, + childMultiCall: l2Deployment.multicall, + childProxyAdmin: l2Deployment.proxyAdmin, + childWeth: l2Deployment.weth, + childWethGateway: l2Deployment.wethGateway, }, } return { - l1Network, l2Network, } } @@ -104,25 +103,15 @@ const registerNetworks = async ( l2Provider: JsonRpcProvider, rollupAddress: string ): Promise<{ - l1Network: L1Network - l2Network: Omit + l2Network: ArbitrumNetwork }> => { const l1NetworkInfo = await l1Provider.getNetwork() const l2NetworkInfo = await l2Provider.getNetwork() - const l1Network: L1Network = { - blockTime: 10, - chainID: l1NetworkInfo.chainId, - explorerUrl: '', - isCustom: true, - name: l1NetworkInfo.name, - partnerChainIDs: [l2NetworkInfo.chainId], - isArbitrum: false, - } - const rollup = RollupAdminLogic__factory.connect(rollupAddress, l1Provider) - const l2Network: L2Network = { - chainID: l2NetworkInfo.chainId, + const l2Network: ArbitrumNetwork = { + isTestnet: false, + chainId: l2NetworkInfo.chainId, confirmPeriodBlocks: (await rollup.confirmPeriodBlocks()).toNumber(), ethBridge: { bridge: await rollup.bridge(), @@ -131,51 +120,26 @@ const registerNetworks = async ( rollup: rollup.address, sequencerInbox: await rollup.sequencerInbox(), }, - explorerUrl: '', - isArbitrum: true, isCustom: true, name: 'OrbitChain', - partnerChainID: l1NetworkInfo.chainId, + parentChainId: l1NetworkInfo.chainId, retryableLifetimeSeconds: 7 * 24 * 60 * 60, - nitroGenesisBlock: 0, - nitroGenesisL1Block: 0, - depositTimeout: 900000, - tokenBridge: { - l1CustomGateway: '', - l1ERC20Gateway: '', - l1GatewayRouter: '', - l1MultiCall: '', - l1ProxyAdmin: '', - l1Weth: '', - l1WethGateway: '', - l2CustomGateway: '', - l2ERC20Gateway: '', - l2GatewayRouter: '', - l2Multicall: '', - l2ProxyAdmin: '', - l2Weth: '', - l2WethGateway: '', - }, } // register - needed for retryables - addCustomNetwork({ - customL1Network: l1Network, - customL2Network: l2Network, - }) + registerCustomArbitrumNetwork(l2Network) return { - l1Network, l2Network, } } async function main() { - const { l1Network, l2Network } = await createTokenBridgeOnTargetChain() + const { l2Network } = await createTokenBridgeOnTargetChain() const NETWORK_FILE = 'network.json' fs.writeFileSync( NETWORK_FILE, - JSON.stringify({ l1Network, l2Network }, null, 2) + JSON.stringify({ l2Network }, null, 2) ) console.log(NETWORK_FILE + ' updated') } diff --git a/scripts/deployment/deployTokenBridgeCreator.ts b/scripts/deployment/deployTokenBridgeCreator.ts index 569ce10716..6fa8daaf61 100644 --- a/scripts/deployment/deployTokenBridgeCreator.ts +++ b/scripts/deployment/deployTokenBridgeCreator.ts @@ -1,5 +1,5 @@ import { JsonRpcProvider } from '@ethersproject/providers' -import { L1Network, L2Network, addCustomNetwork } from '@arbitrum/sdk' +import { ArbitrumNetwork, registerCustomArbitrumNetwork } from '@arbitrum/sdk' import { RollupAdminLogic__factory } from '@arbitrum/sdk/dist/lib/abi/factories/RollupAdminLogic__factory' import { deployL1TokenBridgeCreator, @@ -90,25 +90,15 @@ const registerNetworks = async ( l2Provider: JsonRpcProvider, rollupAddress: string ): Promise<{ - l1Network: L1Network - l2Network: Omit + l2Network: ArbitrumNetwork }> => { const l1NetworkInfo = await l1Provider.getNetwork() const l2NetworkInfo = await l2Provider.getNetwork() - const l1Network: L1Network = { - blockTime: 10, - chainID: l1NetworkInfo.chainId, - explorerUrl: '', - isCustom: true, - name: l1NetworkInfo.name, - partnerChainIDs: [l2NetworkInfo.chainId], - isArbitrum: false, - } - const rollup = RollupAdminLogic__factory.connect(rollupAddress, l1Provider) - const l2Network: L2Network = { - chainID: l2NetworkInfo.chainId, + const l2Network: ArbitrumNetwork = { + isTestnet: false, + chainId: l2NetworkInfo.chainId, confirmPeriodBlocks: (await rollup.confirmPeriodBlocks()).toNumber(), ethBridge: { bridge: await rollup.bridge(), @@ -117,41 +107,16 @@ const registerNetworks = async ( rollup: rollup.address, sequencerInbox: await rollup.sequencerInbox(), }, - explorerUrl: '', - isArbitrum: true, isCustom: true, name: 'OrbitChain', - partnerChainID: l1NetworkInfo.chainId, + parentChainId: l1NetworkInfo.chainId, retryableLifetimeSeconds: 7 * 24 * 60 * 60, - nitroGenesisBlock: 0, - nitroGenesisL1Block: 0, - depositTimeout: 900000, - tokenBridge: { - l1CustomGateway: '', - l1ERC20Gateway: '', - l1GatewayRouter: '', - l1MultiCall: '', - l1ProxyAdmin: '', - l1Weth: '', - l1WethGateway: '', - l2CustomGateway: '', - l2ERC20Gateway: '', - l2GatewayRouter: '', - l2Multicall: '', - l2ProxyAdmin: '', - l2Weth: '', - l2WethGateway: '', - }, } // register - needed for retryables - addCustomNetwork({ - customL1Network: l1Network, - customL2Network: l2Network, - }) + registerCustomArbitrumNetwork(l2Network) return { - l1Network, l2Network, } } diff --git a/scripts/local-deployment/deployCreatorAndCreateTokenBridge.ts b/scripts/local-deployment/deployCreatorAndCreateTokenBridge.ts index b45e7a04db..69ffab8946 100644 --- a/scripts/local-deployment/deployCreatorAndCreateTokenBridge.ts +++ b/scripts/local-deployment/deployCreatorAndCreateTokenBridge.ts @@ -3,7 +3,6 @@ import { setupTokenBridgeInLocalEnv } from './localDeploymentLib' async function main() { const { - l1Network, l2Network, l1TokenBridgeCreatorAddress: l1TokenBridgeCreator, retryableSenderAddress: retryableSender, @@ -13,7 +12,7 @@ async function main() { fs.writeFileSync( NETWORK_FILE, JSON.stringify( - { l1Network, l2Network, l1TokenBridgeCreator, retryableSender }, + { l2Network, l1TokenBridgeCreator, retryableSender }, null, 2 ) diff --git a/scripts/local-deployment/localDeploymentLib.ts b/scripts/local-deployment/localDeploymentLib.ts index 3e08fb498f..020565c999 100644 --- a/scripts/local-deployment/localDeploymentLib.ts +++ b/scripts/local-deployment/localDeploymentLib.ts @@ -1,6 +1,6 @@ import { BigNumber, Wallet, ethers } from 'ethers' import { JsonRpcProvider } from '@ethersproject/providers' -import { L1Network, L2Network, addCustomNetwork } from '@arbitrum/sdk' +import { ArbitrumNetwork, registerCustomArbitrumNetwork } from '@arbitrum/sdk' import { Bridge__factory } from '@arbitrum/sdk/dist/lib/abi/factories/Bridge__factory' import { RollupAdminLogic__factory } from '@arbitrum/sdk/dist/lib/abi/factories/RollupAdminLogic__factory' import { execSync } from 'child_process' @@ -12,6 +12,7 @@ import { } from '../atomicTokenBridgeDeployer' import { ERC20__factory, + IERC20Bridge__factory, IOwnable__factory, TestWETH9__factory, } from '../../build/types' @@ -75,28 +76,12 @@ export const setupTokenBridgeInLocalEnv = async () => { ) /// register networks - const { l1Network, l2Network: coreL2Network } = await getLocalNetworks( + const { l2Network: coreL2Network } = await getLocalNetwork( parentRpc, childRpc, rollupAddress ) - const _l1Network = l1Network as L2Network - const ethLocal: L1Network = { - blockTime: 10, - chainID: _l1Network.partnerChainID, - explorerUrl: '', - isCustom: true, - name: 'EthLocal', - partnerChainIDs: [_l1Network.chainID], - isArbitrum: false, - } - addCustomNetwork({ - customL1Network: ethLocal, - customL2Network: _l1Network, - }) - addCustomNetwork({ - customL2Network: coreL2Network, - }) + registerCustomArbitrumNetwork(coreL2Network) // prerequisite - deploy L1 creator and set templates console.log('Deploying L1TokenBridgeCreator') @@ -159,24 +144,24 @@ export const setupTokenBridgeInLocalEnv = async () => { ) } - const l2Network: L2Network = { + const l2Network: ArbitrumNetwork = { ...coreL2Network, tokenBridge: { - l1CustomGateway: l1Deployment.customGateway, - l1ERC20Gateway: l1Deployment.standardGateway, - l1GatewayRouter: l1Deployment.router, - l1MultiCall: l1MultiCall, - l1ProxyAdmin: l1ProxyAdmin, - l1Weth: l1Deployment.weth, - l1WethGateway: l1Deployment.wethGateway, + parentCustomGateway: l1Deployment.customGateway, + parentErc20Gateway: l1Deployment.standardGateway, + parentGatewayRouter: l1Deployment.router, + parentMultiCall: l1MultiCall, + parentProxyAdmin: l1ProxyAdmin, + parentWeth: l1Deployment.weth, + parentWethGateway: l1Deployment.wethGateway, - l2CustomGateway: l2Deployment.customGateway, - l2ERC20Gateway: l2Deployment.standardGateway, - l2GatewayRouter: l2Deployment.router, - l2Multicall: l2Deployment.multicall, - l2ProxyAdmin: l2Deployment.proxyAdmin, - l2Weth: l2Deployment.weth, - l2WethGateway: l2Deployment.wethGateway, + childCustomGateway: l2Deployment.customGateway, + childErc20Gateway: l2Deployment.standardGateway, + childGatewayRouter: l2Deployment.router, + childMultiCall: l2Deployment.multicall, + childProxyAdmin: l2Deployment.proxyAdmin, + childWeth: l2Deployment.weth, + childWethGateway: l2Deployment.wethGateway, }, } @@ -184,20 +169,18 @@ export const setupTokenBridgeInLocalEnv = async () => { const retryableSenderAddress = retryableSender.address return { - l1Network, l2Network, l1TokenBridgeCreatorAddress, retryableSenderAddress, } } -export const getLocalNetworks = async ( +export const getLocalNetwork = async ( l1Url: string, l2Url: string, rollupAddress?: string ): Promise<{ - l1Network: L1Network | L2Network - l2Network: L2Network + l2Network: ArbitrumNetwork }> => { const l1Provider = new JsonRpcProvider(l1Url) const l2Provider = new JsonRpcProvider(l2Url) @@ -221,46 +204,6 @@ export const getLocalNetworks = async ( rollup: string } - const l1Network: L1Network | L2Network = { - partnerChainID: 1337, - partnerChainIDs: [l2NetworkInfo.chainId], - isArbitrum: true, - confirmPeriodBlocks: 20, - retryableLifetimeSeconds: 7 * 24 * 60 * 60, - nitroGenesisBlock: 0, - nitroGenesisL1Block: 0, - depositTimeout: 900000, - chainID: 412346, - explorerUrl: '', - isCustom: true, - name: 'ArbLocal', - blockTime: 0.25, - ethBridge: { - bridge: l2Data.bridge, - inbox: l2Data.inbox, - outbox: '', - rollup: l2Data.rollup, - sequencerInbox: l2Data['sequencer-inbox'], - }, - tokenBridge: { - l1CustomGateway: '', - l1ERC20Gateway: '', - l1GatewayRouter: '', - l1MultiCall: '', - l1ProxyAdmin: '', - l1Weth: '', - l1WethGateway: '', - - l2CustomGateway: '', - l2ERC20Gateway: '', - l2GatewayRouter: '', - l2Multicall: '', - l2ProxyAdmin: '', - l2Weth: '', - l2WethGateway: '', - }, - } - /// get L3 info let deploymentData: string let data = { @@ -298,10 +241,16 @@ export const getLocalNetworks = async ( const bridge = Bridge__factory.connect(data.bridge, l1Provider) const outboxAddr = await bridge.allowedOutboxList(0) - const l2Network: L2Network = { - partnerChainID: l1NetworkInfo.chainId, - partnerChainIDs: [], - chainID: l2NetworkInfo.chainId, + let nativeToken: string | undefined = undefined + try { + nativeToken = await IERC20Bridge__factory.connect(data.bridge, l1Provider).nativeToken() + } + catch {} + + const l2Network: ArbitrumNetwork = { + nativeToken, + parentChainId: l1NetworkInfo.chainId, + chainId: l2NetworkInfo.chainId, confirmPeriodBlocks: 20, ethBridge: { bridge: data.bridge, @@ -310,35 +259,12 @@ export const getLocalNetworks = async ( rollup: data.rollup, sequencerInbox: data['sequencer-inbox'], }, - explorerUrl: '', - isArbitrum: true, isCustom: true, - blockTime: 0.25, name: 'OrbitLocal', retryableLifetimeSeconds: 7 * 24 * 60 * 60, - nitroGenesisBlock: 0, - nitroGenesisL1Block: 0, - depositTimeout: 900000, - tokenBridge: { - l1CustomGateway: '', - l1ERC20Gateway: '', - l1GatewayRouter: '', - l1MultiCall: '', - l1ProxyAdmin: '', - l1Weth: '', - l1WethGateway: '', - - l2CustomGateway: '', - l2ERC20Gateway: '', - l2GatewayRouter: '', - l2Multicall: '', - l2ProxyAdmin: '', - l2Weth: '', - l2WethGateway: '', - }, + isTestnet: true } return { - l1Network, l2Network, } } diff --git a/scripts/signatures_test.bash b/scripts/signatures_test.bash deleted file mode 100755 index b4e0fb1636..0000000000 --- a/scripts/signatures_test.bash +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -output_dir="./test/signatures" -for CONTRACTNAME in L1ERC20Gateway L1CustomGateway L1ReverseCustomGateway L1WethGateway L2ERC20Gateway L2CustomGateway L2ReverseCustomGateway L2WethGateway L1GatewayRouter L2GatewayRouter StandardArbERC20 L1AtomicTokenBridgeCreator L1TokenBridgeRetryableSender L2AtomicTokenBridgeFactory L1OrbitCustomGateway L1OrbitERC20Gateway L1OrbitGatewayRouter L1OrbitReverseCustomGateway L1USDCGateway L1OrbitUSDCGateway L2USDCGateway -do - echo "Checking for signature changes in $CONTRACTNAME" - [ -f "$output_dir/$CONTRACTNAME" ] && mv "$output_dir/$CONTRACTNAME" "$output_dir/$CONTRACTNAME-old" - forge inspect "$CONTRACTNAME" methods > "$output_dir/$CONTRACTNAME" - diff "$output_dir/$CONTRACTNAME-old" "$output_dir/$CONTRACTNAME" - if [[ $? != "0" ]] - then - CHANGED=1 - fi -done -if [[ $CHANGED == 1 ]] -then - exit 1 -fi \ No newline at end of file diff --git a/scripts/storage_layout_test.bash b/scripts/storage_layout_test.bash deleted file mode 100755 index ceb28b7006..0000000000 --- a/scripts/storage_layout_test.bash +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -output_dir="./test/storage" -for CONTRACTNAME in L1ERC20Gateway L1CustomGateway L1ReverseCustomGateway L1WethGateway L2ERC20Gateway L2CustomGateway L2ReverseCustomGateway L2WethGateway L1GatewayRouter L2GatewayRouter StandardArbERC20 L1AtomicTokenBridgeCreator L1TokenBridgeRetryableSender L2AtomicTokenBridgeFactory L1OrbitCustomGateway L1OrbitERC20Gateway L1OrbitGatewayRouter L1OrbitReverseCustomGateway L1USDCGateway L1OrbitUSDCGateway L2USDCGateway -do - echo "Checking storage change of $CONTRACTNAME" - [ -f "$output_dir/$CONTRACTNAME" ] && mv "$output_dir/$CONTRACTNAME" "$output_dir/$CONTRACTNAME-old" - forge inspect "$CONTRACTNAME" --pretty storage > "$output_dir/$CONTRACTNAME" - diff "$output_dir/$CONTRACTNAME-old" "$output_dir/$CONTRACTNAME" - if [[ $? != "0" ]] - then - CHANGED=1 - fi -done -if [[ $CHANGED == 1 ]] -then - exit 1 -fi \ No newline at end of file diff --git a/scripts/template/print-contracts.bash b/scripts/template/print-contracts.bash new file mode 100755 index 0000000000..7ad167dece --- /dev/null +++ b/scripts/template/print-contracts.bash @@ -0,0 +1,43 @@ +#!/bin/bash + +# search for all contracts defined in the contracts directory and print them + +# need to build with this flag to get AST output +# could keep an eye on this issue to optimize this: https://github.com/foundry-rs/foundry/issues/7212 +forge build --build-info > /dev/null + +if [ $? -ne 0 ]; then + echo "Build failed" + exit 1 +fi + +OUTPUT_PATH="out/" +SOURCE_PATH="contracts/" + +# find all json files in the out directory +FILES=$(find $OUTPUT_PATH -name "*.json") + +# Initialize an empty array to collect all contract names +declare -a all_contract_names=() + +# for each file, print the absolutePath +for file in $FILES; do + sol_path=$(cat "$file" | jq '.ast.absolutePath' -r) + + # make sure the path is in the source path and exclude test directory + if [[ $sol_path == $SOURCE_PATH* ]] && [[ $sol_path != *"contracts/tokenbridge/test/"* ]]; then + # Read contract names into an array and append them to the all_contract_names array + while IFS= read -r name; do + all_contract_names+=("$name") + done < <(cat $file | jq '.ast.nodes[] | select(.nodeType == "ContractDefinition" and .contractKind == "contract" and .abstract == false).name' -r) + fi +done + +# if we have no contracts, exit with an error +if [ ${#all_contract_names[@]} -eq 0 ]; then + echo "No contracts found" + exit 1 +fi + +# Print unique contract names, removing duplicates +printf "%s\n" "${all_contract_names[@]}" | sort | uniq diff --git a/scripts/usdc-bridge-deployment/deployUsdcBridge.ts b/scripts/usdc-bridge-deployment/deployUsdcBridge.ts index 68fb06e666..4f541a636f 100644 --- a/scripts/usdc-bridge-deployment/deployUsdcBridge.ts +++ b/scripts/usdc-bridge-deployment/deployUsdcBridge.ts @@ -41,12 +41,11 @@ import { bytecode as MasterMinterBytecode, } from '@offchainlabs/stablecoin-evm/artifacts/hardhat/contracts/minting/MasterMinter.sol/MasterMinter.json' import { - addCustomNetwork, - L1Network, - L1ToL2MessageGasEstimator, - L1ToL2MessageStatus, - L1TransactionReceipt, - L2Network, + registerCustomArbitrumNetwork, + ParentToChildMessageGasEstimator, + ParentToChildMessageStatus, + ParentTransactionReceipt, + ArbitrumNetwork } from '@arbitrum/sdk' import { RollupAdminLogic__factory } from '@arbitrum/sdk/dist/lib/abi/factories/RollupAdminLogic__factory' import { getBaseFee } from '@arbitrum/sdk/dist/lib/utils/lib' @@ -443,7 +442,7 @@ async function _registerGateway( [[l1UsdcAddress], [l1UsdcGatewayAddress]] ) - const l1ToL2MessageGasEstimate = new L1ToL2MessageGasEstimator(childProvider) + const l1ToL2MessageGasEstimate = new ParentToChildMessageGasEstimator(childProvider) const retryableParams = await l1ToL2MessageGasEstimate.estimateAll( { from: l1RouterAddress, @@ -471,7 +470,7 @@ async function _registerGateway( const registrationCalldata = isFeeToken ? L1OrbitGatewayRouter__factory.createInterface().encodeFunctionData( - 'setGateways(address[],address[],uint256,uint256,uint256,uint256)', + 'setGateways', [ [l1UsdcAddress], [l1UsdcGatewayAddress], @@ -482,7 +481,7 @@ async function _registerGateway( ] ) : L1GatewayRouter__factory.createInterface().encodeFunctionData( - 'setGateways(address[],address[],uint256,uint256,uint256)', + 'setGateways', [ [l1UsdcAddress], [l1UsdcGatewayAddress], @@ -623,14 +622,14 @@ async function _isUpgradeExecutor( */ async function _waitOnL2Msg(tx: ContractTransaction, childProvider: Provider) { const retryableReceipt = await tx.wait() - const l1TxReceipt = new L1TransactionReceipt(retryableReceipt) - const messages = await l1TxReceipt.getL1ToL2Messages(childProvider) + const l1TxReceipt = new ParentTransactionReceipt(retryableReceipt) + const messages = await l1TxReceipt.getParentToChildMessages(childProvider) // 1 msg expected const messageResult = await messages[0].waitForStatus() const status = messageResult.status - if (status != L1ToL2MessageStatus.REDEEMED) { + if (status != ParentToChildMessageStatus.REDEEMED) { throw new Error('L1->L2 message not redeemed') } } @@ -647,31 +646,19 @@ async function _registerNetworks( l2Provider: Provider, inboxAddress: string ): Promise<{ - l1Network: L1Network - l2Network: Omit + l2Network: ArbitrumNetwork }> { const l1NetworkInfo = await l1Provider.getNetwork() const l2NetworkInfo = await l2Provider.getNetwork() - const l1Network: L1Network = { - blockTime: 10, - chainID: l1NetworkInfo.chainId, - explorerUrl: '', - isCustom: true, - name: l1NetworkInfo.name, - partnerChainIDs: [l2NetworkInfo.chainId], - isArbitrum: false, - } - const rollupAddress = await IBridge__factory.connect( await IInboxBase__factory.connect(inboxAddress, l1Provider).bridge(), l1Provider ).rollup() const rollup = RollupAdminLogic__factory.connect(rollupAddress, l1Provider) - const l2Network: L2Network = { - blockTime: 10, - partnerChainIDs: [], - chainID: l2NetworkInfo.chainId, + const l2Network: ArbitrumNetwork = { + isTestnet: false, + chainId: l2NetworkInfo.chainId, confirmPeriodBlocks: (await rollup.confirmPeriodBlocks()).toNumber(), ethBridge: { bridge: await rollup.bridge(), @@ -680,41 +667,16 @@ async function _registerNetworks( rollup: rollup.address, sequencerInbox: await rollup.sequencerInbox(), }, - explorerUrl: '', - isArbitrum: true, isCustom: true, name: 'OrbitChain', - partnerChainID: l1NetworkInfo.chainId, + parentChainId: l1NetworkInfo.chainId, retryableLifetimeSeconds: 7 * 24 * 60 * 60, - nitroGenesisBlock: 0, - nitroGenesisL1Block: 0, - depositTimeout: 900000, - tokenBridge: { - l1CustomGateway: '', - l1ERC20Gateway: '', - l1GatewayRouter: '', - l1MultiCall: '', - l1ProxyAdmin: '', - l1Weth: '', - l1WethGateway: '', - l2CustomGateway: '', - l2ERC20Gateway: '', - l2GatewayRouter: '', - l2Multicall: '', - l2ProxyAdmin: '', - l2Weth: '', - l2WethGateway: '', - }, } // register - needed for retryables - addCustomNetwork({ - customL1Network: l1Network, - customL2Network: l2Network, - }) + registerCustomArbitrumNetwork(l2Network) return { - l1Network, l2Network, } } diff --git a/test-e2e/orbitTokenBridge.ts b/test-e2e/orbitTokenBridge.ts index 7fc105f24e..3eafe4961a 100644 --- a/test-e2e/orbitTokenBridge.ts +++ b/test-e2e/orbitTokenBridge.ts @@ -1,10 +1,9 @@ import { - L1Network, - L1ToL2MessageGasEstimator, - L1ToL2MessageStatus, - L1TransactionReceipt, - L2Network, - L2TransactionReceipt, + ParentToChildMessageGasEstimator, + ParentToChildMessageStatus, + ParentTransactionReceipt, + ArbitrumNetwork, + ChildTransactionReceipt } from '@arbitrum/sdk' import { getBaseFee } from '@arbitrum/sdk/dist/lib/utils/lib' import { JsonRpcProvider } from '@ethersproject/providers' @@ -54,6 +53,7 @@ import { abi as UsdcProxyAbi, bytecode as UsdcProxyBytecode, } from '@offchainlabs/stablecoin-evm/artifacts/hardhat/contracts/v1/FiatTokenProxy.sol/FiatTokenProxy.json' +import { TokenBridge } from '@arbitrum/sdk/dist/lib/dataEntities/networks' const config = { parentUrl: 'http://127.0.0.1:8547', childUrl: 'http://127.0.0.1:3347', @@ -71,8 +71,7 @@ let deployerL2Wallet: Wallet let userL1Wallet: Wallet let userL2Wallet: Wallet -let _l1Network: L1Network -let _l2Network: L2Network +let _l2Network: ArbitrumNetwork & {tokenBridge: TokenBridge} let token: TestERC20 let l2Token: ERC20 @@ -109,10 +108,11 @@ describe('orbitTokenBridge', () => { }) ).wait() - const { l1Network, l2Network } = await setupTokenBridgeInLocalEnv() - - _l1Network = l1Network - _l2Network = l2Network + const { l2Network } = await setupTokenBridgeInLocalEnv() + if (!l2Network.tokenBridge) { + throw new Error('L2 network does not have token bridge configured') + } + _l2Network = l2Network as ArbitrumNetwork & {tokenBridge: TokenBridge} // create user wallets and fund it const userKey = ethers.utils.sha256(ethers.utils.toUtf8Bytes('user_wallet')) @@ -153,12 +153,12 @@ describe('orbitTokenBridge', () => { it('should have deployed token bridge contracts', async function () { // get router as entry point const l1Router = L1OrbitGatewayRouter__factory.connect( - _l2Network.tokenBridge.l1GatewayRouter, + _l2Network.tokenBridge.parentGatewayRouter, parentProvider ) expect((await l1Router.defaultGateway()).toLowerCase()).to.be.eq( - _l2Network.tokenBridge.l1ERC20Gateway.toLowerCase() + _l2Network.tokenBridge.parentErc20Gateway.toLowerCase() ) }) @@ -185,7 +185,7 @@ describe('orbitTokenBridge', () => { const userTokenBalanceBefore = await token.balanceOf(userL1Wallet.address) const gatewayTokenBalanceBefore = await token.balanceOf( - _l2Network.tokenBridge.l1ERC20Gateway + _l2Network.tokenBridge.parentErc20Gateway ) const userNativeTokenBalanceBefore = nativeToken ? await nativeToken.balanceOf(userL1Wallet.address) @@ -197,7 +197,7 @@ describe('orbitTokenBridge', () => { // approve token const depositAmount = 120 await ( - await token.approve(_l2Network.tokenBridge.l1ERC20Gateway, depositAmount) + await token.approve(_l2Network.tokenBridge.parentErc20Gateway, depositAmount) ).wait() // calculate retryable params @@ -207,7 +207,7 @@ describe('orbitTokenBridge', () => { const callhook = '0x' const gateway = L1OrbitERC20Gateway__factory.connect( - _l2Network.tokenBridge.l1ERC20Gateway, + _l2Network.tokenBridge.parentErc20Gateway, userL1Wallet ) const outboundCalldata = await gateway.getOutboundCalldata( @@ -218,7 +218,7 @@ describe('orbitTokenBridge', () => { callhook ) - const l1ToL2MessageGasEstimate = new L1ToL2MessageGasEstimator( + const l1ToL2MessageGasEstimate = new ParentToChildMessageGasEstimator( childProvider ) const retryableParams = await l1ToL2MessageGasEstimate.estimateAll( @@ -248,7 +248,7 @@ describe('orbitTokenBridge', () => { if (nativeToken) { await ( await nativeToken.approve( - _l2Network.tokenBridge.l1ERC20Gateway, + _l2Network.tokenBridge.parentErc20Gateway, tokenTotalFeeAmount ) ).wait() @@ -267,11 +267,11 @@ describe('orbitTokenBridge', () => { const router = nativeToken ? L1OrbitGatewayRouter__factory.connect( - _l2Network.tokenBridge.l1GatewayRouter, + _l2Network.tokenBridge.parentGatewayRouter, userL1Wallet ) : L1GatewayRouter__factory.connect( - _l2Network.tokenBridge.l1GatewayRouter, + _l2Network.tokenBridge.parentGatewayRouter, userL1Wallet ) @@ -303,7 +303,7 @@ describe('orbitTokenBridge', () => { ) const gatewayTokenBalanceAfter = await token.balanceOf( - _l2Network.tokenBridge.l1ERC20Gateway + _l2Network.tokenBridge.parentErc20Gateway ) expect(gatewayTokenBalanceAfter.sub(gatewayTokenBalanceBefore)).to.be.eq( depositAmount @@ -340,26 +340,26 @@ describe('orbitTokenBridge', () => { userL2Wallet.address ) const l1GatewayTokenBalanceBefore = await token.balanceOf( - _l2Network.tokenBridge.l1ERC20Gateway + _l2Network.tokenBridge.parentErc20Gateway ) const l2TokenSupplyBefore = await l2Token.totalSupply() // start withdrawal const withdrawalAmount = 250 const l2Router = L2GatewayRouter__factory.connect( - _l2Network.tokenBridge.l2GatewayRouter, + _l2Network.tokenBridge.childGatewayRouter, userL2Wallet ) const withdrawTx = await l2Router[ 'outboundTransfer(address,address,uint256,bytes)' ](token.address, userL1Wallet.address, withdrawalAmount, '0x') const withdrawReceipt = await withdrawTx.wait() - const l2Receipt = new L2TransactionReceipt(withdrawReceipt) + const l2Receipt = new ChildTransactionReceipt(withdrawReceipt) // wait until dispute period passes and withdrawal is ready for execution await sleep(5 * 1000) - const messages = await l2Receipt.getL2ToL1Messages(userL1Wallet) + const messages = await l2Receipt.getChildToParentMessages(userL1Wallet) const l2ToL1Msg = messages[0] const timeToWaitMs = 1000 await l2ToL1Msg.waitUntilReadyToExecute(childProvider, timeToWaitMs) @@ -381,7 +381,7 @@ describe('orbitTokenBridge', () => { ) const l1GatewayTokenBalanceAfter = await token.balanceOf( - _l2Network.tokenBridge.l1ERC20Gateway + _l2Network.tokenBridge.parentErc20Gateway ) expect( l1GatewayTokenBalanceBefore.sub(l1GatewayTokenBalanceAfter) @@ -409,12 +409,12 @@ describe('orbitTokenBridge', () => { // create L1 custom token const customL1TokenFactory = nativeToken ? await new TestOrbitCustomTokenL1__factory(deployerL1Wallet).deploy( - _l2Network.tokenBridge.l1CustomGateway, - _l2Network.tokenBridge.l1GatewayRouter + _l2Network.tokenBridge.parentCustomGateway, + _l2Network.tokenBridge.parentGatewayRouter ) : await new TestCustomTokenL1__factory(deployerL1Wallet).deploy( - _l2Network.tokenBridge.l1CustomGateway, - _l2Network.tokenBridge.l1GatewayRouter + _l2Network.tokenBridge.parentCustomGateway, + _l2Network.tokenBridge.parentGatewayRouter ) const customL1Token = await customL1TokenFactory.deployed() await (await customL1Token.connect(userL1Wallet).mint()).wait() @@ -425,32 +425,32 @@ describe('orbitTokenBridge', () => { } const customL2TokenFactory = await new TestArbCustomToken__factory( deployerL2Wallet - ).deploy(_l2Network.tokenBridge.l2CustomGateway, customL1Token.address) + ).deploy(_l2Network.tokenBridge.childCustomGateway, customL1Token.address) const customL2Token = await customL2TokenFactory.deployed() // prepare custom gateway registration params const router = nativeToken ? L1OrbitGatewayRouter__factory.connect( - _l2Network.tokenBridge.l1GatewayRouter, + _l2Network.tokenBridge.parentGatewayRouter, userL1Wallet ) : L1GatewayRouter__factory.connect( - _l2Network.tokenBridge.l1GatewayRouter, + _l2Network.tokenBridge.parentGatewayRouter, userL1Wallet ) - const l1ToL2MessageGasEstimate = new L1ToL2MessageGasEstimator( + const l1ToL2MessageGasEstimate = new ParentToChildMessageGasEstimator( childProvider ) const routerData = L2GatewayRouter__factory.createInterface().encodeFunctionData( 'setGateway', - [[customL1Token.address], [_l2Network.tokenBridge.l2CustomGateway]] + [[customL1Token.address], [_l2Network.tokenBridge.childCustomGateway]] ) const routerRetryableParams = await l1ToL2MessageGasEstimate.estimateAll( { - from: _l2Network.tokenBridge.l1GatewayRouter, - to: _l2Network.tokenBridge.l2GatewayRouter, + from: _l2Network.tokenBridge.parentGatewayRouter, + to: _l2Network.tokenBridge.childGatewayRouter, l2CallValue: BigNumber.from(0), excessFeeRefundAddress: userL1Wallet.address, callValueRefundAddress: userL1Wallet.address, @@ -467,8 +467,8 @@ describe('orbitTokenBridge', () => { ) const gwRetryableParams = await l1ToL2MessageGasEstimate.estimateAll( { - from: _l2Network.tokenBridge.l1CustomGateway, - to: _l2Network.tokenBridge.l2CustomGateway, + from: _l2Network.tokenBridge.parentCustomGateway, + to: _l2Network.tokenBridge.childCustomGateway, l2CallValue: BigNumber.from(0), excessFeeRefundAddress: userL1Wallet.address, callValueRefundAddress: userL1Wallet.address, @@ -479,20 +479,8 @@ describe('orbitTokenBridge', () => { ) // approve fee amount - const valueForGateway = nativeToken - ? await _getScaledAmount( - nativeToken.address, - gwRetryableParams.deposit, - nativeToken.provider! - ) - : gwRetryableParams.deposit - const valueForRouter = nativeToken - ? await _getScaledAmount( - nativeToken.address, - routerRetryableParams.deposit, - nativeToken.provider! - ) - : routerRetryableParams.deposit + const valueForGateway = gwRetryableParams.deposit + const valueForRouter = routerRetryableParams.deposit const registrationFee = valueForGateway.add(valueForRouter).mul(2) if (nativeToken) { await ( @@ -523,23 +511,23 @@ describe('orbitTokenBridge', () => { ).wait() /// wait for execution of both tickets - const l1TxReceipt = new L1TransactionReceipt(receipt) - const messages = await l1TxReceipt.getL1ToL2Messages(childProvider) + const l1TxReceipt = new ParentTransactionReceipt(receipt) + const messages = await l1TxReceipt.getParentToChildMessages(childProvider) const messageResults = await Promise.all( messages.map(message => message.waitForStatus()) ) if ( - messageResults[0].status !== L1ToL2MessageStatus.REDEEMED || - messageResults[1].status !== L1ToL2MessageStatus.REDEEMED + messageResults[0].status !== ParentToChildMessageStatus.REDEEMED || + messageResults[1].status !== ParentToChildMessageStatus.REDEEMED ) { console.log( `Retryable ticket (ID ${messages[0].retryableCreationId}) status: ${ - L1ToL2MessageStatus[messageResults[0].status] + ParentToChildMessageStatus[messageResults[0].status] }` ) console.log( `Retryable ticket (ID ${messages[1].retryableCreationId}) status: ${ - L1ToL2MessageStatus[messageResults[1].status] + ParentToChildMessageStatus[messageResults[1].status] }` ) exit() @@ -550,7 +538,7 @@ describe('orbitTokenBridge', () => { userL1Wallet.address ) const gatewayTokenBalanceBefore = await customL1Token.balanceOf( - _l2Network.tokenBridge.l1CustomGateway + _l2Network.tokenBridge.parentCustomGateway ) const userNativeTokenBalanceBefore = nativeToken ? await nativeToken.balanceOf(userL1Wallet.address) @@ -564,7 +552,7 @@ describe('orbitTokenBridge', () => { await ( await customL1Token .connect(userL1Wallet) - .approve(_l2Network.tokenBridge.l1CustomGateway, depositAmount) + .approve(_l2Network.tokenBridge.parentCustomGateway, depositAmount) ).wait() // calculate retryable params @@ -587,7 +575,7 @@ describe('orbitTokenBridge', () => { if (nativeToken) { await ( await nativeToken.approve( - _l2Network.tokenBridge.l1CustomGateway, + _l2Network.tokenBridge.parentCustomGateway, tokenTotalFeeAmount ) ).wait() @@ -620,7 +608,7 @@ describe('orbitTokenBridge', () => { ///// checks expect(await router.getGateway(customL1Token.address)).to.be.eq( - _l2Network.tokenBridge.l1CustomGateway + _l2Network.tokenBridge.parentCustomGateway ) const l2TokenAddress = await router.calculateL2TokenAddress( @@ -640,7 +628,7 @@ describe('orbitTokenBridge', () => { ) const gatewayTokenBalanceAfter = await customL1Token.balanceOf( - _l2Network.tokenBridge.l1CustomGateway + _l2Network.tokenBridge.parentCustomGateway ) expect(gatewayTokenBalanceAfter.sub(gatewayTokenBalanceBefore)).to.be.eq( depositAmount @@ -781,7 +769,7 @@ describe('orbitTokenBridge', () => { await ( await l1USDCCustomGateway.initialize( l2USDCCustomGateway.address, - _l2Network.tokenBridge.l1GatewayRouter, + _l2Network.tokenBridge.parentGatewayRouter, _l2Network.ethBridge.inbox, l1Usdc.address, l2Usdc.address, @@ -793,7 +781,7 @@ describe('orbitTokenBridge', () => { await ( await l2USDCCustomGateway.initialize( l1USDCCustomGateway.address, - _l2Network.tokenBridge.l2GatewayRouter, + _l2Network.tokenBridge.childGatewayRouter, l1Usdc.address, l2Usdc.address, deployerL2Wallet.address @@ -803,11 +791,11 @@ describe('orbitTokenBridge', () => { /// register USDC custom gateway const router = L1GatewayRouter__factory.connect( - _l2Network.tokenBridge.l1GatewayRouter, + _l2Network.tokenBridge.parentGatewayRouter, deployerL1Wallet ) const l2Router = L2GatewayRouter__factory.connect( - _l2Network.tokenBridge.l2GatewayRouter, + _l2Network.tokenBridge.childGatewayRouter, deployerL2Wallet ) const maxGas = BigNumber.from(500000) @@ -1129,7 +1117,7 @@ describe('orbitTokenBridge', () => { await ( await l1USDCCustomGateway.initialize( l2USDCCustomGateway.address, - _l2Network.tokenBridge.l1GatewayRouter, + _l2Network.tokenBridge.parentGatewayRouter, _l2Network.ethBridge.inbox, l1Usdc.address, l2Usdc.address, @@ -1141,7 +1129,7 @@ describe('orbitTokenBridge', () => { await ( await l2USDCCustomGateway.initialize( l1USDCCustomGateway.address, - _l2Network.tokenBridge.l2GatewayRouter, + _l2Network.tokenBridge.childGatewayRouter, l1Usdc.address, l2Usdc.address, deployerL2Wallet.address @@ -1151,11 +1139,11 @@ describe('orbitTokenBridge', () => { /// register USDC custom gateway const router = L1OrbitGatewayRouter__factory.connect( - _l2Network.tokenBridge.l1GatewayRouter, + _l2Network.tokenBridge.parentGatewayRouter, deployerL1Wallet ) const l2Router = L2GatewayRouter__factory.connect( - _l2Network.tokenBridge.l2GatewayRouter, + _l2Network.tokenBridge.childGatewayRouter, deployerL2Wallet ) const maxGas = BigNumber.from(500000) @@ -1427,21 +1415,21 @@ async function depositNativeToL2() { const depositTx = await inbox.depositERC20(amountToDeposit) // wait for deposit to be processed - const depositRec = await L1TransactionReceipt.monkeyPatchEthDepositWait( + const depositRec = await ParentTransactionReceipt.monkeyPatchEthDepositWait( depositTx ).wait() - await depositRec.waitForL2(childProvider) + await depositRec.waitForChildTransactionReceipt(childProvider) } async function waitOnL2Msg(tx: ethers.ContractTransaction) { const retryableReceipt = await tx.wait() - const l1TxReceipt = new L1TransactionReceipt(retryableReceipt) - const messages = await l1TxReceipt.getL1ToL2Messages(childProvider) + const l1TxReceipt = new ParentTransactionReceipt(retryableReceipt) + const messages = await l1TxReceipt.getParentToChildMessages(childProvider) // 1 msg expected const messageResult = await messages[0].waitForStatus() const status = messageResult.status - expect(status).to.be.eq(L1ToL2MessageStatus.REDEEMED) + expect(status).to.be.eq(ParentToChildMessageStatus.REDEEMED) } const getFeeToken = async (inbox: string, parentProvider: any) => { diff --git a/test/signatures/ArbMulticall2 b/test/signatures/ArbMulticall2 new file mode 100644 index 0000000000..cd495bf852 --- /dev/null +++ b/test/signatures/ArbMulticall2 @@ -0,0 +1,33 @@ + +╭-----------------------------------------------+------------╮ +| Method | Identifier | ++============================================================+ +| aggregate((address,bytes)[]) | 252dba42 | +|-----------------------------------------------+------------| +| blockAndAggregate((address,bytes)[]) | c3077fa9 | +|-----------------------------------------------+------------| +| getBlockHash(uint256) | ee82ac5e | +|-----------------------------------------------+------------| +| getBlockNumber() | 42cbb15c | +|-----------------------------------------------+------------| +| getCurrentBlockCoinbase() | a8b0574e | +|-----------------------------------------------+------------| +| getCurrentBlockDifficulty() | 72425d9d | +|-----------------------------------------------+------------| +| getCurrentBlockGasLimit() | 86d516e8 | +|-----------------------------------------------+------------| +| getCurrentBlockTimestamp() | 0f28c97d | +|-----------------------------------------------+------------| +| getEthBalance(address) | 4d2301cc | +|-----------------------------------------------+------------| +| getL1BlockNumber() | b9b3efe9 | +|-----------------------------------------------+------------| +| getLastBlockHash() | 27e86d6e | +|-----------------------------------------------+------------| +| tryAggregate(bool,(address,bytes)[]) | bce38bd7 | +|-----------------------------------------------+------------| +| tryAggregateGasRation(bool,(address,bytes)[]) | 2935cd90 | +|-----------------------------------------------+------------| +| tryBlockAndAggregate(bool,(address,bytes)[]) | 399542e9 | +╰-----------------------------------------------+------------╯ + diff --git a/test/signatures/BeaconProxyFactory b/test/signatures/BeaconProxyFactory new file mode 100644 index 0000000000..d098c15bae --- /dev/null +++ b/test/signatures/BeaconProxyFactory @@ -0,0 +1,19 @@ + +╭-------------------------------------------+------------╮ +| Method | Identifier | ++========================================================+ +| beacon() | 59659e90 | +|-------------------------------------------+------------| +| calculateExpectedAddress(address,bytes32) | e75b2141 | +|-------------------------------------------+------------| +| calculateExpectedAddress(bytes32) | 396a5f95 | +|-------------------------------------------+------------| +| cloneableProxyHash() | 97881f8d | +|-------------------------------------------+------------| +| createProxy(bytes32) | 29a5c5cf | +|-------------------------------------------+------------| +| getSalt(address,bytes32) | b3e3bf42 | +|-------------------------------------------+------------| +| initialize(address) | c4d66de8 | +╰-------------------------------------------+------------╯ + diff --git a/test/signatures/ClonableBeaconProxy b/test/signatures/ClonableBeaconProxy new file mode 100644 index 0000000000..b98cabea1a --- /dev/null +++ b/test/signatures/ClonableBeaconProxy @@ -0,0 +1,6 @@ + +╭--------+------------╮ +| Method | Identifier | ++=====================+ +╰--------+------------╯ + diff --git a/test/signatures/Cloneable b/test/signatures/Cloneable new file mode 100644 index 0000000000..308850787e --- /dev/null +++ b/test/signatures/Cloneable @@ -0,0 +1,7 @@ + +╭------------+------------╮ +| Method | Identifier | ++=========================+ +| isMaster() | 6f791d29 | +╰------------+------------╯ + diff --git a/test/signatures/ERC20Upgradeable b/test/signatures/ERC20Upgradeable new file mode 100644 index 0000000000..68fc3494b7 --- /dev/null +++ b/test/signatures/ERC20Upgradeable @@ -0,0 +1,27 @@ + +╭---------------------------------------+------------╮ +| Method | Identifier | ++====================================================+ +| allowance(address,address) | dd62ed3e | +|---------------------------------------+------------| +| approve(address,uint256) | 095ea7b3 | +|---------------------------------------+------------| +| balanceOf(address) | 70a08231 | +|---------------------------------------+------------| +| decimals() | 313ce567 | +|---------------------------------------+------------| +| decreaseAllowance(address,uint256) | a457c2d7 | +|---------------------------------------+------------| +| increaseAllowance(address,uint256) | 39509351 | +|---------------------------------------+------------| +| name() | 06fdde03 | +|---------------------------------------+------------| +| symbol() | 95d89b41 | +|---------------------------------------+------------| +| totalSupply() | 18160ddd | +|---------------------------------------+------------| +| transfer(address,uint256) | a9059cbb | +|---------------------------------------+------------| +| transferFrom(address,address,uint256) | 23b872dd | +╰---------------------------------------+------------╯ + diff --git a/test/signatures/L1AtomicTokenBridgeCreator b/test/signatures/L1AtomicTokenBridgeCreator index 9d2ac7cc5e..46c782076e 100644 --- a/test/signatures/L1AtomicTokenBridgeCreator +++ b/test/signatures/L1AtomicTokenBridgeCreator @@ -1,25 +1,51 @@ -{ - "canonicalL2FactoryAddress()": "bfd3e518", - "createTokenBridge(address,address,uint256,uint256)": "8277742b", - "gasLimitForL2FactoryDeployment()": "888139d4", - "getRouter(address)": "8369166d", - "inboxToL1Deployment(address)": "d9ce0ef9", - "inboxToL2Deployment(address)": "46052706", - "initialize(address)": "c4d66de8", - "l1Multicall()": "b1460a71", - "l1Templates()": "a5595da9", - "l1Weth()": "146bf4b1", - "l2CustomGatewayTemplate()": "41083186", - "l2MulticallTemplate()": "8c99e31c", - "l2RouterTemplate()": "381c9d99", - "l2StandardGatewayTemplate()": "d7eee6ca", - "l2TokenBridgeFactoryTemplate()": "1aeef2e2", - "l2WethGatewayTemplate()": "9095765e", - "l2WethTemplate()": "fd40ad85", - "owner()": "8da5cb5b", - "renounceOwnership()": "715018a6", - "retryableSender()": "36dddb97", - "setDeployment(address,(address,address,address,address,address),(address,address,address,address,address,address,address,address,address))": "4c149671", - "setTemplates((address,address,address,address,address,address,address,address),address,address,address,address,address,address,address,address,address,uint256)": "81fb9184", - "transferOwnership(address)": "f2fde38b" -} + +╭-----------------------------------------------------------------------------------------------------------------------------------------------------------------+------------╮ +| Method | Identifier | ++==============================================================================================================================================================================+ +| canonicalL2FactoryAddress() | bfd3e518 | +|-----------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| createTokenBridge(address,address,uint256,uint256) | 8277742b | +|-----------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| gasLimitForL2FactoryDeployment() | 888139d4 | +|-----------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| getRouter(address) | 8369166d | +|-----------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| inboxToL1Deployment(address) | d9ce0ef9 | +|-----------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| inboxToL2Deployment(address) | 46052706 | +|-----------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| initialize(address) | c4d66de8 | +|-----------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| l1Multicall() | b1460a71 | +|-----------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| l1Templates() | a5595da9 | +|-----------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| l1Weth() | 146bf4b1 | +|-----------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| l2CustomGatewayTemplate() | 41083186 | +|-----------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| l2MulticallTemplate() | 8c99e31c | +|-----------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| l2RouterTemplate() | 381c9d99 | +|-----------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| l2StandardGatewayTemplate() | d7eee6ca | +|-----------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| l2TokenBridgeFactoryTemplate() | 1aeef2e2 | +|-----------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| l2WethGatewayTemplate() | 9095765e | +|-----------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| l2WethTemplate() | fd40ad85 | +|-----------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| owner() | 8da5cb5b | +|-----------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| renounceOwnership() | 715018a6 | +|-----------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| retryableSender() | 36dddb97 | +|-----------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| setDeployment(address,(address,address,address,address,address),(address,address,address,address,address,address,address,address,address)) | 4c149671 | +|-----------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| setTemplates((address,address,address,address,address,address,address,address),address,address,address,address,address,address,address,address,address,uint256) | 81fb9184 | +|-----------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| transferOwnership(address) | f2fde38b | +╰-----------------------------------------------------------------------------------------------------------------------------------------------------------------+------------╯ + diff --git a/test/signatures/L1CustomGateway b/test/signatures/L1CustomGateway index e756b93455..5859efb5b8 100644 --- a/test/signatures/L1CustomGateway +++ b/test/signatures/L1CustomGateway @@ -1,24 +1,49 @@ -{ - "calculateL2TokenAddress(address)": "a7e28d48", - "counterpartGateway()": "2db09c1c", - "encodeWithdrawal(uint256,address)": "020a6058", - "finalizeInboundTransfer(address,address,address,uint256,bytes)": "2e567b36", - "forceRegisterTokenToL2(address[],address[],uint256,uint256,uint256)": "1d3a689f", - "getExternalCall(uint256,address,bytes)": "f68a9082", - "getOutboundCalldata(address,address,address,uint256,bytes)": "a0c76a96", - "inbox()": "fb0e722b", - "initialize(address,address,address,address)": "f8c8765e", - "l1ToL2Token(address)": "8a2dc014", - "outboundTransfer(address,address,uint256,uint256,uint256,bytes)": "d2ce7d65", - "outboundTransferCustomRefund(address,address,address,uint256,uint256,uint256,bytes)": "4fb1a07b", - "owner()": "8da5cb5b", - "postUpgradeInit()": "95fcea78", - "redirectedExits(bytes32)": "bcf2e6eb", - "registerTokenToL2(address,uint256,uint256,uint256)": "f26bdead", - "registerTokenToL2(address,uint256,uint256,uint256,address)": "ca346d4a", - "router()": "f887ea40", - "setOwner(address)": "13af4035", - "supportsInterface(bytes4)": "01ffc9a7", - "transferExitAndCall(uint256,address,address,bytes,bytes)": "bd5f3e7d", - "whitelist()": "93e59dc1" -} + +╭-------------------------------------------------------------------------------------+------------╮ +| Method | Identifier | ++==================================================================================================+ +| calculateL2TokenAddress(address) | a7e28d48 | +|-------------------------------------------------------------------------------------+------------| +| counterpartGateway() | 2db09c1c | +|-------------------------------------------------------------------------------------+------------| +| encodeWithdrawal(uint256,address) | 020a6058 | +|-------------------------------------------------------------------------------------+------------| +| finalizeInboundTransfer(address,address,address,uint256,bytes) | 2e567b36 | +|-------------------------------------------------------------------------------------+------------| +| forceRegisterTokenToL2(address[],address[],uint256,uint256,uint256) | 1d3a689f | +|-------------------------------------------------------------------------------------+------------| +| getExternalCall(uint256,address,bytes) | f68a9082 | +|-------------------------------------------------------------------------------------+------------| +| getOutboundCalldata(address,address,address,uint256,bytes) | a0c76a96 | +|-------------------------------------------------------------------------------------+------------| +| inbox() | fb0e722b | +|-------------------------------------------------------------------------------------+------------| +| initialize(address,address,address,address) | f8c8765e | +|-------------------------------------------------------------------------------------+------------| +| l1ToL2Token(address) | 8a2dc014 | +|-------------------------------------------------------------------------------------+------------| +| outboundTransfer(address,address,uint256,uint256,uint256,bytes) | d2ce7d65 | +|-------------------------------------------------------------------------------------+------------| +| outboundTransferCustomRefund(address,address,address,uint256,uint256,uint256,bytes) | 4fb1a07b | +|-------------------------------------------------------------------------------------+------------| +| owner() | 8da5cb5b | +|-------------------------------------------------------------------------------------+------------| +| postUpgradeInit() | 95fcea78 | +|-------------------------------------------------------------------------------------+------------| +| redirectedExits(bytes32) | bcf2e6eb | +|-------------------------------------------------------------------------------------+------------| +| registerTokenToL2(address,uint256,uint256,uint256) | f26bdead | +|-------------------------------------------------------------------------------------+------------| +| registerTokenToL2(address,uint256,uint256,uint256,address) | ca346d4a | +|-------------------------------------------------------------------------------------+------------| +| router() | f887ea40 | +|-------------------------------------------------------------------------------------+------------| +| setOwner(address) | 13af4035 | +|-------------------------------------------------------------------------------------+------------| +| supportsInterface(bytes4) | 01ffc9a7 | +|-------------------------------------------------------------------------------------+------------| +| transferExitAndCall(uint256,address,address,bytes,bytes) | bd5f3e7d | +|-------------------------------------------------------------------------------------+------------| +| whitelist() | 93e59dc1 | +╰-------------------------------------------------------------------------------------+------------╯ + diff --git a/test/signatures/L1ERC20Gateway b/test/signatures/L1ERC20Gateway index 98c9bb6125..fa31978c7a 100644 --- a/test/signatures/L1ERC20Gateway +++ b/test/signatures/L1ERC20Gateway @@ -1,20 +1,41 @@ -{ - "calculateL2TokenAddress(address)": "a7e28d48", - "cloneableProxyHash()": "97881f8d", - "counterpartGateway()": "2db09c1c", - "encodeWithdrawal(uint256,address)": "020a6058", - "finalizeInboundTransfer(address,address,address,uint256,bytes)": "2e567b36", - "getExternalCall(uint256,address,bytes)": "f68a9082", - "getOutboundCalldata(address,address,address,uint256,bytes)": "a0c76a96", - "inbox()": "fb0e722b", - "initialize(address,address,address,bytes32,address)": "a01893bf", - "l2BeaconProxyFactory()": "70fc045f", - "outboundTransfer(address,address,uint256,uint256,uint256,bytes)": "d2ce7d65", - "outboundTransferCustomRefund(address,address,address,uint256,uint256,uint256,bytes)": "4fb1a07b", - "postUpgradeInit()": "95fcea78", - "redirectedExits(bytes32)": "bcf2e6eb", - "router()": "f887ea40", - "supportsInterface(bytes4)": "01ffc9a7", - "transferExitAndCall(uint256,address,address,bytes,bytes)": "bd5f3e7d", - "whitelist()": "93e59dc1" -} + +╭-------------------------------------------------------------------------------------+------------╮ +| Method | Identifier | ++==================================================================================================+ +| calculateL2TokenAddress(address) | a7e28d48 | +|-------------------------------------------------------------------------------------+------------| +| cloneableProxyHash() | 97881f8d | +|-------------------------------------------------------------------------------------+------------| +| counterpartGateway() | 2db09c1c | +|-------------------------------------------------------------------------------------+------------| +| encodeWithdrawal(uint256,address) | 020a6058 | +|-------------------------------------------------------------------------------------+------------| +| finalizeInboundTransfer(address,address,address,uint256,bytes) | 2e567b36 | +|-------------------------------------------------------------------------------------+------------| +| getExternalCall(uint256,address,bytes) | f68a9082 | +|-------------------------------------------------------------------------------------+------------| +| getOutboundCalldata(address,address,address,uint256,bytes) | a0c76a96 | +|-------------------------------------------------------------------------------------+------------| +| inbox() | fb0e722b | +|-------------------------------------------------------------------------------------+------------| +| initialize(address,address,address,bytes32,address) | a01893bf | +|-------------------------------------------------------------------------------------+------------| +| l2BeaconProxyFactory() | 70fc045f | +|-------------------------------------------------------------------------------------+------------| +| outboundTransfer(address,address,uint256,uint256,uint256,bytes) | d2ce7d65 | +|-------------------------------------------------------------------------------------+------------| +| outboundTransferCustomRefund(address,address,address,uint256,uint256,uint256,bytes) | 4fb1a07b | +|-------------------------------------------------------------------------------------+------------| +| postUpgradeInit() | 95fcea78 | +|-------------------------------------------------------------------------------------+------------| +| redirectedExits(bytes32) | bcf2e6eb | +|-------------------------------------------------------------------------------------+------------| +| router() | f887ea40 | +|-------------------------------------------------------------------------------------+------------| +| supportsInterface(bytes4) | 01ffc9a7 | +|-------------------------------------------------------------------------------------+------------| +| transferExitAndCall(uint256,address,address,bytes,bytes) | bd5f3e7d | +|-------------------------------------------------------------------------------------+------------| +| whitelist() | 93e59dc1 | +╰-------------------------------------------------------------------------------------+------------╯ + diff --git a/test/signatures/L1ForceOnlyReverseCustomGateway b/test/signatures/L1ForceOnlyReverseCustomGateway new file mode 100644 index 0000000000..5859efb5b8 --- /dev/null +++ b/test/signatures/L1ForceOnlyReverseCustomGateway @@ -0,0 +1,49 @@ + +╭-------------------------------------------------------------------------------------+------------╮ +| Method | Identifier | ++==================================================================================================+ +| calculateL2TokenAddress(address) | a7e28d48 | +|-------------------------------------------------------------------------------------+------------| +| counterpartGateway() | 2db09c1c | +|-------------------------------------------------------------------------------------+------------| +| encodeWithdrawal(uint256,address) | 020a6058 | +|-------------------------------------------------------------------------------------+------------| +| finalizeInboundTransfer(address,address,address,uint256,bytes) | 2e567b36 | +|-------------------------------------------------------------------------------------+------------| +| forceRegisterTokenToL2(address[],address[],uint256,uint256,uint256) | 1d3a689f | +|-------------------------------------------------------------------------------------+------------| +| getExternalCall(uint256,address,bytes) | f68a9082 | +|-------------------------------------------------------------------------------------+------------| +| getOutboundCalldata(address,address,address,uint256,bytes) | a0c76a96 | +|-------------------------------------------------------------------------------------+------------| +| inbox() | fb0e722b | +|-------------------------------------------------------------------------------------+------------| +| initialize(address,address,address,address) | f8c8765e | +|-------------------------------------------------------------------------------------+------------| +| l1ToL2Token(address) | 8a2dc014 | +|-------------------------------------------------------------------------------------+------------| +| outboundTransfer(address,address,uint256,uint256,uint256,bytes) | d2ce7d65 | +|-------------------------------------------------------------------------------------+------------| +| outboundTransferCustomRefund(address,address,address,uint256,uint256,uint256,bytes) | 4fb1a07b | +|-------------------------------------------------------------------------------------+------------| +| owner() | 8da5cb5b | +|-------------------------------------------------------------------------------------+------------| +| postUpgradeInit() | 95fcea78 | +|-------------------------------------------------------------------------------------+------------| +| redirectedExits(bytes32) | bcf2e6eb | +|-------------------------------------------------------------------------------------+------------| +| registerTokenToL2(address,uint256,uint256,uint256) | f26bdead | +|-------------------------------------------------------------------------------------+------------| +| registerTokenToL2(address,uint256,uint256,uint256,address) | ca346d4a | +|-------------------------------------------------------------------------------------+------------| +| router() | f887ea40 | +|-------------------------------------------------------------------------------------+------------| +| setOwner(address) | 13af4035 | +|-------------------------------------------------------------------------------------+------------| +| supportsInterface(bytes4) | 01ffc9a7 | +|-------------------------------------------------------------------------------------+------------| +| transferExitAndCall(uint256,address,address,bytes,bytes) | bd5f3e7d | +|-------------------------------------------------------------------------------------+------------| +| whitelist() | 93e59dc1 | +╰-------------------------------------------------------------------------------------+------------╯ + diff --git a/test/signatures/L1GatewayRouter b/test/signatures/L1GatewayRouter index 428467cc21..8cefe6151a 100644 --- a/test/signatures/L1GatewayRouter +++ b/test/signatures/L1GatewayRouter @@ -1,24 +1,49 @@ -{ - "calculateL2TokenAddress(address)": "a7e28d48", - "counterpartGateway()": "2db09c1c", - "defaultGateway()": "03295802", - "finalizeInboundTransfer(address,address,address,uint256,bytes)": "2e567b36", - "getGateway(address)": "bda009fe", - "getOutboundCalldata(address,address,address,uint256,bytes)": "a0c76a96", - "inbox()": "fb0e722b", - "initialize(address,address,address,address,address)": "1459457a", - "l1TokenToGateway(address)": "ed08fdc6", - "outboundTransfer(address,address,uint256,uint256,uint256,bytes)": "d2ce7d65", - "outboundTransferCustomRefund(address,address,address,uint256,uint256,uint256,bytes)": "4fb1a07b", - "owner()": "8da5cb5b", - "postUpgradeInit()": "95fcea78", - "router()": "f887ea40", - "setDefaultGateway(address,uint256,uint256,uint256)": "5625a952", - "setGateway(address,uint256,uint256,uint256)": "dd614569", - "setGateway(address,uint256,uint256,uint256,address)": "2d67b72d", - "setGateways(address[],address[],uint256,uint256,uint256)": "658b53f4", - "setOwner(address)": "13af4035", - "supportsInterface(bytes4)": "01ffc9a7", - "updateWhitelistSource(address)": "47466f98", - "whitelist()": "93e59dc1" -} + +╭-------------------------------------------------------------------------------------+------------╮ +| Method | Identifier | ++==================================================================================================+ +| calculateL2TokenAddress(address) | a7e28d48 | +|-------------------------------------------------------------------------------------+------------| +| counterpartGateway() | 2db09c1c | +|-------------------------------------------------------------------------------------+------------| +| defaultGateway() | 03295802 | +|-------------------------------------------------------------------------------------+------------| +| finalizeInboundTransfer(address,address,address,uint256,bytes) | 2e567b36 | +|-------------------------------------------------------------------------------------+------------| +| getGateway(address) | bda009fe | +|-------------------------------------------------------------------------------------+------------| +| getOutboundCalldata(address,address,address,uint256,bytes) | a0c76a96 | +|-------------------------------------------------------------------------------------+------------| +| inbox() | fb0e722b | +|-------------------------------------------------------------------------------------+------------| +| initialize(address,address,address,address,address) | 1459457a | +|-------------------------------------------------------------------------------------+------------| +| l1TokenToGateway(address) | ed08fdc6 | +|-------------------------------------------------------------------------------------+------------| +| outboundTransfer(address,address,uint256,uint256,uint256,bytes) | d2ce7d65 | +|-------------------------------------------------------------------------------------+------------| +| outboundTransferCustomRefund(address,address,address,uint256,uint256,uint256,bytes) | 4fb1a07b | +|-------------------------------------------------------------------------------------+------------| +| owner() | 8da5cb5b | +|-------------------------------------------------------------------------------------+------------| +| postUpgradeInit() | 95fcea78 | +|-------------------------------------------------------------------------------------+------------| +| router() | f887ea40 | +|-------------------------------------------------------------------------------------+------------| +| setDefaultGateway(address,uint256,uint256,uint256) | 5625a952 | +|-------------------------------------------------------------------------------------+------------| +| setGateway(address,uint256,uint256,uint256) | dd614569 | +|-------------------------------------------------------------------------------------+------------| +| setGateway(address,uint256,uint256,uint256,address) | 2d67b72d | +|-------------------------------------------------------------------------------------+------------| +| setGateways(address[],address[],uint256,uint256,uint256) | 658b53f4 | +|-------------------------------------------------------------------------------------+------------| +| setOwner(address) | 13af4035 | +|-------------------------------------------------------------------------------------+------------| +| supportsInterface(bytes4) | 01ffc9a7 | +|-------------------------------------------------------------------------------------+------------| +| updateWhitelistSource(address) | 47466f98 | +|-------------------------------------------------------------------------------------+------------| +| whitelist() | 93e59dc1 | +╰-------------------------------------------------------------------------------------+------------╯ + diff --git a/test/signatures/L1OrbitCustomGateway b/test/signatures/L1OrbitCustomGateway index 678bff837f..24dbe05d24 100644 --- a/test/signatures/L1OrbitCustomGateway +++ b/test/signatures/L1OrbitCustomGateway @@ -1,27 +1,55 @@ -{ - "calculateL2TokenAddress(address)": "a7e28d48", - "counterpartGateway()": "2db09c1c", - "encodeWithdrawal(uint256,address)": "020a6058", - "finalizeInboundTransfer(address,address,address,uint256,bytes)": "2e567b36", - "forceRegisterTokenToL2(address[],address[],uint256,uint256,uint256)": "1d3a689f", - "forceRegisterTokenToL2(address[],address[],uint256,uint256,uint256,uint256)": "85f25597", - "getExternalCall(uint256,address,bytes)": "f68a9082", - "getOutboundCalldata(address,address,address,uint256,bytes)": "a0c76a96", - "inbox()": "fb0e722b", - "initialize(address,address,address,address)": "f8c8765e", - "l1ToL2Token(address)": "8a2dc014", - "outboundTransfer(address,address,uint256,uint256,uint256,bytes)": "d2ce7d65", - "outboundTransferCustomRefund(address,address,address,uint256,uint256,uint256,bytes)": "4fb1a07b", - "owner()": "8da5cb5b", - "postUpgradeInit()": "95fcea78", - "redirectedExits(bytes32)": "bcf2e6eb", - "registerTokenToL2(address,uint256,uint256,uint256)": "f26bdead", - "registerTokenToL2(address,uint256,uint256,uint256,address)": "ca346d4a", - "registerTokenToL2(address,uint256,uint256,uint256,address,uint256)": "37daacad", - "registerTokenToL2(address,uint256,uint256,uint256,uint256)": "3e8ee3df", - "router()": "f887ea40", - "setOwner(address)": "13af4035", - "supportsInterface(bytes4)": "01ffc9a7", - "transferExitAndCall(uint256,address,address,bytes,bytes)": "bd5f3e7d", - "whitelist()": "93e59dc1" -} + +╭-------------------------------------------------------------------------------------+------------╮ +| Method | Identifier | ++==================================================================================================+ +| calculateL2TokenAddress(address) | a7e28d48 | +|-------------------------------------------------------------------------------------+------------| +| counterpartGateway() | 2db09c1c | +|-------------------------------------------------------------------------------------+------------| +| encodeWithdrawal(uint256,address) | 020a6058 | +|-------------------------------------------------------------------------------------+------------| +| finalizeInboundTransfer(address,address,address,uint256,bytes) | 2e567b36 | +|-------------------------------------------------------------------------------------+------------| +| forceRegisterTokenToL2(address[],address[],uint256,uint256,uint256) | 1d3a689f | +|-------------------------------------------------------------------------------------+------------| +| forceRegisterTokenToL2(address[],address[],uint256,uint256,uint256,uint256) | 85f25597 | +|-------------------------------------------------------------------------------------+------------| +| getExternalCall(uint256,address,bytes) | f68a9082 | +|-------------------------------------------------------------------------------------+------------| +| getOutboundCalldata(address,address,address,uint256,bytes) | a0c76a96 | +|-------------------------------------------------------------------------------------+------------| +| inbox() | fb0e722b | +|-------------------------------------------------------------------------------------+------------| +| initialize(address,address,address,address) | f8c8765e | +|-------------------------------------------------------------------------------------+------------| +| l1ToL2Token(address) | 8a2dc014 | +|-------------------------------------------------------------------------------------+------------| +| outboundTransfer(address,address,uint256,uint256,uint256,bytes) | d2ce7d65 | +|-------------------------------------------------------------------------------------+------------| +| outboundTransferCustomRefund(address,address,address,uint256,uint256,uint256,bytes) | 4fb1a07b | +|-------------------------------------------------------------------------------------+------------| +| owner() | 8da5cb5b | +|-------------------------------------------------------------------------------------+------------| +| postUpgradeInit() | 95fcea78 | +|-------------------------------------------------------------------------------------+------------| +| redirectedExits(bytes32) | bcf2e6eb | +|-------------------------------------------------------------------------------------+------------| +| registerTokenToL2(address,uint256,uint256,uint256) | f26bdead | +|-------------------------------------------------------------------------------------+------------| +| registerTokenToL2(address,uint256,uint256,uint256,address) | ca346d4a | +|-------------------------------------------------------------------------------------+------------| +| registerTokenToL2(address,uint256,uint256,uint256,address,uint256) | 37daacad | +|-------------------------------------------------------------------------------------+------------| +| registerTokenToL2(address,uint256,uint256,uint256,uint256) | 3e8ee3df | +|-------------------------------------------------------------------------------------+------------| +| router() | f887ea40 | +|-------------------------------------------------------------------------------------+------------| +| setOwner(address) | 13af4035 | +|-------------------------------------------------------------------------------------+------------| +| supportsInterface(bytes4) | 01ffc9a7 | +|-------------------------------------------------------------------------------------+------------| +| transferExitAndCall(uint256,address,address,bytes,bytes) | bd5f3e7d | +|-------------------------------------------------------------------------------------+------------| +| whitelist() | 93e59dc1 | +╰-------------------------------------------------------------------------------------+------------╯ + diff --git a/test/signatures/L1OrbitERC20Gateway b/test/signatures/L1OrbitERC20Gateway index 98c9bb6125..fa31978c7a 100644 --- a/test/signatures/L1OrbitERC20Gateway +++ b/test/signatures/L1OrbitERC20Gateway @@ -1,20 +1,41 @@ -{ - "calculateL2TokenAddress(address)": "a7e28d48", - "cloneableProxyHash()": "97881f8d", - "counterpartGateway()": "2db09c1c", - "encodeWithdrawal(uint256,address)": "020a6058", - "finalizeInboundTransfer(address,address,address,uint256,bytes)": "2e567b36", - "getExternalCall(uint256,address,bytes)": "f68a9082", - "getOutboundCalldata(address,address,address,uint256,bytes)": "a0c76a96", - "inbox()": "fb0e722b", - "initialize(address,address,address,bytes32,address)": "a01893bf", - "l2BeaconProxyFactory()": "70fc045f", - "outboundTransfer(address,address,uint256,uint256,uint256,bytes)": "d2ce7d65", - "outboundTransferCustomRefund(address,address,address,uint256,uint256,uint256,bytes)": "4fb1a07b", - "postUpgradeInit()": "95fcea78", - "redirectedExits(bytes32)": "bcf2e6eb", - "router()": "f887ea40", - "supportsInterface(bytes4)": "01ffc9a7", - "transferExitAndCall(uint256,address,address,bytes,bytes)": "bd5f3e7d", - "whitelist()": "93e59dc1" -} + +╭-------------------------------------------------------------------------------------+------------╮ +| Method | Identifier | ++==================================================================================================+ +| calculateL2TokenAddress(address) | a7e28d48 | +|-------------------------------------------------------------------------------------+------------| +| cloneableProxyHash() | 97881f8d | +|-------------------------------------------------------------------------------------+------------| +| counterpartGateway() | 2db09c1c | +|-------------------------------------------------------------------------------------+------------| +| encodeWithdrawal(uint256,address) | 020a6058 | +|-------------------------------------------------------------------------------------+------------| +| finalizeInboundTransfer(address,address,address,uint256,bytes) | 2e567b36 | +|-------------------------------------------------------------------------------------+------------| +| getExternalCall(uint256,address,bytes) | f68a9082 | +|-------------------------------------------------------------------------------------+------------| +| getOutboundCalldata(address,address,address,uint256,bytes) | a0c76a96 | +|-------------------------------------------------------------------------------------+------------| +| inbox() | fb0e722b | +|-------------------------------------------------------------------------------------+------------| +| initialize(address,address,address,bytes32,address) | a01893bf | +|-------------------------------------------------------------------------------------+------------| +| l2BeaconProxyFactory() | 70fc045f | +|-------------------------------------------------------------------------------------+------------| +| outboundTransfer(address,address,uint256,uint256,uint256,bytes) | d2ce7d65 | +|-------------------------------------------------------------------------------------+------------| +| outboundTransferCustomRefund(address,address,address,uint256,uint256,uint256,bytes) | 4fb1a07b | +|-------------------------------------------------------------------------------------+------------| +| postUpgradeInit() | 95fcea78 | +|-------------------------------------------------------------------------------------+------------| +| redirectedExits(bytes32) | bcf2e6eb | +|-------------------------------------------------------------------------------------+------------| +| router() | f887ea40 | +|-------------------------------------------------------------------------------------+------------| +| supportsInterface(bytes4) | 01ffc9a7 | +|-------------------------------------------------------------------------------------+------------| +| transferExitAndCall(uint256,address,address,bytes,bytes) | bd5f3e7d | +|-------------------------------------------------------------------------------------+------------| +| whitelist() | 93e59dc1 | +╰-------------------------------------------------------------------------------------+------------╯ + diff --git a/test/signatures/L1OrbitGatewayRouter b/test/signatures/L1OrbitGatewayRouter index db159e0dd5..583c303c86 100644 --- a/test/signatures/L1OrbitGatewayRouter +++ b/test/signatures/L1OrbitGatewayRouter @@ -1,28 +1,57 @@ -{ - "calculateL2TokenAddress(address)": "a7e28d48", - "counterpartGateway()": "2db09c1c", - "defaultGateway()": "03295802", - "finalizeInboundTransfer(address,address,address,uint256,bytes)": "2e567b36", - "getGateway(address)": "bda009fe", - "getOutboundCalldata(address,address,address,uint256,bytes)": "a0c76a96", - "inbox()": "fb0e722b", - "initialize(address,address,address,address,address)": "1459457a", - "l1TokenToGateway(address)": "ed08fdc6", - "outboundTransfer(address,address,uint256,uint256,uint256,bytes)": "d2ce7d65", - "outboundTransferCustomRefund(address,address,address,uint256,uint256,uint256,bytes)": "4fb1a07b", - "owner()": "8da5cb5b", - "postUpgradeInit()": "95fcea78", - "router()": "f887ea40", - "setDefaultGateway(address,uint256,uint256,uint256)": "5625a952", - "setDefaultGateway(address,uint256,uint256,uint256,uint256)": "c9a96997", - "setGateway(address,uint256,uint256,uint256)": "dd614569", - "setGateway(address,uint256,uint256,uint256,address)": "2d67b72d", - "setGateway(address,uint256,uint256,uint256,address,uint256)": "d7f7459c", - "setGateway(address,uint256,uint256,uint256,uint256)": "dc121927", - "setGateways(address[],address[],uint256,uint256,uint256)": "658b53f4", - "setGateways(address[],address[],uint256,uint256,uint256,uint256)": "55654af8", - "setOwner(address)": "13af4035", - "supportsInterface(bytes4)": "01ffc9a7", - "updateWhitelistSource(address)": "47466f98", - "whitelist()": "93e59dc1" -} + +╭-------------------------------------------------------------------------------------+------------╮ +| Method | Identifier | ++==================================================================================================+ +| calculateL2TokenAddress(address) | a7e28d48 | +|-------------------------------------------------------------------------------------+------------| +| counterpartGateway() | 2db09c1c | +|-------------------------------------------------------------------------------------+------------| +| defaultGateway() | 03295802 | +|-------------------------------------------------------------------------------------+------------| +| finalizeInboundTransfer(address,address,address,uint256,bytes) | 2e567b36 | +|-------------------------------------------------------------------------------------+------------| +| getGateway(address) | bda009fe | +|-------------------------------------------------------------------------------------+------------| +| getOutboundCalldata(address,address,address,uint256,bytes) | a0c76a96 | +|-------------------------------------------------------------------------------------+------------| +| inbox() | fb0e722b | +|-------------------------------------------------------------------------------------+------------| +| initialize(address,address,address,address,address) | 1459457a | +|-------------------------------------------------------------------------------------+------------| +| l1TokenToGateway(address) | ed08fdc6 | +|-------------------------------------------------------------------------------------+------------| +| outboundTransfer(address,address,uint256,uint256,uint256,bytes) | d2ce7d65 | +|-------------------------------------------------------------------------------------+------------| +| outboundTransferCustomRefund(address,address,address,uint256,uint256,uint256,bytes) | 4fb1a07b | +|-------------------------------------------------------------------------------------+------------| +| owner() | 8da5cb5b | +|-------------------------------------------------------------------------------------+------------| +| postUpgradeInit() | 95fcea78 | +|-------------------------------------------------------------------------------------+------------| +| router() | f887ea40 | +|-------------------------------------------------------------------------------------+------------| +| setDefaultGateway(address,uint256,uint256,uint256) | 5625a952 | +|-------------------------------------------------------------------------------------+------------| +| setDefaultGateway(address,uint256,uint256,uint256,uint256) | c9a96997 | +|-------------------------------------------------------------------------------------+------------| +| setGateway(address,uint256,uint256,uint256) | dd614569 | +|-------------------------------------------------------------------------------------+------------| +| setGateway(address,uint256,uint256,uint256,address) | 2d67b72d | +|-------------------------------------------------------------------------------------+------------| +| setGateway(address,uint256,uint256,uint256,address,uint256) | d7f7459c | +|-------------------------------------------------------------------------------------+------------| +| setGateway(address,uint256,uint256,uint256,uint256) | dc121927 | +|-------------------------------------------------------------------------------------+------------| +| setGateways(address[],address[],uint256,uint256,uint256) | 658b53f4 | +|-------------------------------------------------------------------------------------+------------| +| setGateways(address[],address[],uint256,uint256,uint256,uint256) | 55654af8 | +|-------------------------------------------------------------------------------------+------------| +| setOwner(address) | 13af4035 | +|-------------------------------------------------------------------------------------+------------| +| supportsInterface(bytes4) | 01ffc9a7 | +|-------------------------------------------------------------------------------------+------------| +| updateWhitelistSource(address) | 47466f98 | +|-------------------------------------------------------------------------------------+------------| +| whitelist() | 93e59dc1 | +╰-------------------------------------------------------------------------------------+------------╯ + diff --git a/test/signatures/L1OrbitReverseCustomGateway b/test/signatures/L1OrbitReverseCustomGateway index 678bff837f..24dbe05d24 100644 --- a/test/signatures/L1OrbitReverseCustomGateway +++ b/test/signatures/L1OrbitReverseCustomGateway @@ -1,27 +1,55 @@ -{ - "calculateL2TokenAddress(address)": "a7e28d48", - "counterpartGateway()": "2db09c1c", - "encodeWithdrawal(uint256,address)": "020a6058", - "finalizeInboundTransfer(address,address,address,uint256,bytes)": "2e567b36", - "forceRegisterTokenToL2(address[],address[],uint256,uint256,uint256)": "1d3a689f", - "forceRegisterTokenToL2(address[],address[],uint256,uint256,uint256,uint256)": "85f25597", - "getExternalCall(uint256,address,bytes)": "f68a9082", - "getOutboundCalldata(address,address,address,uint256,bytes)": "a0c76a96", - "inbox()": "fb0e722b", - "initialize(address,address,address,address)": "f8c8765e", - "l1ToL2Token(address)": "8a2dc014", - "outboundTransfer(address,address,uint256,uint256,uint256,bytes)": "d2ce7d65", - "outboundTransferCustomRefund(address,address,address,uint256,uint256,uint256,bytes)": "4fb1a07b", - "owner()": "8da5cb5b", - "postUpgradeInit()": "95fcea78", - "redirectedExits(bytes32)": "bcf2e6eb", - "registerTokenToL2(address,uint256,uint256,uint256)": "f26bdead", - "registerTokenToL2(address,uint256,uint256,uint256,address)": "ca346d4a", - "registerTokenToL2(address,uint256,uint256,uint256,address,uint256)": "37daacad", - "registerTokenToL2(address,uint256,uint256,uint256,uint256)": "3e8ee3df", - "router()": "f887ea40", - "setOwner(address)": "13af4035", - "supportsInterface(bytes4)": "01ffc9a7", - "transferExitAndCall(uint256,address,address,bytes,bytes)": "bd5f3e7d", - "whitelist()": "93e59dc1" -} + +╭-------------------------------------------------------------------------------------+------------╮ +| Method | Identifier | ++==================================================================================================+ +| calculateL2TokenAddress(address) | a7e28d48 | +|-------------------------------------------------------------------------------------+------------| +| counterpartGateway() | 2db09c1c | +|-------------------------------------------------------------------------------------+------------| +| encodeWithdrawal(uint256,address) | 020a6058 | +|-------------------------------------------------------------------------------------+------------| +| finalizeInboundTransfer(address,address,address,uint256,bytes) | 2e567b36 | +|-------------------------------------------------------------------------------------+------------| +| forceRegisterTokenToL2(address[],address[],uint256,uint256,uint256) | 1d3a689f | +|-------------------------------------------------------------------------------------+------------| +| forceRegisterTokenToL2(address[],address[],uint256,uint256,uint256,uint256) | 85f25597 | +|-------------------------------------------------------------------------------------+------------| +| getExternalCall(uint256,address,bytes) | f68a9082 | +|-------------------------------------------------------------------------------------+------------| +| getOutboundCalldata(address,address,address,uint256,bytes) | a0c76a96 | +|-------------------------------------------------------------------------------------+------------| +| inbox() | fb0e722b | +|-------------------------------------------------------------------------------------+------------| +| initialize(address,address,address,address) | f8c8765e | +|-------------------------------------------------------------------------------------+------------| +| l1ToL2Token(address) | 8a2dc014 | +|-------------------------------------------------------------------------------------+------------| +| outboundTransfer(address,address,uint256,uint256,uint256,bytes) | d2ce7d65 | +|-------------------------------------------------------------------------------------+------------| +| outboundTransferCustomRefund(address,address,address,uint256,uint256,uint256,bytes) | 4fb1a07b | +|-------------------------------------------------------------------------------------+------------| +| owner() | 8da5cb5b | +|-------------------------------------------------------------------------------------+------------| +| postUpgradeInit() | 95fcea78 | +|-------------------------------------------------------------------------------------+------------| +| redirectedExits(bytes32) | bcf2e6eb | +|-------------------------------------------------------------------------------------+------------| +| registerTokenToL2(address,uint256,uint256,uint256) | f26bdead | +|-------------------------------------------------------------------------------------+------------| +| registerTokenToL2(address,uint256,uint256,uint256,address) | ca346d4a | +|-------------------------------------------------------------------------------------+------------| +| registerTokenToL2(address,uint256,uint256,uint256,address,uint256) | 37daacad | +|-------------------------------------------------------------------------------------+------------| +| registerTokenToL2(address,uint256,uint256,uint256,uint256) | 3e8ee3df | +|-------------------------------------------------------------------------------------+------------| +| router() | f887ea40 | +|-------------------------------------------------------------------------------------+------------| +| setOwner(address) | 13af4035 | +|-------------------------------------------------------------------------------------+------------| +| supportsInterface(bytes4) | 01ffc9a7 | +|-------------------------------------------------------------------------------------+------------| +| transferExitAndCall(uint256,address,address,bytes,bytes) | bd5f3e7d | +|-------------------------------------------------------------------------------------+------------| +| whitelist() | 93e59dc1 | +╰-------------------------------------------------------------------------------------+------------╯ + diff --git a/test/signatures/L1OrbitUSDCGateway b/test/signatures/L1OrbitUSDCGateway index b59554ae2a..85644d4c57 100644 --- a/test/signatures/L1OrbitUSDCGateway +++ b/test/signatures/L1OrbitUSDCGateway @@ -1,29 +1,59 @@ -{ - "burnAmount()": "486a7e6b", - "burnLockedUSDC()": "8a5e52bb", - "burner()": "27810b6e", - "calculateL2TokenAddress(address)": "a7e28d48", - "counterpartGateway()": "2db09c1c", - "depositsPaused()": "60da3e83", - "encodeWithdrawal(uint256,address)": "020a6058", - "finalizeInboundTransfer(address,address,address,uint256,bytes)": "2e567b36", - "getExternalCall(uint256,address,bytes)": "f68a9082", - "getOutboundCalldata(address,address,address,uint256,bytes)": "a0c76a96", - "inbox()": "fb0e722b", - "initialize(address,address,address,address,address,address)": "cc2a9a5b", - "l1USDC()": "a6f73669", - "l2USDC()": "29e96f9e", - "outboundTransfer(address,address,uint256,uint256,uint256,bytes)": "d2ce7d65", - "outboundTransferCustomRefund(address,address,address,uint256,uint256,uint256,bytes)": "4fb1a07b", - "owner()": "8da5cb5b", - "pauseDeposits()": "02191980", - "postUpgradeInit()": "95fcea78", - "redirectedExits(bytes32)": "bcf2e6eb", - "router()": "f887ea40", - "setBurnAmount(uint256)": "cc43f3d3", - "setBurner(address)": "a996d6ce", - "setOwner(address)": "13af4035", - "supportsInterface(bytes4)": "01ffc9a7", - "transferExitAndCall(uint256,address,address,bytes,bytes)": "bd5f3e7d", - "unpauseDeposits()": "63d8882a" -} + +╭-------------------------------------------------------------------------------------+------------╮ +| Method | Identifier | ++==================================================================================================+ +| burnAmount() | 486a7e6b | +|-------------------------------------------------------------------------------------+------------| +| burnLockedUSDC() | 8a5e52bb | +|-------------------------------------------------------------------------------------+------------| +| burner() | 27810b6e | +|-------------------------------------------------------------------------------------+------------| +| calculateL2TokenAddress(address) | a7e28d48 | +|-------------------------------------------------------------------------------------+------------| +| counterpartGateway() | 2db09c1c | +|-------------------------------------------------------------------------------------+------------| +| depositsPaused() | 60da3e83 | +|-------------------------------------------------------------------------------------+------------| +| encodeWithdrawal(uint256,address) | 020a6058 | +|-------------------------------------------------------------------------------------+------------| +| finalizeInboundTransfer(address,address,address,uint256,bytes) | 2e567b36 | +|-------------------------------------------------------------------------------------+------------| +| getExternalCall(uint256,address,bytes) | f68a9082 | +|-------------------------------------------------------------------------------------+------------| +| getOutboundCalldata(address,address,address,uint256,bytes) | a0c76a96 | +|-------------------------------------------------------------------------------------+------------| +| inbox() | fb0e722b | +|-------------------------------------------------------------------------------------+------------| +| initialize(address,address,address,address,address,address) | cc2a9a5b | +|-------------------------------------------------------------------------------------+------------| +| l1USDC() | a6f73669 | +|-------------------------------------------------------------------------------------+------------| +| l2USDC() | 29e96f9e | +|-------------------------------------------------------------------------------------+------------| +| outboundTransfer(address,address,uint256,uint256,uint256,bytes) | d2ce7d65 | +|-------------------------------------------------------------------------------------+------------| +| outboundTransferCustomRefund(address,address,address,uint256,uint256,uint256,bytes) | 4fb1a07b | +|-------------------------------------------------------------------------------------+------------| +| owner() | 8da5cb5b | +|-------------------------------------------------------------------------------------+------------| +| pauseDeposits() | 02191980 | +|-------------------------------------------------------------------------------------+------------| +| postUpgradeInit() | 95fcea78 | +|-------------------------------------------------------------------------------------+------------| +| redirectedExits(bytes32) | bcf2e6eb | +|-------------------------------------------------------------------------------------+------------| +| router() | f887ea40 | +|-------------------------------------------------------------------------------------+------------| +| setBurnAmount(uint256) | cc43f3d3 | +|-------------------------------------------------------------------------------------+------------| +| setBurner(address) | a996d6ce | +|-------------------------------------------------------------------------------------+------------| +| setOwner(address) | 13af4035 | +|-------------------------------------------------------------------------------------+------------| +| supportsInterface(bytes4) | 01ffc9a7 | +|-------------------------------------------------------------------------------------+------------| +| transferExitAndCall(uint256,address,address,bytes,bytes) | bd5f3e7d | +|-------------------------------------------------------------------------------------+------------| +| unpauseDeposits() | 63d8882a | +╰-------------------------------------------------------------------------------------+------------╯ + diff --git a/test/signatures/L1ReverseCustomGateway b/test/signatures/L1ReverseCustomGateway index e756b93455..5859efb5b8 100644 --- a/test/signatures/L1ReverseCustomGateway +++ b/test/signatures/L1ReverseCustomGateway @@ -1,24 +1,49 @@ -{ - "calculateL2TokenAddress(address)": "a7e28d48", - "counterpartGateway()": "2db09c1c", - "encodeWithdrawal(uint256,address)": "020a6058", - "finalizeInboundTransfer(address,address,address,uint256,bytes)": "2e567b36", - "forceRegisterTokenToL2(address[],address[],uint256,uint256,uint256)": "1d3a689f", - "getExternalCall(uint256,address,bytes)": "f68a9082", - "getOutboundCalldata(address,address,address,uint256,bytes)": "a0c76a96", - "inbox()": "fb0e722b", - "initialize(address,address,address,address)": "f8c8765e", - "l1ToL2Token(address)": "8a2dc014", - "outboundTransfer(address,address,uint256,uint256,uint256,bytes)": "d2ce7d65", - "outboundTransferCustomRefund(address,address,address,uint256,uint256,uint256,bytes)": "4fb1a07b", - "owner()": "8da5cb5b", - "postUpgradeInit()": "95fcea78", - "redirectedExits(bytes32)": "bcf2e6eb", - "registerTokenToL2(address,uint256,uint256,uint256)": "f26bdead", - "registerTokenToL2(address,uint256,uint256,uint256,address)": "ca346d4a", - "router()": "f887ea40", - "setOwner(address)": "13af4035", - "supportsInterface(bytes4)": "01ffc9a7", - "transferExitAndCall(uint256,address,address,bytes,bytes)": "bd5f3e7d", - "whitelist()": "93e59dc1" -} + +╭-------------------------------------------------------------------------------------+------------╮ +| Method | Identifier | ++==================================================================================================+ +| calculateL2TokenAddress(address) | a7e28d48 | +|-------------------------------------------------------------------------------------+------------| +| counterpartGateway() | 2db09c1c | +|-------------------------------------------------------------------------------------+------------| +| encodeWithdrawal(uint256,address) | 020a6058 | +|-------------------------------------------------------------------------------------+------------| +| finalizeInboundTransfer(address,address,address,uint256,bytes) | 2e567b36 | +|-------------------------------------------------------------------------------------+------------| +| forceRegisterTokenToL2(address[],address[],uint256,uint256,uint256) | 1d3a689f | +|-------------------------------------------------------------------------------------+------------| +| getExternalCall(uint256,address,bytes) | f68a9082 | +|-------------------------------------------------------------------------------------+------------| +| getOutboundCalldata(address,address,address,uint256,bytes) | a0c76a96 | +|-------------------------------------------------------------------------------------+------------| +| inbox() | fb0e722b | +|-------------------------------------------------------------------------------------+------------| +| initialize(address,address,address,address) | f8c8765e | +|-------------------------------------------------------------------------------------+------------| +| l1ToL2Token(address) | 8a2dc014 | +|-------------------------------------------------------------------------------------+------------| +| outboundTransfer(address,address,uint256,uint256,uint256,bytes) | d2ce7d65 | +|-------------------------------------------------------------------------------------+------------| +| outboundTransferCustomRefund(address,address,address,uint256,uint256,uint256,bytes) | 4fb1a07b | +|-------------------------------------------------------------------------------------+------------| +| owner() | 8da5cb5b | +|-------------------------------------------------------------------------------------+------------| +| postUpgradeInit() | 95fcea78 | +|-------------------------------------------------------------------------------------+------------| +| redirectedExits(bytes32) | bcf2e6eb | +|-------------------------------------------------------------------------------------+------------| +| registerTokenToL2(address,uint256,uint256,uint256) | f26bdead | +|-------------------------------------------------------------------------------------+------------| +| registerTokenToL2(address,uint256,uint256,uint256,address) | ca346d4a | +|-------------------------------------------------------------------------------------+------------| +| router() | f887ea40 | +|-------------------------------------------------------------------------------------+------------| +| setOwner(address) | 13af4035 | +|-------------------------------------------------------------------------------------+------------| +| supportsInterface(bytes4) | 01ffc9a7 | +|-------------------------------------------------------------------------------------+------------| +| transferExitAndCall(uint256,address,address,bytes,bytes) | bd5f3e7d | +|-------------------------------------------------------------------------------------+------------| +| whitelist() | 93e59dc1 | +╰-------------------------------------------------------------------------------------+------------╯ + diff --git a/test/signatures/L1TokenBridgeRetryableSender b/test/signatures/L1TokenBridgeRetryableSender index 2ad6e91a3b..1452498a33 100644 --- a/test/signatures/L1TokenBridgeRetryableSender +++ b/test/signatures/L1TokenBridgeRetryableSender @@ -1,7 +1,15 @@ -{ - "initialize()": "8129fc1c", - "owner()": "8da5cb5b", - "renounceOwnership()": "715018a6", - "sendRetryable((address,address,address,address,uint256,uint256,uint256),(address,address,address,address,address,address,address),(address,address,address,address,address),address,address,address,address)": "5fc788d6", - "transferOwnership(address)": "f2fde38b" -} + +╭--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------╮ +| Method | Identifier | ++===========================================================================================================================================================================================================================+ +| initialize() | 8129fc1c | +|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| owner() | 8da5cb5b | +|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| renounceOwnership() | 715018a6 | +|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| sendRetryable((address,address,address,address,uint256,uint256,uint256),(address,address,address,address,address,address,address),(address,address,address,address,address),address,address,address,address) | 5fc788d6 | +|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| transferOwnership(address) | f2fde38b | +╰--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------╯ + diff --git a/test/signatures/L1USDCGateway b/test/signatures/L1USDCGateway index b59554ae2a..85644d4c57 100644 --- a/test/signatures/L1USDCGateway +++ b/test/signatures/L1USDCGateway @@ -1,29 +1,59 @@ -{ - "burnAmount()": "486a7e6b", - "burnLockedUSDC()": "8a5e52bb", - "burner()": "27810b6e", - "calculateL2TokenAddress(address)": "a7e28d48", - "counterpartGateway()": "2db09c1c", - "depositsPaused()": "60da3e83", - "encodeWithdrawal(uint256,address)": "020a6058", - "finalizeInboundTransfer(address,address,address,uint256,bytes)": "2e567b36", - "getExternalCall(uint256,address,bytes)": "f68a9082", - "getOutboundCalldata(address,address,address,uint256,bytes)": "a0c76a96", - "inbox()": "fb0e722b", - "initialize(address,address,address,address,address,address)": "cc2a9a5b", - "l1USDC()": "a6f73669", - "l2USDC()": "29e96f9e", - "outboundTransfer(address,address,uint256,uint256,uint256,bytes)": "d2ce7d65", - "outboundTransferCustomRefund(address,address,address,uint256,uint256,uint256,bytes)": "4fb1a07b", - "owner()": "8da5cb5b", - "pauseDeposits()": "02191980", - "postUpgradeInit()": "95fcea78", - "redirectedExits(bytes32)": "bcf2e6eb", - "router()": "f887ea40", - "setBurnAmount(uint256)": "cc43f3d3", - "setBurner(address)": "a996d6ce", - "setOwner(address)": "13af4035", - "supportsInterface(bytes4)": "01ffc9a7", - "transferExitAndCall(uint256,address,address,bytes,bytes)": "bd5f3e7d", - "unpauseDeposits()": "63d8882a" -} + +╭-------------------------------------------------------------------------------------+------------╮ +| Method | Identifier | ++==================================================================================================+ +| burnAmount() | 486a7e6b | +|-------------------------------------------------------------------------------------+------------| +| burnLockedUSDC() | 8a5e52bb | +|-------------------------------------------------------------------------------------+------------| +| burner() | 27810b6e | +|-------------------------------------------------------------------------------------+------------| +| calculateL2TokenAddress(address) | a7e28d48 | +|-------------------------------------------------------------------------------------+------------| +| counterpartGateway() | 2db09c1c | +|-------------------------------------------------------------------------------------+------------| +| depositsPaused() | 60da3e83 | +|-------------------------------------------------------------------------------------+------------| +| encodeWithdrawal(uint256,address) | 020a6058 | +|-------------------------------------------------------------------------------------+------------| +| finalizeInboundTransfer(address,address,address,uint256,bytes) | 2e567b36 | +|-------------------------------------------------------------------------------------+------------| +| getExternalCall(uint256,address,bytes) | f68a9082 | +|-------------------------------------------------------------------------------------+------------| +| getOutboundCalldata(address,address,address,uint256,bytes) | a0c76a96 | +|-------------------------------------------------------------------------------------+------------| +| inbox() | fb0e722b | +|-------------------------------------------------------------------------------------+------------| +| initialize(address,address,address,address,address,address) | cc2a9a5b | +|-------------------------------------------------------------------------------------+------------| +| l1USDC() | a6f73669 | +|-------------------------------------------------------------------------------------+------------| +| l2USDC() | 29e96f9e | +|-------------------------------------------------------------------------------------+------------| +| outboundTransfer(address,address,uint256,uint256,uint256,bytes) | d2ce7d65 | +|-------------------------------------------------------------------------------------+------------| +| outboundTransferCustomRefund(address,address,address,uint256,uint256,uint256,bytes) | 4fb1a07b | +|-------------------------------------------------------------------------------------+------------| +| owner() | 8da5cb5b | +|-------------------------------------------------------------------------------------+------------| +| pauseDeposits() | 02191980 | +|-------------------------------------------------------------------------------------+------------| +| postUpgradeInit() | 95fcea78 | +|-------------------------------------------------------------------------------------+------------| +| redirectedExits(bytes32) | bcf2e6eb | +|-------------------------------------------------------------------------------------+------------| +| router() | f887ea40 | +|-------------------------------------------------------------------------------------+------------| +| setBurnAmount(uint256) | cc43f3d3 | +|-------------------------------------------------------------------------------------+------------| +| setBurner(address) | a996d6ce | +|-------------------------------------------------------------------------------------+------------| +| setOwner(address) | 13af4035 | +|-------------------------------------------------------------------------------------+------------| +| supportsInterface(bytes4) | 01ffc9a7 | +|-------------------------------------------------------------------------------------+------------| +| transferExitAndCall(uint256,address,address,bytes,bytes) | bd5f3e7d | +|-------------------------------------------------------------------------------------+------------| +| unpauseDeposits() | 63d8882a | +╰-------------------------------------------------------------------------------------+------------╯ + diff --git a/test/signatures/L1WethGateway b/test/signatures/L1WethGateway index c6b0853293..86e3906120 100644 --- a/test/signatures/L1WethGateway +++ b/test/signatures/L1WethGateway @@ -1,19 +1,39 @@ -{ - "calculateL2TokenAddress(address)": "a7e28d48", - "counterpartGateway()": "2db09c1c", - "encodeWithdrawal(uint256,address)": "020a6058", - "finalizeInboundTransfer(address,address,address,uint256,bytes)": "2e567b36", - "getExternalCall(uint256,address,bytes)": "f68a9082", - "getOutboundCalldata(address,address,address,uint256,bytes)": "a0c76a96", - "inbox()": "fb0e722b", - "initialize(address,address,address,address,address)": "1459457a", - "l1Weth()": "146bf4b1", - "l2Weth()": "247b2768", - "outboundTransfer(address,address,uint256,uint256,uint256,bytes)": "d2ce7d65", - "outboundTransferCustomRefund(address,address,address,uint256,uint256,uint256,bytes)": "4fb1a07b", - "postUpgradeInit()": "95fcea78", - "redirectedExits(bytes32)": "bcf2e6eb", - "router()": "f887ea40", - "supportsInterface(bytes4)": "01ffc9a7", - "transferExitAndCall(uint256,address,address,bytes,bytes)": "bd5f3e7d" -} + +╭-------------------------------------------------------------------------------------+------------╮ +| Method | Identifier | ++==================================================================================================+ +| calculateL2TokenAddress(address) | a7e28d48 | +|-------------------------------------------------------------------------------------+------------| +| counterpartGateway() | 2db09c1c | +|-------------------------------------------------------------------------------------+------------| +| encodeWithdrawal(uint256,address) | 020a6058 | +|-------------------------------------------------------------------------------------+------------| +| finalizeInboundTransfer(address,address,address,uint256,bytes) | 2e567b36 | +|-------------------------------------------------------------------------------------+------------| +| getExternalCall(uint256,address,bytes) | f68a9082 | +|-------------------------------------------------------------------------------------+------------| +| getOutboundCalldata(address,address,address,uint256,bytes) | a0c76a96 | +|-------------------------------------------------------------------------------------+------------| +| inbox() | fb0e722b | +|-------------------------------------------------------------------------------------+------------| +| initialize(address,address,address,address,address) | 1459457a | +|-------------------------------------------------------------------------------------+------------| +| l1Weth() | 146bf4b1 | +|-------------------------------------------------------------------------------------+------------| +| l2Weth() | 247b2768 | +|-------------------------------------------------------------------------------------+------------| +| outboundTransfer(address,address,uint256,uint256,uint256,bytes) | d2ce7d65 | +|-------------------------------------------------------------------------------------+------------| +| outboundTransferCustomRefund(address,address,address,uint256,uint256,uint256,bytes) | 4fb1a07b | +|-------------------------------------------------------------------------------------+------------| +| postUpgradeInit() | 95fcea78 | +|-------------------------------------------------------------------------------------+------------| +| redirectedExits(bytes32) | bcf2e6eb | +|-------------------------------------------------------------------------------------+------------| +| router() | f887ea40 | +|-------------------------------------------------------------------------------------+------------| +| supportsInterface(bytes4) | 01ffc9a7 | +|-------------------------------------------------------------------------------------+------------| +| transferExitAndCall(uint256,address,address,bytes,bytes) | bd5f3e7d | +╰-------------------------------------------------------------------------------------+------------╯ + diff --git a/test/signatures/L2AtomicTokenBridgeFactory b/test/signatures/L2AtomicTokenBridgeFactory index 2aa137afc0..496153ce54 100644 --- a/test/signatures/L2AtomicTokenBridgeFactory +++ b/test/signatures/L2AtomicTokenBridgeFactory @@ -1,3 +1,7 @@ -{ - "deployL2Contracts((bytes,bytes,bytes,bytes,bytes,bytes,bytes),address,address,address,address,address,address,address,address)": "b1c7a870" -} + +╭--------------------------------------------------------------------------------------------------------------------------------+------------╮ +| Method | Identifier | ++=============================================================================================================================================+ +| deployL2Contracts((bytes,bytes,bytes,bytes,bytes,bytes,bytes),address,address,address,address,address,address,address,address) | b1c7a870 | +╰--------------------------------------------------------------------------------------------------------------------------------+------------╯ + diff --git a/test/signatures/L2CustomGateway b/test/signatures/L2CustomGateway index 058d61b578..698ed24b62 100644 --- a/test/signatures/L2CustomGateway +++ b/test/signatures/L2CustomGateway @@ -1,14 +1,29 @@ -{ - "calculateL2TokenAddress(address)": "a7e28d48", - "counterpartGateway()": "2db09c1c", - "exitNum()": "015234ab", - "finalizeInboundTransfer(address,address,address,uint256,bytes)": "2e567b36", - "getOutboundCalldata(address,address,address,uint256,bytes)": "a0c76a96", - "initialize(address,address)": "485cc955", - "l1ToL2Token(address)": "8a2dc014", - "outboundTransfer(address,address,uint256,bytes)": "7b3a3c8b", - "outboundTransfer(address,address,uint256,uint256,uint256,bytes)": "d2ce7d65", - "postUpgradeInit()": "95fcea78", - "registerTokenFromL1(address[],address[])": "d4f5532f", - "router()": "f887ea40" -} + +╭-----------------------------------------------------------------+------------╮ +| Method | Identifier | ++==============================================================================+ +| calculateL2TokenAddress(address) | a7e28d48 | +|-----------------------------------------------------------------+------------| +| counterpartGateway() | 2db09c1c | +|-----------------------------------------------------------------+------------| +| exitNum() | 015234ab | +|-----------------------------------------------------------------+------------| +| finalizeInboundTransfer(address,address,address,uint256,bytes) | 2e567b36 | +|-----------------------------------------------------------------+------------| +| getOutboundCalldata(address,address,address,uint256,bytes) | a0c76a96 | +|-----------------------------------------------------------------+------------| +| initialize(address,address) | 485cc955 | +|-----------------------------------------------------------------+------------| +| l1ToL2Token(address) | 8a2dc014 | +|-----------------------------------------------------------------+------------| +| outboundTransfer(address,address,uint256,bytes) | 7b3a3c8b | +|-----------------------------------------------------------------+------------| +| outboundTransfer(address,address,uint256,uint256,uint256,bytes) | d2ce7d65 | +|-----------------------------------------------------------------+------------| +| postUpgradeInit() | 95fcea78 | +|-----------------------------------------------------------------+------------| +| registerTokenFromL1(address[],address[]) | d4f5532f | +|-----------------------------------------------------------------+------------| +| router() | f887ea40 | +╰-----------------------------------------------------------------+------------╯ + diff --git a/test/signatures/L2CustomGatewayToken b/test/signatures/L2CustomGatewayToken new file mode 100644 index 0000000000..7e8cae5fd6 --- /dev/null +++ b/test/signatures/L2CustomGatewayToken @@ -0,0 +1,45 @@ + +╭---------------------------------------------------------------+------------╮ +| Method | Identifier | ++============================================================================+ +| DOMAIN_SEPARATOR() | 3644e515 | +|---------------------------------------------------------------+------------| +| allowance(address,address) | dd62ed3e | +|---------------------------------------------------------------+------------| +| approve(address,uint256) | 095ea7b3 | +|---------------------------------------------------------------+------------| +| balanceOf(address) | 70a08231 | +|---------------------------------------------------------------+------------| +| bridgeBurn(address,uint256) | 74f4f547 | +|---------------------------------------------------------------+------------| +| bridgeMint(address,uint256) | 8c2a993e | +|---------------------------------------------------------------+------------| +| decimals() | 313ce567 | +|---------------------------------------------------------------+------------| +| decreaseAllowance(address,uint256) | a457c2d7 | +|---------------------------------------------------------------+------------| +| increaseAllowance(address,uint256) | 39509351 | +|---------------------------------------------------------------+------------| +| initialize(string,string,uint8,address,address) | c820f146 | +|---------------------------------------------------------------+------------| +| l1Address() | c2eeeebd | +|---------------------------------------------------------------+------------| +| l2Gateway() | 8fa74a0e | +|---------------------------------------------------------------+------------| +| name() | 06fdde03 | +|---------------------------------------------------------------+------------| +| nonces(address) | 7ecebe00 | +|---------------------------------------------------------------+------------| +| permit(address,address,uint256,uint256,uint8,bytes32,bytes32) | d505accf | +|---------------------------------------------------------------+------------| +| symbol() | 95d89b41 | +|---------------------------------------------------------------+------------| +| totalSupply() | 18160ddd | +|---------------------------------------------------------------+------------| +| transfer(address,uint256) | a9059cbb | +|---------------------------------------------------------------+------------| +| transferAndCall(address,uint256,bytes) | 4000aea0 | +|---------------------------------------------------------------+------------| +| transferFrom(address,address,uint256) | 23b872dd | +╰---------------------------------------------------------------+------------╯ + diff --git a/test/signatures/L2ERC20Gateway b/test/signatures/L2ERC20Gateway index a6128af74f..b331c1030d 100644 --- a/test/signatures/L2ERC20Gateway +++ b/test/signatures/L2ERC20Gateway @@ -1,15 +1,31 @@ -{ - "beaconProxyFactory()": "c05e6a95", - "calculateL2TokenAddress(address)": "a7e28d48", - "cloneableProxyHash()": "97881f8d", - "counterpartGateway()": "2db09c1c", - "exitNum()": "015234ab", - "finalizeInboundTransfer(address,address,address,uint256,bytes)": "2e567b36", - "getOutboundCalldata(address,address,address,uint256,bytes)": "a0c76a96", - "getUserSalt(address)": "569f26ff", - "initialize(address,address,address)": "c0c53b8b", - "outboundTransfer(address,address,uint256,bytes)": "7b3a3c8b", - "outboundTransfer(address,address,uint256,uint256,uint256,bytes)": "d2ce7d65", - "postUpgradeInit()": "95fcea78", - "router()": "f887ea40" -} + +╭-----------------------------------------------------------------+------------╮ +| Method | Identifier | ++==============================================================================+ +| beaconProxyFactory() | c05e6a95 | +|-----------------------------------------------------------------+------------| +| calculateL2TokenAddress(address) | a7e28d48 | +|-----------------------------------------------------------------+------------| +| cloneableProxyHash() | 97881f8d | +|-----------------------------------------------------------------+------------| +| counterpartGateway() | 2db09c1c | +|-----------------------------------------------------------------+------------| +| exitNum() | 015234ab | +|-----------------------------------------------------------------+------------| +| finalizeInboundTransfer(address,address,address,uint256,bytes) | 2e567b36 | +|-----------------------------------------------------------------+------------| +| getOutboundCalldata(address,address,address,uint256,bytes) | a0c76a96 | +|-----------------------------------------------------------------+------------| +| getUserSalt(address) | 569f26ff | +|-----------------------------------------------------------------+------------| +| initialize(address,address,address) | c0c53b8b | +|-----------------------------------------------------------------+------------| +| outboundTransfer(address,address,uint256,bytes) | 7b3a3c8b | +|-----------------------------------------------------------------+------------| +| outboundTransfer(address,address,uint256,uint256,uint256,bytes) | d2ce7d65 | +|-----------------------------------------------------------------+------------| +| postUpgradeInit() | 95fcea78 | +|-----------------------------------------------------------------+------------| +| router() | f887ea40 | +╰-----------------------------------------------------------------+------------╯ + diff --git a/test/signatures/L2GatewayRouter b/test/signatures/L2GatewayRouter index 6a86a7a947..2800a421ab 100644 --- a/test/signatures/L2GatewayRouter +++ b/test/signatures/L2GatewayRouter @@ -1,16 +1,33 @@ -{ - "calculateL2TokenAddress(address)": "a7e28d48", - "counterpartGateway()": "2db09c1c", - "defaultGateway()": "03295802", - "finalizeInboundTransfer(address,address,address,uint256,bytes)": "2e567b36", - "getGateway(address)": "bda009fe", - "getOutboundCalldata(address,address,address,uint256,bytes)": "a0c76a96", - "initialize(address,address)": "485cc955", - "l1TokenToGateway(address)": "ed08fdc6", - "outboundTransfer(address,address,uint256,bytes)": "7b3a3c8b", - "outboundTransfer(address,address,uint256,uint256,uint256,bytes)": "d2ce7d65", - "postUpgradeInit()": "95fcea78", - "router()": "f887ea40", - "setDefaultGateway(address)": "f7c9362f", - "setGateway(address[],address[])": "4201f985" -} + +╭-----------------------------------------------------------------+------------╮ +| Method | Identifier | ++==============================================================================+ +| calculateL2TokenAddress(address) | a7e28d48 | +|-----------------------------------------------------------------+------------| +| counterpartGateway() | 2db09c1c | +|-----------------------------------------------------------------+------------| +| defaultGateway() | 03295802 | +|-----------------------------------------------------------------+------------| +| finalizeInboundTransfer(address,address,address,uint256,bytes) | 2e567b36 | +|-----------------------------------------------------------------+------------| +| getGateway(address) | bda009fe | +|-----------------------------------------------------------------+------------| +| getOutboundCalldata(address,address,address,uint256,bytes) | a0c76a96 | +|-----------------------------------------------------------------+------------| +| initialize(address,address) | 485cc955 | +|-----------------------------------------------------------------+------------| +| l1TokenToGateway(address) | ed08fdc6 | +|-----------------------------------------------------------------+------------| +| outboundTransfer(address,address,uint256,bytes) | 7b3a3c8b | +|-----------------------------------------------------------------+------------| +| outboundTransfer(address,address,uint256,uint256,uint256,bytes) | d2ce7d65 | +|-----------------------------------------------------------------+------------| +| postUpgradeInit() | 95fcea78 | +|-----------------------------------------------------------------+------------| +| router() | f887ea40 | +|-----------------------------------------------------------------+------------| +| setDefaultGateway(address) | f7c9362f | +|-----------------------------------------------------------------+------------| +| setGateway(address[],address[]) | 4201f985 | +╰-----------------------------------------------------------------+------------╯ + diff --git a/test/signatures/L2ReverseCustomGateway b/test/signatures/L2ReverseCustomGateway index 058d61b578..698ed24b62 100644 --- a/test/signatures/L2ReverseCustomGateway +++ b/test/signatures/L2ReverseCustomGateway @@ -1,14 +1,29 @@ -{ - "calculateL2TokenAddress(address)": "a7e28d48", - "counterpartGateway()": "2db09c1c", - "exitNum()": "015234ab", - "finalizeInboundTransfer(address,address,address,uint256,bytes)": "2e567b36", - "getOutboundCalldata(address,address,address,uint256,bytes)": "a0c76a96", - "initialize(address,address)": "485cc955", - "l1ToL2Token(address)": "8a2dc014", - "outboundTransfer(address,address,uint256,bytes)": "7b3a3c8b", - "outboundTransfer(address,address,uint256,uint256,uint256,bytes)": "d2ce7d65", - "postUpgradeInit()": "95fcea78", - "registerTokenFromL1(address[],address[])": "d4f5532f", - "router()": "f887ea40" -} + +╭-----------------------------------------------------------------+------------╮ +| Method | Identifier | ++==============================================================================+ +| calculateL2TokenAddress(address) | a7e28d48 | +|-----------------------------------------------------------------+------------| +| counterpartGateway() | 2db09c1c | +|-----------------------------------------------------------------+------------| +| exitNum() | 015234ab | +|-----------------------------------------------------------------+------------| +| finalizeInboundTransfer(address,address,address,uint256,bytes) | 2e567b36 | +|-----------------------------------------------------------------+------------| +| getOutboundCalldata(address,address,address,uint256,bytes) | a0c76a96 | +|-----------------------------------------------------------------+------------| +| initialize(address,address) | 485cc955 | +|-----------------------------------------------------------------+------------| +| l1ToL2Token(address) | 8a2dc014 | +|-----------------------------------------------------------------+------------| +| outboundTransfer(address,address,uint256,bytes) | 7b3a3c8b | +|-----------------------------------------------------------------+------------| +| outboundTransfer(address,address,uint256,uint256,uint256,bytes) | d2ce7d65 | +|-----------------------------------------------------------------+------------| +| postUpgradeInit() | 95fcea78 | +|-----------------------------------------------------------------+------------| +| registerTokenFromL1(address[],address[]) | d4f5532f | +|-----------------------------------------------------------------+------------| +| router() | f887ea40 | +╰-----------------------------------------------------------------+------------╯ + diff --git a/test/signatures/L2USDCGateway b/test/signatures/L2USDCGateway index 5873150681..22d43bb0e9 100644 --- a/test/signatures/L2USDCGateway +++ b/test/signatures/L2USDCGateway @@ -1,22 +1,45 @@ -{ - "calculateL2TokenAddress(address)": "a7e28d48", - "counterpartGateway()": "2db09c1c", - "exitNum()": "015234ab", - "finalizeInboundTransfer(address,address,address,uint256,bytes)": "2e567b36", - "getOutboundCalldata(address,address,address,uint256,bytes)": "a0c76a96", - "initialize(address,address,address,address,address)": "1459457a", - "l1USDC()": "a6f73669", - "l2USDC()": "29e96f9e", - "outboundTransfer(address,address,uint256,bytes)": "7b3a3c8b", - "outboundTransfer(address,address,uint256,uint256,uint256,bytes)": "d2ce7d65", - "owner()": "8da5cb5b", - "pauseWithdrawals()": "56bb54a7", - "postUpgradeInit()": "95fcea78", - "router()": "f887ea40", - "setOwner(address)": "13af4035", - "setUsdcOwnershipTransferrer(address)": "54d3a598", - "transferUSDCRoles(address)": "c689fc34", - "unpauseWithdrawals()": "e4c4be58", - "usdcOwnershipTransferrer()": "77403988", - "withdrawalsPaused()": "e9f2838e" -} + +╭-----------------------------------------------------------------+------------╮ +| Method | Identifier | ++==============================================================================+ +| calculateL2TokenAddress(address) | a7e28d48 | +|-----------------------------------------------------------------+------------| +| counterpartGateway() | 2db09c1c | +|-----------------------------------------------------------------+------------| +| exitNum() | 015234ab | +|-----------------------------------------------------------------+------------| +| finalizeInboundTransfer(address,address,address,uint256,bytes) | 2e567b36 | +|-----------------------------------------------------------------+------------| +| getOutboundCalldata(address,address,address,uint256,bytes) | a0c76a96 | +|-----------------------------------------------------------------+------------| +| initialize(address,address,address,address,address) | 1459457a | +|-----------------------------------------------------------------+------------| +| l1USDC() | a6f73669 | +|-----------------------------------------------------------------+------------| +| l2USDC() | 29e96f9e | +|-----------------------------------------------------------------+------------| +| outboundTransfer(address,address,uint256,bytes) | 7b3a3c8b | +|-----------------------------------------------------------------+------------| +| outboundTransfer(address,address,uint256,uint256,uint256,bytes) | d2ce7d65 | +|-----------------------------------------------------------------+------------| +| owner() | 8da5cb5b | +|-----------------------------------------------------------------+------------| +| pauseWithdrawals() | 56bb54a7 | +|-----------------------------------------------------------------+------------| +| postUpgradeInit() | 95fcea78 | +|-----------------------------------------------------------------+------------| +| router() | f887ea40 | +|-----------------------------------------------------------------+------------| +| setOwner(address) | 13af4035 | +|-----------------------------------------------------------------+------------| +| setUsdcOwnershipTransferrer(address) | 54d3a598 | +|-----------------------------------------------------------------+------------| +| transferUSDCRoles(address) | c689fc34 | +|-----------------------------------------------------------------+------------| +| unpauseWithdrawals() | e4c4be58 | +|-----------------------------------------------------------------+------------| +| usdcOwnershipTransferrer() | 77403988 | +|-----------------------------------------------------------------+------------| +| withdrawalsPaused() | e9f2838e | +╰-----------------------------------------------------------------+------------╯ + diff --git a/test/signatures/L2WethGateway b/test/signatures/L2WethGateway index 860455a628..1a2653d2d7 100644 --- a/test/signatures/L2WethGateway +++ b/test/signatures/L2WethGateway @@ -1,14 +1,29 @@ -{ - "calculateL2TokenAddress(address)": "a7e28d48", - "counterpartGateway()": "2db09c1c", - "exitNum()": "015234ab", - "finalizeInboundTransfer(address,address,address,uint256,bytes)": "2e567b36", - "getOutboundCalldata(address,address,address,uint256,bytes)": "a0c76a96", - "initialize(address,address,address,address)": "f8c8765e", - "l1Weth()": "146bf4b1", - "l2Weth()": "247b2768", - "outboundTransfer(address,address,uint256,bytes)": "7b3a3c8b", - "outboundTransfer(address,address,uint256,uint256,uint256,bytes)": "d2ce7d65", - "postUpgradeInit()": "95fcea78", - "router()": "f887ea40" -} + +╭-----------------------------------------------------------------+------------╮ +| Method | Identifier | ++==============================================================================+ +| calculateL2TokenAddress(address) | a7e28d48 | +|-----------------------------------------------------------------+------------| +| counterpartGateway() | 2db09c1c | +|-----------------------------------------------------------------+------------| +| exitNum() | 015234ab | +|-----------------------------------------------------------------+------------| +| finalizeInboundTransfer(address,address,address,uint256,bytes) | 2e567b36 | +|-----------------------------------------------------------------+------------| +| getOutboundCalldata(address,address,address,uint256,bytes) | a0c76a96 | +|-----------------------------------------------------------------+------------| +| initialize(address,address,address,address) | f8c8765e | +|-----------------------------------------------------------------+------------| +| l1Weth() | 146bf4b1 | +|-----------------------------------------------------------------+------------| +| l2Weth() | 247b2768 | +|-----------------------------------------------------------------+------------| +| outboundTransfer(address,address,uint256,bytes) | 7b3a3c8b | +|-----------------------------------------------------------------+------------| +| outboundTransfer(address,address,uint256,uint256,uint256,bytes) | d2ce7d65 | +|-----------------------------------------------------------------+------------| +| postUpgradeInit() | 95fcea78 | +|-----------------------------------------------------------------+------------| +| router() | f887ea40 | +╰-----------------------------------------------------------------+------------╯ + diff --git a/test/signatures/Multicall2 b/test/signatures/Multicall2 new file mode 100644 index 0000000000..197f4396c7 --- /dev/null +++ b/test/signatures/Multicall2 @@ -0,0 +1,31 @@ + +╭-----------------------------------------------+------------╮ +| Method | Identifier | ++============================================================+ +| aggregate((address,bytes)[]) | 252dba42 | +|-----------------------------------------------+------------| +| blockAndAggregate((address,bytes)[]) | c3077fa9 | +|-----------------------------------------------+------------| +| getBlockHash(uint256) | ee82ac5e | +|-----------------------------------------------+------------| +| getBlockNumber() | 42cbb15c | +|-----------------------------------------------+------------| +| getCurrentBlockCoinbase() | a8b0574e | +|-----------------------------------------------+------------| +| getCurrentBlockDifficulty() | 72425d9d | +|-----------------------------------------------+------------| +| getCurrentBlockGasLimit() | 86d516e8 | +|-----------------------------------------------+------------| +| getCurrentBlockTimestamp() | 0f28c97d | +|-----------------------------------------------+------------| +| getEthBalance(address) | 4d2301cc | +|-----------------------------------------------+------------| +| getLastBlockHash() | 27e86d6e | +|-----------------------------------------------+------------| +| tryAggregate(bool,(address,bytes)[]) | bce38bd7 | +|-----------------------------------------------+------------| +| tryAggregateGasRation(bool,(address,bytes)[]) | 2935cd90 | +|-----------------------------------------------+------------| +| tryBlockAndAggregate(bool,(address,bytes)[]) | 399542e9 | +╰-----------------------------------------------+------------╯ + diff --git a/test/signatures/StandardArbERC20 b/test/signatures/StandardArbERC20 index eb0e443c53..b762efe364 100644 --- a/test/signatures/StandardArbERC20 +++ b/test/signatures/StandardArbERC20 @@ -1,23 +1,47 @@ -{ - "DOMAIN_SEPARATOR()": "3644e515", - "allowance(address,address)": "dd62ed3e", - "approve(address,uint256)": "095ea7b3", - "balanceOf(address)": "70a08231", - "bridgeBurn(address,uint256)": "74f4f547", - "bridgeInit(address,bytes)": "189db7d2", - "bridgeMint(address,uint256)": "8c2a993e", - "decimals()": "313ce567", - "decreaseAllowance(address,uint256)": "a457c2d7", - "increaseAllowance(address,uint256)": "39509351", - "isMaster()": "6f791d29", - "l1Address()": "c2eeeebd", - "l2Gateway()": "8fa74a0e", - "name()": "06fdde03", - "nonces(address)": "7ecebe00", - "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": "d505accf", - "symbol()": "95d89b41", - "totalSupply()": "18160ddd", - "transfer(address,uint256)": "a9059cbb", - "transferAndCall(address,uint256,bytes)": "4000aea0", - "transferFrom(address,address,uint256)": "23b872dd" -} + +╭---------------------------------------------------------------+------------╮ +| Method | Identifier | ++============================================================================+ +| DOMAIN_SEPARATOR() | 3644e515 | +|---------------------------------------------------------------+------------| +| allowance(address,address) | dd62ed3e | +|---------------------------------------------------------------+------------| +| approve(address,uint256) | 095ea7b3 | +|---------------------------------------------------------------+------------| +| balanceOf(address) | 70a08231 | +|---------------------------------------------------------------+------------| +| bridgeBurn(address,uint256) | 74f4f547 | +|---------------------------------------------------------------+------------| +| bridgeInit(address,bytes) | 189db7d2 | +|---------------------------------------------------------------+------------| +| bridgeMint(address,uint256) | 8c2a993e | +|---------------------------------------------------------------+------------| +| decimals() | 313ce567 | +|---------------------------------------------------------------+------------| +| decreaseAllowance(address,uint256) | a457c2d7 | +|---------------------------------------------------------------+------------| +| increaseAllowance(address,uint256) | 39509351 | +|---------------------------------------------------------------+------------| +| isMaster() | 6f791d29 | +|---------------------------------------------------------------+------------| +| l1Address() | c2eeeebd | +|---------------------------------------------------------------+------------| +| l2Gateway() | 8fa74a0e | +|---------------------------------------------------------------+------------| +| name() | 06fdde03 | +|---------------------------------------------------------------+------------| +| nonces(address) | 7ecebe00 | +|---------------------------------------------------------------+------------| +| permit(address,address,uint256,uint256,uint8,bytes32,bytes32) | d505accf | +|---------------------------------------------------------------+------------| +| symbol() | 95d89b41 | +|---------------------------------------------------------------+------------| +| totalSupply() | 18160ddd | +|---------------------------------------------------------------+------------| +| transfer(address,uint256) | a9059cbb | +|---------------------------------------------------------------+------------| +| transferAndCall(address,uint256,bytes) | 4000aea0 | +|---------------------------------------------------------------+------------| +| transferFrom(address,address,uint256) | 23b872dd | +╰---------------------------------------------------------------+------------╯ + diff --git a/test/signatures/Whitelist b/test/signatures/Whitelist new file mode 100644 index 0000000000..1335ed2d1f --- /dev/null +++ b/test/signatures/Whitelist @@ -0,0 +1,15 @@ + +╭-------------------------------------+------------╮ +| Method | Identifier | ++==================================================+ +| isAllowed(address) | babcc539 | +|-------------------------------------+------------| +| owner() | 8da5cb5b | +|-------------------------------------+------------| +| setOwner(address) | 13af4035 | +|-------------------------------------+------------| +| setWhitelist(address[],bool[]) | 3b99adf7 | +|-------------------------------------+------------| +| triggerConsumers(address,address[]) | 37ca2617 | +╰-------------------------------------+------------╯ + diff --git a/test/signatures/aeERC20 b/test/signatures/aeERC20 new file mode 100644 index 0000000000..c0e4769a41 --- /dev/null +++ b/test/signatures/aeERC20 @@ -0,0 +1,35 @@ + +╭---------------------------------------------------------------+------------╮ +| Method | Identifier | ++============================================================================+ +| DOMAIN_SEPARATOR() | 3644e515 | +|---------------------------------------------------------------+------------| +| allowance(address,address) | dd62ed3e | +|---------------------------------------------------------------+------------| +| approve(address,uint256) | 095ea7b3 | +|---------------------------------------------------------------+------------| +| balanceOf(address) | 70a08231 | +|---------------------------------------------------------------+------------| +| decimals() | 313ce567 | +|---------------------------------------------------------------+------------| +| decreaseAllowance(address,uint256) | a457c2d7 | +|---------------------------------------------------------------+------------| +| increaseAllowance(address,uint256) | 39509351 | +|---------------------------------------------------------------+------------| +| name() | 06fdde03 | +|---------------------------------------------------------------+------------| +| nonces(address) | 7ecebe00 | +|---------------------------------------------------------------+------------| +| permit(address,address,uint256,uint256,uint8,bytes32,bytes32) | d505accf | +|---------------------------------------------------------------+------------| +| symbol() | 95d89b41 | +|---------------------------------------------------------------+------------| +| totalSupply() | 18160ddd | +|---------------------------------------------------------------+------------| +| transfer(address,uint256) | a9059cbb | +|---------------------------------------------------------------+------------| +| transferAndCall(address,uint256,bytes) | 4000aea0 | +|---------------------------------------------------------------+------------| +| transferFrom(address,address,uint256) | 23b872dd | +╰---------------------------------------------------------------+------------╯ + diff --git a/test/signatures/aeWETH b/test/signatures/aeWETH new file mode 100644 index 0000000000..dbb9171436 --- /dev/null +++ b/test/signatures/aeWETH @@ -0,0 +1,53 @@ + +╭---------------------------------------------------------------+------------╮ +| Method | Identifier | ++============================================================================+ +| DOMAIN_SEPARATOR() | 3644e515 | +|---------------------------------------------------------------+------------| +| allowance(address,address) | dd62ed3e | +|---------------------------------------------------------------+------------| +| approve(address,uint256) | 095ea7b3 | +|---------------------------------------------------------------+------------| +| balanceOf(address) | 70a08231 | +|---------------------------------------------------------------+------------| +| bridgeBurn(address,uint256) | 74f4f547 | +|---------------------------------------------------------------+------------| +| bridgeMint(address,uint256) | 8c2a993e | +|---------------------------------------------------------------+------------| +| decimals() | 313ce567 | +|---------------------------------------------------------------+------------| +| decreaseAllowance(address,uint256) | a457c2d7 | +|---------------------------------------------------------------+------------| +| deposit() | d0e30db0 | +|---------------------------------------------------------------+------------| +| depositTo(address) | b760faf9 | +|---------------------------------------------------------------+------------| +| increaseAllowance(address,uint256) | 39509351 | +|---------------------------------------------------------------+------------| +| initialize(string,string,uint8,address,address) | c820f146 | +|---------------------------------------------------------------+------------| +| l1Address() | c2eeeebd | +|---------------------------------------------------------------+------------| +| l2Gateway() | 8fa74a0e | +|---------------------------------------------------------------+------------| +| name() | 06fdde03 | +|---------------------------------------------------------------+------------| +| nonces(address) | 7ecebe00 | +|---------------------------------------------------------------+------------| +| permit(address,address,uint256,uint256,uint8,bytes32,bytes32) | d505accf | +|---------------------------------------------------------------+------------| +| symbol() | 95d89b41 | +|---------------------------------------------------------------+------------| +| totalSupply() | 18160ddd | +|---------------------------------------------------------------+------------| +| transfer(address,uint256) | a9059cbb | +|---------------------------------------------------------------+------------| +| transferAndCall(address,uint256,bytes) | 4000aea0 | +|---------------------------------------------------------------+------------| +| transferFrom(address,address,uint256) | 23b872dd | +|---------------------------------------------------------------+------------| +| withdraw(uint256) | 2e1a7d4d | +|---------------------------------------------------------------+------------| +| withdrawTo(address,uint256) | 205c2878 | +╰---------------------------------------------------------------+------------╯ + diff --git a/test/signatures/test-sigs.bash b/test/signatures/test-sigs.bash new file mode 100755 index 0000000000..316789affc --- /dev/null +++ b/test/signatures/test-sigs.bash @@ -0,0 +1,3 @@ +#!/bin/bash + +./test/util/forge-inspect.bash ./test/signatures methods \ No newline at end of file diff --git a/test/storage/ArbMulticall2 b/test/storage/ArbMulticall2 new file mode 100644 index 0000000000..1ec5dc0797 --- /dev/null +++ b/test/storage/ArbMulticall2 @@ -0,0 +1,6 @@ + +╭------+------+------+--------+-------+----------╮ +| Name | Type | Slot | Offset | Bytes | Contract | ++================================================+ +╰------+------+------+--------+-------+----------╯ + diff --git a/test/storage/BeaconProxyFactory b/test/storage/BeaconProxyFactory new file mode 100644 index 0000000000..0d8059680c --- /dev/null +++ b/test/storage/BeaconProxyFactory @@ -0,0 +1,7 @@ + +╭--------+---------+------+--------+-------+----------------------------------------------------------------------------╮ +| Name | Type | Slot | Offset | Bytes | Contract | ++=======================================================================================================================+ +| beacon | address | 0 | 0 | 20 | contracts/tokenbridge/libraries/ClonableBeaconProxy.sol:BeaconProxyFactory | +╰--------+---------+------+--------+-------+----------------------------------------------------------------------------╯ + diff --git a/test/storage/ClonableBeaconProxy b/test/storage/ClonableBeaconProxy new file mode 100644 index 0000000000..1ec5dc0797 --- /dev/null +++ b/test/storage/ClonableBeaconProxy @@ -0,0 +1,6 @@ + +╭------+------+------+--------+-------+----------╮ +| Name | Type | Slot | Offset | Bytes | Contract | ++================================================+ +╰------+------+------+--------+-------+----------╯ + diff --git a/test/storage/Cloneable b/test/storage/Cloneable new file mode 100644 index 0000000000..20e83b88db --- /dev/null +++ b/test/storage/Cloneable @@ -0,0 +1,7 @@ + +╭--------------+------+------+--------+-------+---------------------------------------------------------╮ +| Name | Type | Slot | Offset | Bytes | Contract | ++=======================================================================================================+ +| isMasterCopy | bool | 0 | 0 | 1 | contracts/tokenbridge/libraries/Cloneable.sol:Cloneable | +╰--------------+------+------+--------+-------+---------------------------------------------------------╯ + diff --git a/test/storage/ERC20Upgradeable b/test/storage/ERC20Upgradeable new file mode 100644 index 0000000000..7d97065785 --- /dev/null +++ b/test/storage/ERC20Upgradeable @@ -0,0 +1,25 @@ + +╭---------------+-------------------------------------------------+------+--------+-------+-----------------------------------------------------------------------╮ +| Name | Type | Slot | Offset | Bytes | Contract | ++=================================================================================================================================================================+ +| _initialized | uint8 | 0 | 0 | 1 | contracts/tokenbridge/libraries/ERC20Upgradeable.sol:ERC20Upgradeable | +|---------------+-------------------------------------------------+------+--------+-------+-----------------------------------------------------------------------| +| _initializing | bool | 0 | 1 | 1 | contracts/tokenbridge/libraries/ERC20Upgradeable.sol:ERC20Upgradeable | +|---------------+-------------------------------------------------+------+--------+-------+-----------------------------------------------------------------------| +| __gap | uint256[50] | 1 | 0 | 1600 | contracts/tokenbridge/libraries/ERC20Upgradeable.sol:ERC20Upgradeable | +|---------------+-------------------------------------------------+------+--------+-------+-----------------------------------------------------------------------| +| _balances | mapping(address => uint256) | 51 | 0 | 32 | contracts/tokenbridge/libraries/ERC20Upgradeable.sol:ERC20Upgradeable | +|---------------+-------------------------------------------------+------+--------+-------+-----------------------------------------------------------------------| +| _allowances | mapping(address => mapping(address => uint256)) | 52 | 0 | 32 | contracts/tokenbridge/libraries/ERC20Upgradeable.sol:ERC20Upgradeable | +|---------------+-------------------------------------------------+------+--------+-------+-----------------------------------------------------------------------| +| _totalSupply | uint256 | 53 | 0 | 32 | contracts/tokenbridge/libraries/ERC20Upgradeable.sol:ERC20Upgradeable | +|---------------+-------------------------------------------------+------+--------+-------+-----------------------------------------------------------------------| +| _name | string | 54 | 0 | 32 | contracts/tokenbridge/libraries/ERC20Upgradeable.sol:ERC20Upgradeable | +|---------------+-------------------------------------------------+------+--------+-------+-----------------------------------------------------------------------| +| _symbol | string | 55 | 0 | 32 | contracts/tokenbridge/libraries/ERC20Upgradeable.sol:ERC20Upgradeable | +|---------------+-------------------------------------------------+------+--------+-------+-----------------------------------------------------------------------| +| _decimals | uint8 | 56 | 0 | 1 | contracts/tokenbridge/libraries/ERC20Upgradeable.sol:ERC20Upgradeable | +|---------------+-------------------------------------------------+------+--------+-------+-----------------------------------------------------------------------| +| __gap | uint256[44] | 57 | 0 | 1408 | contracts/tokenbridge/libraries/ERC20Upgradeable.sol:ERC20Upgradeable | +╰---------------+-------------------------------------------------+------+--------+-------+-----------------------------------------------------------------------╯ + diff --git a/test/storage/L1AtomicTokenBridgeCreator b/test/storage/L1AtomicTokenBridgeCreator index 41f7e032aa..92d5ffacfb 100644 --- a/test/storage/L1AtomicTokenBridgeCreator +++ b/test/storage/L1AtomicTokenBridgeCreator @@ -1,22 +1,45 @@ + +╭--------------------------------+--------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------------╮ | Name | Type | Slot | Offset | Bytes | Contract | -|--------------------------------|--------------------------------------------------|------|--------|-------|------------------------------------------------------------------------------------------| ++======================================================================================================================================================================================================+ | _initialized | uint8 | 0 | 0 | 1 | contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol:L1AtomicTokenBridgeCreator | +|--------------------------------+--------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------------| | _initializing | bool | 0 | 1 | 1 | contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol:L1AtomicTokenBridgeCreator | +|--------------------------------+--------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------------| | __gap | uint256[50] | 1 | 0 | 1600 | contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol:L1AtomicTokenBridgeCreator | +|--------------------------------+--------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------------| | _owner | address | 51 | 0 | 20 | contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol:L1AtomicTokenBridgeCreator | +|--------------------------------+--------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------------| | __gap | uint256[49] | 52 | 0 | 1568 | contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol:L1AtomicTokenBridgeCreator | +|--------------------------------+--------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------------| | inboxToL1Deployment | mapping(address => struct L1DeploymentAddresses) | 101 | 0 | 32 | contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol:L1AtomicTokenBridgeCreator | +|--------------------------------+--------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------------| | inboxToL2Deployment | mapping(address => struct L2DeploymentAddresses) | 102 | 0 | 32 | contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol:L1AtomicTokenBridgeCreator | +|--------------------------------+--------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------------| | gasLimitForL2FactoryDeployment | uint256 | 103 | 0 | 32 | contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol:L1AtomicTokenBridgeCreator | +|--------------------------------+--------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------------| | retryableSender | contract L1TokenBridgeRetryableSender | 104 | 0 | 20 | contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol:L1AtomicTokenBridgeCreator | +|--------------------------------+--------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------------| | l1Templates | struct L1AtomicTokenBridgeCreator.L1Templates | 105 | 0 | 256 | contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol:L1AtomicTokenBridgeCreator | +|--------------------------------+--------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------------| | l2TokenBridgeFactoryTemplate | address | 113 | 0 | 20 | contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol:L1AtomicTokenBridgeCreator | +|--------------------------------+--------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------------| | l2RouterTemplate | address | 114 | 0 | 20 | contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol:L1AtomicTokenBridgeCreator | +|--------------------------------+--------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------------| | l2StandardGatewayTemplate | address | 115 | 0 | 20 | contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol:L1AtomicTokenBridgeCreator | +|--------------------------------+--------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------------| | l2CustomGatewayTemplate | address | 116 | 0 | 20 | contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol:L1AtomicTokenBridgeCreator | +|--------------------------------+--------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------------| | l2WethGatewayTemplate | address | 117 | 0 | 20 | contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol:L1AtomicTokenBridgeCreator | +|--------------------------------+--------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------------| | l2WethTemplate | address | 118 | 0 | 20 | contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol:L1AtomicTokenBridgeCreator | +|--------------------------------+--------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------------| | l2MulticallTemplate | address | 119 | 0 | 20 | contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol:L1AtomicTokenBridgeCreator | +|--------------------------------+--------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------------| | l1Weth | address | 120 | 0 | 20 | contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol:L1AtomicTokenBridgeCreator | +|--------------------------------+--------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------------| | l1Multicall | address | 121 | 0 | 20 | contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol:L1AtomicTokenBridgeCreator | +|--------------------------------+--------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------------| | canonicalL2FactoryAddress | address | 122 | 0 | 20 | contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol:L1AtomicTokenBridgeCreator | +╰--------------------------------+--------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------------╯ + diff --git a/test/storage/L1CustomGateway b/test/storage/L1CustomGateway index 80ca4f35c7..d370bb2d56 100644 --- a/test/storage/L1CustomGateway +++ b/test/storage/L1CustomGateway @@ -1,10 +1,21 @@ + +╭--------------------+---------------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------╮ | Name | Type | Slot | Offset | Bytes | Contract | -|--------------------|---------------------------------------------------------------|------|--------|-------|----------------------------------------------------------------------------| ++=========================================================================================================================================================================================+ | counterpartGateway | address | 0 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1CustomGateway.sol:L1CustomGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------| | router | address | 1 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1CustomGateway.sol:L1CustomGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------| | inbox | address | 2 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1CustomGateway.sol:L1CustomGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------| | redirectedExits | mapping(bytes32 => struct L1ArbitrumExtendedGateway.ExitData) | 3 | 0 | 32 | contracts/tokenbridge/ethereum/gateway/L1CustomGateway.sol:L1CustomGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------| | l1ToL2Token | mapping(address => address) | 4 | 0 | 32 | contracts/tokenbridge/ethereum/gateway/L1CustomGateway.sol:L1CustomGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------| | owner | address | 5 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1CustomGateway.sol:L1CustomGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------| | whitelist | address | 6 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1CustomGateway.sol:L1CustomGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------| | _status | uint256 | 7 | 0 | 32 | contracts/tokenbridge/ethereum/gateway/L1CustomGateway.sol:L1CustomGateway | +╰--------------------+---------------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------╯ + diff --git a/test/storage/L1ERC20Gateway b/test/storage/L1ERC20Gateway index 21e1ff0fed..a3b993b956 100644 --- a/test/storage/L1ERC20Gateway +++ b/test/storage/L1ERC20Gateway @@ -1,10 +1,21 @@ + +╭----------------------+---------------------------------------------------------------+------+--------+-------+--------------------------------------------------------------------------╮ | Name | Type | Slot | Offset | Bytes | Contract | -|----------------------|---------------------------------------------------------------|------|--------|-------|--------------------------------------------------------------------------| ++=========================================================================================================================================================================================+ | counterpartGateway | address | 0 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1ERC20Gateway.sol:L1ERC20Gateway | +|----------------------+---------------------------------------------------------------+------+--------+-------+--------------------------------------------------------------------------| | router | address | 1 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1ERC20Gateway.sol:L1ERC20Gateway | +|----------------------+---------------------------------------------------------------+------+--------+-------+--------------------------------------------------------------------------| | inbox | address | 2 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1ERC20Gateway.sol:L1ERC20Gateway | +|----------------------+---------------------------------------------------------------+------+--------+-------+--------------------------------------------------------------------------| | redirectedExits | mapping(bytes32 => struct L1ArbitrumExtendedGateway.ExitData) | 3 | 0 | 32 | contracts/tokenbridge/ethereum/gateway/L1ERC20Gateway.sol:L1ERC20Gateway | +|----------------------+---------------------------------------------------------------+------+--------+-------+--------------------------------------------------------------------------| | cloneableProxyHash | bytes32 | 4 | 0 | 32 | contracts/tokenbridge/ethereum/gateway/L1ERC20Gateway.sol:L1ERC20Gateway | +|----------------------+---------------------------------------------------------------+------+--------+-------+--------------------------------------------------------------------------| | l2BeaconProxyFactory | address | 5 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1ERC20Gateway.sol:L1ERC20Gateway | +|----------------------+---------------------------------------------------------------+------+--------+-------+--------------------------------------------------------------------------| | whitelist | address | 6 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1ERC20Gateway.sol:L1ERC20Gateway | +|----------------------+---------------------------------------------------------------+------+--------+-------+--------------------------------------------------------------------------| | _status | uint256 | 7 | 0 | 32 | contracts/tokenbridge/ethereum/gateway/L1ERC20Gateway.sol:L1ERC20Gateway | +╰----------------------+---------------------------------------------------------------+------+--------+-------+--------------------------------------------------------------------------╯ + diff --git a/test/storage/L1ForceOnlyReverseCustomGateway b/test/storage/L1ForceOnlyReverseCustomGateway new file mode 100644 index 0000000000..823d855f45 --- /dev/null +++ b/test/storage/L1ForceOnlyReverseCustomGateway @@ -0,0 +1,21 @@ + +╭--------------------+---------------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------------------------------╮ +| Name | Type | Slot | Offset | Bytes | Contract | ++=========================================================================================================================================================================================================================+ +| counterpartGateway | address | 0 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1ForceOnlyReverseCustomGateway.sol:L1ForceOnlyReverseCustomGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------------------------------| +| router | address | 1 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1ForceOnlyReverseCustomGateway.sol:L1ForceOnlyReverseCustomGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------------------------------| +| inbox | address | 2 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1ForceOnlyReverseCustomGateway.sol:L1ForceOnlyReverseCustomGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------------------------------| +| redirectedExits | mapping(bytes32 => struct L1ArbitrumExtendedGateway.ExitData) | 3 | 0 | 32 | contracts/tokenbridge/ethereum/gateway/L1ForceOnlyReverseCustomGateway.sol:L1ForceOnlyReverseCustomGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------------------------------| +| l1ToL2Token | mapping(address => address) | 4 | 0 | 32 | contracts/tokenbridge/ethereum/gateway/L1ForceOnlyReverseCustomGateway.sol:L1ForceOnlyReverseCustomGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------------------------------| +| owner | address | 5 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1ForceOnlyReverseCustomGateway.sol:L1ForceOnlyReverseCustomGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------------------------------| +| whitelist | address | 6 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1ForceOnlyReverseCustomGateway.sol:L1ForceOnlyReverseCustomGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------------------------------| +| _status | uint256 | 7 | 0 | 32 | contracts/tokenbridge/ethereum/gateway/L1ForceOnlyReverseCustomGateway.sol:L1ForceOnlyReverseCustomGateway | +╰--------------------+---------------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------------------------------╯ + diff --git a/test/storage/L1GatewayRouter b/test/storage/L1GatewayRouter index b4ed170557..addd77bf79 100644 --- a/test/storage/L1GatewayRouter +++ b/test/storage/L1GatewayRouter @@ -1,9 +1,19 @@ + +╭--------------------+-----------------------------+------+--------+-------+----------------------------------------------------------------------------╮ | Name | Type | Slot | Offset | Bytes | Contract | -|--------------------|-----------------------------|------|--------|-------|----------------------------------------------------------------------------| ++=======================================================================================================================================================+ | whitelist | address | 0 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1GatewayRouter.sol:L1GatewayRouter | +|--------------------+-----------------------------+------+--------+-------+----------------------------------------------------------------------------| | counterpartGateway | address | 1 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1GatewayRouter.sol:L1GatewayRouter | +|--------------------+-----------------------------+------+--------+-------+----------------------------------------------------------------------------| | router | address | 2 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1GatewayRouter.sol:L1GatewayRouter | +|--------------------+-----------------------------+------+--------+-------+----------------------------------------------------------------------------| | l1TokenToGateway | mapping(address => address) | 3 | 0 | 32 | contracts/tokenbridge/ethereum/gateway/L1GatewayRouter.sol:L1GatewayRouter | +|--------------------+-----------------------------+------+--------+-------+----------------------------------------------------------------------------| | defaultGateway | address | 4 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1GatewayRouter.sol:L1GatewayRouter | +|--------------------+-----------------------------+------+--------+-------+----------------------------------------------------------------------------| | owner | address | 5 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1GatewayRouter.sol:L1GatewayRouter | +|--------------------+-----------------------------+------+--------+-------+----------------------------------------------------------------------------| | inbox | address | 6 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1GatewayRouter.sol:L1GatewayRouter | +╰--------------------+-----------------------------+------+--------+-------+----------------------------------------------------------------------------╯ + diff --git a/test/storage/L1OrbitCustomGateway b/test/storage/L1OrbitCustomGateway index 3debf013ae..e3a626122c 100644 --- a/test/storage/L1OrbitCustomGateway +++ b/test/storage/L1OrbitCustomGateway @@ -1,10 +1,21 @@ + +╭--------------------+---------------------------------------------------------------+------+--------+-------+--------------------------------------------------------------------------------------╮ | Name | Type | Slot | Offset | Bytes | Contract | -|--------------------|---------------------------------------------------------------|------|--------|-------|--------------------------------------------------------------------------------------| ++===================================================================================================================================================================================================+ | counterpartGateway | address | 0 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1OrbitCustomGateway.sol:L1OrbitCustomGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+--------------------------------------------------------------------------------------| | router | address | 1 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1OrbitCustomGateway.sol:L1OrbitCustomGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+--------------------------------------------------------------------------------------| | inbox | address | 2 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1OrbitCustomGateway.sol:L1OrbitCustomGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+--------------------------------------------------------------------------------------| | redirectedExits | mapping(bytes32 => struct L1ArbitrumExtendedGateway.ExitData) | 3 | 0 | 32 | contracts/tokenbridge/ethereum/gateway/L1OrbitCustomGateway.sol:L1OrbitCustomGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+--------------------------------------------------------------------------------------| | l1ToL2Token | mapping(address => address) | 4 | 0 | 32 | contracts/tokenbridge/ethereum/gateway/L1OrbitCustomGateway.sol:L1OrbitCustomGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+--------------------------------------------------------------------------------------| | owner | address | 5 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1OrbitCustomGateway.sol:L1OrbitCustomGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+--------------------------------------------------------------------------------------| | whitelist | address | 6 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1OrbitCustomGateway.sol:L1OrbitCustomGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+--------------------------------------------------------------------------------------| | _status | uint256 | 7 | 0 | 32 | contracts/tokenbridge/ethereum/gateway/L1OrbitCustomGateway.sol:L1OrbitCustomGateway | +╰--------------------+---------------------------------------------------------------+------+--------+-------+--------------------------------------------------------------------------------------╯ + diff --git a/test/storage/L1OrbitERC20Gateway b/test/storage/L1OrbitERC20Gateway index 64acd3ba5c..a63e536617 100644 --- a/test/storage/L1OrbitERC20Gateway +++ b/test/storage/L1OrbitERC20Gateway @@ -1,10 +1,21 @@ + +╭----------------------+---------------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------╮ | Name | Type | Slot | Offset | Bytes | Contract | -|----------------------|---------------------------------------------------------------|------|--------|-------|------------------------------------------------------------------------------------| ++===================================================================================================================================================================================================+ | counterpartGateway | address | 0 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1OrbitERC20Gateway.sol:L1OrbitERC20Gateway | +|----------------------+---------------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------| | router | address | 1 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1OrbitERC20Gateway.sol:L1OrbitERC20Gateway | +|----------------------+---------------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------| | inbox | address | 2 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1OrbitERC20Gateway.sol:L1OrbitERC20Gateway | +|----------------------+---------------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------| | redirectedExits | mapping(bytes32 => struct L1ArbitrumExtendedGateway.ExitData) | 3 | 0 | 32 | contracts/tokenbridge/ethereum/gateway/L1OrbitERC20Gateway.sol:L1OrbitERC20Gateway | +|----------------------+---------------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------| | cloneableProxyHash | bytes32 | 4 | 0 | 32 | contracts/tokenbridge/ethereum/gateway/L1OrbitERC20Gateway.sol:L1OrbitERC20Gateway | +|----------------------+---------------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------| | l2BeaconProxyFactory | address | 5 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1OrbitERC20Gateway.sol:L1OrbitERC20Gateway | +|----------------------+---------------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------| | whitelist | address | 6 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1OrbitERC20Gateway.sol:L1OrbitERC20Gateway | +|----------------------+---------------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------| | _status | uint256 | 7 | 0 | 32 | contracts/tokenbridge/ethereum/gateway/L1OrbitERC20Gateway.sol:L1OrbitERC20Gateway | +╰----------------------+---------------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------╯ + diff --git a/test/storage/L1OrbitGatewayRouter b/test/storage/L1OrbitGatewayRouter index 0d0a2206fe..d68a328f08 100644 --- a/test/storage/L1OrbitGatewayRouter +++ b/test/storage/L1OrbitGatewayRouter @@ -1,9 +1,19 @@ + +╭--------------------+-----------------------------+------+--------+-------+--------------------------------------------------------------------------------------╮ | Name | Type | Slot | Offset | Bytes | Contract | -|--------------------|-----------------------------|------|--------|-------|--------------------------------------------------------------------------------------| ++=================================================================================================================================================================+ | whitelist | address | 0 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1OrbitGatewayRouter.sol:L1OrbitGatewayRouter | +|--------------------+-----------------------------+------+--------+-------+--------------------------------------------------------------------------------------| | counterpartGateway | address | 1 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1OrbitGatewayRouter.sol:L1OrbitGatewayRouter | +|--------------------+-----------------------------+------+--------+-------+--------------------------------------------------------------------------------------| | router | address | 2 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1OrbitGatewayRouter.sol:L1OrbitGatewayRouter | +|--------------------+-----------------------------+------+--------+-------+--------------------------------------------------------------------------------------| | l1TokenToGateway | mapping(address => address) | 3 | 0 | 32 | contracts/tokenbridge/ethereum/gateway/L1OrbitGatewayRouter.sol:L1OrbitGatewayRouter | +|--------------------+-----------------------------+------+--------+-------+--------------------------------------------------------------------------------------| | defaultGateway | address | 4 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1OrbitGatewayRouter.sol:L1OrbitGatewayRouter | +|--------------------+-----------------------------+------+--------+-------+--------------------------------------------------------------------------------------| | owner | address | 5 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1OrbitGatewayRouter.sol:L1OrbitGatewayRouter | +|--------------------+-----------------------------+------+--------+-------+--------------------------------------------------------------------------------------| | inbox | address | 6 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1OrbitGatewayRouter.sol:L1OrbitGatewayRouter | +╰--------------------+-----------------------------+------+--------+-------+--------------------------------------------------------------------------------------╯ + diff --git a/test/storage/L1OrbitReverseCustomGateway b/test/storage/L1OrbitReverseCustomGateway index d6b240349e..9e512b2b88 100644 --- a/test/storage/L1OrbitReverseCustomGateway +++ b/test/storage/L1OrbitReverseCustomGateway @@ -1,10 +1,21 @@ + +╭--------------------+---------------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------------------------------╮ | Name | Type | Slot | Offset | Bytes | Contract | -|--------------------|---------------------------------------------------------------|------|--------|-------|----------------------------------------------------------------------------------------------------| ++=================================================================================================================================================================================================================+ | counterpartGateway | address | 0 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1OrbitReverseCustomGateway.sol:L1OrbitReverseCustomGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------------------------------| | router | address | 1 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1OrbitReverseCustomGateway.sol:L1OrbitReverseCustomGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------------------------------| | inbox | address | 2 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1OrbitReverseCustomGateway.sol:L1OrbitReverseCustomGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------------------------------| | redirectedExits | mapping(bytes32 => struct L1ArbitrumExtendedGateway.ExitData) | 3 | 0 | 32 | contracts/tokenbridge/ethereum/gateway/L1OrbitReverseCustomGateway.sol:L1OrbitReverseCustomGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------------------------------| | l1ToL2Token | mapping(address => address) | 4 | 0 | 32 | contracts/tokenbridge/ethereum/gateway/L1OrbitReverseCustomGateway.sol:L1OrbitReverseCustomGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------------------------------| | owner | address | 5 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1OrbitReverseCustomGateway.sol:L1OrbitReverseCustomGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------------------------------| | whitelist | address | 6 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1OrbitReverseCustomGateway.sol:L1OrbitReverseCustomGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------------------------------| | _status | uint256 | 7 | 0 | 32 | contracts/tokenbridge/ethereum/gateway/L1OrbitReverseCustomGateway.sol:L1OrbitReverseCustomGateway | +╰--------------------+---------------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------------------------------╯ + diff --git a/test/storage/L1OrbitUSDCGateway b/test/storage/L1OrbitUSDCGateway index 6b669ff529..0347108442 100644 --- a/test/storage/L1OrbitUSDCGateway +++ b/test/storage/L1OrbitUSDCGateway @@ -1,12 +1,25 @@ + +╭--------------------+---------------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------------╮ | Name | Type | Slot | Offset | Bytes | Contract | -|--------------------|---------------------------------------------------------------|------|--------|-------|----------------------------------------------------------------------------------| ++===============================================================================================================================================================================================+ | counterpartGateway | address | 0 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1OrbitUSDCGateway.sol:L1OrbitUSDCGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------------| | router | address | 1 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1OrbitUSDCGateway.sol:L1OrbitUSDCGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------------| | inbox | address | 2 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1OrbitUSDCGateway.sol:L1OrbitUSDCGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------------| | redirectedExits | mapping(bytes32 => struct L1ArbitrumExtendedGateway.ExitData) | 3 | 0 | 32 | contracts/tokenbridge/ethereum/gateway/L1OrbitUSDCGateway.sol:L1OrbitUSDCGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------------| | l1USDC | address | 4 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1OrbitUSDCGateway.sol:L1OrbitUSDCGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------------| | l2USDC | address | 5 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1OrbitUSDCGateway.sol:L1OrbitUSDCGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------------| | owner | address | 6 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1OrbitUSDCGateway.sol:L1OrbitUSDCGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------------| | burner | address | 7 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1OrbitUSDCGateway.sol:L1OrbitUSDCGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------------| | depositsPaused | bool | 7 | 20 | 1 | contracts/tokenbridge/ethereum/gateway/L1OrbitUSDCGateway.sol:L1OrbitUSDCGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------------| | burnAmount | uint256 | 8 | 0 | 32 | contracts/tokenbridge/ethereum/gateway/L1OrbitUSDCGateway.sol:L1OrbitUSDCGateway | +╰--------------------+---------------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------------╯ + diff --git a/test/storage/L1ReverseCustomGateway b/test/storage/L1ReverseCustomGateway index 71204210f9..89675db3ad 100644 --- a/test/storage/L1ReverseCustomGateway +++ b/test/storage/L1ReverseCustomGateway @@ -1,10 +1,21 @@ + +╭--------------------+---------------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------------╮ | Name | Type | Slot | Offset | Bytes | Contract | -|--------------------|---------------------------------------------------------------|------|--------|-------|------------------------------------------------------------------------------------------| ++=======================================================================================================================================================================================================+ | counterpartGateway | address | 0 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1ReverseCustomGateway.sol:L1ReverseCustomGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------------| | router | address | 1 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1ReverseCustomGateway.sol:L1ReverseCustomGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------------| | inbox | address | 2 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1ReverseCustomGateway.sol:L1ReverseCustomGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------------| | redirectedExits | mapping(bytes32 => struct L1ArbitrumExtendedGateway.ExitData) | 3 | 0 | 32 | contracts/tokenbridge/ethereum/gateway/L1ReverseCustomGateway.sol:L1ReverseCustomGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------------| | l1ToL2Token | mapping(address => address) | 4 | 0 | 32 | contracts/tokenbridge/ethereum/gateway/L1ReverseCustomGateway.sol:L1ReverseCustomGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------------| | owner | address | 5 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1ReverseCustomGateway.sol:L1ReverseCustomGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------------| | whitelist | address | 6 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1ReverseCustomGateway.sol:L1ReverseCustomGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------------| | _status | uint256 | 7 | 0 | 32 | contracts/tokenbridge/ethereum/gateway/L1ReverseCustomGateway.sol:L1ReverseCustomGateway | +╰--------------------+---------------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------------╯ + diff --git a/test/storage/L1TokenBridgeRetryableSender b/test/storage/L1TokenBridgeRetryableSender index 2233e30abe..0c0ecf2669 100644 --- a/test/storage/L1TokenBridgeRetryableSender +++ b/test/storage/L1TokenBridgeRetryableSender @@ -1,7 +1,15 @@ + +╭---------------+-------------+------+--------+-------+----------------------------------------------------------------------------------------------╮ | Name | Type | Slot | Offset | Bytes | Contract | -|---------------|-------------|------|--------|-------|----------------------------------------------------------------------------------------------| ++====================================================================================================================================================+ | _initialized | uint8 | 0 | 0 | 1 | contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol:L1TokenBridgeRetryableSender | +|---------------+-------------+------+--------+-------+----------------------------------------------------------------------------------------------| | _initializing | bool | 0 | 1 | 1 | contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol:L1TokenBridgeRetryableSender | +|---------------+-------------+------+--------+-------+----------------------------------------------------------------------------------------------| | __gap | uint256[50] | 1 | 0 | 1600 | contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol:L1TokenBridgeRetryableSender | +|---------------+-------------+------+--------+-------+----------------------------------------------------------------------------------------------| | _owner | address | 51 | 0 | 20 | contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol:L1TokenBridgeRetryableSender | +|---------------+-------------+------+--------+-------+----------------------------------------------------------------------------------------------| | __gap | uint256[49] | 52 | 0 | 1568 | contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol:L1TokenBridgeRetryableSender | +╰---------------+-------------+------+--------+-------+----------------------------------------------------------------------------------------------╯ + diff --git a/test/storage/L1USDCGateway b/test/storage/L1USDCGateway index bf0aacf6c2..3ceba08f8d 100644 --- a/test/storage/L1USDCGateway +++ b/test/storage/L1USDCGateway @@ -1,12 +1,25 @@ + +╭--------------------+---------------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------╮ | Name | Type | Slot | Offset | Bytes | Contract | -|--------------------|---------------------------------------------------------------|------|--------|-------|------------------------------------------------------------------------| ++=====================================================================================================================================================================================+ | counterpartGateway | address | 0 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1USDCGateway.sol:L1USDCGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------| | router | address | 1 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1USDCGateway.sol:L1USDCGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------| | inbox | address | 2 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1USDCGateway.sol:L1USDCGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------| | redirectedExits | mapping(bytes32 => struct L1ArbitrumExtendedGateway.ExitData) | 3 | 0 | 32 | contracts/tokenbridge/ethereum/gateway/L1USDCGateway.sol:L1USDCGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------| | l1USDC | address | 4 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1USDCGateway.sol:L1USDCGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------| | l2USDC | address | 5 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1USDCGateway.sol:L1USDCGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------| | owner | address | 6 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1USDCGateway.sol:L1USDCGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------| | burner | address | 7 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1USDCGateway.sol:L1USDCGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------| | depositsPaused | bool | 7 | 20 | 1 | contracts/tokenbridge/ethereum/gateway/L1USDCGateway.sol:L1USDCGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------| | burnAmount | uint256 | 8 | 0 | 32 | contracts/tokenbridge/ethereum/gateway/L1USDCGateway.sol:L1USDCGateway | +╰--------------------+---------------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------╯ + diff --git a/test/storage/L1WethGateway b/test/storage/L1WethGateway index 84f914b308..21d31e6f0e 100644 --- a/test/storage/L1WethGateway +++ b/test/storage/L1WethGateway @@ -1,8 +1,17 @@ + +╭--------------------+---------------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------╮ | Name | Type | Slot | Offset | Bytes | Contract | -|--------------------|---------------------------------------------------------------|------|--------|-------|------------------------------------------------------------------------| ++=====================================================================================================================================================================================+ | counterpartGateway | address | 0 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1WethGateway.sol:L1WethGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------| | router | address | 1 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1WethGateway.sol:L1WethGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------| | inbox | address | 2 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1WethGateway.sol:L1WethGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------| | redirectedExits | mapping(bytes32 => struct L1ArbitrumExtendedGateway.ExitData) | 3 | 0 | 32 | contracts/tokenbridge/ethereum/gateway/L1WethGateway.sol:L1WethGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------| | l1Weth | address | 4 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1WethGateway.sol:L1WethGateway | +|--------------------+---------------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------| | l2Weth | address | 5 | 0 | 20 | contracts/tokenbridge/ethereum/gateway/L1WethGateway.sol:L1WethGateway | +╰--------------------+---------------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------╯ + diff --git a/test/storage/L2AtomicTokenBridgeFactory b/test/storage/L2AtomicTokenBridgeFactory index 55eed362d4..1ec5dc0797 100644 --- a/test/storage/L2AtomicTokenBridgeFactory +++ b/test/storage/L2AtomicTokenBridgeFactory @@ -1,2 +1,6 @@ + +╭------+------+------+--------+-------+----------╮ | Name | Type | Slot | Offset | Bytes | Contract | -|------|------|------|--------|-------|----------| ++================================================+ +╰------+------+------+--------+-------+----------╯ + diff --git a/test/storage/L2CustomGateway b/test/storage/L2CustomGateway index e937d3f09d..ef387e7013 100644 --- a/test/storage/L2CustomGateway +++ b/test/storage/L2CustomGateway @@ -1,6 +1,13 @@ + +╭--------------------+-----------------------------+------+--------+-------+----------------------------------------------------------------------------╮ | Name | Type | Slot | Offset | Bytes | Contract | -|--------------------|-----------------------------|------|--------|-------|----------------------------------------------------------------------------| ++=======================================================================================================================================================+ | counterpartGateway | address | 0 | 0 | 20 | contracts/tokenbridge/arbitrum/gateway/L2CustomGateway.sol:L2CustomGateway | +|--------------------+-----------------------------+------+--------+-------+----------------------------------------------------------------------------| | router | address | 1 | 0 | 20 | contracts/tokenbridge/arbitrum/gateway/L2CustomGateway.sol:L2CustomGateway | +|--------------------+-----------------------------+------+--------+-------+----------------------------------------------------------------------------| | exitNum | uint256 | 2 | 0 | 32 | contracts/tokenbridge/arbitrum/gateway/L2CustomGateway.sol:L2CustomGateway | +|--------------------+-----------------------------+------+--------+-------+----------------------------------------------------------------------------| | l1ToL2Token | mapping(address => address) | 3 | 0 | 32 | contracts/tokenbridge/arbitrum/gateway/L2CustomGateway.sol:L2CustomGateway | +╰--------------------+-----------------------------+------+--------+-------+----------------------------------------------------------------------------╯ + diff --git a/test/storage/L2CustomGatewayToken b/test/storage/L2CustomGatewayToken new file mode 100644 index 0000000000..d2b0894d55 --- /dev/null +++ b/test/storage/L2CustomGatewayToken @@ -0,0 +1,41 @@ + +╭----------------------------------+--------------------------------------------------------+------+--------+-------+-------------------------------------------------------------------------------╮ +| Name | Type | Slot | Offset | Bytes | Contract | ++===================================================================================================================================================================================================+ +| _initialized | uint8 | 0 | 0 | 1 | contracts/tokenbridge/libraries/L2CustomGatewayToken.sol:L2CustomGatewayToken | +|----------------------------------+--------------------------------------------------------+------+--------+-------+-------------------------------------------------------------------------------| +| _initializing | bool | 0 | 1 | 1 | contracts/tokenbridge/libraries/L2CustomGatewayToken.sol:L2CustomGatewayToken | +|----------------------------------+--------------------------------------------------------+------+--------+-------+-------------------------------------------------------------------------------| +| __gap | uint256[50] | 1 | 0 | 1600 | contracts/tokenbridge/libraries/L2CustomGatewayToken.sol:L2CustomGatewayToken | +|----------------------------------+--------------------------------------------------------+------+--------+-------+-------------------------------------------------------------------------------| +| _balances | mapping(address => uint256) | 51 | 0 | 32 | contracts/tokenbridge/libraries/L2CustomGatewayToken.sol:L2CustomGatewayToken | +|----------------------------------+--------------------------------------------------------+------+--------+-------+-------------------------------------------------------------------------------| +| _allowances | mapping(address => mapping(address => uint256)) | 52 | 0 | 32 | contracts/tokenbridge/libraries/L2CustomGatewayToken.sol:L2CustomGatewayToken | +|----------------------------------+--------------------------------------------------------+------+--------+-------+-------------------------------------------------------------------------------| +| _totalSupply | uint256 | 53 | 0 | 32 | contracts/tokenbridge/libraries/L2CustomGatewayToken.sol:L2CustomGatewayToken | +|----------------------------------+--------------------------------------------------------+------+--------+-------+-------------------------------------------------------------------------------| +| _name | string | 54 | 0 | 32 | contracts/tokenbridge/libraries/L2CustomGatewayToken.sol:L2CustomGatewayToken | +|----------------------------------+--------------------------------------------------------+------+--------+-------+-------------------------------------------------------------------------------| +| _symbol | string | 55 | 0 | 32 | contracts/tokenbridge/libraries/L2CustomGatewayToken.sol:L2CustomGatewayToken | +|----------------------------------+--------------------------------------------------------+------+--------+-------+-------------------------------------------------------------------------------| +| _decimals | uint8 | 56 | 0 | 1 | contracts/tokenbridge/libraries/L2CustomGatewayToken.sol:L2CustomGatewayToken | +|----------------------------------+--------------------------------------------------------+------+--------+-------+-------------------------------------------------------------------------------| +| __gap | uint256[44] | 57 | 0 | 1408 | contracts/tokenbridge/libraries/L2CustomGatewayToken.sol:L2CustomGatewayToken | +|----------------------------------+--------------------------------------------------------+------+--------+-------+-------------------------------------------------------------------------------| +| _HASHED_NAME | bytes32 | 101 | 0 | 32 | contracts/tokenbridge/libraries/L2CustomGatewayToken.sol:L2CustomGatewayToken | +|----------------------------------+--------------------------------------------------------+------+--------+-------+-------------------------------------------------------------------------------| +| _HASHED_VERSION | bytes32 | 102 | 0 | 32 | contracts/tokenbridge/libraries/L2CustomGatewayToken.sol:L2CustomGatewayToken | +|----------------------------------+--------------------------------------------------------+------+--------+-------+-------------------------------------------------------------------------------| +| __gap | uint256[50] | 103 | 0 | 1600 | contracts/tokenbridge/libraries/L2CustomGatewayToken.sol:L2CustomGatewayToken | +|----------------------------------+--------------------------------------------------------+------+--------+-------+-------------------------------------------------------------------------------| +| _nonces | mapping(address => struct CountersUpgradeable.Counter) | 153 | 0 | 32 | contracts/tokenbridge/libraries/L2CustomGatewayToken.sol:L2CustomGatewayToken | +|----------------------------------+--------------------------------------------------------+------+--------+-------+-------------------------------------------------------------------------------| +| _PERMIT_TYPEHASH_DEPRECATED_SLOT | bytes32 | 154 | 0 | 32 | contracts/tokenbridge/libraries/L2CustomGatewayToken.sol:L2CustomGatewayToken | +|----------------------------------+--------------------------------------------------------+------+--------+-------+-------------------------------------------------------------------------------| +| __gap | uint256[49] | 155 | 0 | 1568 | contracts/tokenbridge/libraries/L2CustomGatewayToken.sol:L2CustomGatewayToken | +|----------------------------------+--------------------------------------------------------+------+--------+-------+-------------------------------------------------------------------------------| +| l2Gateway | address | 204 | 0 | 20 | contracts/tokenbridge/libraries/L2CustomGatewayToken.sol:L2CustomGatewayToken | +|----------------------------------+--------------------------------------------------------+------+--------+-------+-------------------------------------------------------------------------------| +| l1Address | address | 205 | 0 | 20 | contracts/tokenbridge/libraries/L2CustomGatewayToken.sol:L2CustomGatewayToken | +╰----------------------------------+--------------------------------------------------------+------+--------+-------+-------------------------------------------------------------------------------╯ + diff --git a/test/storage/L2ERC20Gateway b/test/storage/L2ERC20Gateway index 710d97dba2..bb76409277 100644 --- a/test/storage/L2ERC20Gateway +++ b/test/storage/L2ERC20Gateway @@ -1,6 +1,13 @@ + +╭--------------------+---------+------+--------+-------+--------------------------------------------------------------------------╮ | Name | Type | Slot | Offset | Bytes | Contract | -|--------------------|---------|------|--------|-------|--------------------------------------------------------------------------| ++=================================================================================================================================+ | counterpartGateway | address | 0 | 0 | 20 | contracts/tokenbridge/arbitrum/gateway/L2ERC20Gateway.sol:L2ERC20Gateway | +|--------------------+---------+------+--------+-------+--------------------------------------------------------------------------| | router | address | 1 | 0 | 20 | contracts/tokenbridge/arbitrum/gateway/L2ERC20Gateway.sol:L2ERC20Gateway | +|--------------------+---------+------+--------+-------+--------------------------------------------------------------------------| | exitNum | uint256 | 2 | 0 | 32 | contracts/tokenbridge/arbitrum/gateway/L2ERC20Gateway.sol:L2ERC20Gateway | +|--------------------+---------+------+--------+-------+--------------------------------------------------------------------------| | beaconProxyFactory | address | 3 | 0 | 20 | contracts/tokenbridge/arbitrum/gateway/L2ERC20Gateway.sol:L2ERC20Gateway | +╰--------------------+---------+------+--------+-------+--------------------------------------------------------------------------╯ + diff --git a/test/storage/L2GatewayRouter b/test/storage/L2GatewayRouter index 7838e97625..5306e19bf4 100644 --- a/test/storage/L2GatewayRouter +++ b/test/storage/L2GatewayRouter @@ -1,6 +1,13 @@ + +╭--------------------+-----------------------------+------+--------+-------+----------------------------------------------------------------------------╮ | Name | Type | Slot | Offset | Bytes | Contract | -|--------------------|-----------------------------|------|--------|-------|----------------------------------------------------------------------------| ++=======================================================================================================================================================+ | counterpartGateway | address | 0 | 0 | 20 | contracts/tokenbridge/arbitrum/gateway/L2GatewayRouter.sol:L2GatewayRouter | +|--------------------+-----------------------------+------+--------+-------+----------------------------------------------------------------------------| | router | address | 1 | 0 | 20 | contracts/tokenbridge/arbitrum/gateway/L2GatewayRouter.sol:L2GatewayRouter | +|--------------------+-----------------------------+------+--------+-------+----------------------------------------------------------------------------| | l1TokenToGateway | mapping(address => address) | 2 | 0 | 32 | contracts/tokenbridge/arbitrum/gateway/L2GatewayRouter.sol:L2GatewayRouter | +|--------------------+-----------------------------+------+--------+-------+----------------------------------------------------------------------------| | defaultGateway | address | 3 | 0 | 20 | contracts/tokenbridge/arbitrum/gateway/L2GatewayRouter.sol:L2GatewayRouter | +╰--------------------+-----------------------------+------+--------+-------+----------------------------------------------------------------------------╯ + diff --git a/test/storage/L2ReverseCustomGateway b/test/storage/L2ReverseCustomGateway index d17e1a3a7f..87c724b342 100644 --- a/test/storage/L2ReverseCustomGateway +++ b/test/storage/L2ReverseCustomGateway @@ -1,6 +1,13 @@ + +╭--------------------+-----------------------------+------+--------+-------+------------------------------------------------------------------------------------------╮ | Name | Type | Slot | Offset | Bytes | Contract | -|--------------------|-----------------------------|------|--------|-------|------------------------------------------------------------------------------------------| ++=====================================================================================================================================================================+ | counterpartGateway | address | 0 | 0 | 20 | contracts/tokenbridge/arbitrum/gateway/L2ReverseCustomGateway.sol:L2ReverseCustomGateway | +|--------------------+-----------------------------+------+--------+-------+------------------------------------------------------------------------------------------| | router | address | 1 | 0 | 20 | contracts/tokenbridge/arbitrum/gateway/L2ReverseCustomGateway.sol:L2ReverseCustomGateway | +|--------------------+-----------------------------+------+--------+-------+------------------------------------------------------------------------------------------| | exitNum | uint256 | 2 | 0 | 32 | contracts/tokenbridge/arbitrum/gateway/L2ReverseCustomGateway.sol:L2ReverseCustomGateway | +|--------------------+-----------------------------+------+--------+-------+------------------------------------------------------------------------------------------| | l1ToL2Token | mapping(address => address) | 3 | 0 | 32 | contracts/tokenbridge/arbitrum/gateway/L2ReverseCustomGateway.sol:L2ReverseCustomGateway | +╰--------------------+-----------------------------+------+--------+-------+------------------------------------------------------------------------------------------╯ + diff --git a/test/storage/L2USDCGateway b/test/storage/L2USDCGateway index fd55fa036c..4a63377ab5 100644 --- a/test/storage/L2USDCGateway +++ b/test/storage/L2USDCGateway @@ -1,10 +1,21 @@ + +╭--------------------------+---------+------+--------+-------+------------------------------------------------------------------------╮ | Name | Type | Slot | Offset | Bytes | Contract | -|--------------------------|---------|------|--------|-------|------------------------------------------------------------------------| ++=====================================================================================================================================+ | counterpartGateway | address | 0 | 0 | 20 | contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol:L2USDCGateway | +|--------------------------+---------+------+--------+-------+------------------------------------------------------------------------| | router | address | 1 | 0 | 20 | contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol:L2USDCGateway | +|--------------------------+---------+------+--------+-------+------------------------------------------------------------------------| | exitNum | uint256 | 2 | 0 | 32 | contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol:L2USDCGateway | +|--------------------------+---------+------+--------+-------+------------------------------------------------------------------------| | l1USDC | address | 3 | 0 | 20 | contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol:L2USDCGateway | +|--------------------------+---------+------+--------+-------+------------------------------------------------------------------------| | l2USDC | address | 4 | 0 | 20 | contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol:L2USDCGateway | +|--------------------------+---------+------+--------+-------+------------------------------------------------------------------------| | owner | address | 5 | 0 | 20 | contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol:L2USDCGateway | +|--------------------------+---------+------+--------+-------+------------------------------------------------------------------------| | usdcOwnershipTransferrer | address | 6 | 0 | 20 | contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol:L2USDCGateway | +|--------------------------+---------+------+--------+-------+------------------------------------------------------------------------| | withdrawalsPaused | bool | 6 | 20 | 1 | contracts/tokenbridge/arbitrum/gateway/L2USDCGateway.sol:L2USDCGateway | +╰--------------------------+---------+------+--------+-------+------------------------------------------------------------------------╯ + diff --git a/test/storage/L2WethGateway b/test/storage/L2WethGateway index 703723384e..aa66bf7e39 100644 --- a/test/storage/L2WethGateway +++ b/test/storage/L2WethGateway @@ -1,7 +1,15 @@ + +╭--------------------+---------+------+--------+-------+------------------------------------------------------------------------╮ | Name | Type | Slot | Offset | Bytes | Contract | -|--------------------|---------|------|--------|-------|------------------------------------------------------------------------| ++===============================================================================================================================+ | counterpartGateway | address | 0 | 0 | 20 | contracts/tokenbridge/arbitrum/gateway/L2WethGateway.sol:L2WethGateway | +|--------------------+---------+------+--------+-------+------------------------------------------------------------------------| | router | address | 1 | 0 | 20 | contracts/tokenbridge/arbitrum/gateway/L2WethGateway.sol:L2WethGateway | +|--------------------+---------+------+--------+-------+------------------------------------------------------------------------| | exitNum | uint256 | 2 | 0 | 32 | contracts/tokenbridge/arbitrum/gateway/L2WethGateway.sol:L2WethGateway | +|--------------------+---------+------+--------+-------+------------------------------------------------------------------------| | l1Weth | address | 3 | 0 | 20 | contracts/tokenbridge/arbitrum/gateway/L2WethGateway.sol:L2WethGateway | +|--------------------+---------+------+--------+-------+------------------------------------------------------------------------| | l2Weth | address | 4 | 0 | 20 | contracts/tokenbridge/arbitrum/gateway/L2WethGateway.sol:L2WethGateway | +╰--------------------+---------+------+--------+-------+------------------------------------------------------------------------╯ + diff --git a/test/storage/Multicall2 b/test/storage/Multicall2 new file mode 100644 index 0000000000..1ec5dc0797 --- /dev/null +++ b/test/storage/Multicall2 @@ -0,0 +1,6 @@ + +╭------+------+------+--------+-------+----------╮ +| Name | Type | Slot | Offset | Bytes | Contract | ++================================================+ +╰------+------+------+--------+-------+----------╯ + diff --git a/test/storage/StandardArbERC20 b/test/storage/StandardArbERC20 index 9b33d4682a..bb9e1c86cd 100644 --- a/test/storage/StandardArbERC20 +++ b/test/storage/StandardArbERC20 @@ -1,22 +1,45 @@ + +╭----------------------------------+--------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------╮ | Name | Type | Slot | Offset | Bytes | Contract | -|----------------------------------|--------------------------------------------------------|------|--------|-------|----------------------------------------------------------------------| ++==========================================================================================================================================================================================+ | _initialized | uint8 | 0 | 0 | 1 | contracts/tokenbridge/arbitrum/StandardArbERC20.sol:StandardArbERC20 | +|----------------------------------+--------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------| | _initializing | bool | 0 | 1 | 1 | contracts/tokenbridge/arbitrum/StandardArbERC20.sol:StandardArbERC20 | +|----------------------------------+--------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------| | __gap | uint256[50] | 1 | 0 | 1600 | contracts/tokenbridge/arbitrum/StandardArbERC20.sol:StandardArbERC20 | +|----------------------------------+--------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------| | _balances | mapping(address => uint256) | 51 | 0 | 32 | contracts/tokenbridge/arbitrum/StandardArbERC20.sol:StandardArbERC20 | +|----------------------------------+--------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------| | _allowances | mapping(address => mapping(address => uint256)) | 52 | 0 | 32 | contracts/tokenbridge/arbitrum/StandardArbERC20.sol:StandardArbERC20 | +|----------------------------------+--------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------| | _totalSupply | uint256 | 53 | 0 | 32 | contracts/tokenbridge/arbitrum/StandardArbERC20.sol:StandardArbERC20 | +|----------------------------------+--------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------| | _name | string | 54 | 0 | 32 | contracts/tokenbridge/arbitrum/StandardArbERC20.sol:StandardArbERC20 | +|----------------------------------+--------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------| | _symbol | string | 55 | 0 | 32 | contracts/tokenbridge/arbitrum/StandardArbERC20.sol:StandardArbERC20 | +|----------------------------------+--------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------| | _decimals | uint8 | 56 | 0 | 1 | contracts/tokenbridge/arbitrum/StandardArbERC20.sol:StandardArbERC20 | +|----------------------------------+--------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------| | __gap | uint256[44] | 57 | 0 | 1408 | contracts/tokenbridge/arbitrum/StandardArbERC20.sol:StandardArbERC20 | +|----------------------------------+--------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------| | _HASHED_NAME | bytes32 | 101 | 0 | 32 | contracts/tokenbridge/arbitrum/StandardArbERC20.sol:StandardArbERC20 | +|----------------------------------+--------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------| | _HASHED_VERSION | bytes32 | 102 | 0 | 32 | contracts/tokenbridge/arbitrum/StandardArbERC20.sol:StandardArbERC20 | +|----------------------------------+--------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------| | __gap | uint256[50] | 103 | 0 | 1600 | contracts/tokenbridge/arbitrum/StandardArbERC20.sol:StandardArbERC20 | +|----------------------------------+--------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------| | _nonces | mapping(address => struct CountersUpgradeable.Counter) | 153 | 0 | 32 | contracts/tokenbridge/arbitrum/StandardArbERC20.sol:StandardArbERC20 | +|----------------------------------+--------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------| | _PERMIT_TYPEHASH_DEPRECATED_SLOT | bytes32 | 154 | 0 | 32 | contracts/tokenbridge/arbitrum/StandardArbERC20.sol:StandardArbERC20 | +|----------------------------------+--------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------| | __gap | uint256[49] | 155 | 0 | 1568 | contracts/tokenbridge/arbitrum/StandardArbERC20.sol:StandardArbERC20 | +|----------------------------------+--------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------| | l2Gateway | address | 204 | 0 | 20 | contracts/tokenbridge/arbitrum/StandardArbERC20.sol:StandardArbERC20 | +|----------------------------------+--------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------| | l1Address | address | 205 | 0 | 20 | contracts/tokenbridge/arbitrum/StandardArbERC20.sol:StandardArbERC20 | +|----------------------------------+--------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------| | isMasterCopy | bool | 205 | 20 | 1 | contracts/tokenbridge/arbitrum/StandardArbERC20.sol:StandardArbERC20 | +|----------------------------------+--------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------| | availableGetters | struct StandardArbERC20.ERC20Getters | 206 | 0 | 32 | contracts/tokenbridge/arbitrum/StandardArbERC20.sol:StandardArbERC20 | +╰----------------------------------+--------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------╯ + diff --git a/test/storage/Whitelist b/test/storage/Whitelist new file mode 100644 index 0000000000..db5744451c --- /dev/null +++ b/test/storage/Whitelist @@ -0,0 +1,9 @@ + +╭-----------+--------------------------+------+--------+-------+---------------------------------------------------------╮ +| Name | Type | Slot | Offset | Bytes | Contract | ++========================================================================================================================+ +| owner | address | 0 | 0 | 20 | contracts/tokenbridge/libraries/Whitelist.sol:Whitelist | +|-----------+--------------------------+------+--------+-------+---------------------------------------------------------| +| isAllowed | mapping(address => bool) | 1 | 0 | 32 | contracts/tokenbridge/libraries/Whitelist.sol:Whitelist | +╰-----------+--------------------------+------+--------+-------+---------------------------------------------------------╯ + diff --git a/test/storage/aeERC20 b/test/storage/aeERC20 new file mode 100644 index 0000000000..04f1de83ae --- /dev/null +++ b/test/storage/aeERC20 @@ -0,0 +1,37 @@ + +╭----------------------------------+--------------------------------------------------------+------+--------+-------+-----------------------------------------------------╮ +| Name | Type | Slot | Offset | Bytes | Contract | ++=========================================================================================================================================================================+ +| _initialized | uint8 | 0 | 0 | 1 | contracts/tokenbridge/libraries/aeERC20.sol:aeERC20 | +|----------------------------------+--------------------------------------------------------+------+--------+-------+-----------------------------------------------------| +| _initializing | bool | 0 | 1 | 1 | contracts/tokenbridge/libraries/aeERC20.sol:aeERC20 | +|----------------------------------+--------------------------------------------------------+------+--------+-------+-----------------------------------------------------| +| __gap | uint256[50] | 1 | 0 | 1600 | contracts/tokenbridge/libraries/aeERC20.sol:aeERC20 | +|----------------------------------+--------------------------------------------------------+------+--------+-------+-----------------------------------------------------| +| _balances | mapping(address => uint256) | 51 | 0 | 32 | contracts/tokenbridge/libraries/aeERC20.sol:aeERC20 | +|----------------------------------+--------------------------------------------------------+------+--------+-------+-----------------------------------------------------| +| _allowances | mapping(address => mapping(address => uint256)) | 52 | 0 | 32 | contracts/tokenbridge/libraries/aeERC20.sol:aeERC20 | +|----------------------------------+--------------------------------------------------------+------+--------+-------+-----------------------------------------------------| +| _totalSupply | uint256 | 53 | 0 | 32 | contracts/tokenbridge/libraries/aeERC20.sol:aeERC20 | +|----------------------------------+--------------------------------------------------------+------+--------+-------+-----------------------------------------------------| +| _name | string | 54 | 0 | 32 | contracts/tokenbridge/libraries/aeERC20.sol:aeERC20 | +|----------------------------------+--------------------------------------------------------+------+--------+-------+-----------------------------------------------------| +| _symbol | string | 55 | 0 | 32 | contracts/tokenbridge/libraries/aeERC20.sol:aeERC20 | +|----------------------------------+--------------------------------------------------------+------+--------+-------+-----------------------------------------------------| +| _decimals | uint8 | 56 | 0 | 1 | contracts/tokenbridge/libraries/aeERC20.sol:aeERC20 | +|----------------------------------+--------------------------------------------------------+------+--------+-------+-----------------------------------------------------| +| __gap | uint256[44] | 57 | 0 | 1408 | contracts/tokenbridge/libraries/aeERC20.sol:aeERC20 | +|----------------------------------+--------------------------------------------------------+------+--------+-------+-----------------------------------------------------| +| _HASHED_NAME | bytes32 | 101 | 0 | 32 | contracts/tokenbridge/libraries/aeERC20.sol:aeERC20 | +|----------------------------------+--------------------------------------------------------+------+--------+-------+-----------------------------------------------------| +| _HASHED_VERSION | bytes32 | 102 | 0 | 32 | contracts/tokenbridge/libraries/aeERC20.sol:aeERC20 | +|----------------------------------+--------------------------------------------------------+------+--------+-------+-----------------------------------------------------| +| __gap | uint256[50] | 103 | 0 | 1600 | contracts/tokenbridge/libraries/aeERC20.sol:aeERC20 | +|----------------------------------+--------------------------------------------------------+------+--------+-------+-----------------------------------------------------| +| _nonces | mapping(address => struct CountersUpgradeable.Counter) | 153 | 0 | 32 | contracts/tokenbridge/libraries/aeERC20.sol:aeERC20 | +|----------------------------------+--------------------------------------------------------+------+--------+-------+-----------------------------------------------------| +| _PERMIT_TYPEHASH_DEPRECATED_SLOT | bytes32 | 154 | 0 | 32 | contracts/tokenbridge/libraries/aeERC20.sol:aeERC20 | +|----------------------------------+--------------------------------------------------------+------+--------+-------+-----------------------------------------------------| +| __gap | uint256[49] | 155 | 0 | 1568 | contracts/tokenbridge/libraries/aeERC20.sol:aeERC20 | +╰----------------------------------+--------------------------------------------------------+------+--------+-------+-----------------------------------------------------╯ + diff --git a/test/storage/aeWETH b/test/storage/aeWETH new file mode 100644 index 0000000000..eb9586c615 --- /dev/null +++ b/test/storage/aeWETH @@ -0,0 +1,41 @@ + +╭----------------------------------+--------------------------------------------------------+------+--------+-------+---------------------------------------------------╮ +| Name | Type | Slot | Offset | Bytes | Contract | ++=======================================================================================================================================================================+ +| _initialized | uint8 | 0 | 0 | 1 | contracts/tokenbridge/libraries/aeWETH.sol:aeWETH | +|----------------------------------+--------------------------------------------------------+------+--------+-------+---------------------------------------------------| +| _initializing | bool | 0 | 1 | 1 | contracts/tokenbridge/libraries/aeWETH.sol:aeWETH | +|----------------------------------+--------------------------------------------------------+------+--------+-------+---------------------------------------------------| +| __gap | uint256[50] | 1 | 0 | 1600 | contracts/tokenbridge/libraries/aeWETH.sol:aeWETH | +|----------------------------------+--------------------------------------------------------+------+--------+-------+---------------------------------------------------| +| _balances | mapping(address => uint256) | 51 | 0 | 32 | contracts/tokenbridge/libraries/aeWETH.sol:aeWETH | +|----------------------------------+--------------------------------------------------------+------+--------+-------+---------------------------------------------------| +| _allowances | mapping(address => mapping(address => uint256)) | 52 | 0 | 32 | contracts/tokenbridge/libraries/aeWETH.sol:aeWETH | +|----------------------------------+--------------------------------------------------------+------+--------+-------+---------------------------------------------------| +| _totalSupply | uint256 | 53 | 0 | 32 | contracts/tokenbridge/libraries/aeWETH.sol:aeWETH | +|----------------------------------+--------------------------------------------------------+------+--------+-------+---------------------------------------------------| +| _name | string | 54 | 0 | 32 | contracts/tokenbridge/libraries/aeWETH.sol:aeWETH | +|----------------------------------+--------------------------------------------------------+------+--------+-------+---------------------------------------------------| +| _symbol | string | 55 | 0 | 32 | contracts/tokenbridge/libraries/aeWETH.sol:aeWETH | +|----------------------------------+--------------------------------------------------------+------+--------+-------+---------------------------------------------------| +| _decimals | uint8 | 56 | 0 | 1 | contracts/tokenbridge/libraries/aeWETH.sol:aeWETH | +|----------------------------------+--------------------------------------------------------+------+--------+-------+---------------------------------------------------| +| __gap | uint256[44] | 57 | 0 | 1408 | contracts/tokenbridge/libraries/aeWETH.sol:aeWETH | +|----------------------------------+--------------------------------------------------------+------+--------+-------+---------------------------------------------------| +| _HASHED_NAME | bytes32 | 101 | 0 | 32 | contracts/tokenbridge/libraries/aeWETH.sol:aeWETH | +|----------------------------------+--------------------------------------------------------+------+--------+-------+---------------------------------------------------| +| _HASHED_VERSION | bytes32 | 102 | 0 | 32 | contracts/tokenbridge/libraries/aeWETH.sol:aeWETH | +|----------------------------------+--------------------------------------------------------+------+--------+-------+---------------------------------------------------| +| __gap | uint256[50] | 103 | 0 | 1600 | contracts/tokenbridge/libraries/aeWETH.sol:aeWETH | +|----------------------------------+--------------------------------------------------------+------+--------+-------+---------------------------------------------------| +| _nonces | mapping(address => struct CountersUpgradeable.Counter) | 153 | 0 | 32 | contracts/tokenbridge/libraries/aeWETH.sol:aeWETH | +|----------------------------------+--------------------------------------------------------+------+--------+-------+---------------------------------------------------| +| _PERMIT_TYPEHASH_DEPRECATED_SLOT | bytes32 | 154 | 0 | 32 | contracts/tokenbridge/libraries/aeWETH.sol:aeWETH | +|----------------------------------+--------------------------------------------------------+------+--------+-------+---------------------------------------------------| +| __gap | uint256[49] | 155 | 0 | 1568 | contracts/tokenbridge/libraries/aeWETH.sol:aeWETH | +|----------------------------------+--------------------------------------------------------+------+--------+-------+---------------------------------------------------| +| l2Gateway | address | 204 | 0 | 20 | contracts/tokenbridge/libraries/aeWETH.sol:aeWETH | +|----------------------------------+--------------------------------------------------------+------+--------+-------+---------------------------------------------------| +| l1Address | address | 205 | 0 | 20 | contracts/tokenbridge/libraries/aeWETH.sol:aeWETH | +╰----------------------------------+--------------------------------------------------------+------+--------+-------+---------------------------------------------------╯ + diff --git a/test/storage/test-storage.bash b/test/storage/test-storage.bash new file mode 100755 index 0000000000..8d2519c981 --- /dev/null +++ b/test/storage/test-storage.bash @@ -0,0 +1,3 @@ +#!/bin/bash + +./test/util/forge-inspect.bash ./test/storage storage \ No newline at end of file diff --git a/test/util/forge-inspect.bash b/test/util/forge-inspect.bash new file mode 100755 index 0000000000..a988ac36f0 --- /dev/null +++ b/test/util/forge-inspect.bash @@ -0,0 +1,52 @@ +#!/bin/bash + +# usage: ./test/util/forge-inspect.bash + +contracts=$(./scripts/template/print-contracts.bash) +if [[ $? != "0" ]]; then + echo "Failed to get contracts" + exit 1 +fi + +outputDir=$1 +inspectType=$2 + +CHANGED=0 + +for contractName in $contracts; do + echo "Checking for $inspectType changes in $contractName" + + # if the file doesn't exist, create it + if [ ! -f "$outputDir/$contractName" ]; then + forge inspect "$contractName" "$inspectType" > "$outputDir/$contractName" + CHANGED=1 + # if the file does exist, compare it + else + mv "$outputDir/$contractName" "$outputDir/$contractName-old" + forge inspect "$contractName" "$inspectType" > "$outputDir/$contractName" + diff "$outputDir/$contractName-old" "$outputDir/$contractName" + if [[ $? != "0" ]]; then + CHANGED=1 + fi + fi +done + +rm -f "$outputDir"/*-old + +# Remove files for contracts that no longer exist +for existingFile in "$outputDir"/*; do + filename=$(basename "$existingFile") + + # skip files with extensions + if [[ "$filename" == *.* ]]; then + continue + fi + + # if the file doesn't exist in the contracts list, remove it + if ! echo "$contracts" | grep -qx "$filename"; then + rm -f "$existingFile" + CHANGED=1 + fi +done + +exit $CHANGED diff --git a/yarn.lock b/yarn.lock index 4feb506a0b..e5106deb33 100644 --- a/yarn.lock +++ b/yarn.lock @@ -17,10 +17,10 @@ "@openzeppelin/contracts-upgradeable" "4.5.2" patch-package "^6.4.7" -"@arbitrum/sdk@^3.5.1": - version "3.5.1" - resolved "https://registry.yarnpkg.com/@arbitrum/sdk/-/sdk-3.5.1.tgz#9606b726101e62ca32953386a9ba341041e40c47" - integrity sha512-UQ5nUSmvFzEYpAbf1CKkYZmGGq9WysRASOWEAimc63EYVwkOV31hU5m8Dnj6JiJtLcO8mFYnTlVsJGex5oxntw== +"@arbitrum/sdk@^4.0.4": + version "4.0.4" + resolved "https://registry.yarnpkg.com/@arbitrum/sdk/-/sdk-4.0.4.tgz#32f3cfa75d2b3f9ab0be01eb807112e0001f428d" + integrity sha512-GscwlkHYmPzRKs9huDHntbqx1xMRhTraTUvTC9exu+prjndKxHe9ZORuIcqmtEqwLwma/l8nqxI+k+pEEdIO6Q== dependencies: "@ethersproject/address" "^5.0.8" "@ethersproject/bignumber" "^5.1.1"