Skip to content

Commit

Permalink
feat: Add destination gas configuration for warp route deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
mshojaei-txfusion committed Jan 31, 2025
1 parent 3acf0d9 commit 4f22f6d
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion typescript/cli/src/deploy/warp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -708,16 +708,29 @@ async function updateExistingWarpRoute(
.getRemoteChains(chain)
.filter((c) => Object.keys(deployedRoutersAddresses).includes(c));

// Set remote routers and destination gas
config.remoteRouters = otherChains.reduce<RemoteRouters>(
(remoteRouters, otherChain) => {
remoteRouters[multiProvider.getDomainId(otherChain)] = {
const domainId = multiProvider.getDomainId(otherChain);
remoteRouters[domainId] = {
address: deployedRoutersAddresses[otherChain],
};
return remoteRouters;
},
{},
);

// Set destination gas for each remote chain
config.destinationGas = otherChains.reduce<Record<string, string>>(
(destinationGas, otherChain) => {
const domainId = multiProvider.getDomainId(otherChain);
const otherConfig = warpDeployConfig[otherChain];
destinationGas[domainId] = (otherConfig.gas || 0).toString();
return destinationGas;
},
{},
);

transactions.push(...(await evmERC20WarpModule.update(config)));
});
}),
Expand Down

0 comments on commit 4f22f6d

Please sign in to comment.