Skip to content

Commit

Permalink
Create deploy_state_channel.js
Browse files Browse the repository at this point in the history
  • Loading branch information
KOSASIH authored Oct 20, 2024
1 parent c8b86a8 commit 1b34e50
Showing 1 changed file with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// deploy_state_channel.js
const { ethers } = require("hardhat");

async function main() {
// Deploy ChannelManager
const ChannelManager = await ethers.getContractFactory("ChannelManager");
const channelManager = await ChannelManager.deploy();
await channelManager.deployed();
console.log("ChannelManager deployed to:", channelManager.address);

// Deploy ChannelValidator
const ChannelValidator = await ethers.getContractFactory("ChannelValidator");
const channelValidator = await ChannelValidator.deploy();
await channelValidator.deployed();
console.log("ChannelValidator deployed to:", channelValidator.address);
}

// Execute the deployment script
main()
.then(() => process.exit(0))
.catch((error) => {
console.error(error);
process.exit(1);
});

0 comments on commit 1b34e50

Please sign in to comment.