NEW

Developer Passes are now available for Chainlink SmartCon. Get yours today.

Create and manage VRF V2.5 subscriptions

Using the VRF Subscription Manager

The VRF Subscription Manager is available to help you create and manage VRF V2.5 subscriptions. You can create and manage new V2.5 subscriptions, and manage existing V2 subscriptions, but you can no longer create new V2 subscriptions in the VRF Subscription Manager. Alternatively, you can create and manage subscriptions programmatically.

Create a subscription

To create a VRF 2.5 subscription:

  1. Use the VRF Subscription Manager at vrf.chain.link. Connect your wallet in the upper right corner and then click Create subscription. The address of your connected wallet is automatically filled in the Admin address field.

  2. When the subscription is successfully created, there will be an alert in the upper right corner telling you that the subscription was successfully created. Click Home to navigate back to your main dashboard.

  3. Your new subscription shows in the My Subscriptions list, along with previous V2 subscriptions you might have. Click the Subscription ID for your new subscription in the list.

Add a consumer

To add a consuming contract:

  1. On the details page for your subscription, select Add Consumer.

  2. Provide the address of your consuming contract, and then select Add Consumer again. Confirm the resulting prompts in MetaMask or other wallet browser extension.

Fund your subscription

To fund your subscription:

  1. On the page for your subscription, select the Actions menu and then select Fund subscription.

  2. Your subscription has two balances: one for LINK, and one for the native token. Expand the Asset menu to select either LINK or the native token.

  3. In Amount to fund, enter the amount you want to fund your subscription. Your wallet balance is displayed below the Asset field for easier reference. Select Confirm to fund your wallet, and then confirm the resulting prompts in MetaMask or other wallet browser extension.

Create a subscription programmatically

If you prefer to create, fund and manage your subscriptions programmatically, you can either deploy a subscription manager contract or use your network's block explorer:

  1. Create a new subscription for VRF v2.5:

    Deploy the SubscriptionManager contract. On deployment, the contract creates a new subscription and adds itself as a consumer to the new subscription.

  2. Fund your new VRF v2.5 subscription:

    1. Fund your new VRFv2PlusSubscriptionManager contract.
    2. Call topUpSubscription from the VRFv2PlusSubscriptionManager contract. This function uses the LINK token contract's transferAndCall function to fund your new subscription.

Stay updated on the latest Chainlink news