How to set up VRF proxy?
VRF (Verifiable Random Function) capabilities are essential for any customer looking to launch a gaming application. Historically, building a VRF is difficult on blockchains because of the inability to leverage a RNG (Random Number Generator) on-chain. AvaCloud provides a VRF solution via its portal to help customers to overcome this difficulty.
Note: full recording of these processes are available at the end of this article.
Prerequisite
- Interoperability has been enabled on the L1. See How to setup Interoperability?
- Core Extension is connected.
- On a paid plan.
Set up VRF Proxy
Navigate to the Interoperability
tab of an L1, and click on VRF Proxies
After clicking on Create new proxy
, a screen shows an introduction to VRF service.
VRF Service is only available on a paid plan, AvaCloud portal first checks if the user has subscribed to a paid plan.
If not, it will redirect users to payment first. Otherwise, it shows Subscribed
.
AvaCloud portal also checks if the connected Core Extension is on the correct L1. If not, it will prompt the user to switch.
Then AvaCloud portal requires the contract owner address to deploy the contract for VRFConsumerRegistry:
Then a name to deploy VRF proxy contract
From the dashboard, clicking on each proxy will navigate to the detail page of that proxy
Here is the recording of this full process:
VRF Testing Module
To show how VRF works, AvaCloud portal also provides a VRF Testing module, demonstrating how to use this newly created VRF proxy.
Navigate to the Testing module portion on the bottom of a VRF proxy, click on the Deploy Contract
button
Then copy the newly created address to the allow list
Then update the contract name
Click on the Draw random number
button to see a new random number (489) generated
On the dashboard, there is also a button How to build using VRF
which navigate to a page for instruction.
The whole guide can be found here.
Here is the recording of this full process:
For any additional questions, please view our other knowledge base articles or contact a support team member via the chat button. Examples are for illustrative purposes only.
Learn More About AvaCloud | Download Case Studies | Schedule an AvaCloud Demo