使用 Polygon MUMBAI 测试网在 Hardhat 中部署 ERC721 合约,但没有任何反应

问题描述 投票:0回答:1

我正在使用 Hardhat 在孟买的测试网络中部署 ERC721 合约,一切看起来都很好,但是当输入: npx hardhat run script/deploy.js --network mumbai 时,没有任何反应。

还有吗?

救命!

LM

enter image description here

我想在孟买多边形的测试网部署合约

polygon contract
1个回答
0
投票

部署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 帐户日志中应该有活动。但是终端中并没有出现部署的代码,为什么呢?这种事只发生在孟买吗?感谢您的帮助。

Alchemy

Alchemy

© www.soinside.com 2019 - 2024. All rights reserved.