light-pay/smart-contracts/deploy/deploy-payment.js
2024-09-04 00:43:18 +03:00

18 lines
582 B
JavaScript

// smart-contracts/scripts/deploy-payment.js
const CryptoPayment = artifacts.require("CryptoPayment");
module.exports = async function (deployer, network, accounts) {
try {
// Deploy the CryptoPayment contract
await deployer.deploy(CryptoPayment);
// Retrieve the deployed contract instance
const cryptoPayment = await CryptoPayment.deployed();
console.log(`CryptoPayment contract deployed at address: ${cryptoPayment.address}`);
} catch (error) {
console.error("Error deploying CryptoPayment contract:", error);
}
};