# 【Solidity】环境搭建(nodejs,hardhat) **Published by:** [allen zhang](https://paragraph.com/@cfwan/) **Published on:** 2022-10-31 **URL:** https://paragraph.com/@cfwan/solidity-nodejs-hardhat ## Content 1.安装Node.js 版本:v16.17.02.安装hardhatnpm install --save-dev hardhat3.创建项目npm init --yes npx hardhat 选择Create an empty hardhat.config.js然后回车4.安装插件npm install --save-dev @nomiclabs/hardhat-ethers ethers @nomiclabs/hardhat-waffle ethereum-waffle chai5.编译合约&部署合约npx hardhat compile npx hardhat run RND/deployToken.js --network goerli6.合约验证truffle migrate --network goerli truffle run verify RND@0x186E35F0d1BfD5B2FA2b4B5C5dd5d28DFCc7b13B --network goerli --debug https://www.npmjs.com/package/truffle-plugin-verify https://github.com/rkalis/truffle-plugin-verify 参考链接: https://medium.com/my-blockchain-development-daily-journey/%E5%AE%8C%E6%95%B4%E7%9A%84hardhat%E5%AF%A6%E8%B8%90%E6%95%99%E7%A8%8B-a9b005aa4c12 https://learnblockchain.cn/article/1356 https://mirror.xyz/hackbot.eth/plbO7co90A6JhKSRSMsstrcP-X8CpfnaRs7k3HI3loY https://github.com/GGCCCC/airdrop_multi_claim https://mirror.xyz/0x3dbb624861C0f62BdE573a33640ca016E4c65Ff7/VoBIa7fC_lNLw6TPutj16KztvnQffDdBOv_A1Z2AxUw ## Publication Information - [allen zhang](https://paragraph.com/@cfwan/): Publication homepage - [All Posts](https://paragraph.com/@cfwan/): More posts from this publication - [RSS Feed](https://api.paragraph.com/blogs/rss/@cfwan): Subscribe to updates - [Twitter](https://twitter.com/allen4187): Follow on Twitter