feat(infra): Support warp config in infra from non-evm routes (#4291)
### Description - Add in code warp configs for non-evm chains ### Testing Manualpull/4303/head
parent
72aa438e27
commit
19f7d4fd90
@ -0,0 +1,5 @@ |
||||
--- |
||||
'@hyperlane-xyz/sdk': minor |
||||
--- |
||||
|
||||
Supprt passing foreignDeployments to HypERC20App constructor |
@ -1 +1 @@ |
||||
4c4fadfba88b5ad1c310941eb282ae1fc07aa939 |
||||
29f4901c1d1a63944b0f5f2ee50f499568260004 |
||||
|
@ -0,0 +1,34 @@ |
||||
import { |
||||
ChainMap, |
||||
RouterConfig, |
||||
TokenRouterConfig, |
||||
TokenType, |
||||
} from '@hyperlane-xyz/sdk'; |
||||
|
||||
export const getArbitrumNeutronEclipWarpConfig = async ( |
||||
routerConfig: ChainMap<RouterConfig>, |
||||
): Promise<ChainMap<TokenRouterConfig>> => { |
||||
const neutronRouter = |
||||
'6b04c49fcfd98bc4ea9c05cd5790462a39537c00028333474aebe6ddf20b73a3'; |
||||
|
||||
// @ts-ignore - foreignDeployment configs dont conform to the TokenRouterConfig
|
||||
const neutron: TokenRouterConfig = { |
||||
foreignDeployment: neutronRouter, |
||||
}; |
||||
|
||||
const arbitrum: TokenRouterConfig = { |
||||
...routerConfig.arbitrum, |
||||
type: TokenType.synthetic, |
||||
name: 'Eclipse Fi', |
||||
symbol: 'ECLIP', |
||||
decimals: 6, |
||||
totalSupply: 0, |
||||
gas: 600_000, |
||||
interchainSecurityModule: '0x53a5c239d62ff35c98e0ec9612c86517748fff59', // TODO: we should replace this with an ISM config
|
||||
}; |
||||
|
||||
return { |
||||
neutron, |
||||
arbitrum, |
||||
}; |
||||
}; |
@ -0,0 +1,46 @@ |
||||
import { |
||||
ChainMap, |
||||
IsmType, |
||||
RouterConfig, |
||||
TokenRouterConfig, |
||||
TokenType, |
||||
} from '@hyperlane-xyz/sdk'; |
||||
|
||||
export const getArbitrumNeutronTiaWarpConfig = async ( |
||||
routerConfig: ChainMap<RouterConfig>, |
||||
): Promise<ChainMap<TokenRouterConfig>> => { |
||||
const neutronRouter = |
||||
'910926c4cf95d107237a9cf0b3305fe9c81351ebcba3d218ceb0e4935d92ceac'; |
||||
|
||||
// @ts-ignore - foreignDeployment configs dont conform to the TokenRouterConfig
|
||||
const neutron: TokenRouterConfig = { |
||||
foreignDeployment: neutronRouter, |
||||
}; |
||||
|
||||
const arbitrum: TokenRouterConfig = { |
||||
...routerConfig.arbitrum, |
||||
interchainSecurityModule: { |
||||
type: IsmType.MESSAGE_ID_MULTISIG, |
||||
validators: [ |
||||
'0xa9b8c1f4998f781f958c63cfcd1708d02f004ff0', |
||||
'0xb65438a014fb05fbadcfe35bc6e25d372b6ba460', |
||||
'0xc79503a3e3011535a9c60f6d21f76f59823a38bd', |
||||
'0x42fa752defe92459370a052b6387a87f7de9b80c', |
||||
'0x54b2cca5091b098a1a993dec03c4d1ee9af65999', |
||||
'0x47aa126e05933b95c5eb90b26e6b668d84f4b25a', |
||||
], |
||||
threshold: 4, |
||||
}, |
||||
type: TokenType.synthetic, |
||||
name: 'TIA', |
||||
symbol: 'TIA.n', |
||||
decimals: 6, |
||||
totalSupply: 0, |
||||
gas: 600_000, |
||||
}; |
||||
|
||||
return { |
||||
arbitrum, |
||||
neutron, |
||||
}; |
||||
}; |
@ -0,0 +1,28 @@ |
||||
import { |
||||
ChainMap, |
||||
RouterConfig, |
||||
TokenRouterConfig, |
||||
TokenType, |
||||
} from '@hyperlane-xyz/sdk'; |
||||
|
||||
export const getInevmInjectiveINJWarpConfig = async ( |
||||
routerConfig: ChainMap<RouterConfig>, |
||||
): Promise<ChainMap<TokenRouterConfig>> => { |
||||
const injectiveRouter = 'inj1mv9tjvkaw7x8w8y9vds8pkfq46g2vcfkjehc6k'; |
||||
|
||||
// @ts-ignore - foreignDeployment configs don't conform to the TokenRouterConfig
|
||||
const injective: TokenRouterConfig = { |
||||
type: TokenType.native, |
||||
foreignDeployment: injectiveRouter, |
||||
}; |
||||
|
||||
const inevm: TokenRouterConfig = { |
||||
...routerConfig.inevm, |
||||
type: TokenType.native, |
||||
}; |
||||
|
||||
return { |
||||
injective, |
||||
inevm, |
||||
}; |
||||
}; |
@ -0,0 +1,46 @@ |
||||
import { |
||||
ChainMap, |
||||
IsmType, |
||||
RouterConfig, |
||||
TokenRouterConfig, |
||||
TokenType, |
||||
} from '@hyperlane-xyz/sdk'; |
||||
|
||||
export const getMantapacificNeutronTiaWarpConfig = async ( |
||||
routerConfig: ChainMap<RouterConfig>, |
||||
): Promise<ChainMap<TokenRouterConfig>> => { |
||||
const neutronRouter = |
||||
'0xc5fc6899019cb4a7649981d89eb7b1a0929d0a85b2d41802f3315129ad4b581a'; |
||||
|
||||
// @ts-ignore - foreignDeployment configs don't conform to the TokenRouterConfig
|
||||
const neutron: TokenRouterConfig = { |
||||
foreignDeployment: neutronRouter, |
||||
}; |
||||
|
||||
const mantapacific: TokenRouterConfig = { |
||||
...routerConfig.mantapacific, |
||||
interchainSecurityModule: { |
||||
type: IsmType.MESSAGE_ID_MULTISIG, |
||||
validators: [ |
||||
'0xa9b8c1f4998f781f958c63cfcd1708d02f004ff0', |
||||
'0xb65438a014fb05fbadcfe35bc6e25d372b6ba460', |
||||
'0xc79503a3e3011535a9c60f6d21f76f59823a38bd', |
||||
'0x42fa752defe92459370a052b6387a87f7de9b80c', |
||||
'0x54b2cca5091b098a1a993dec03c4d1ee9af65999', |
||||
'0x47aa126e05933b95c5eb90b26e6b668d84f4b25a', |
||||
], |
||||
threshold: 4, |
||||
}, |
||||
type: TokenType.synthetic, |
||||
name: 'TIA', |
||||
symbol: 'TIA', |
||||
decimals: 6, |
||||
totalSupply: 0, |
||||
gas: 600_000, |
||||
}; |
||||
|
||||
return { |
||||
mantapacific, |
||||
neutron, |
||||
}; |
||||
}; |
Loading…
Reference in new issue