Everything related to my progress through this course from Patrick Collins
Go to the video »
To get a local copy up and running follow these simple example steps.
You will need to install either npm or yarn to run the commands, and git to clone the repository.
- Clone the whole repo:
git clone https://github.com/0xpolarzero/full-blockchain-solidity-course-js.git
- Navigate into the subdirectory:
cd 03-hardhat-fund-me
- Install NPM packages using
yarn
ornpm install
. - Create a
.env
file at the root of the project, and populate it with the following variables:GOERLI_RPC_URL = goerli_rpc_from_provider PRIVATE_KEY = your_wallet_private_key ETHERSCAN_API_KEY = your_etherscan_api_key COINMARKETCAP_API_KEY = your_coinmarketcap_api_key
Deploy:
yarn hardhat deploy
You can specify the network to deploy to with the --network
flag, e.g. yarn hardhat deploy --network goerli
. You can use polygon
, goerli
, hardhat
, localhost
. The latter will require you to run a local node first with the following command.
Run a local node:
yarn hardhat node
Run tests:
yarn hardhat test
Report coverage:
yarn hardhat coverage
To get the gas usage report included or not, change enabled
to true
or false
in the hardhat.config.js file.
gasReporter: {
enabled: true,
}
- Deploying multiple/selected contracts with Hardhat
- Mocking a Chainlink price feed for testing
- Unit & Staging tests
- Interacting with storage in Solidity
- Gas optimization, using storage, immutable & constant variables