-
Notifications
You must be signed in to change notification settings - Fork 388
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
### 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 <[email protected]>
- Loading branch information
Showing
11 changed files
with
551 additions
and
10 deletions.
There are no files selected for viewing
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,5 @@ | ||
--- | ||
'@hyperlane-xyz/infra': minor | ||
--- | ||
|
||
add USDC, USDT, cbBTC and ETH zeronetwork warp routes support in infra |
198 changes: 198 additions & 0 deletions
198
...astBscEthereumGnosisMantleModeOptimismPolygonScrollZeroNetworkZoraMainnetETHWarpConfig.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,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, | ||
}; | ||
}; |
114 changes: 114 additions & 0 deletions
114
...et3/warp/configGetters/getArbitrumBaseEthereumOptimismPolygonZeroNetworkUSDCWarpConfig.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,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, | ||
}; | ||
}; |
Oops, something went wrong.