Repository
- Code: github.com/berachain/guides/tree/main/apps/gelato-vrf
- README (raw): raw README
Official documentation
- Gelato VRF — deploy and manage VRF tasks.
Requirements
- Node
v20.0.0or greater, npm or yarn - Wallet with $BERA — bArtio Faucet
- Hardhat
Stack
Solidity, Hardhat, Node.js, Gelato VRF (requester + fulfillment).Quick start
- Clone and install
- Configure
.envfrom.env.example:PRIVATE_KEY,DEDICATED_MSG_SENDER, and laterSC_ADDRESS(your deployed contract). - Deploy
Note the deployed address from
deployments/and setSC_ADDRESSin.env. - Create a Gelato VRF task at app.gelato.network/vrf: choose Berachain bArtio, enter your requester contract address, then launch the VRF instance.
- Request randomness
Monitor execution in the Gelato app.
Key files
| Purpose | Path |
|---|---|
| VRF contract | Contracts in repo (see README) |
| Deploy output | deployments/ |
| Request script | scripts/requestRandomness.ts |