Hi. I am trying to deploy and lazy mint tokens using the signature checker contract provided by Openzeppelin NFT merkel Airkdrop workshop. The blog is this and this is the github repository. But I still have some confusions on how to use the deploy.js file. Can someone just list down the steps in easy to understand words on how to change the script for my usage because when I used ethers.getSigners() it isnt returning me addresses.
This is the code for my deploy.js
const { ethers } = require("hardhat");
require("@nomiclabs/hardhat-waffle");
async function deploy() {
const Akript721 = await ethers.getContractFactory("ERC721AkriptUpgradeable");
console.log("Deploying your ERC721 smart contract...");
const proxy721 = await upgrades.deployProxy(
Akript721,
["Akript", "AKT", "V1"],
{
initializer: "initialize",
}
);
await proxy721.deployed();
console.log(
"Proxy of Akript deployed to: https://rinkeby.etherscan.io/address/" +
proxy721.address
);
}
async function main() {
const [admin, minter, relayer] = await ethers.getSigners();
console.log(admin);
// const provider = new ethers.providers.InfuraProvider("rinkeby", {
// projectId: "d02f9xxx608",
// projectSecret: "489exxxfc28",
// });
// const adminWallet = new ethers.Wallet(admin, provider);
// const adminAddress = adminWallet.connect(provider);
console.log(`Deploying contracts:`);
// console.log(
// `- admin: ${admin.address} (${ethers.utils.formatEther(
// await admin.getBalance()
// )} ${ethers.constants.EtherSymbol})`
// );
// console.log(
// `- minter: ${minter.address} (${ethers.utils.formatEther(
// await minter.getBalance()
// )} ${ethers.constants.EtherSymbol})`
// );
// console.log(`- relayer: ${relayer.address} (${ethers.utils.formatEther(await relayer.getBalance())} $
//{ethers.constants.EtherSymbol})`);
const registry = (
await deploy("ERC721AkriptUpgradeable", "Akript", "AKT", "1")
).connect(admin);
await registry.grantRole(await registry.MINTER_ROLE(), minter.address);
console.log({ registry: registry.address });
}
main()
.then(() => process.exit(0))
.catch((error) => {
console.error(error);
process.exit(1);
});