From b31680729889bead01822f2f8f521e3436d397a8 Mon Sep 17 00:00:00 2001 From: Michalina Date: Wed, 8 Nov 2023 17:03:16 +0100 Subject: [PATCH 1/8] Add Sepolia / Base Sepolia support for Base cross-chain MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Goerli testnet currently used by Threshold/Keep for development purposes is planned to become deprecated with the end of year 2023. The testnet that was created to replace it is called [Holešky](https://github.com/eth-clients/holesky), however it will take some time until it gets integrated with by some of the projects we rely on. As a solution, we decided to switch first to another testnet that is currently live - Sepolia. This testnet's EOL is planned for 2026, which gives us plenty of time to move to Holešky before Sepolia gets deprecated. Until Görli is not dead we want to support both testnets. The Goerli -> Sepolia migration means that also L2 testnet basing on Goerli (Base Goerli) needs to be migrated to Sepolia-based chain (Base Sepolia). At the moment Base Sepolia is not supported by Wormhole, so deployment of our contracts on that testnet is yet not possible. But we're already adding changes that prepare us for the moment when it will be supported. Once support is confirmed, we'll need to verify if `wormholeChainID` we use in the config is correct for the testnet. --- cross-chain/base/.gitignore | 2 + cross-chain/base/README.adoc | 5 ++- ...update_self_in_wormhole_gateway_mapping.ts | 2 + cross-chain/base/hardhat.config.ts | 42 +++++++++++++++++++ cross-chain/base/package.json | 1 + 5 files changed, 50 insertions(+), 2 deletions(-) diff --git a/cross-chain/base/.gitignore b/cross-chain/base/.gitignore index 656127c19..e26936816 100644 --- a/cross-chain/base/.gitignore +++ b/cross-chain/base/.gitignore @@ -10,8 +10,10 @@ !/deployments/mainnet/ !/deployments/base/ !/deployments/baseGoerli/ +!/deployments/baseSepolia/ # OZ /.openzeppelin/unknown-*.json !/.openzeppelin/unknown-84531.json !/.openzeppelin/unknown-8453.json +!/.openzeppelin/unknown-84532.json \ No newline at end of file diff --git a/cross-chain/base/README.adoc b/cross-chain/base/README.adoc index cc95d56a3..8f4af934e 100644 --- a/cross-chain/base/README.adoc +++ b/cross-chain/base/README.adoc @@ -42,7 +42,8 @@ yarn deploy --network Supported networks: - `hardhat` - for local development -- `baseGoerli` - L2 testing network +- `baseGoerli` - L2 testing network (will become deprecated with end of 2023) +- `baseSepolia` - L2 testing network - `base` - L2 mainnet Currently, this module does not deploy any contracts on L1. All the existing @@ -54,6 +55,6 @@ the contracts before running the deployment script. This command produces an `export.json` file containing contract deployment info. Note that for the chains other than `hardhat` the following environment variables are needed: -- `L2_CHAIN_API_URL` - URL to access blockchain services, e.g. `https://goerli.base.org` +- `L2_CHAIN_API_URL` - URL to access blockchain services, e.g. `https://sepolia.base.org` - `L2_ACCOUNTS_PRIVATE_KEYS` - Private keys for the deployer and council `<0xOwnerPrivKey,0xCouncilPrivKey>` - `BASESCAN_API_KEY` - Base Etherscan API key diff --git a/cross-chain/base/deploy_l2/12_update_self_in_wormhole_gateway_mapping.ts b/cross-chain/base/deploy_l2/12_update_self_in_wormhole_gateway_mapping.ts index 8d72defea..b0c7d3dc7 100644 --- a/cross-chain/base/deploy_l2/12_update_self_in_wormhole_gateway_mapping.ts +++ b/cross-chain/base/deploy_l2/12_update_self_in_wormhole_gateway_mapping.ts @@ -8,6 +8,8 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { // See https://docs.wormhole.com/wormhole/blockchain-environments/evm#base // This ID is valid for both Base Goerli and Base Mainnet + // TODO: check if id is correct for Base Sepolia as well (once Wormhole + // supports that testnet) const wormholeChainID = 30 const baseWormholeGateway = await deployments.get("BaseWormholeGateway") diff --git a/cross-chain/base/hardhat.config.ts b/cross-chain/base/hardhat.config.ts index f7dada54c..661ad01ae 100644 --- a/cross-chain/base/hardhat.config.ts +++ b/cross-chain/base/hardhat.config.ts @@ -44,6 +44,15 @@ const config: HardhatUserConfig = { : undefined, tags: ["etherscan"], }, + sepolia: { + url: process.env.L1_CHAIN_API_URL || "", + chainId: 11155111, + deploy: ["deploy_l1"], + accounts: process.env.L1_ACCOUNTS_PRIVATE_KEYS + ? process.env.L1_ACCOUNTS_PRIVATE_KEYS.split(",") + : undefined, + tags: ["etherscan"], + }, mainnet: { url: process.env.L1_CHAIN_API_URL || "", chainId: 1, @@ -68,6 +77,21 @@ const config: HardhatUserConfig = { // l1: "goerli", // }, }, + baseSepolia: { + url: process.env.L2_CHAIN_API_URL || "", + chainId: 84532, + deploy: ["deploy_l2"], + accounts: process.env.L2_ACCOUNTS_PRIVATE_KEYS + ? process.env.L2_ACCOUNTS_PRIVATE_KEYS.split(",") + : undefined, + tags: ["basescan"], + // In case of deployment failing with underpriced transaction error set + // the `gasPrice` parameter. + // gasPrice: 1000000000, + // companionNetworks: { + // l1: "sepolia", + // }, + }, base: { url: process.env.L2_CHAIN_API_URL || "", chainId: 8453, @@ -88,24 +112,30 @@ const config: HardhatUserConfig = { external: { deployments: { goerli: ["./external/goerli"], + sepolia: ["./external/sepolia"], mainnet: ["./external/mainnet"], baseGoerli: ["./external/baseGoerli"], + baseSepolia: ["./external/baseSepolia"], base: ["./external/base"], }, }, deploymentArtifactsExport: { goerli: "artifacts/l1", + sepolia: "artifacts/l1", mainnet: "artifacts/l1", baseGoerli: "artifacts/l2", + baseSepolia: "artifacts/l2", base: "artifacts/l2", }, etherscan: { apiKey: { goerli: process.env.ETHERSCAN_API_KEY, + sepolia: process.env.ETHERSCAN_API_KEY, mainnet: process.env.ETHERSCAN_API_KEY, "base-goerli": process.env.BASESCAN_API_KEY, + "base-sepolia": process.env.BLOCKSCOUT_API_KEY, "base-mainnet": process.env.BASESCAN_API_KEY, }, customChains: [ @@ -117,6 +147,14 @@ const config: HardhatUserConfig = { browserURL: "https://goerli.basescan.org", }, }, + { + network: "base-sepolia", + chainId: 84532, + urls: { + apiURL: "https://base-sepolia.blockscout.com/api", + browserURL: "https://base-sepolia.blockscout.com/", + }, + }, { network: "base-mainnet", chainId: 8453, @@ -132,14 +170,18 @@ const config: HardhatUserConfig = { deployer: { default: 1, goerli: 0, + sepolia:0, baseGoerli: 0, + baseSepolia: 0, mainnet: "0x123694886DBf5Ac94DDA07135349534536D14cAf", base: "0x123694886DBf5Ac94DDA07135349534536D14cAf", }, governance: { default: 2, goerli: 0, + sepolia:0, baseGoerli: 0, + baseSepolia: 0, mainnet: "0x9f6e831c8f8939dc0c830c6e492e7cef4f9c2f5f", // Threshold Council base: "0x518385dd31289F1000fE6382b0C65df4d1Cd3bfC", // Threshold Council }, diff --git a/cross-chain/base/package.json b/cross-chain/base/package.json index 300f085ba..b7d9102ee 100644 --- a/cross-chain/base/package.json +++ b/cross-chain/base/package.json @@ -31,6 +31,7 @@ "lint:config:fix": "prettier --write '**/*.@(json|yaml)'", "prepack": "tsc -p tsconfig.export.json && hardhat export-artifacts export/artifacts", "export-artifacts:goerli": "yarn hardhat export-deployment-artifacts --network baseGoerli", + "export-artifacts:sepolia": "yarn hardhat export-deployment-artifacts --network baseSepolia", "export-artifacts:mainnet": "yarn hardhat export-deployment-artifacts --network base", "prepublishOnly": "npm run export-artifacts:$npm_config_network", "test": "hardhat test" From 19cbc8e9910b249ffdd3f32102438abbd109f49e Mon Sep 17 00:00:00 2001 From: Michalina Date: Wed, 3 Jan 2024 10:31:31 +0100 Subject: [PATCH 2/8] Move from Blockscout to Basescan for Base Sepolia Earlier Basescan did not support Base Sepolia. Now that this testnet is supported there, we can change configuration to use Basescan instead of Blockscout (Basescan is what we use for other networks as well). --- cross-chain/base/hardhat.config.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cross-chain/base/hardhat.config.ts b/cross-chain/base/hardhat.config.ts index 661ad01ae..e4d1e2755 100644 --- a/cross-chain/base/hardhat.config.ts +++ b/cross-chain/base/hardhat.config.ts @@ -135,7 +135,7 @@ const config: HardhatUserConfig = { sepolia: process.env.ETHERSCAN_API_KEY, mainnet: process.env.ETHERSCAN_API_KEY, "base-goerli": process.env.BASESCAN_API_KEY, - "base-sepolia": process.env.BLOCKSCOUT_API_KEY, + "base-sepolia": process.env.BASESCAN_API_KEY, "base-mainnet": process.env.BASESCAN_API_KEY, }, customChains: [ @@ -151,8 +151,8 @@ const config: HardhatUserConfig = { network: "base-sepolia", chainId: 84532, urls: { - apiURL: "https://base-sepolia.blockscout.com/api", - browserURL: "https://base-sepolia.blockscout.com/", + apiURL: "https://api-sepolia.basescan.org/api", + browserURL: "https://sepolia.basescan.org", }, }, { From 0ffaaf67b9683ffa575233ec9d75394256d6a036 Mon Sep 17 00:00:00 2001 From: Michalina Date: Thu, 18 Jan 2024 15:27:13 +0100 Subject: [PATCH 3/8] Make `...WormholeChainID` values dependable on the environment Wormhole has added support for Arbitrum Sepolia, Base Sepolia and Optimism Sepolia testnets. We want to modify the config of our deployment scripts so that deployment on Sepolia-based L2s would be possible. As the Chain IDs for Wormhole Sepolia-based networks differ from from IDs for Mainnet and Goerli-based testnets, we need to set the right value of `...WormholeChainID` constants for the the right network we're deploying to. --- .../12_update_self_in_wormhole_gateway_mapping.ts | 10 +++++----- ...update_with_arbitrum_in_wormhole_gateway_mapping.ts | 9 ++++++--- ..._update_with_polygon_in_wormhole_gateway_mapping.ts | 4 +++- ...update_with_optimism_in_wormhole_gateway_mapping.ts | 9 ++++++--- 4 files changed, 20 insertions(+), 12 deletions(-) diff --git a/cross-chain/base/deploy_l2/12_update_self_in_wormhole_gateway_mapping.ts b/cross-chain/base/deploy_l2/12_update_self_in_wormhole_gateway_mapping.ts index b0c7d3dc7..663643301 100644 --- a/cross-chain/base/deploy_l2/12_update_self_in_wormhole_gateway_mapping.ts +++ b/cross-chain/base/deploy_l2/12_update_self_in_wormhole_gateway_mapping.ts @@ -6,11 +6,11 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const { execute } = deployments const { deployer } = await getNamedAccounts() - // See https://docs.wormhole.com/wormhole/blockchain-environments/evm#base - // This ID is valid for both Base Goerli and Base Mainnet - // TODO: check if id is correct for Base Sepolia as well (once Wormhole - // supports that testnet) - const wormholeChainID = 30 + // See https://docs.wormhole.com/wormhole/blockchain-environments/evm#base and + // https://docs.wormhole.com/wormhole/blockchain-environments/evm#base-sepolia + // The value `30` is valid for both Base Goerli and Base Mainnet. The value + // for Base Sepolia is `10004`. + const wormholeChainID = hre.network.name === "baseSepolia" ? 10004 : 30 const baseWormholeGateway = await deployments.get("BaseWormholeGateway") diff --git a/cross-chain/base/deploy_l2/13_update_with_arbitrum_in_wormhole_gateway_mapping.ts b/cross-chain/base/deploy_l2/13_update_with_arbitrum_in_wormhole_gateway_mapping.ts index e80738989..8d94f45ae 100644 --- a/cross-chain/base/deploy_l2/13_update_with_arbitrum_in_wormhole_gateway_mapping.ts +++ b/cross-chain/base/deploy_l2/13_update_with_arbitrum_in_wormhole_gateway_mapping.ts @@ -10,9 +10,12 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const fakeArbitrumWormholeGateway = "0x1af5DC16568EFF2d480a43A77E6C409e497FcFb9" - // See https://book.wormhole.com/reference/contracts.html - // This ID is valid for both Arbitrum Goerli and Mainnet - const arbitrumWormholeChainID = 23 + // See https://docs.wormhole.com/wormhole/blockchain-environments/evm#arbitrum + // and https://docs.wormhole.com/wormhole/blockchain-environments/evm#arbitrum-sepolia + // The value `23` is valid for both Arbitrum Goerli and Arbitrum Mainnet. The + // value for Arbitrum Sepolia is `10003`. + const arbitrumWormholeChainID = + hre.network.name === "baseSepolia" ? 10003 : 23 const arbitrumWormholeGateway = await deployments.getOrNull( "ArbitrumWormholeGateway" diff --git a/cross-chain/base/deploy_l2/14_update_with_polygon_in_wormhole_gateway_mapping.ts b/cross-chain/base/deploy_l2/14_update_with_polygon_in_wormhole_gateway_mapping.ts index 7d4f38a70..439e7ffce 100644 --- a/cross-chain/base/deploy_l2/14_update_with_polygon_in_wormhole_gateway_mapping.ts +++ b/cross-chain/base/deploy_l2/14_update_with_polygon_in_wormhole_gateway_mapping.ts @@ -11,7 +11,9 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { "0x1af5DC16568EFF2d480a43A77E6C409e497FcFb9" // See https://book.wormhole.com/reference/contracts.html - // This ID is valid for both Polygon Testnet (Mumbai) and Mainnet + // This ID is valid for both Polygonn Goerli-based Testnet (Mumbai) and + // Mainnet. Wormhole does not support the Sepolia-based Amoy Testnet yet. + // TODO: Update the ID once the support is added. const polygonWormholeChainID = 5 const polygonWormholeGateway = await deployments.getOrNull( diff --git a/cross-chain/base/deploy_l2/15_update_with_optimism_in_wormhole_gateway_mapping.ts b/cross-chain/base/deploy_l2/15_update_with_optimism_in_wormhole_gateway_mapping.ts index 09dd489ff..80176fe99 100644 --- a/cross-chain/base/deploy_l2/15_update_with_optimism_in_wormhole_gateway_mapping.ts +++ b/cross-chain/base/deploy_l2/15_update_with_optimism_in_wormhole_gateway_mapping.ts @@ -10,9 +10,12 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const fakeOptimismWormholeGateway = "0x2af5DC16568EFF2d480a43A77E6C409e497FcFb9" - // See https://book.wormhole.com/reference/contracts.html - // This ID is valid for both Optimism Goerli and Mainnet - const optimismWormholeChainID = 24 + // See https://docs.wormhole.com/wormhole/blockchain-environments/evm#optimism + // and https://docs.wormhole.com/wormhole/blockchain-environments/evm#optimism-sepolia + // The value `24` is valid for both Optimism Goerli and Optimism Mainnet. The + // value for Optimism Sepolia is `10005`. + const optimismWormholeChainID = + hre.network.name === "baseSepolia" ? 10005 : 24 const optimismWormholeGateway = await deployments.getOrNull( "OptimismWormholeGateway" From 9d8a070e3911f46800f9b83360169fff10044c96 Mon Sep 17 00:00:00 2001 From: Michalina Date: Thu, 18 Jan 2024 17:06:28 +0100 Subject: [PATCH 4/8] Fix linting --- cross-chain/base/hardhat.config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cross-chain/base/hardhat.config.ts b/cross-chain/base/hardhat.config.ts index e4d1e2755..9ab642587 100644 --- a/cross-chain/base/hardhat.config.ts +++ b/cross-chain/base/hardhat.config.ts @@ -170,7 +170,7 @@ const config: HardhatUserConfig = { deployer: { default: 1, goerli: 0, - sepolia:0, + sepolia: 0, baseGoerli: 0, baseSepolia: 0, mainnet: "0x123694886DBf5Ac94DDA07135349534536D14cAf", @@ -179,7 +179,7 @@ const config: HardhatUserConfig = { governance: { default: 2, goerli: 0, - sepolia:0, + sepolia: 0, baseGoerli: 0, baseSepolia: 0, mainnet: "0x9f6e831c8f8939dc0c830c6e492e7cef4f9c2f5f", // Threshold Council From a068e6a94d7e714507be41fa8963086e925250a8 Mon Sep 17 00:00:00 2001 From: Michalina Date: Fri, 26 Jan 2024 11:40:46 +0100 Subject: [PATCH 5/8] Add Sepolia-related `external` contracts Adding Sepolia-related contracts needed for deployment on `baseSepolia` network: * `external/baseSepolia/BaseTokenBridge.json` - address taken from https://docs.wormhole.com/wormhole/blockchain-environments/evm#testnet-contracts-base-sepolia-84532 * `external/baseSepolia/SolanaWormholeGateway.json` - used the same value as in `baseGoreli` * `external/sepolia/TokenBridge.json` - address taken from https://docs.wormhole.com/wormhole/blockchain-environments/evm#testnet-contracts-sepolia-11155111 NOT included in this commit (but needed for the deployment): * `external/baseSepolia/BaseWormholeTBTC.json` - in order to get the address we need to perform attestation of the Ethereum Sepolia TBTC token on Base Sepolia (but atm Base Sepolia is not available on the list of target networks on https://wormhole-foundation.github.io/example-token-bridge-ui/#/register) --- cross-chain/base/external/baseSepolia/BaseTokenBridge.json | 3 +++ .../base/external/baseSepolia/SolanaWormholeGateway.json | 3 +++ cross-chain/base/external/sepolia/TokenBridge.json | 3 +++ 3 files changed, 9 insertions(+) create mode 100644 cross-chain/base/external/baseSepolia/BaseTokenBridge.json create mode 100644 cross-chain/base/external/baseSepolia/SolanaWormholeGateway.json create mode 100644 cross-chain/base/external/sepolia/TokenBridge.json diff --git a/cross-chain/base/external/baseSepolia/BaseTokenBridge.json b/cross-chain/base/external/baseSepolia/BaseTokenBridge.json new file mode 100644 index 000000000..4d3d8aa12 --- /dev/null +++ b/cross-chain/base/external/baseSepolia/BaseTokenBridge.json @@ -0,0 +1,3 @@ +{ + "address": "0x86F55A04690fd7815A3D802bD587e83eA888B239" +} diff --git a/cross-chain/base/external/baseSepolia/SolanaWormholeGateway.json b/cross-chain/base/external/baseSepolia/SolanaWormholeGateway.json new file mode 100644 index 000000000..dee25fa3e --- /dev/null +++ b/cross-chain/base/external/baseSepolia/SolanaWormholeGateway.json @@ -0,0 +1,3 @@ +{ + "address": "0x69a22dc2e01ecd2ae40864822d4406ff8aed4e2b8932385dabe818422ff67e1b" +} diff --git a/cross-chain/base/external/sepolia/TokenBridge.json b/cross-chain/base/external/sepolia/TokenBridge.json new file mode 100644 index 000000000..c09d6e7c2 --- /dev/null +++ b/cross-chain/base/external/sepolia/TokenBridge.json @@ -0,0 +1,3 @@ +{ + "address": "0xDB5492265f6038831E89f495670FF909aDe94bd9" +} From edfbb7969c2e1fb25c95b550c4c315ac54238d84 Mon Sep 17 00:00:00 2001 From: Michalina Date: Thu, 8 Feb 2024 09:38:03 +0100 Subject: [PATCH 6/8] Add BaseWormholeTBTC.json after registration in Wormhole Portal Locally deployed portal was used to register TBTC. --- cross-chain/base/external/baseSepolia/BaseWormholeTBTC.json | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 cross-chain/base/external/baseSepolia/BaseWormholeTBTC.json diff --git a/cross-chain/base/external/baseSepolia/BaseWormholeTBTC.json b/cross-chain/base/external/baseSepolia/BaseWormholeTBTC.json new file mode 100644 index 000000000..75af60335 --- /dev/null +++ b/cross-chain/base/external/baseSepolia/BaseWormholeTBTC.json @@ -0,0 +1,3 @@ +{ + "address": "0xe8a91987f593e0c1bb33835e1a443b5b44a6eb55" +} From a9212d60e7e1f6052de86cea4e2398b0ace7b20a Mon Sep 17 00:00:00 2001 From: Michalina Date: Thu, 8 Feb 2024 09:39:40 +0100 Subject: [PATCH 7/8] Add contract artifacts for Base Sepolia We're adding artifacts for contracts deployed to Base Sepolia network. --- .../base/.openzeppelin/unknown-84532.json | 458 ++++++++++ .../base/deployments/baseSepolia/.chainId | 1 + .../deployments/baseSepolia/BaseTBTC.json | 863 ++++++++++++++++++ .../baseSepolia/BaseWormholeGateway.json | 482 ++++++++++ 4 files changed, 1804 insertions(+) create mode 100644 cross-chain/base/.openzeppelin/unknown-84532.json create mode 100644 cross-chain/base/deployments/baseSepolia/.chainId create mode 100644 cross-chain/base/deployments/baseSepolia/BaseTBTC.json create mode 100644 cross-chain/base/deployments/baseSepolia/BaseWormholeGateway.json diff --git a/cross-chain/base/.openzeppelin/unknown-84532.json b/cross-chain/base/.openzeppelin/unknown-84532.json new file mode 100644 index 000000000..c94e49b5b --- /dev/null +++ b/cross-chain/base/.openzeppelin/unknown-84532.json @@ -0,0 +1,458 @@ +{ + "manifestVersion": "3.2", + "admin": { + "address": "0xB2F6c5B73239c39360EE0Ea95047565dab13E3c7", + "txHash": "0x112516f83aaca7e2c8570ada7ebcd85ed16e642b5ae00f859c40170c40003dfb" + }, + "proxies": [ + { + "address": "0xb8f31A249bcb45267d06b9E51252c4793B917Cd0", + "txHash": "0xab8316fb27299ddc835c0755166c57dcb404e7e2745291646d100006d84602fe", + "kind": "transparent" + }, + { + "address": "0xc3D46e0266d95215589DE639cC4E93b79f88fc6C", + "txHash": "0xc362207cb5c36e09f5eae5bcc206c760e01af0a042fb7a48f6a4b2078eafcd24", + "kind": "transparent" + } + ], + "impls": { + "1eca3b29684e1fcc811e32be6ee7e72cd846a93f69838508595506ae72555f18": { + "address": "0x1e9E56Acdb2987DCe23Eb6E751C22d4f89296a06", + "txHash": "0x770bdd4973aeae4222b5788f7cd5b44b1ef6d553e8d50bb9d844279d0eba4e7c", + "layout": { + "solcVersion": "0.8.17", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_balances", + "offset": 0, + "slot": "51", + "type": "t_mapping(t_address,t_uint256)", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:37" + }, + { + "label": "_allowances", + "offset": 0, + "slot": "52", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:39" + }, + { + "label": "_totalSupply", + "offset": 0, + "slot": "53", + "type": "t_uint256", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:41" + }, + { + "label": "_name", + "offset": 0, + "slot": "54", + "type": "t_string_storage", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:43" + }, + { + "label": "_symbol", + "offset": 0, + "slot": "55", + "type": "t_string_storage", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:44" + }, + { + "label": "__gap", + "offset": 0, + "slot": "56", + "type": "t_array(t_uint256)45_storage", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:400" + }, + { + "label": "__gap", + "offset": 0, + "slot": "101", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC20BurnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol:51" + }, + { + "label": "_HASHED_NAME", + "offset": 0, + "slot": "151", + "type": "t_bytes32", + "contract": "EIP712Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol:32" + }, + { + "label": "_HASHED_VERSION", + "offset": 0, + "slot": "152", + "type": "t_bytes32", + "contract": "EIP712Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol:33" + }, + { + "label": "__gap", + "offset": 0, + "slot": "153", + "type": "t_array(t_uint256)50_storage", + "contract": "EIP712Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol:120" + }, + { + "label": "_nonces", + "offset": 0, + "slot": "203", + "type": "t_mapping(t_address,t_struct(Counter)3253_storage)", + "contract": "ERC20PermitUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol:28" + }, + { + "label": "_PERMIT_TYPEHASH_DEPRECATED_SLOT", + "offset": 0, + "slot": "204", + "type": "t_bytes32", + "contract": "ERC20PermitUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol:40", + "renamedFrom": "_PERMIT_TYPEHASH" + }, + { + "label": "__gap", + "offset": 0, + "slot": "205", + "type": "t_array(t_uint256)49_storage", + "contract": "ERC20PermitUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol:108" + }, + { + "label": "_owner", + "offset": 0, + "slot": "254", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "255", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "label": "_paused", + "offset": 0, + "slot": "304", + "type": "t_bool", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:29" + }, + { + "label": "__gap", + "offset": 0, + "slot": "305", + "type": "t_array(t_uint256)49_storage", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:116" + }, + { + "label": "isMinter", + "offset": 0, + "slot": "354", + "type": "t_mapping(t_address,t_bool)", + "contract": "L2TBTC", + "src": "@keep-network/tbtc-v2/contracts/l2/L2TBTC.sol:76" + }, + { + "label": "minters", + "offset": 0, + "slot": "355", + "type": "t_array(t_address)dyn_storage", + "contract": "L2TBTC", + "src": "@keep-network/tbtc-v2/contracts/l2/L2TBTC.sol:77" + }, + { + "label": "isGuardian", + "offset": 0, + "slot": "356", + "type": "t_mapping(t_address,t_bool)", + "contract": "L2TBTC", + "src": "@keep-network/tbtc-v2/contracts/l2/L2TBTC.sol:85" + }, + { + "label": "guardians", + "offset": 0, + "slot": "357", + "type": "t_array(t_address)dyn_storage", + "contract": "L2TBTC", + "src": "@keep-network/tbtc-v2/contracts/l2/L2TBTC.sol:89" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_address)dyn_storage": { + "label": "address[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)45_storage": { + "label": "uint256[45]", + "numberOfBytes": "1440" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_struct(Counter)3253_storage)": { + "label": "mapping(address => struct CountersUpgradeable.Counter)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Counter)3253_storage": { + "label": "struct CountersUpgradeable.Counter", + "members": [ + { + "label": "_value", + "type": "t_uint256", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + }, + "4eab818d90a79d503842492e9ce92e35a3b96c1835245a0d54c5b023197ec36a": { + "address": "0x9A82bE743f0120fA24893b1631B6b2817fD94b1D", + "txHash": "0xa5c1d1bcfdcb8b2a75200c0e4f9e50c1574e4b5bd65ef74baef41e4663b5c1da", + "layout": { + "solcVersion": "0.8.17", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "label": "_status", + "offset": 0, + "slot": "101", + "type": "t_uint256", + "contract": "ReentrancyGuardUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:38" + }, + { + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "ReentrancyGuardUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:80" + }, + { + "label": "bridge", + "offset": 0, + "slot": "151", + "type": "t_contract(IWormholeTokenBridge)518", + "contract": "L2WormholeGateway", + "src": "@keep-network/tbtc-v2/contracts/l2/L2WormholeGateway.sol:122" + }, + { + "label": "bridgeToken", + "offset": 0, + "slot": "152", + "type": "t_contract(IERC20Upgradeable)2208", + "contract": "L2WormholeGateway", + "src": "@keep-network/tbtc-v2/contracts/l2/L2WormholeGateway.sol:123" + }, + { + "label": "tbtc", + "offset": 0, + "slot": "153", + "type": "t_contract(L2TBTC)443", + "contract": "L2WormholeGateway", + "src": "@keep-network/tbtc-v2/contracts/l2/L2WormholeGateway.sol:124" + }, + { + "label": "gateways", + "offset": 0, + "slot": "154", + "type": "t_mapping(t_uint16,t_bytes32)", + "contract": "L2WormholeGateway", + "src": "@keep-network/tbtc-v2/contracts/l2/L2WormholeGateway.sol:136" + }, + { + "label": "mintingLimit", + "offset": 0, + "slot": "155", + "type": "t_uint256", + "contract": "L2WormholeGateway", + "src": "@keep-network/tbtc-v2/contracts/l2/L2WormholeGateway.sol:147" + }, + { + "label": "mintedAmount", + "offset": 0, + "slot": "156", + "type": "t_uint256", + "contract": "L2WormholeGateway", + "src": "@keep-network/tbtc-v2/contracts/l2/L2WormholeGateway.sol:151" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(IERC20Upgradeable)2208": { + "label": "contract IERC20Upgradeable", + "numberOfBytes": "20" + }, + "t_contract(IWormholeTokenBridge)518": { + "label": "contract IWormholeTokenBridge", + "numberOfBytes": "20" + }, + "t_contract(L2TBTC)443": { + "label": "contract L2TBTC", + "numberOfBytes": "20" + }, + "t_mapping(t_uint16,t_bytes32)": { + "label": "mapping(uint16 => bytes32)", + "numberOfBytes": "32" + }, + "t_uint16": { + "label": "uint16", + "numberOfBytes": "2" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + } + } +} diff --git a/cross-chain/base/deployments/baseSepolia/.chainId b/cross-chain/base/deployments/baseSepolia/.chainId new file mode 100644 index 000000000..667f99daf --- /dev/null +++ b/cross-chain/base/deployments/baseSepolia/.chainId @@ -0,0 +1 @@ +84532 \ No newline at end of file diff --git a/cross-chain/base/deployments/baseSepolia/BaseTBTC.json b/cross-chain/base/deployments/baseSepolia/BaseTBTC.json new file mode 100644 index 000000000..0e6fd0f2e --- /dev/null +++ b/cross-chain/base/deployments/baseSepolia/BaseTBTC.json @@ -0,0 +1,863 @@ +{ + "address": "0xb8f31A249bcb45267d06b9E51252c4793B917Cd0", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "GuardianAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "GuardianRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "minter", + "type": "address" + } + ], + "name": "MinterAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "minter", + "type": "address" + } + ], + "name": "MinterRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "addGuardian", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "minter", + "type": "address" + } + ], + "name": "addMinter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burnFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getGuardians", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMinters", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "guardians", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "isGuardian", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "isMinter", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "minters", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "recoverERC20", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC721Upgradeable", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "recoverERC721", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "removeGuardian", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "minter", + "type": "address" + } + ], + "name": "removeMinter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xab8316fb27299ddc835c0755166c57dcb404e7e2745291646d100006d84602fe", + "receipt": { + "to": null, + "from": "0x68ad60CC5e8f3B7cC53beaB321cf0e6036962dBc", + "contractAddress": "0xb8f31A249bcb45267d06b9E51252c4793B917Cd0", + "transactionIndex": 4, + "gasUsed": "754291", + "logsBloom": "0x00000000000000008000000000000000400000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000202000001000000000000000000000000000000000400020000000000000000000800000000800000000000000001000000400000000200000000000000000002000000000000000080000000000000800000000000000000000000000000000400000000000000000000000000000000000000000020000000000000200020040000000000000400000000000000000020000000000000000000000000000000000000000000000000000000000040000000", + "blockHash": "0x3c3159a5412f976db6df1bd29994d90b54a135ce117fa722f9ae5be5a3ef7cc4", + "transactionHash": "0xab8316fb27299ddc835c0755166c57dcb404e7e2745291646d100006d84602fe", + "logs": [ + { + "transactionIndex": 4, + "blockNumber": 5774426, + "transactionHash": "0xab8316fb27299ddc835c0755166c57dcb404e7e2745291646d100006d84602fe", + "address": "0xb8f31A249bcb45267d06b9E51252c4793B917Cd0", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x0000000000000000000000001e9e56acdb2987dce23eb6e751c22d4f89296a06" + ], + "data": "0x", + "logIndex": 2, + "blockHash": "0x3c3159a5412f976db6df1bd29994d90b54a135ce117fa722f9ae5be5a3ef7cc4" + }, + { + "transactionIndex": 4, + "blockNumber": 5774426, + "transactionHash": "0xab8316fb27299ddc835c0755166c57dcb404e7e2745291646d100006d84602fe", + "address": "0xb8f31A249bcb45267d06b9E51252c4793B917Cd0", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000068ad60cc5e8f3b7cc53beab321cf0e6036962dbc" + ], + "data": "0x", + "logIndex": 3, + "blockHash": "0x3c3159a5412f976db6df1bd29994d90b54a135ce117fa722f9ae5be5a3ef7cc4" + }, + { + "transactionIndex": 4, + "blockNumber": 5774426, + "transactionHash": "0xab8316fb27299ddc835c0755166c57dcb404e7e2745291646d100006d84602fe", + "address": "0xb8f31A249bcb45267d06b9E51252c4793B917Cd0", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 4, + "blockHash": "0x3c3159a5412f976db6df1bd29994d90b54a135ce117fa722f9ae5be5a3ef7cc4" + }, + { + "transactionIndex": 4, + "blockNumber": 5774426, + "transactionHash": "0xab8316fb27299ddc835c0755166c57dcb404e7e2745291646d100006d84602fe", + "address": "0xb8f31A249bcb45267d06b9E51252c4793B917Cd0", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b2f6c5b73239c39360ee0ea95047565dab13e3c7", + "logIndex": 5, + "blockHash": "0x3c3159a5412f976db6df1bd29994d90b54a135ce117fa722f9ae5be5a3ef7cc4" + } + ], + "blockNumber": 5774426, + "cumulativeGasUsed": "1688352", + "status": 1, + "byzantium": true + }, + "numDeployments": 1, + "implementation": "0x1e9E56Acdb2987DCe23Eb6E751C22d4f89296a06", + "devdoc": "Contract deployed as upgradable proxy" +} \ No newline at end of file diff --git a/cross-chain/base/deployments/baseSepolia/BaseWormholeGateway.json b/cross-chain/base/deployments/baseSepolia/BaseWormholeGateway.json new file mode 100644 index 000000000..29ad828f8 --- /dev/null +++ b/cross-chain/base/deployments/baseSepolia/BaseWormholeGateway.json @@ -0,0 +1,482 @@ +{ + "address": "0xc3D46e0266d95215589DE639cC4E93b79f88fc6C", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "chainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "gateway", + "type": "bytes32" + } + ], + "name": "GatewayAddressUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "mintingLimit", + "type": "uint256" + } + ], + "name": "MintingLimitUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "depositor", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "WormholeTbtcDeposited", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "WormholeTbtcReceived", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint16", + "name": "recipientChain", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "gateway", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "recipient", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "arbiterFee", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "nonce", + "type": "uint32" + } + ], + "name": "WormholeTbtcSent", + "type": "event" + }, + { + "inputs": [], + "name": "bridge", + "outputs": [ + { + "internalType": "contract IWormholeTokenBridge", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "bridgeToken", + "outputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_address", + "type": "bytes32" + } + ], + "name": "fromWormholeAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "gateways", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IWormholeTokenBridge", + "name": "_bridge", + "type": "address" + }, + { + "internalType": "contract IERC20Upgradeable", + "name": "_bridgeToken", + "type": "address" + }, + { + "internalType": "contract L2TBTC", + "name": "_tbtc", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "mintedAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "mintingLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "encodedVm", + "type": "bytes" + } + ], + "name": "receiveTbtc", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint16", + "name": "recipientChain", + "type": "uint16" + }, + { + "internalType": "bytes32", + "name": "recipient", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "arbiterFee", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "nonce", + "type": "uint32" + } + ], + "name": "sendTbtc", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "tbtc", + "outputs": [ + { + "internalType": "contract L2TBTC", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "toWormholeAddress", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "chainId", + "type": "uint16" + }, + { + "internalType": "bytes32", + "name": "gateway", + "type": "bytes32" + } + ], + "name": "updateGatewayAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_mintingLimit", + "type": "uint256" + } + ], + "name": "updateMintingLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xc362207cb5c36e09f5eae5bcc206c760e01af0a042fb7a48f6a4b2078eafcd24", + "receipt": { + "to": null, + "from": "0x68ad60CC5e8f3B7cC53beaB321cf0e6036962dBc", + "contractAddress": "0xc3D46e0266d95215589DE639cC4E93b79f88fc6C", + "transactionIndex": 1, + "gasUsed": "771788", + "logsBloom": "0x00000000000000000000000000000000400000000000000000800000000001000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000202000001000000000000000000000000000000004000020000000000000000000800000000800000000000000000000000400000000208000000000000000000000000000000000080000000000800800000000000000000000010000000000400000000000000000000000000000000000000000020000000000000000020040000000000000400000000000000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xe28ca26b20ea6c9275e904207f889f7c080ed84028d80c7c58b5653eb653992a", + "transactionHash": "0xc362207cb5c36e09f5eae5bcc206c760e01af0a042fb7a48f6a4b2078eafcd24", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 5776797, + "transactionHash": "0xc362207cb5c36e09f5eae5bcc206c760e01af0a042fb7a48f6a4b2078eafcd24", + "address": "0xc3D46e0266d95215589DE639cC4E93b79f88fc6C", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x0000000000000000000000009a82be743f0120fa24893b1631b6b2817fd94b1d" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0xe28ca26b20ea6c9275e904207f889f7c080ed84028d80c7c58b5653eb653992a" + }, + { + "transactionIndex": 1, + "blockNumber": 5776797, + "transactionHash": "0xc362207cb5c36e09f5eae5bcc206c760e01af0a042fb7a48f6a4b2078eafcd24", + "address": "0xc3D46e0266d95215589DE639cC4E93b79f88fc6C", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000068ad60cc5e8f3b7cc53beab321cf0e6036962dbc" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0xe28ca26b20ea6c9275e904207f889f7c080ed84028d80c7c58b5653eb653992a" + }, + { + "transactionIndex": 1, + "blockNumber": 5776797, + "transactionHash": "0xc362207cb5c36e09f5eae5bcc206c760e01af0a042fb7a48f6a4b2078eafcd24", + "address": "0xc3D46e0266d95215589DE639cC4E93b79f88fc6C", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 2, + "blockHash": "0xe28ca26b20ea6c9275e904207f889f7c080ed84028d80c7c58b5653eb653992a" + }, + { + "transactionIndex": 1, + "blockNumber": 5776797, + "transactionHash": "0xc362207cb5c36e09f5eae5bcc206c760e01af0a042fb7a48f6a4b2078eafcd24", + "address": "0xc3D46e0266d95215589DE639cC4E93b79f88fc6C", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b2f6c5b73239c39360ee0ea95047565dab13e3c7", + "logIndex": 3, + "blockHash": "0xe28ca26b20ea6c9275e904207f889f7c080ed84028d80c7c58b5653eb653992a" + } + ], + "blockNumber": 5776797, + "cumulativeGasUsed": "822277", + "status": 1, + "byzantium": true + }, + "numDeployments": 1, + "implementation": "0x9A82bE743f0120fA24893b1631B6b2817fD94b1D", + "devdoc": "Contract deployed as upgradable proxy" +} \ No newline at end of file From 241f00ce5484cb43f7e0834b738b98e493200b1d Mon Sep 17 00:00:00 2001 From: Michalina Date: Thu, 15 Feb 2024 16:49:10 +0100 Subject: [PATCH 8/8] Update Base Sepolia with Arbitrum and Optimism gateways --- .../base/external/baseSepolia/ArbitrumWormholeGateway.json | 3 +++ .../base/external/baseSepolia/OptimismWormholeGateway.json | 3 +++ 2 files changed, 6 insertions(+) create mode 100644 cross-chain/base/external/baseSepolia/ArbitrumWormholeGateway.json create mode 100644 cross-chain/base/external/baseSepolia/OptimismWormholeGateway.json diff --git a/cross-chain/base/external/baseSepolia/ArbitrumWormholeGateway.json b/cross-chain/base/external/baseSepolia/ArbitrumWormholeGateway.json new file mode 100644 index 000000000..3378b040e --- /dev/null +++ b/cross-chain/base/external/baseSepolia/ArbitrumWormholeGateway.json @@ -0,0 +1,3 @@ +{ + "address": "0xc3d46e0266d95215589de639cc4e93b79f88fc6c" +} diff --git a/cross-chain/base/external/baseSepolia/OptimismWormholeGateway.json b/cross-chain/base/external/baseSepolia/OptimismWormholeGateway.json new file mode 100644 index 000000000..5504419ce --- /dev/null +++ b/cross-chain/base/external/baseSepolia/OptimismWormholeGateway.json @@ -0,0 +1,3 @@ +{ + "address": "0x5fb63d9e076a314023f2d1ab5dbfd7045c281eba" +}