
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 05-hardhat-smartcontract-lottery
- 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 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,
}
- Write a provably fair raffle system using RNG with Chainlink VRF & Chainlink Keepers
- Using & testing Solidity Events
- Using
evm_increaseTime
&evm_mine
with Hardhat, special methods - More in depth staging tests