Our great sponsors
-
Chainlink-VRF-Demo
This repo contains code for the blog (published on dev.to) which demonstrates how to use Chainlink VRF v2 to request a random number and use it to mint an NFT along with listing it on Opensea.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
This article will be a follow-up on the previous article in the series but can also be read independently. It assumes basic knowledge of solidity smart contract development and familiarity with Chai testing framework. The code has been open-sourced at this GitHub repo. It’s a Hardhat Project. You do not need to have familiarity with Hardhat as Chai works with Truffle as well and we will be focusing on only one hardhat command – npx hardhat test.
Before I end this one, I would like to recommend that you check out the contracts VRFCoordinatorV2Interface.sol and VRFCoordinatorV2Mock.sol. You can use VRFCoordinatorV2Interface.sol to implement your own custom Mock Contract or even your own VRF. VRFCoordinatorV2Mock.sol is the Mock contract we used in this tutorial. At the time of writing this is under heavy development and some functions are yet to be completely implemented. But it can still be used to test out functionalities like we did here.