diff --git a/blockchain_integration/pi_network/pi-network-layer2-scaling/scripts/deploy_state_channel.js b/blockchain_integration/pi_network/pi-network-layer2-scaling/scripts/deploy_state_channel.js new file mode 100644 index 000000000..6d20ca074 --- /dev/null +++ b/blockchain_integration/pi_network/pi-network-layer2-scaling/scripts/deploy_state_channel.js @@ -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); + });