Home Blockchain Solidity Ignitiondeploy部署ethcontract地址的产生
Post
Cancel

Blockchain Solidity Ignitiondeploy部署ethcontract地址的产生

refer to:
https://hardhat.org/ignition/docs/guides/modifications

首次部署贼简单 不过我失败了。准备使用foundry

第二次部署(修改了contract之后)

const { buildModule } = require("@nomicfoundation/hardhat-ignition/modules");

module.exports = buildModule("Apollo", (m) => {
  const apollo = m.contract("Rocket", ["Saturn V"]);

  m.call(apollo, "launch", []);

  const artemis = m.contract("Rocket", ["Artemis 2"], { id: "artemis" });

  m.call(artemis, "launch", []);

  return { apollo, artemis };
});

撤销上一次部署:

npx hardhat ignition wipe SayHi2Module SayHi2_FutureId

This post is licensed under CC BY 4.0 by the author.