Integration Guide
Market Integrity and Application code Risks
Last updated
Market Integrity and Application code Risks
Last updated
The deployment parameters can be obtained from our official website: 🔗 APRO VRF Portal
VRF Coordinator Contract Address: 0xB9CB7Ef204D4C230d175e217C8Feb5b1576757a8
Valueless Token Contract Address: 0xF424cAA15eF7F8524bF55bD838935A25cDf1caae
Download the contract code from GitHub: 🔗 APRO VRF Contracts
Open the contract code using Remix, as shown below.
Switch to the compilation tab, select the compilation version, and compile the contract code.
Switch to the deployment tab, select the compilation version, and link your wallet address
In step 7 shown in the image above, enter the pre-prepared parameters and then click "transact" Finally,as shown in the image, you can copy your VRFConsumerV2 contract address in step nine, which will be used later.
Open the VRF Subscription Manager: 🔗 Subscription Manager
Connect your wallet (top-right corner) and click "Create Subscription".
The Admin Address field is auto-filled with your connected wallet address.
Once created, an alert will confirm the subscription, and you'll be redirected to the dashboard.
Locate your Subscription ID in the "My Subscriptions" list.
On the subscription details page, click "Add Consumer".
Enter the address of your consuming contract and confirm the addition.
Approve the transaction in MetaMask or your wallet extension.
To fund your subscription, provide:
Your wallet address
Your Subscription ID
Then, contact us via: 📧 Email: bd@apro.com 💬 Telegram: Head of Business Development
requestRandomness
function in the VRFConsumerV2 contractExample Input
Call the s_randomWords
function in the VRFConsumerV2 contract to get the random number.
Enter the index (starting from 0
, max = numWords - 1
).
Contracts
Valueless Token: 0x48Ee5E7E27A5058eBf74c8Bb6A2DD1E6176A84a1
BlockHashStore: 0xd3fBd0Cdb7774617fCCa347804Ea48277d586c6A
VRF Coordinator V2: 0x8571C322bf9FC9dDD40635300cC534693fef4067
VRF KeyHash Info
KeyHash 1 (Max Gas: 0.1 GWEI)
0xe568bd3aa35ca9857f68102223a2313ead8ad257b322306a2649f2dff5fc3235
KeyHash 2 (Max Gas: 0.2 GWEI)
0x86af5b5dd69ca4845538ca99ad0087c917fed2475793b4c2c9237556e719c2ca
KeyHash 3 (Max Gas: 0.5 GWEI)
0xbdacf5b71bc9b737f8ffcf7612bea13114b1923c2fe6aa5ca0a7deb9a318f22c
Contracts
Valueless Token: 0xF424cAA15eF7F8524bF55bD838935A25cDf1caae
BlockHashStore: 0x70df6E187188e10A6552445Be86C73ce2168a452
VRF Coordinator V2: 0xB9CB7Ef204D4C230d175e217C8Feb5b1576757a8
VRF KeyHash Info
KeyHash 1 (Max Gas: 0.2 GWEI)
0x797e63f62c966d5a1a2e33228485e3963393c84c0d214300dddcd8b0fec4351800
KeyHash 2 (Max Gas: 0.5 GWEI)
0xe0a345818c80cc3536672b175a215341ac8c32c7a9a31b3c3852f57c01b7f13e00