Links

Using the random beacon on-chain

Following this tutorial, you'll learn how to write a smart contract consuming randomness from Cryptosat Random Beacon contract.

Create and deploy contract

For this example, use ClientContract.sol sample contract
  1. 2.
    Compile the contract on the Compile tab.
  2. 3.
    Deploy your contract with Random Beacon contract address
    Select Injected Web3 environment and fill in 0xFf94BaE6D7d2ccf61db5593Dc899E3c68464cDdb for the Beacon Address
    • Velas Testnet: 0xFf94BaE6D7d2ccf61db5593Dc899E3c68464cDdb
    • Velas Mainnet: 0x8f5FE77380B83BaA7365ccc9956EB0594859F9E4
    MetaMask will ask you to confirm the transaction.
  3. 4.
    After you deploy your contract, you can interact with it.
    Click on requestRandom button to request Space Random Beacon.