Contracts for Degen Domain Name Service
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
degen-contracts/scripts/temp/deployFactoryOnly.js

36 lines
1.2 KiB

// Use if the Forbidden contract was deployed, but factory was not
// npx hardhat run scripts/temp/deployFactoryOnly.js --network localhost
const contractNameFactory = "DegenTLDFactory";
const forbAddress = "<enter-forbidden-address>";
async function main() {
const [deployer] = await ethers.getSigners();
console.log("Deploying contracts with the account:", deployer.address);
console.log("Account balance:", (await deployer.getBalance()).toString());
// deploy contract1
const contractFactory = await ethers.getContractFactory(contractNameFactory);
console.log("ForbiddenTlds contract address:", forbAddress);
const tldPrice = ethers.utils.parseUnits("10", "ether");
const instanceFactory = await contractFactory.deploy(tldPrice, forbAddress);
console.log("Factory contract address:", instanceFactory.address);
console.log("Wait a minute and then run this command to verify contracts on Etherscan:");
console.log("npx hardhat verify --network " + network.name + " " + instanceFactory.address + ' "' + tldPrice + '" ' + forbAddress);
}
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
main()
.then(() => process.exit(0))
.catch((error) => {
console.error(error);
process.exit(1);
});