Using RNDFusion Hub
We are currently Avalanche Testnets and on Sepolia soon!
Create the interface
interface RndFusion {
function RequestRandomNumber(uint256) external payable;
}Define the interface
RndFusion rndFusion;Define the interface and contract address
address rndFusionAddress = 0x748E11Bcabdd0aAf06e9618161061E04F417844A;Set the contract address in the constructor
constructor() {
rndFusion = RndFusion(rndFusionAddress);
}(OPTIONAL) Create a function to set the address after deployment
function SetRNDAddress(address _address) public {
//Access controll (only owner should be allowed)
rndFusionAddress = _address;
rndFusion = RndFusion(rndFusionAddress);
}Call the RND fusion contract
Create a function for the callback
Testnets
Avalanche Fuji
Etheruem Sepolia
Last updated