Oracle details
Chain | Address |
---|---|
Testnet | 0xad19b5b3a0bf2bacf028ed6cc9e3fc153cb405b6 |
Oracle configuration
The oracle uses drand randomness from quicknet to provide randomness on CrossFi.How to access data
To consume randomness data, you’ll need to invoke thegetLastRound
method on the oracle contract. It will return the round ID of the latest update.
Using this round ID, you can call getRandomValue
and will receive a return value of that randomness, the round ID and the BLS signature from the drand API.
Note that round IDs are used round-robin and will repeat after 1000 iterations.
Refer to the Solidity guide for detailed steps on fetching random values from the oracle in your contract. You can learn more about the randomness protocol here.