我正在使用 Hardhat 在孟买的测试网络中部署 ERC721 合约,一切看起来都很好,但是当输入: npx hardhat run script/deploy.js --network mumbai 时,没有任何反应。
还有吗?
救命!
LM
我想在孟买多边形的测试网部署合约
部署PunkFacesNFT.js 代码硬体:
const hre = require("hardhat");
async function main() {
// Replace '0xYourAddress' with the desired initial owner address
const initialOwner = '0x16b3F4959cef38625e64De5FD5etc...';
const PunkFacesNFT = await hre.ethers.getContractFactory("PunkFacesNFT");
const punkFacesNFT = await PunkFacesNFT.deploy(initialOwner); // Pass the initialOwner argument here
console.log("PunkFacesNFT deployed to:", punkFacesNFT.address);
// We recommend this pattern to be able to use async/await everywhere
// and properly handle errors.
main().catch((error) => {
console.error(error);
process.exitCode = 1;
});
}
最终答案:
luismora@MacBook-Pro full-mint-website % npx hardhat run scripts/deployPunkFacesNFT.js --network polygonMumbai
luismora@MacBook-Pro full-mint-website % npx hardhat run scripts/deployPunkFacesNFT.js --network mumbai
luismora@MacBook-Pro full-mint-website %
* History restored
luismora@MacBook-Pro 完整网站 %
注意:我的 Alchemy 帐户日志中应该有活动。但是终端中并没有出现部署的代码,为什么呢?这种事只发生在孟买吗?感谢您的帮助。