Change directory to packages/contracts and execute:
yarn node:runThis will start a Hardhat node, deploy the contracts and place initial bids using the first twenty auto-generated accounts.
A number of custom Hardhat tasks were defined to aid testing.
yarn node:increase-time [--value <INT>]- increase block time by value seconds, defaults to six houryarn node:accounts- print a list of available accounts
yarn hardhat:bid --account <STRING> --amount <STRING>- using account place bid of amount ETHyarn hardhat:bid-random --amount <INT> [--account <INT>]- using randomly generated accounts place amount of bids using funds from account with index account (defaults to0)yarn hardhat:settle-auction- settle auctionyarn hardhat:settle-raffle- settle raffle using random numbersyarn hardhat:settle- increase time, settle auction and raffle
yarn rinkeby:generate-dotenv [--path <STRING>] [--count <INT>]- generate .env file needed for other tasks, path - output path, count - number of private keys to generateyarn rinkeby:transfer-ether- transfer ether fromDEPLOYERtoPRIVATE_KEYSaccountsyarn rinkeby:init-bids- place initial bids usingPRIVATE_KEYSaccounts
yarn ethereum:generate-random-numbers --blocks <ARRAY> --secret <STRING>- generate random numbers for raffle settlement, blocks - array of block numbers from which extract block hash (e.g. "[1234, 5678]"), secret - secret number represented as 32 bytes hex string