-
Notifications
You must be signed in to change notification settings - Fork 410
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(infra): added superseed USDT and OP config getters (#5130)
### Description Adds config getters for OP and USDT routes on supersede Related registry PRs: - hyperlane-xyz/hyperlane-registry#473 - hyperlane-xyz/hyperlane-registry#474 ### Drive-by changes - NO ### Related issues - ### Backward compatibility - YES ### Testing - CLI - UI
- Loading branch information
Showing
4 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
55 changes: 55 additions & 0 deletions
55
typescript/infra/config/environments/mainnet3/warp/configGetters/getSuperseedWarpConfigs.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,55 @@ | ||
import { ethers } from 'ethers'; | ||
|
||
import { ChainMap, HypTokenRouterConfig, TokenType } from '@hyperlane-xyz/sdk'; | ||
import { Address } from '@hyperlane-xyz/utils'; | ||
|
||
import { | ||
RouterConfigWithoutOwner, | ||
tokens, | ||
} from '../../../../../src/config/warp.js'; | ||
|
||
const safeOwners: ChainMap<Address> = { | ||
ethereum: '0x11BEBBf509248735203BAAAe90c1a27EEE70D567', | ||
superseed: '0x6652010BaCE855DF870D427daA6141c313994929', | ||
optimism: '0x0D493D7E51212bbBF0F1ca4bcfA1E5514C7fEF10', | ||
}; | ||
|
||
export const getEthereumSuperseedUSDTConfig = async ( | ||
routerConfig: ChainMap<RouterConfigWithoutOwner>, | ||
): Promise<ChainMap<HypTokenRouterConfig>> => { | ||
return { | ||
ethereum: { | ||
...routerConfig.ethereum, | ||
owner: safeOwners.ethereum, | ||
type: TokenType.collateral, | ||
token: tokens.ethereum.USDT, | ||
interchainSecurityModule: ethers.constants.AddressZero, | ||
}, | ||
superseed: { | ||
...routerConfig.superseed, | ||
owner: safeOwners.superseed, | ||
type: TokenType.synthetic, | ||
interchainSecurityModule: ethers.constants.AddressZero, | ||
}, | ||
}; | ||
}; | ||
|
||
export const getOptimismSuperseedOPConfig = async ( | ||
routerConfig: ChainMap<RouterConfigWithoutOwner>, | ||
): Promise<ChainMap<HypTokenRouterConfig>> => { | ||
return { | ||
optimism: { | ||
...routerConfig.optimism, | ||
owner: safeOwners.optimism, | ||
type: TokenType.collateral, | ||
token: tokens.optimism.OP, | ||
interchainSecurityModule: ethers.constants.AddressZero, | ||
}, | ||
superseed: { | ||
...routerConfig.superseed, | ||
owner: safeOwners.superseed, | ||
type: TokenType.synthetic, | ||
interchainSecurityModule: ethers.constants.AddressZero, | ||
}, | ||
}; | ||
}; |
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
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
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