fix(sdk): Add collateralFiat support into Token.ts & TokenStandard.ts (#4308)
### Description Adds CollateralFiat to token mapping which will output the correct `standard` to the warp deploy artifact. ### Related issues https://github.com/hyperlane-xyz/hyperlane-monorepo/issues/4307 ### Backward compatibility Yes ### Testing Manually tested with Beta (collateral) -> Gamma (CollateralFiat) 1. Deploy an ERC20 to represent USDC on beta ``` forge create contracts/test/ERC20Test.sol:ERC20Test \ --constructor-args "Test" "TS" 10000000000000000000000000 6 \ --rpc-url https://beta-op.rpc.caldera.xyz/http \ --private-key $HYP_KEY ``` 2. Deploy a CollateralFiat on gamma ``` forge create contracts/test/ERC20Test.sol:FiatTokenTest \ --constructor-args "FiatTest" "FTS" 0 6 \ --rpc-url https://rpc-gamma-2bgo7wnh9d.t.conduit.xyz \ --private-key $HYP_KEY ``` 3. warp init and deploy 4. Start up the ts relayer `hyperlane relayer --chains beta,gamma` 5. Add the deploy artifacts to UI ``` # warpRoutes.yaml tokens: - chainName: beta standard: EvmHypCollateral decimals: 6 symbol: TS name: Test addressOrDenom: "0x56D13Eb21a625EdA8438F55DF2C31dC3632034f5" collateralAddressOrDenom: "0x9BcC604D4381C5b0Ad12Ff3Bf32bEdE063416BC7" connections: - token: ethereum|gamma|0xA7c59f010700930003b33aB25a7a0679C860f29c - chainName: gamma standard: EvmHypCollateralFiat decimals: 6 symbol: TS name: Test addressOrDenom: "0xA7c59f010700930003b33aB25a7a0679C860f29c" collateralAddressOrDenom: "0xD5ac451B0c50B9476107823Af206eD814a2e2580" connections: - token: ethereum|beta|0x56D13Eb21a625EdA8438F55DF2C31dC3632034f5 # chains.yaml beta: displayName: Beta chainId: 7097927 domainId: 7097927 protocol: ethereum name: beta isTestnet: true rpcUrls: - http: https://beta-op.rpc.caldera.xyz/http nativeToken: symbol: ETH name: Ether decimals: 18 gamma: blockExplorers: - apiUrl: https://explorer-gamma-2bgo7wnh9d.t.conduit.xyz family: blockscout name: gamma explorer url: https://explorer-gamma-2bgo7wnh9d.t.conduit.xyz chainId: 69995 displayName: Gamma domainId: 69995 isTestnet: true name: gamma nativeToken: decimals: 18 name: Ether symbol: ETH protocol: ethereum rpcUrls: - http: https://rpc-gamma-2bgo7wnh9d.t.conduit.xyz ``` 7. Start up UIpull/4327/head
parent
beab39c43c
commit
19ea053845
@ -0,0 +1,5 @@ |
||||
--- |
||||
'@hyperlane-xyz/sdk': minor |
||||
--- |
||||
|
||||
Adds CollateralFiat to token mapping which will output the correct standard to the warp deploy artifact. |
Loading…
Reference in new issue