smartcontractkit / hardhat-starter-kit

A repo for boilerplate code for testing, deploying, and shipping chainlink solidity code.
MIT License
1.21k stars 491 forks source link

Migrated from hardhat-waffle [fixes #112] + fixed RandomNumberConsumer localhost deploy #123

Closed 0xZarko closed 1 year ago

0xZarko commented 2 years ago

Migrated from hardhat-waffle and ethereum-waffle to hardhat-toolbox. Also added hardhat-chai-matchers and hardhat-network-helpers as per recommended on the hardhat migration guide. Upgraded the used packages to their latest stable versions.

Also fixed an issue with the deploy script for RandomNumberConsumer, as it was not adding the RandomNumberConsumer to the VRF Coordinator as a Consumer when deploying to a local testnet with the function addConsumer(subId, contractAddress), which meant testing failed as calling the requestRandomWords function reverted with a "not a consumer" error.

Lastly, formatted all the user files as per the .prettierrc Prettier configuration file using "yarn format". Most of the changes in files are whitespaces, the code changes are in hardhat.config.js and 03_Deploy_RandomNumberConsumer.js.

0xZarko commented 2 years ago

Hey @andrejrakic ! Sorry for the delay, college has been really demanding last week. I implemented your recommended changes!

andrejrakic commented 1 year ago

Hi @0xZarko, can you please merge the main branch into yours, resolve conflicts, run yarn format, and request code review for hopefully the last time? Thank you :)