activateChainPath.js 805 B

123456789101112131415
  1. task("activateChainPath", "given a Stargate router, activate chainPaths that owner knows have been created remotely")
  2. .addParam("router", "the stargate router address")
  3. .addParam("poolId", "the local pool id")
  4. .addParam("dstChainId", "dst chain id")
  5. .addParam("dstPoolId", "the pool id on the destination")
  6. .setAction(async (taskArgs) => {
  7. let router = await ethers.getContract("Router")
  8. console.log(`router.address: ${router.address}`)
  9. let tx = await (await router.activateChainPath(taskArgs.poolId, taskArgs.dstChainId, taskArgs.dstPoolId)).wait()
  10. console.log(
  11. `activateChainPath: poolId: ${taskArgs.poolId} dstChainId: ${taskArgs.dstChainId} dstPoolId: ${taskArgs.dstPoolId} | tx.transactionHash:${tx.transactionHash}`
  12. )
  13. })