Random Number
Last updated
Last updated
Generating true random numbers in a blockchain environment is challenging due to the transparent and deterministic nature of blockchain systems. Nodes must reach consensus on the state of the blockchain, making it difficult to generate numbers that are unpredictable and tamper-proof.
Random numbers are crucial in blockchain technology for various applications, including secure cryptographic functions, gaming, lottery systems, and random token distribution.
Our Oracle supports the generation of random numbers by leveraging data from random.org, a renowned organization dedicated to providing true random numbers. These numbers are rigorously tested to meet the standards recommended by the US National Institute of Standards and Technology (NIST), ensuring high-quality and reliable randomness for your blockchain applications.
When calling the createRequest
function from our Oracle, use the following arguments:
oracleType -> "randomNumber"
args -> [minValue, maxValue]
priv -> true or false
Here, minValue
and maxValue
define the range from which the random number will be generated.
Please refer to the section for more information about the priv
argument.
We offer two demo implementations of the Random Number Oracle to help you understand its functionality and explore its potential applications.
This is the simplest implementation, utilizing our Oracle with minimal additional logic. The result is a true random number that can be seamlessly used within the blockchain.
Visit Our Site: Access our Random Number Oracle site to get started.
Connect Your Wallet: Use Metamask or ThetaWallet to connect your wallet to the application.
Set the Range: Specify the range from which the random number will be generated by entering the minimum and maximum values.
Approve the Service Fee: Click the Approve
button to authorize the use of 250 DOGZ as the service fee.
Generate the Random Number: Click the Generate
button and confirm the transaction fee in TFUEL.
Wait for Transaction Completion: Wait for the transaction to be processed, which could take up to 1 minute depending on network congestion.
Get Your Random Number: Once the transaction is complete, you will receive a true random number within the Theta Network.
See on Explorer: Click on See on Explorer
to view the transaction details and the data gathered from the Oracle.
Voila! You now have a true random number generated within the Theta Network.
This is a use case of our Oracle where a random number is used to select a winner from a list. In this simple example, we demonstrate a powerful application of our Oracle, showcasing its potential. The possibilities are limitless and left to your imagination.
Visit Our Site: Access our Random Number Oracle site to get started.
Connect Your Wallet: Use Metamask or ThetaWallet to connect your wallet to the application.
Add Items: Add the items (at least 2 participants) to the list from which the winner will be selected.
Approve the Service Fee: Click the Approve
button to authorize the use of 250 DOGZ as the service fee.
Pick the Winner: Click the Pick the Winner
button and confirm the transaction fee in TFUEL.
Wait for Transaction Completion: Wait for the transaction to be processed, which could take up to 1 minute depending on network congestion.
Get Your Random Number: Once the transaction is complete, the winner will be selected based on a true random number generated by our Oracle.
See on Explorer: Click on See on Explorer
to view the transaction details and the data gathered from the Oracle.
Voila! You have your winner, selected through a truly random process on the Theta Network.