我的“部署”合约仍然不会出现在 Etherscan 上。大约1.5小时

发布于 2025-01-15 03:56:31 字数 1859 浏览 6 评论 0原文

需要帮助弄清楚为什么我所谓的“部署”合约仍然不会出现在 Etherscan 中。

概述:

  • 我使用带有以下代码的安全帽并得到确认:

    $ npx 安全帽运行脚本/deployRoboPunksNFT.js --network rinkeby RoboPunksNFT 部署到:0xaBDe0c1A9F7589f21818287287885a2Fef32E3f0

  • 显然,它确认已完全部署,但当我在 Etherscan (Rinkeby) 检查此合约地址时...什么也没有:https://rinkeby.etherscan.io/address/0xaBDe0c1A9F7589f21818287287885a2Fef32E3f0

  • 使用的部署脚本:

const hre = require("hardhat");

async function main() {
  const RoboPunksNFT = await hre.ethers.getContractFactory("RoboPunksNFT");
  const roboPunksNFT = await RoboPunksNFT.deploy();
  await roboPunksNFT.deployed();
  console.log("RoboPunksNFT deployed to:", roboPunksNFT.address);
}

main()
  .then(() => process.exit(0))
  .catch((error) => {
    console.error(error);
    process.exit(1);
  });
  • 我的hardhat.config.js
require("@nomiclabs/hardhat-waffle");
const dotenv = require("dotenv");
require("@nomiclabs/hardhat-etherscan");

dotenv.config();

task("accounts", "Prints the list of accounts", async (taskArgs, hre) => {
  const accounts = await hre.ethers.getSigners();

  for (const account of accounts) {
    console.log(account.address);
  }
});

/**
 * @type import('hardhat/config').HardhatUserConfig
 */
module.exports = {
  solidity: "0.8.4",
  networks: {
        rinkeby: {
            url: process.env.REACT_APP_RINKEBY_RPC_URL,
            accounts: [process.env.REACT_APP_PRIVATE_KEY]
        },
    },
    etherscan: {
        apiKey: process.env.REACT_APP_ETHERSCAN_KEY,
    }
};

我非常沮丧,所以我再次部署了它(上面的代码是第二次尝试/第二次部署的合同。第一个部署的合同地址位于0x9F6040234728493121BCB9A1EaFDBa5E494bB3ed。

如果有人看到我的东西,请告诉我希望我在这里提交了足够的信息来确定...... 非常感谢!

need help figuring out why my supposedly 'deployed' contract will still not appear in Etherscan.

Overview:

  • I used hardhat with following code and got back confirmation:

    $ npx hardhat run scripts/deployRoboPunksNFT.js --network rinkeby
    RoboPunksNFT deployed to: 0xaBDe0c1A9F7589f21818287287885a2Fef32E3f0

  • Clearly, it confirms as fully deployed but when I check this contract address at Etherscan (Rinkeby)...nothing: https://rinkeby.etherscan.io/address/0xaBDe0c1A9F7589f21818287287885a2Fef32E3f0

  • The deployment script used:

const hre = require("hardhat");

async function main() {
  const RoboPunksNFT = await hre.ethers.getContractFactory("RoboPunksNFT");
  const roboPunksNFT = await RoboPunksNFT.deploy();
  await roboPunksNFT.deployed();
  console.log("RoboPunksNFT deployed to:", roboPunksNFT.address);
}

main()
  .then(() => process.exit(0))
  .catch((error) => {
    console.error(error);
    process.exit(1);
  });
  • My hardhat.config.js
require("@nomiclabs/hardhat-waffle");
const dotenv = require("dotenv");
require("@nomiclabs/hardhat-etherscan");

dotenv.config();

task("accounts", "Prints the list of accounts", async (taskArgs, hre) => {
  const accounts = await hre.ethers.getSigners();

  for (const account of accounts) {
    console.log(account.address);
  }
});

/**
 * @type import('hardhat/config').HardhatUserConfig
 */
module.exports = {
  solidity: "0.8.4",
  networks: {
        rinkeby: {
            url: process.env.REACT_APP_RINKEBY_RPC_URL,
            accounts: [process.env.REACT_APP_PRIVATE_KEY]
        },
    },
    etherscan: {
        apiKey: process.env.REACT_APP_ETHERSCAN_KEY,
    }
};

I got so frustrated that I deployed it again (Code above is 2nd attempt/2nd deployed contract. The first deployed contract address was at 0x9F6040234728493121BCB9A1EaFDBa5E494bB3ed.

Please let me know if anyone sees something that I missed. Hopefully there's enuf info I've submitted here to determine...
Thanks very much!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

小梨窩很甜 2025-01-22 03:56:31

问题解决了。 Rinkeby 恰好宕机了整整 6 个小时。但一旦恢复,Rinkeby 上就有 2 个新部署的合约准备就绪......

Problem solved. Rinkeby happened to be down for 6 whole hours. But once it came back up, had 2 freshly deployed contracts on Rinkeby ready to go...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文