yarn hardhat
const { ethers } = require("hardhat"); async function main() { const contractFactory = await ethers.getContractFactory("SimpleStorage"); const contract = await contractFactory.deploy(); console.log(contract.address); await contract.deployed(); } main() .then(() => { process.exit(0); }) .catch((error) => { console.error(error); process.exit(1); });
本文作者:前端小毛
本文链接:
版权声明:本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!