NFT raffles via Chainlink VRF.
Waffle is a simple primitive for NFT raffles inspired by Jon Itzler.
Additionally:
Edit the necessary RPC endpoints and private keys in hardhat.config.js
. It is recommended to run the test suite against Chainlink's Kovan or Rinkeby deployments, to remove the need to simulate Chainlink VRF responses.
# Install dependencies
npm install
# Run tests
npx hardhat test
Waffle.sol
contractWaffleFactory.sol
contractWaffle.sol
is a full-fledged raffle system that enables the deposit, withdrawal, and post-raffle disbursement of an ERC721
NFT. Randomness during winner selection is guaranteed through the use of a Chainlink VRF oracle.
WaffleFactory.sol
is the factory deployed for child Waffle.sol
instances. It simplifies the deployment of a raffle and ensures that deployers pre-fund Waffle.sol
instances with the LINK
necessary to retrieve a random result from the Chainlink oracle.
transfer
calls when deleting a raffle.Freepik for the icon.