Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use Endpoint ID instead of Chain ID #37

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
4 changes: 2 additions & 2 deletions tasks/bridge.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
const CHAIN_IDS = require("../constants/chainIds.json")
const ENDPOINT_IDS = require("../constants/endpointIds.json")
const NATIVE_OFT_ARGS = require("../constants/nativeOftArgs.json")

module.exports = async function (taskArgs, hre) {
const signers = await ethers.getSigners()
const owner = signers[0]
const dstChainId = CHAIN_IDS[taskArgs.targetNetwork]
const dstChainId = ENDPOINT_IDS[taskArgs.targetNetwork]
const amount = ethers.utils.parseEther(taskArgs.amount)
const nativeOft = await ethers.getContract(NATIVE_OFT_ARGS[hre.network.name].contractName)
const bridge = await ethers.getContract("SwappableBridge")
Expand Down
4 changes: 2 additions & 2 deletions tasks/setTrustedRemote.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const CHAIN_IDS = require("../constants/chainIds.json")
const ENDPOINT_IDS = require("../constants/endpointIds.json")
const { getDeploymentAddresses } = require("../utils/readStatic")
const OFT_ARGS = require("../constants/oftArgs.json")
const NATIVE_OFT_ARGS = require("../constants/nativeOftArgs.json")
Expand All @@ -7,7 +7,7 @@ module.exports = async function (taskArgs, hre) {
const localChain = hre.network.name;
const remoteChain = taskArgs.targetNetwork;

const remoteChainId = CHAIN_IDS[remoteChain]
const remoteChainId = ENDPOINT_IDS[remoteChain]

const remoteOft = getDeploymentAddresses(remoteChain)[OFT_ARGS[remoteChain].contractName]
const remoteNativeOft = getDeploymentAddresses(remoteChain)[NATIVE_OFT_ARGS[remoteChain].contractName]
Expand Down
4 changes: 2 additions & 2 deletions tasks/swapAndBridge.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
const CHAIN_IDS = require("../constants/chainIds.json")
const ENDPOINT_IDS = require("../constants/endpointIds.json")
const OFT_ARGS = require("../constants/oftArgs.json")

module.exports = async function (taskArgs, hre) {
const signers = await ethers.getSigners()
const owner = signers[0]
const dstChainId = CHAIN_IDS[taskArgs.targetNetwork]
const dstChainId = ENDPOINT_IDS[taskArgs.targetNetwork]
const amount = ethers.utils.parseEther(taskArgs.amount)
const oft = await ethers.getContract(OFT_ARGS[hre.network.name].contractName)
const bridge = await ethers.getContract("SwappableBridge")
Expand Down