A sample code for studying Solidity. This sample code is made from the following hardhat + typescript template. https://github.com/amanusk/hardhat-template
To check nodejs version.
node -v
To check npm version.
npm -v
Run following command to install packages
npm install
Create secret.json
touch secret.json
Edit secret.json like below.
{
"providers": {
"infuraKey": " {YOUR INFURAKEY} ",
"etherscanKey": " {YOUR ETHERSCANKEY} "
},
"mnemonic": " {YOUR MNEMONIC} "
}
You can see hardhat options if they can be used.
npx hardhat
Run following command to compile smart contracts.
npx hardhat compile
Run following command to export type.
npx hardhat typechain
Run following command to execute tests.
npx hardhat test
npx hardhat run --network rinkeby ./scripts/deploy.ts
npx hardhat run --network rinkeby ./scripts/deploy-artwork.ts
Change the address to an actual deployed address.
npx hardhat verify --network rinkeby 0x509261ead018B9F86E7cbC39762eE44dF3d4C6A1
npx hardhat verify --network rinkeby 0x0CdD3298851fA01e555596A5d67E432D125ddE60 "Artwork Contract" "ART"