Smart Contracts
Smart Contracts
SimpleVrf's core logic is implemented as a Fuel smart contract. It manages randomness requests, authorities, fees, and proof verification.
Main Components
- SimpleVrf Contract: Handles requests, proof submission, authority management, and callbacks
- ABI: Interface for interacting with the contract from off-chain tools
- Example Contract: Shows how to integrate SimpleVrf into your own Fuel contracts
Request Flow
- User or contract calls
request(seed)
on the SimpleVrf contract - The request is stored and awaits fulfillment
- Worker submits a VRF proof via
submit_proof(seed, proof)
- Contract verifies the proof and triggers the callback