-
Notifications
You must be signed in to change notification settings - Fork 412
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add USDC to Ink <-> Ethereum (#5139)
### Description Add USDC between Ink and Ethereum ### Drive-by changes <!-- Are there any minor or drive-by changes also included? --> ### Related issues <!-- - Fixes #[issue number here] --> ### Backward compatibility <!-- Are these changes backward compatible? Are there any infrastructure implications, e.g. changes that would prohibit deploying older commits using this infra tooling? Yes/No --> ### Testing <!-- What kind of testing have these changes undergone? None/Manual/Unit Tests -->
- Loading branch information
Showing
6 changed files
with
58 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 | ||
--- | ||
|
||
Add USDC between Ink and Ethereum |
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 @@ | ||
8481aeb47ed242783c8dc6ccd366f90a95b471bf | ||
62ccc4da05f48d62a5a0fd5d1498b68b596c627b |
48 changes: 48 additions & 0 deletions
48
...ipt/infra/config/environments/mainnet3/warp/configGetters/getEthereumInkUSDCWarpConfig.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,48 @@ | ||
import { ethers } from 'ethers'; | ||
|
||
import { | ||
ChainMap, | ||
HypTokenRouterConfig, | ||
OwnableConfig, | ||
TokenType, | ||
} from '@hyperlane-xyz/sdk'; | ||
|
||
import { | ||
RouterConfigWithoutOwner, | ||
tokens, | ||
} from '../../../../../src/config/warp.js'; | ||
|
||
const ISM_CONFIG = ethers.constants.AddressZero; // Default ISM | ||
|
||
export const getEthereumInkUSDCConfig = async ( | ||
routerConfig: ChainMap<RouterConfigWithoutOwner>, | ||
abacusWorksEnvOwnerConfig: ChainMap<OwnableConfig>, | ||
): Promise<ChainMap<HypTokenRouterConfig>> => { | ||
const ethereum: HypTokenRouterConfig = { | ||
...routerConfig.ethereum, | ||
owner: abacusWorksEnvOwnerConfig.ethereum.owner, | ||
proxyAdmin: { | ||
owner: abacusWorksEnvOwnerConfig.ethereum.owner, | ||
address: '0xd702dCed4DDeC529Ea763ddeBD8fb180C4D1843F', | ||
}, | ||
type: TokenType.collateral, | ||
token: tokens.ethereum.USDC, | ||
interchainSecurityModule: ISM_CONFIG, | ||
}; | ||
|
||
const ink: HypTokenRouterConfig = { | ||
...routerConfig.ink, | ||
owner: abacusWorksEnvOwnerConfig.ink.owner, | ||
proxyAdmin: { | ||
owner: abacusWorksEnvOwnerConfig.ink.owner, | ||
address: '0xd9Cc2e652A162bb93173d1c44d46cd2c0bbDA59D', | ||
}, | ||
type: TokenType.synthetic, | ||
interchainSecurityModule: ISM_CONFIG, | ||
}; | ||
|
||
return { | ||
ethereum, | ||
ink, | ||
}; | ||
}; |
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