@ -108,14 +108,68 @@ describe('WarpApply e2e tests', async function () {
type : TokenType . native ,
} ;
await extendWarpConfig (
await extendWarpConfig ( {
chain : CHAIN_NAME_2 ,
chainToExtend : CHAIN_NAME_3 ,
extendedConfig : config ,
warpCorePath : WARP_CORE_CONFIG_PATH_2 ,
warpDeployPath : warpConfigPath ,
} ) ;
const COMBINED_WARP_CORE_CONFIG_PATH = ` ${ REGISTRY_PATH } /deployments/warp_routes/ETH/anvil2-anvil3-config.yaml ` ;
// Check that chain2 is enrolled in chain1
const updatedWarpDeployConfig1 = await readWarpConfig (
CHAIN_NAME_2 ,
COMBINED_WARP_CORE_CONFIG_PATH ,
warpConfigPath ,
) ;
const chain2Id = await getChainId ( CHAIN_NAME_3 , ANVIL_KEY ) ;
const remoteRouterKeys1 = Object . keys (
updatedWarpDeployConfig1 [ CHAIN_NAME_2 ] . remoteRouters ! ,
) ;
expect ( remoteRouterKeys1 ) . to . include ( chain2Id ) ;
// Check that chain1 is enrolled in chain2
const updatedWarpDeployConfig2 = await readWarpConfig (
CHAIN_NAME_3 ,
config ,
WARP_CORE_CONFIG_PATH_2 ,
COMBINED_WARP_CORE_CONFIG_PATH ,
warpConfigPath ,
) ;
const chain1Id = await getChainId ( CHAIN_NAME_2 , ANVIL_KEY ) ;
const remoteRouterKeys2 = Object . keys (
updatedWarpDeployConfig2 [ CHAIN_NAME_3 ] . remoteRouters ! ,
) ;
expect ( remoteRouterKeys2 ) . to . include ( chain1Id ) ;
} ) ;
it ( 'should extend an existing warp route with json strategy' , async ( ) = > {
// Read existing config into a file
const warpConfigPath = ` ${ TEMP_PATH } /warp-route-deployment-2.yaml ` ;
await readWarpConfig ( CHAIN_NAME_2 , WARP_CORE_CONFIG_PATH_2 , warpConfigPath ) ;
// Extend with new config
const config : TokenRouterConfig = {
decimals : 18 ,
mailbox : chain2Addresses ! . mailbox ,
name : 'Ether' ,
owner : new Wallet ( ANVIL_KEY ) . address ,
symbol : 'ETH' ,
totalSupply : 0 ,
type : TokenType . native ,
} ;
await extendWarpConfig ( {
chain : CHAIN_NAME_2 ,
chainToExtend : CHAIN_NAME_3 ,
extendedConfig : config ,
warpCorePath : WARP_CORE_CONFIG_PATH_2 ,
warpDeployPath : warpConfigPath ,
strategyUrl : ` ${ EXAMPLES_PATH } /submit/strategy/json-rpc-chain-strategy.yaml ` ,
} ) ;
const COMBINED_WARP_CORE_CONFIG_PATH = ` ${ REGISTRY_PATH } /deployments/warp_routes/ETH/anvil2-anvil3-config.yaml ` ;
// Check that chain2 is enrolled in chain1