Verifiable Randomness
Learn how to request verifiable randomness on EVM with secret-network-ccl npm package
With requestRandomness
you can request an array of up to 2000 random numbers on chain from Secret Network.
Select the EVM chain that you want to use to execute the Secret Network smart contract and update your secretPathAddress with the correct gateway contract address. For this example we are using Sepolia:
requestRandomness
requires privateKey
, endpoint
, secretPathAddress
, network
, numbers,
and max
parameters:
numbers
is the amount of numbers you want to request
max
is the the max range the numbers can be. So if you set max
to 200, the largest random number that can be returned is 200
Execute the function to request randomness on EVM:
Last updated