This project demonstrates a basic Hardhat use case. It comes with a sample contract, a test for that contract, a sample script that deploys that contract, and an example of a task implementation, which simply lists the available accounts.
Try running some of the following tasks:
npx hardhat accounts
npx hardhat compile
npx hardhat clean
npx hardhat test
npx hardhat node
node scripts/sample-script.js
npx hardhat help
Steps:
cd hardhat_ts
mkdir hardhat_ts
cd hardhat_ts/
npm install --save-dev ts-node typescript
npm install --save-dev chai @types/node @types/mocha @types/chai
ls -ltr
npx hardhat
mv hardhat.config.js hardhat.config.ts
npm install --save-dev ts-node typescript
npm install --save-dev chai @types/node @types/mocha @types/chai
vi hardhat.config.ts
cp hardhat.config.ts hardhat.config.ts_bkp
vi hardhat.config.ts
touch tsconfig.json
vi tsconfig.json
ls -ltr
ls -la scripts/
vi scripts/
cd scripts/
ls -ltr
cd ..
cd contracts/
ls -la
cd ..
npx hardhat compile
npx hardhat accounts
npx hardhat
npm install --save-dev hardhat
npx hardhat accounts
ls -ltr
npm install --save-dev @nomiclabs/hardhat-ethers 'ethers@^5.0.0'
npx hardhat compile
npm install --save-dev ethereum-waffle
npx hardhat compile
npm install --save-dev @nomiclabs/hardhat-waffle
npx hardhat compile
npx hardhat run scripts/sample-acc.ts