-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updating existing supported chains after Base deployment
- Updated external addresses for Mainnet and Testnet - Updated mappings for existing supported chains
- Loading branch information
Showing
12 changed files
with
221 additions
and
0 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
cross-chain/arbitrum/deploy_l2/00_resolve_base_wormhole_gateway.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import type { HardhatRuntimeEnvironment } from "hardhat/types" | ||
import type { DeployFunction } from "hardhat-deploy/types" | ||
|
||
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { | ||
const { helpers, deployments } = hre | ||
const { log } = deployments | ||
|
||
const BaseWormholeGateway = await deployments.getOrNull( | ||
"BaseWormholeGateway" | ||
) | ||
|
||
if ( | ||
BaseWormholeGateway && | ||
helpers.address.isValid(BaseWormholeGateway.address) | ||
) { | ||
log( | ||
Check failure on line 16 in cross-chain/arbitrum/deploy_l2/00_resolve_base_wormhole_gateway.ts GitHub Actions / contracts-format
|
||
`using existing BaseWormholeGateway at ${BaseWormholeGateway.address}` | ||
) | ||
} else if (hre.network.name === "hardhat") { | ||
log("using fake BaseWormholeGateway for hardhat network") | ||
} else { | ||
throw new Error("deployed BaseWormholeGateway contract not found") | ||
} | ||
} | ||
|
||
export default func | ||
|
||
func.tags = ["BaseWormholeGateway"] |
39 changes: 39 additions & 0 deletions
39
cross-chain/arbitrum/deploy_l2/15_update_with_base_in_wormhole_gateway_mapping.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import type { HardhatRuntimeEnvironment } from "hardhat/types" | ||
import type { DeployFunction } from "hardhat-deploy/types" | ||
|
||
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { | ||
const { deployments, getNamedAccounts, ethers } = hre | ||
const { execute, log } = deployments | ||
const { deployer } = await getNamedAccounts() | ||
|
||
// Fake BaseWormholeGateway for local development purposes only. | ||
const fakeBaseWormholeGateway = | ||
"0x1af5DC16568EFF2d480a43A77E6C409e497FcFb9" | ||
|
||
// See https://docs.wormhole.com/wormhole/blockchain-environments/evm#base | ||
// This ID is valid for both Base Testnet and Mainnet | ||
const baseWormholeChainID = 30 | ||
|
||
const baseWormholeGateway = await deployments.getOrNull( | ||
"BaseWormholeGateway" | ||
) | ||
|
||
let baseWormholeGatewayAddress = baseWormholeGateway?.address | ||
if (!baseWormholeGatewayAddress && hre.network.name === "hardhat") { | ||
baseWormholeGatewayAddress = fakeBaseWormholeGateway | ||
log(`fake BaseWormholeGateway address ${baseWormholeGatewayAddress}`) | ||
} | ||
|
||
await execute( | ||
"ArbitrumWormholeGateway", | ||
{ from: deployer, log: true, waitConfirmations: 1 }, | ||
"updateGatewayAddress", | ||
baseWormholeChainID, | ||
ethers.utils.hexZeroPad(baseWormholeGatewayAddress, 32) | ||
) | ||
} | ||
|
||
export default func | ||
|
||
func.tags = ["SetBaseGatewayAddress"] | ||
func.dependencies = ["BaseWormholeGateway"] |
3 changes: 3 additions & 0 deletions
3
cross-chain/arbitrum/external/arbitrumGoerli/BaseWormholeGateway.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"address": "0xe3e0511EEbD87F08FbaE4486419cb5dFB06e1343" | ||
} |
3 changes: 3 additions & 0 deletions
3
cross-chain/arbitrum/external/arbitrumOne/BaseWormholeGateway.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"address": "0x09959798B95d00a3183d20FaC298E4594E599eab" | ||
} |
28 changes: 28 additions & 0 deletions
28
cross-chain/optimism/deploy_l2/00_resolve_base_wormhole_gateway.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import type { HardhatRuntimeEnvironment } from "hardhat/types" | ||
import type { DeployFunction } from "hardhat-deploy/types" | ||
|
||
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { | ||
const { helpers, deployments } = hre | ||
const { log } = deployments | ||
|
||
const BaseWormholeGateway = await deployments.getOrNull( | ||
"BaseWormholeGateway" | ||
) | ||
|
||
if ( | ||
BaseWormholeGateway && | ||
helpers.address.isValid(BaseWormholeGateway.address) | ||
) { | ||
log( | ||
Check failure on line 16 in cross-chain/optimism/deploy_l2/00_resolve_base_wormhole_gateway.ts GitHub Actions / contracts-format
|
||
`using existing BaseWormholeGateway at ${BaseWormholeGateway.address}` | ||
) | ||
} else if (hre.network.name === "hardhat") { | ||
log("using fake BaseWormholeGateway for hardhat network") | ||
} else { | ||
throw new Error("deployed BaseWormholeGateway contract not found") | ||
} | ||
} | ||
|
||
export default func | ||
|
||
func.tags = ["BaseWormholeGateway"] |
39 changes: 39 additions & 0 deletions
39
cross-chain/optimism/deploy_l2/15_update_with_base_in_wormhole_gateway_mapping.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import type { HardhatRuntimeEnvironment } from "hardhat/types" | ||
import type { DeployFunction } from "hardhat-deploy/types" | ||
|
||
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { | ||
const { deployments, getNamedAccounts, ethers } = hre | ||
const { execute, log } = deployments | ||
const { deployer } = await getNamedAccounts() | ||
|
||
// Fake BaseWormholeGateway for local development purposes only. | ||
const fakeBaseWormholeGateway = | ||
"0x1af5DC16568EFF2d480a43A77E6C409e497FcFb9" | ||
|
||
// See https://docs.wormhole.com/wormhole/blockchain-environments/evm#base | ||
// This ID is valid for both Base Testnet and Mainnet | ||
const baseWormholeChainID = 30 | ||
|
||
const baseWormholeGateway = await deployments.getOrNull( | ||
"BaseWormholeGateway" | ||
) | ||
|
||
let baseWormholeGatewayAddress = baseWormholeGateway?.address | ||
if (!baseWormholeGatewayAddress && hre.network.name === "hardhat") { | ||
baseWormholeGatewayAddress = fakeBaseWormholeGateway | ||
log(`fake BaseWormholeGateway address ${baseWormholeGatewayAddress}`) | ||
} | ||
|
||
await execute( | ||
"OptimismWormholeGateway", | ||
{ from: deployer, log: true, waitConfirmations: 1 }, | ||
"updateGatewayAddress", | ||
baseWormholeChainID, | ||
ethers.utils.hexZeroPad(baseWormholeGatewayAddress, 32) | ||
) | ||
} | ||
|
||
export default func | ||
|
||
func.tags = ["SetBaseGatewayAddress"] | ||
func.dependencies = ["BaseWormholeGateway"] |
3 changes: 3 additions & 0 deletions
3
cross-chain/optimism/external/optimism/BaseWormholeGateway.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"address": "0x09959798B95d00a3183d20FaC298E4594E599eab" | ||
} |
3 changes: 3 additions & 0 deletions
3
cross-chain/optimism/external/optimismGoerli/BaseWormholeGateway.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"address": "0xe3e0511EEbD87F08FbaE4486419cb5dFB06e1343" | ||
} |
28 changes: 28 additions & 0 deletions
28
cross-chain/polygon/deploy_sidechain/00_resolve_base_wormhole_gateway.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import type { HardhatRuntimeEnvironment } from "hardhat/types" | ||
import type { DeployFunction } from "hardhat-deploy/types" | ||
|
||
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { | ||
const { helpers, deployments } = hre | ||
const { log } = deployments | ||
|
||
const BaseWormholeGateway = await deployments.getOrNull( | ||
"BaseWormholeGateway" | ||
) | ||
|
||
if ( | ||
BaseWormholeGateway && | ||
helpers.address.isValid(BaseWormholeGateway.address) | ||
) { | ||
log( | ||
Check failure on line 16 in cross-chain/polygon/deploy_sidechain/00_resolve_base_wormhole_gateway.ts GitHub Actions / contracts-format
|
||
`using existing BaseWormholeGateway at ${BaseWormholeGateway.address}` | ||
) | ||
} else if (hre.network.name === "hardhat") { | ||
log("using fake BaseWormholeGateway for hardhat network") | ||
} else { | ||
throw new Error("deployed BaseWormholeGateway contract not found") | ||
} | ||
} | ||
|
||
export default func | ||
|
||
func.tags = ["BaseWormholeGateway"] |
41 changes: 41 additions & 0 deletions
41
cross-chain/polygon/deploy_sidechain/15_update_with_base_in_wormhole_gateway_mapping.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import type { HardhatRuntimeEnvironment } from "hardhat/types" | ||
import type { DeployFunction } from "hardhat-deploy/types" | ||
|
||
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { | ||
const { deployments, getNamedAccounts, ethers } = hre | ||
const { execute, log } = deployments | ||
const { deployer } = await getNamedAccounts() | ||
|
||
// Fake BaseWormholeGateway for local development purposes only. | ||
const fakeBaseWormholeGateway = | ||
"0x2af5DC16568EFF2d480a43A77E6C409e497FcFb9" | ||
|
||
// See https://docs.wormhole.com/wormhole/blockchain-environments/evm#base | ||
// This ID is valid for both Base Goerli and Mainnet | ||
const baseWormholeChainID = 30 | ||
|
||
const baseWormholeGateway = await deployments.getOrNull( | ||
"BaseWormholeGateway" | ||
) | ||
|
||
let baseWormholeGatewayAddress = baseWormholeGateway?.address | ||
if (!baseWormholeGatewayAddress && hre.network.name === "hardhat") { | ||
baseWormholeGatewayAddress = fakeBaseWormholeGateway | ||
log( | ||
Check failure on line 24 in cross-chain/polygon/deploy_sidechain/15_update_with_base_in_wormhole_gateway_mapping.ts GitHub Actions / contracts-format
|
||
`fake BaseWormholeGateway address ${baseWormholeGatewayAddress}` | ||
) | ||
} | ||
|
||
await execute( | ||
"PolygonWormholeGateway", | ||
{ from: deployer, log: true, waitConfirmations: 1 }, | ||
"updateGatewayAddress", | ||
baseWormholeChainID, | ||
ethers.utils.hexZeroPad(baseWormholeGatewayAddress, 32) | ||
) | ||
} | ||
|
||
export default func | ||
|
||
func.tags = ["SetBaseGatewayAddress"] | ||
func.dependencies = ["BaseWormholeGateway"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"address": "0xe3e0511EEbD87F08FbaE4486419cb5dFB06e1343" | ||
} |
3 changes: 3 additions & 0 deletions
3
cross-chain/polygon/external/polygon/BaseWormholeGateway.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"address": "0x09959798B95d00a3183d20FaC298E4594E599eab" | ||
} |