Skip to content

Commit

Permalink
update create-channel scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
tmsdkeys committed Feb 15, 2024
1 parent a099ce8 commit b3d094a
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions scripts/create-channel.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,27 @@ async function main() {
const connHop2 = ibcConfig[chanConfig.dstChain].canonConnTo;
const srcPortId = addressToPortId(`polyibc.${chanConfig.srcChain}`, chanConfig.srcAddr);
const dstPortId = addressToPortId(`polyibc.${chanConfig.dstChain}`, chanConfig.dstAddr);

const local = {
portId: srcPortId,
channelId: hre.ethers.encodeBytes32String(''),
version: '',
};

const cp = {
portId: dstPortId,
channelId: hre.ethers.encodeBytes32String(''),
version: '',
};

// Create the channel
// Note: The proofHeight and proof are dummy values and will be dropped in the future
const tx = await ibcAppSrc.createChannel(
chanConfig.version,
local,
chanConfig.ordering,
chanConfig.fees,
[ connHop1, connHop2 ],
{
portId: dstPortId,
channelId: hre.ethers.encodeBytes32String(''),
version: '',
},
cp,
{
proofHeight: { revision_height: 0, revision_number: 0 },
proof: hre.ethers.encodeBytes32String('abc')
Expand Down

0 comments on commit b3d094a

Please sign in to comment.