This Scaffold-ETH 2 extension comes pre-configured with RANDOMNESS generator contract and frontend to interact with it
npx create-eth@latest -e bhavyagor12/randomness-extension
This extension supports both foundry
and hardhat
so choose any.
- For Foundry (add this to the package.json)
- Copy the
script/DeployRandomness.s.sol
andscript/Deploy.s.sol
to your project
Ethereum PoS introduces randomness using block.difficulty
- @bhavyagor12 | bhavyagor.eth