npm init --yes
npm install --save-dev hardhat
npm install --save-dev @nomiclabs/hardhat-ethers ethers @nomiclabs/hardhat-waffle ethereum-waffle chai @nomiclabs/hardhat-etherscan @openzeppelin/hardhat-upgrades
Get the APIkey address under ethScan or bscScan personal information
cp hardhat.config.js.example hardhat.config.js
// modify hardhat.config.js
const INFURA_PROJECT_ID = "00e8...2b41";
const ROPSTEN_PRIVATE_KEY = "07f1c38b7318fc6bd5e958...e3";
apiKey: "EQF6AY17HK1574GNC...", // eth
npx hardhat compile
npx hardhat run scripts/deploy.js --network testnet
npx hardhat verify --network testnet 0x6064a2D77ceb06369F2A001d1AE9184ee83B46B3 --contract contracts/SimpleToken.sol:SimpleToken --constructor-args arguments.js --show-stack-traces
tree -I '*artifacts|*node_module*|cache'
.
├── Readme.md
├── arguments.js
├── contracts
│ └── SimpleToken.sol
├── hardhat.config.js
├── package-lock.json
├── package.json
├── scripts
│ └── deploy.js
└── test