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

chore: register ckb light client #40

Merged
merged 3 commits into from
Dec 22, 2023
Merged
Changes from 1 commit
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
15 changes: 14 additions & 1 deletion migrations/1_deploy_contracts.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ const IBCChannel = artifacts.require("IBCChannelHandshake");
const IBCClient = artifacts.require("IBCClient");
const MockClient = artifacts.require("MockClient");
const MockModule = artifacts.require("MockModule");
const CkbClient = artifacts.require("CkbClient");
const Molecule = artifacts.require("Molecule");
const CkbProof = artifacts.require("CkbProof");
const CkbLightClient = artifacts.require("CkbLightClient");

module.exports = async function (deployer, network) {
console.log("Deploy contracts for network", network);
Expand All @@ -16,11 +20,20 @@ module.exports = async function (deployer, network) {
await deployer.deploy(MockClient);
await deployer.deploy(MockModule);

const molecule = await Molecule.new();
const ckbLightClient = await CkbLightClient.new();
CkbProof.link(molecule);
CkbProof.link(ckbLightClient);
const ckbProof = await CkbProof.new();
CkbClient.link(ckbProof);
await deployer.deploy(CkbClient);

const ibcClient = await IBCClient.deployed();
const ibcPacket = await IBCPacket.deployed();
const ibcConnection = await IBCConnection.deployed();
const ibcChannel = await IBCChannel.deployed();
const mockClient = await MockClient.deployed();
const ckbClient = await CkbClient.deployed();

// 2. deploy IBCMockHandler
let IBCHandler = undefined;
Expand All @@ -46,7 +59,7 @@ module.exports = async function (deployer, network) {
const axonClientType = "07-axon";
await ibcHandler.registerClient(axonClientType, mockClient.address);
const ckbClientType = "07-ckb4ibc";
await ibcHandler.registerClient(ckbClientType, mockClient.address);
await ibcHandler.registerClient(ckbClientType, ckbClient.address);

// 4. register MockTransfer Module
const MockTransfer = artifacts.require("MockTransfer");
Expand Down
Loading