Oracle details
Chain | Address |
---|---|
Alephium Mainnet | v1v4cBXP9L7M9ryZZCx7tuXuNb9pnDLGb3JJkPBpbR1Z |
Alephium Testnet | 217k7FMPgahEQWCfSA1BN5TaxPsFovjPagpujkyxKDvS3 |
Oracle configuration
The oracle uses drand randomness from the quicknet mainnet to provide randomness on Alephium.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.
Below is the DIARandomOracle
contract implementation in Ralph: