SimpleVrf Contract ABI
The SimpleVrf contract is a Fuel smart contract that provides an interface for generating and verifying random numbers using Verifiable Random Functions (VRF). It allows users to request randomness, submit proofs, and manage authorities and fees.
Here is the ABI for the SimpleVrf contract:
The SimpleVrf Fuel contract exposes the following key methods:
Request Management
request(seed)
– Create a new randomness requestget_request(seed)
– Get details of a requestget_request_count()
– Get the total number of requestsget_unfinalized_requests()
– List all pending requests
Proof Submission
submit_proof(seed, proof)
– Submit a VRF proof for a request
Authority Management
add_authority(address)
– Add a new authorityremove_authority(address)
– Remove an authorityget_authorities()
– List all authorities
Fee Management
get_fee(asset)
– Get the fee for a given assetset_fee(asset, amount)
– Set the fee for a given asset
Callback
simplevrf_callback(seed, proof)
– Called by the contract when randomness is fulfilled
See Example Integration for usage in your own contracts.