feat: zero warp deploys (#4876)
### Description Adds infra support for tracking and checking USDC, USDT, cbBTC and ETH routes for zeronetwork ### Drive-by changes - Removed unused imports ### Related issues ### Backward compatibility - Yes ### Testing - Manual ![image](https://github.com/user-attachments/assets/4be51df9-1d95-46cc-8dbb-f2e97f9eb744) ![image](https://github.com/user-attachments/assets/848ba67a-e62e-4c9b-ae64-052d935c86f4) --------- Co-authored-by: Trevor Porter <tkporter4@gmail.com>pull/4892/merge
parent
28a824ad7e
commit
1ca8574510
@ -0,0 +1,5 @@ |
||||
--- |
||||
'@hyperlane-xyz/infra': minor |
||||
--- |
||||
|
||||
add USDC, USDT, cbBTC and ETH zeronetwork warp routes support in infra |
@ -0,0 +1,198 @@ |
||||
import { ethers } from 'ethers'; |
||||
|
||||
import { |
||||
ChainMap, |
||||
IsmConfig, |
||||
OwnableConfig, |
||||
RouterConfig, |
||||
TokenRouterConfig, |
||||
TokenType, |
||||
} from '@hyperlane-xyz/sdk'; |
||||
|
||||
import { |
||||
RouterConfigWithoutOwner, |
||||
tokens, |
||||
} from '../../../../../src/config/warp.js'; |
||||
|
||||
export const getArbitrumBaseBlastBscEthereumGnosisMantleModeOptimismPolygonScrollZeroNetworkZoraMainnetETHWarpConfig = |
||||
async ( |
||||
routerConfig: ChainMap<RouterConfigWithoutOwner>, |
||||
abacusWorksEnvOwnerConfig: ChainMap<OwnableConfig>, |
||||
): Promise<ChainMap<TokenRouterConfig>> => { |
||||
const ISM_CONFIG: IsmConfig = ethers.constants.AddressZero; |
||||
|
||||
const arbitrum: TokenRouterConfig = { |
||||
...routerConfig.arbitrum, |
||||
...abacusWorksEnvOwnerConfig.arbitrum, |
||||
proxyAdmin: { |
||||
...abacusWorksEnvOwnerConfig.arbitrum, |
||||
address: '0x544BC0f2B619a6920650B0469EA3b6d6Ef3B0b10', |
||||
}, |
||||
type: TokenType.native, |
||||
interchainSecurityModule: ISM_CONFIG, |
||||
}; |
||||
|
||||
const base: TokenRouterConfig = { |
||||
...routerConfig.base, |
||||
...abacusWorksEnvOwnerConfig.base, |
||||
proxyAdmin: { |
||||
...abacusWorksEnvOwnerConfig.base, |
||||
address: '0x073235Fd88B04e3bA7fAC83146225c0de53E5c31', |
||||
}, |
||||
type: TokenType.native, |
||||
interchainSecurityModule: ISM_CONFIG, |
||||
}; |
||||
|
||||
const blast: TokenRouterConfig = { |
||||
...routerConfig.blast, |
||||
...abacusWorksEnvOwnerConfig.blast, |
||||
proxyAdmin: { |
||||
...abacusWorksEnvOwnerConfig.blast, |
||||
address: '0x9775Dd30480D545b9bEd2A6a1DC344Ffbad9B223', |
||||
}, |
||||
type: TokenType.native, |
||||
interchainSecurityModule: ISM_CONFIG, |
||||
}; |
||||
|
||||
const bsc: TokenRouterConfig = { |
||||
...routerConfig.bsc, |
||||
...abacusWorksEnvOwnerConfig.bsc, |
||||
proxyAdmin: { |
||||
...abacusWorksEnvOwnerConfig.bsc, |
||||
address: '0xa0B923456b08944bE30D0F237c041F191Eb0c9D0', |
||||
}, |
||||
type: TokenType.collateral, |
||||
token: tokens.bsc.WETH, |
||||
interchainSecurityModule: ISM_CONFIG, |
||||
}; |
||||
|
||||
const ethereum: TokenRouterConfig = { |
||||
...routerConfig.ethereum, |
||||
...abacusWorksEnvOwnerConfig.ethereum, |
||||
proxyAdmin: { |
||||
...abacusWorksEnvOwnerConfig.ethereum, |
||||
address: '0x5E76be0F4e09057D75140216F70fd4cE3365bb29', |
||||
}, |
||||
type: TokenType.native, |
||||
interchainSecurityModule: ISM_CONFIG, |
||||
}; |
||||
|
||||
const gnosis: TokenRouterConfig = { |
||||
...routerConfig.gnosis, |
||||
...abacusWorksEnvOwnerConfig.gnosis, |
||||
proxyAdmin: { |
||||
...abacusWorksEnvOwnerConfig.gnosis, |
||||
address: '0xe516A113316cFdF8a44e125E4e3970dE6df0cC59', |
||||
}, |
||||
type: TokenType.collateral, |
||||
token: tokens.gnosis.WETH, |
||||
interchainSecurityModule: ISM_CONFIG, |
||||
}; |
||||
|
||||
const mantle: TokenRouterConfig = { |
||||
...routerConfig.mantle, |
||||
...abacusWorksEnvOwnerConfig.mantle, |
||||
proxyAdmin: { |
||||
...abacusWorksEnvOwnerConfig.mantle, |
||||
address: '0xEaD68fD6e5A69136CD60De50bF22164658A8E04E', |
||||
}, |
||||
type: TokenType.collateral, |
||||
token: tokens.mantle.WETH, |
||||
interchainSecurityModule: ISM_CONFIG, |
||||
}; |
||||
|
||||
const mode: TokenRouterConfig = { |
||||
...routerConfig.mode, |
||||
...abacusWorksEnvOwnerConfig.mode, |
||||
proxyAdmin: { |
||||
...abacusWorksEnvOwnerConfig.mode, |
||||
address: '0xEC1f2f8C42c8Ca4C8d15E6a0814667a379aB9b43', |
||||
}, |
||||
type: TokenType.native, |
||||
interchainSecurityModule: ISM_CONFIG, |
||||
}; |
||||
|
||||
const optimism: TokenRouterConfig = { |
||||
...routerConfig.optimism, |
||||
...abacusWorksEnvOwnerConfig.optimism, |
||||
proxyAdmin: { |
||||
...abacusWorksEnvOwnerConfig.optimism, |
||||
address: '0xA900858116D7605a01AfC7595450d8D78555Bc83', |
||||
}, |
||||
type: TokenType.native, |
||||
interchainSecurityModule: ISM_CONFIG, |
||||
}; |
||||
|
||||
const polygon: TokenRouterConfig = { |
||||
...routerConfig.polygon, |
||||
...abacusWorksEnvOwnerConfig.polygon, |
||||
proxyAdmin: { |
||||
...abacusWorksEnvOwnerConfig.polygon, |
||||
address: '0xcA11d580faaE3E6993aA230f437079ac21f3078a', |
||||
}, |
||||
type: TokenType.collateral, |
||||
token: tokens.polygon.WETH, |
||||
interchainSecurityModule: ISM_CONFIG, |
||||
}; |
||||
|
||||
const scroll: TokenRouterConfig = { |
||||
...routerConfig.scroll, |
||||
...abacusWorksEnvOwnerConfig.scroll, |
||||
proxyAdmin: { |
||||
...abacusWorksEnvOwnerConfig.scroll, |
||||
address: '0xA452bDb132Cdf8d11E070786D78907ddB95C5120', |
||||
}, |
||||
type: TokenType.native, |
||||
interchainSecurityModule: ISM_CONFIG, |
||||
}; |
||||
|
||||
const zeronetwork: TokenRouterConfig = { |
||||
...routerConfig.zeronetwork, |
||||
...abacusWorksEnvOwnerConfig.zeronetwork, |
||||
proxyAdmin: { |
||||
...abacusWorksEnvOwnerConfig.zeronetwork, |
||||
address: '0xc2caD038236ccDB113C9350EF2551633c65252eF', |
||||
}, |
||||
type: TokenType.native, |
||||
interchainSecurityModule: ISM_CONFIG, |
||||
}; |
||||
|
||||
const zoramainnet: TokenRouterConfig = { |
||||
...routerConfig.zoramainnet, |
||||
...abacusWorksEnvOwnerConfig.zoramainnet, |
||||
proxyAdmin: { |
||||
...abacusWorksEnvOwnerConfig.zoramainnet, |
||||
address: '0x9775Dd30480D545b9bEd2A6a1DC344Ffbad9B223', |
||||
}, |
||||
type: TokenType.native, |
||||
interchainSecurityModule: ISM_CONFIG, |
||||
}; |
||||
|
||||
const lisk: TokenRouterConfig = { |
||||
...routerConfig.lisk, |
||||
...abacusWorksEnvOwnerConfig.lisk, |
||||
proxyAdmin: { |
||||
...abacusWorksEnvOwnerConfig.lisk, |
||||
address: '0x5E76be0F4e09057D75140216F70fd4cE3365bb29', |
||||
}, |
||||
type: TokenType.synthetic, |
||||
interchainSecurityModule: ISM_CONFIG, |
||||
}; |
||||
|
||||
return { |
||||
arbitrum, |
||||
base, |
||||
blast, |
||||
bsc, |
||||
gnosis, |
||||
mantle, |
||||
mode, |
||||
optimism, |
||||
polygon, |
||||
scroll, |
||||
zeronetwork, |
||||
zoramainnet, |
||||
ethereum, |
||||
lisk, |
||||
}; |
||||
}; |
@ -0,0 +1,114 @@ |
||||
import { ethers } from 'ethers'; |
||||
|
||||
import { |
||||
ChainMap, |
||||
OwnableConfig, |
||||
RouterConfig, |
||||
TokenRouterConfig, |
||||
TokenType, |
||||
} from '@hyperlane-xyz/sdk'; |
||||
|
||||
import { |
||||
RouterConfigWithoutOwner, |
||||
tokens, |
||||
} from '../../../../../src/config/warp.js'; |
||||
|
||||
export const getArbitrumBaseEthereumOptimismPolygonZeroNetworkUSDC = async ( |
||||
routerConfig: ChainMap<RouterConfigWithoutOwner>, |
||||
abacusWorksEnvOwnerConfig: ChainMap<OwnableConfig>, |
||||
): Promise<ChainMap<TokenRouterConfig>> => { |
||||
const ISM_CONFIG = ethers.constants.AddressZero; |
||||
|
||||
const arbitrum: TokenRouterConfig = { |
||||
...routerConfig.arbitrum, |
||||
...abacusWorksEnvOwnerConfig.arbitrum, |
||||
proxyAdmin: { |
||||
...abacusWorksEnvOwnerConfig.arbitrum, |
||||
address: '0x02317D525FA7ceb5ea388244b4618f0c8Ac1CeC2', |
||||
}, |
||||
type: TokenType.collateral, |
||||
token: tokens.arbitrum.USDC, |
||||
interchainSecurityModule: ISM_CONFIG, |
||||
}; |
||||
|
||||
const base: TokenRouterConfig = { |
||||
...routerConfig.base, |
||||
...abacusWorksEnvOwnerConfig.base, |
||||
proxyAdmin: { |
||||
...abacusWorksEnvOwnerConfig.base, |
||||
address: '0xB6E9331576C5aBF69376AF6989eA61b7C7ea67F1', |
||||
}, |
||||
type: TokenType.collateral, |
||||
token: tokens.base.USDC, |
||||
interchainSecurityModule: ISM_CONFIG, |
||||
}; |
||||
|
||||
const optimism: TokenRouterConfig = { |
||||
...routerConfig.optimism, |
||||
...abacusWorksEnvOwnerConfig.optimism, |
||||
proxyAdmin: { |
||||
...abacusWorksEnvOwnerConfig.optimism, |
||||
address: '0xca9e64761C97b049901dF4E7a5926464969528b1', |
||||
}, |
||||
type: TokenType.collateral, |
||||
token: tokens.optimism.USDC, |
||||
interchainSecurityModule: ISM_CONFIG, |
||||
}; |
||||
|
||||
const polygon: TokenRouterConfig = { |
||||
...routerConfig.polygon, |
||||
...abacusWorksEnvOwnerConfig.polygon, |
||||
proxyAdmin: { |
||||
...abacusWorksEnvOwnerConfig.polygon, |
||||
address: '0x7fd5be37d560626625f395A2e6E30eA89150cc98', |
||||
}, |
||||
type: TokenType.collateral, |
||||
token: tokens.polygon.USDC, |
||||
interchainSecurityModule: ISM_CONFIG, |
||||
}; |
||||
|
||||
const zeronetwork: TokenRouterConfig = { |
||||
...routerConfig.zeronetwork, |
||||
...abacusWorksEnvOwnerConfig.zeronetwork, |
||||
proxyAdmin: { |
||||
...abacusWorksEnvOwnerConfig.zeronetwork, |
||||
address: '0x6E906d8AeEBE9025a410887EAafc58C2561705e0', |
||||
}, |
||||
type: TokenType.collateral, |
||||
token: tokens.zeronetwork.USDC, |
||||
interchainSecurityModule: ISM_CONFIG, |
||||
}; |
||||
|
||||
const ethereum: TokenRouterConfig = { |
||||
...routerConfig.ethereum, |
||||
...abacusWorksEnvOwnerConfig.ethereum, |
||||
proxyAdmin: { |
||||
...abacusWorksEnvOwnerConfig.ethereum, |
||||
address: '0x81063D413Ed6Eac3FCf0521eea14906fD27fEb1A', |
||||
}, |
||||
type: TokenType.collateral, |
||||
token: tokens.ethereum.USDC, |
||||
interchainSecurityModule: ISM_CONFIG, |
||||
}; |
||||
|
||||
const lisk: TokenRouterConfig = { |
||||
...routerConfig.lisk, |
||||
...abacusWorksEnvOwnerConfig.lisk, |
||||
proxyAdmin: { |
||||
...abacusWorksEnvOwnerConfig.lisk, |
||||
address: '0x81Db8B4Bc6F2e95781eeA2a21D0A453Ac046eFc0', |
||||
}, |
||||
type: TokenType.synthetic, |
||||
interchainSecurityModule: ISM_CONFIG, |
||||
}; |
||||
|
||||
return { |
||||
arbitrum, |
||||
base, |
||||
ethereum, |
||||
optimism, |
||||
polygon, |
||||
zeronetwork, |
||||
lisk, |
||||
}; |
||||
}; |
@ -0,0 +1,116 @@ |
||||
import { ethers } from 'ethers'; |
||||
|
||||
import { |
||||
ChainMap, |
||||
IsmConfig, |
||||
OwnableConfig, |
||||
RouterConfig, |
||||
TokenRouterConfig, |
||||
TokenType, |
||||
} from '@hyperlane-xyz/sdk'; |
||||
|
||||
import { |
||||
RouterConfigWithoutOwner, |
||||
tokens, |
||||
} from '../../../../../src/config/warp.js'; |
||||
|
||||
export const getArbitrumEthereumMantleModePolygonScrollZeroNetworkUSDTWarpConfig = |
||||
async ( |
||||
routerConfig: ChainMap<RouterConfigWithoutOwner>, |
||||
abacusWorksEnvOwnerConfig: ChainMap<OwnableConfig>, |
||||
): Promise<ChainMap<TokenRouterConfig>> => { |
||||
const ISM_CONFIG: IsmConfig = ethers.constants.AddressZero; |
||||
|
||||
const arbitrum: TokenRouterConfig = { |
||||
...routerConfig.arbitrum, |
||||
...abacusWorksEnvOwnerConfig.arbitrum, |
||||
proxyAdmin: { |
||||
...abacusWorksEnvOwnerConfig.arbitrum, |
||||
address: '0x6701d503369cf6aA9e5EdFfEBFA40A2ffdf3dB21', |
||||
}, |
||||
type: TokenType.collateral, |
||||
token: tokens.arbitrum.USDT, |
||||
interchainSecurityModule: ISM_CONFIG, |
||||
}; |
||||
|
||||
const ethereum: TokenRouterConfig = { |
||||
...routerConfig.ethereum, |
||||
...abacusWorksEnvOwnerConfig.ethereum, |
||||
proxyAdmin: { |
||||
...abacusWorksEnvOwnerConfig.ethereum, |
||||
address: '0xA92D6084709469A2B2339919FfC568b7C5D7888D', |
||||
}, |
||||
type: TokenType.collateral, |
||||
token: tokens.ethereum.USDT, |
||||
interchainSecurityModule: ISM_CONFIG, |
||||
}; |
||||
|
||||
const mantle: TokenRouterConfig = { |
||||
...routerConfig.mantle, |
||||
...abacusWorksEnvOwnerConfig.mantle, |
||||
proxyAdmin: { |
||||
...abacusWorksEnvOwnerConfig.mantle, |
||||
address: '0x633268639892C73Fa7340Ec1da4e397cf3913c8C', |
||||
}, |
||||
type: TokenType.collateral, |
||||
token: tokens.mantle.USDT, |
||||
interchainSecurityModule: ISM_CONFIG, |
||||
}; |
||||
|
||||
const mode: TokenRouterConfig = { |
||||
...routerConfig.mode, |
||||
...abacusWorksEnvOwnerConfig.mode, |
||||
proxyAdmin: { |
||||
...abacusWorksEnvOwnerConfig.mode, |
||||
address: '0x633268639892C73Fa7340Ec1da4e397cf3913c8C', |
||||
}, |
||||
type: TokenType.collateral, |
||||
token: tokens.mode.USDT, |
||||
interchainSecurityModule: ISM_CONFIG, |
||||
}; |
||||
|
||||
const polygon: TokenRouterConfig = { |
||||
...routerConfig.polygon, |
||||
...abacusWorksEnvOwnerConfig.polygon, |
||||
proxyAdmin: { |
||||
...abacusWorksEnvOwnerConfig.polygon, |
||||
address: '0x5DBeAEC137d1ef9a240599656073Ae3E717fae3c', |
||||
}, |
||||
type: TokenType.collateral, |
||||
token: tokens.polygon.USDT, |
||||
interchainSecurityModule: ISM_CONFIG, |
||||
}; |
||||
|
||||
const scroll: TokenRouterConfig = { |
||||
...routerConfig.scroll, |
||||
...abacusWorksEnvOwnerConfig.scroll, |
||||
proxyAdmin: { |
||||
...abacusWorksEnvOwnerConfig.scroll, |
||||
address: '0x81Db8B4Bc6F2e95781eeA2a21D0A453Ac046eFc0', |
||||
}, |
||||
type: TokenType.collateral, |
||||
token: tokens.scroll.USDT, |
||||
interchainSecurityModule: ISM_CONFIG, |
||||
}; |
||||
|
||||
const zeronetwork: TokenRouterConfig = { |
||||
...routerConfig.zeronetwork, |
||||
...abacusWorksEnvOwnerConfig.zeronetwork, |
||||
proxyAdmin: { |
||||
...abacusWorksEnvOwnerConfig.zeronetwork, |
||||
address: '0xa3F188BDd6e3894b393e12396347545bC47E7B0e', |
||||
}, |
||||
type: TokenType.synthetic, |
||||
interchainSecurityModule: ISM_CONFIG, |
||||
}; |
||||
|
||||
return { |
||||
arbitrum, |
||||
ethereum, |
||||
mantle, |
||||
mode, |
||||
polygon, |
||||
scroll, |
||||
zeronetwork, |
||||
}; |
||||
}; |
@ -0,0 +1,50 @@ |
||||
import { ethers } from 'ethers'; |
||||
|
||||
import { |
||||
ChainMap, |
||||
IsmConfig, |
||||
OwnableConfig, |
||||
RouterConfig, |
||||
TokenRouterConfig, |
||||
TokenType, |
||||
} from '@hyperlane-xyz/sdk'; |
||||
|
||||
import { |
||||
RouterConfigWithoutOwner, |
||||
tokens, |
||||
} from '../../../../../src/config/warp.js'; |
||||
|
||||
export const getBaseZeroNetworkCBBTCWarpConfig = async ( |
||||
routerConfig: ChainMap<RouterConfigWithoutOwner>, |
||||
abacusWorksEnvOwnerConfig: ChainMap<OwnableConfig>, |
||||
): Promise<ChainMap<TokenRouterConfig>> => { |
||||
const ISM_CONFIG: IsmConfig = ethers.constants.AddressZero; |
||||
|
||||
const base: TokenRouterConfig = { |
||||
...routerConfig.base, |
||||
...abacusWorksEnvOwnerConfig.base, |
||||
proxyAdmin: { |
||||
...abacusWorksEnvOwnerConfig.base, |
||||
address: '0x0FC41a92F526A8CD22060A4052e156502D6B9db0', |
||||
}, |
||||
type: TokenType.collateral, |
||||
token: tokens.base.cbBTC, |
||||
interchainSecurityModule: ISM_CONFIG, |
||||
}; |
||||
|
||||
const zeronetwork: TokenRouterConfig = { |
||||
...routerConfig.zeronetwork, |
||||
...abacusWorksEnvOwnerConfig.zeronetwork, |
||||
proxyAdmin: { |
||||
...abacusWorksEnvOwnerConfig.zeronetwork, |
||||
address: '0xDb0F69187750b52A637938Ea790fAE667123367c', |
||||
}, |
||||
type: TokenType.synthetic, |
||||
interchainSecurityModule: ISM_CONFIG, |
||||
}; |
||||
|
||||
return { |
||||
base, |
||||
zeronetwork, |
||||
}; |
||||
}; |
Loading…
Reference in new issue