Guidance on Utilizing Random Values
This guide elucidates the process of obtaining random values utilizing a straightforward contract to solicit and obtain random values from Plugin VRF Subscription Model.
This instructional assumes familiarity with the creation and deployment of smart contracts on the Xinfin Apothem Network utilizing the subsequent tools:
The Remix Integrated Development Environment (IDE)
MetaMask
Xinfin Network
To commence, create a fresh subscription on the Xinfin Apothem Network.
Launch MetaMask and set it to operate on the Xinfin Apothem Network. The Subscription Manager automatically detects your network based on the active MetaMask network.
Validate on MetaMask the presence of Apothem XDC and PLI on XDC Apothem. Testnet XDC and PLI can be acquired at the respective links: faucet.apothem.network and https://faucet.goplugin.co/.
Access Subscription Manager.
Initiate the creation of a subscription by selecting 'Create Subscription' and follow the subsequent instructions. If your wallet is linked to the Subscription Manager, the Admin address for your subscription will be pre-populated and non-editable. Optionally, you may input an email address and project name, both of which are kept private. MetaMask prompts for confirmation of the on-chain creation of your subscription account.
Upon successful creation, proceed to add funds to your subscription following the provided instructions.
To ensure successful processing of your request, it is imperative to sufficiently fund your subscription with PLI to meet the minimum subscription balance requirements, serving as a buffer against gas volatility. A balance of 10 PLI suffices for this example. After transaction approval, MetaMask confirms the transfer of your PLI token to your subscription account.
Upon fund addition, proceed to add a consumer. A dedicated page displaying your account details and subscription ID will be presented.
Record your subscription ID, essential for your consuming contract, to be added to your subscription subsequently.
Last updated