Skip to main content

Preparation

info

Do you know you can always contact the Binace Oracle team for assistance if you come across any issues using our service. Please feel free to drop us a note if you are interested.

tip

For testing on the BSC testnet, you can go to the faucet and get some tBNB.

Preparation

To connect to Binance Oracle VRF, you need to prepare your smart contract to use the VRF. This involves importing the Binance VRF library contracts (provided below) and calling the requestRandomWords function with the required parameters. You also need to set up a callback function to handle the return value from the VRF. Once you have received the random number from the VRF, you can use it in your dApp.

BSC Mainnet

EnvironmentBSC Mainnet
VRF Coordinator Contract Address0x9632ADE542f12114f5E5AD4d6F8e47fB993955da
SPACE IDvrf.boracle.bnb
keyhash0xcd65a78499993598be303c914c3e37b0103ead6b1f279d1dbfa0ef080e7141a4
(The hash of our VRF public key)
VRFConsumerBase.solVRFConsumerBase.sol(abstract contract)
VRFCoordinatorInterface.solVRFCoordinatorInterface.sol (interface contract)

BSC Testnet

EnvironmentBSC Testnet
VRF Coordinator Contract Address0xa2d23627bC0314f4Cbd08Ff54EcB89bb45685053
SPACE IDvrf.boracle.bnb
keyhash0x617abc3f53ae11766071d04ada1c7b0fbd49833b9542e9e91da4d3191c70cc80
(The hash of our VRF public key)
VRFConsumerBase.solVRFConsumerBase.sol(abstract contract)
VRFCoordinatorInterface.solVRFCoordinatorInterface.sol (interface contract)

opBnb Mainnet

EnvironmentopBnb Mainnet
VRF Coordinator Contract Address0x4E0C997c986539708aB8903a31447f7456dde212
keyhash0xcd65a78499993598be303c914c3e37b0103ead6b1f279d1dbfa0ef080e7141a4
(The hash of our VRF public key)
VRFConsumerBase.solVRFConsumerBase.sol(abstract contract)
VRFCoordinatorInterface.solVRFCoordinatorInterface.sol (interface contract)

opBnb Testnet

EnvironmentopBnb Testnet
VRF Coordinator Contract Address0x2B30C31a17Fe8b5dd397EF66FaFa503760D4eaF0
keyhash0x617abc3f53ae11766071d04ada1c7b0fbd49833b9542e9e91da4d3191c70cc80
(The hash of our VRF public key)
VRFConsumerBase.solVRFConsumerBase.sol(abstract contract)
VRFCoordinatorInterface.solVRFCoordinatorInterface.sol (interface contract)

tip

VRFConsumerBase.sol and VRFCoordinatorInterface.sol are required to develop you own consumer contract.