-
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): usdc appchain base + ubtc boba (#5028)
### Description uBTC warp route extension + USDC route that connects AppChain to Base ### Drive-by changes - No ### Backward compatibility - YES ### Testing Manual --------- Co-authored-by: nambrot <nambrot@googlemail.com>
- Loading branch information
Showing
7 changed files
with
119 additions
and
2 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 | ||
--- | ||
|
||
added ubtc route extension config + usdc from appchain to base |
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 |
---|---|---|
@@ -1 +1 @@ | ||
d3e1e71965d7d06a8f8761c8255e718699c78f11 | ||
32b4ab3b3df2bedd0d905c6745bcf1c673a60a01 |
45 changes: 45 additions & 0 deletions
45
...pt/infra/config/environments/mainnet3/warp/configGetters/getAppchainBaseUSDCWarpConfig.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,45 @@ | ||
import { ethers } from 'ethers'; | ||
|
||
import { | ||
ChainMap, | ||
HypTokenRouterConfig, | ||
IsmConfig, | ||
TokenType, | ||
} from '@hyperlane-xyz/sdk'; | ||
import { Address } from '@hyperlane-xyz/utils'; | ||
|
||
import { | ||
RouterConfigWithoutOwner, | ||
tokens, | ||
} from '../../../../../src/config/warp.js'; | ||
|
||
const safeOwners: ChainMap<Address> = { | ||
appchain: '0xe3436b3335fa6d4f1b58153079FB360c6Aa83Fd9', | ||
base: '0xE3b50a565fbcdb6CC67B30bEB112f9e7FC855359', | ||
}; | ||
|
||
export const getAppChainBaseUSDCWarpConfig = async ( | ||
routerConfig: ChainMap<RouterConfigWithoutOwner>, | ||
): Promise<ChainMap<HypTokenRouterConfig>> => { | ||
const ISM_CONFIG: IsmConfig = ethers.constants.AddressZero; // Use the default ISM | ||
|
||
const appchain: HypTokenRouterConfig = { | ||
mailbox: routerConfig.appchain.mailbox, | ||
owner: safeOwners.appchain, | ||
type: TokenType.synthetic, | ||
interchainSecurityModule: ISM_CONFIG, | ||
}; | ||
|
||
const base: HypTokenRouterConfig = { | ||
mailbox: routerConfig.base.mailbox, | ||
owner: safeOwners.base, | ||
type: TokenType.collateral, | ||
token: tokens.base.USDC, | ||
interchainSecurityModule: ISM_CONFIG, | ||
}; | ||
|
||
return { | ||
appchain, | ||
base, | ||
}; | ||
}; |
54 changes: 54 additions & 0 deletions
54
...fra/config/environments/mainnet3/warp/configGetters/getBobaBsquaredSwellUBTCWarpConfig.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,54 @@ | ||
import { ethers } from 'ethers'; | ||
|
||
import { | ||
ChainMap, | ||
HypTokenRouterConfig, | ||
IsmConfig, | ||
TokenType, | ||
} from '@hyperlane-xyz/sdk'; | ||
import { Address } from '@hyperlane-xyz/utils'; | ||
|
||
import { | ||
RouterConfigWithoutOwner, | ||
tokens, | ||
} from '../../../../../src/config/warp.js'; | ||
|
||
const safeOwners: ChainMap<Address> = { | ||
bsquared: '0x7A363efD42305BeDBA307d25351F8ea157b69A1A', | ||
swell: '0xC11e22A31787394950B31e2DEb1d2b5546689B65', | ||
boba: '0x207FfFa7325fC5d0362aB01605D84B268b61888f', | ||
}; | ||
|
||
export const getBobaBsquaredSwellUBTCWarpConfig = async ( | ||
routerConfig: ChainMap<RouterConfigWithoutOwner>, | ||
): Promise<ChainMap<HypTokenRouterConfig>> => { | ||
const ISM_CONFIG: IsmConfig = ethers.constants.AddressZero; // Use the default ISM | ||
|
||
const boba: HypTokenRouterConfig = { | ||
mailbox: routerConfig.boba.mailbox, | ||
owner: safeOwners.boba, | ||
type: TokenType.synthetic, | ||
interchainSecurityModule: ISM_CONFIG, | ||
}; | ||
|
||
const bsquared: HypTokenRouterConfig = { | ||
mailbox: routerConfig.bsquared.mailbox, | ||
owner: safeOwners.bsquared, | ||
type: TokenType.collateral, | ||
token: tokens.bsquared.uBTC, | ||
interchainSecurityModule: ISM_CONFIG, | ||
}; | ||
|
||
const swell: HypTokenRouterConfig = { | ||
mailbox: routerConfig.swell.mailbox, | ||
owner: safeOwners.swell, | ||
type: TokenType.synthetic, | ||
interchainSecurityModule: ISM_CONFIG, | ||
}; | ||
|
||
return { | ||
boba, | ||
bsquared, | ||
swell, | ||
}; | ||
}; |
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