Configuration
On this page
You are viewing the VRF v2 guide - Subscription method
To learn how to request random numbers without a subscription, see the direct funding
method guide.
Security Considerations
Be sure to review your contracts with the security considerations in mind.
Chainlink VRF allows you to integrate provably fair and verifiably random data in your smart contract.
For implementation details, read Introduction to Chainlink VRF .
Coordinator parameters
These parameters are configured in the coordinator contract. You can view these values by running getConfig
on the coordinator or by viewing the coordinator contracts in a blockchain explorer.
uint16 minimumRequestConfirmations
: The minimum number of confirmation blocks on VRF requests before oracles respond
uint32 maxGasLimit
: The maximum gas limit supported for a fulfillRandomWords
callback.
uint32 stalenessSeconds
: How long the coordinator waits until we consider the ETH/LINK price used for converting gas costs to LINK is stale and use fallbackWeiPerUnitLink
uint32 gasAfterPaymentCalculation
: How much gas is used outside of the payment calculation. This covers the additional operations required to decrement the subscription balance and increment the balance for the oracle that handled the request.
Fee parameters
Fee parameters are configured in the coordinator contract and specify the premium you pay per request in addition to the gas cost for the transaction. You can view them by running getFeeConfig
on the coordinator. The uint32 fulfillmentFlatFeeLinkPPMTier1
parameter defines the fees per request specified in millionths of LINK.
The details for calculating the total transaction cost can be found here .
Configurations
VRF v2 coordinators for subscription funding are available on several networks. To see a list of coordinators for direct funding, see the Direct Funding Configurations page.
Understand Risks associated with Bridges
If you are using a cross-chain bridge to transfer your LINK tokens, read the Bridges and Associated Risks guide to understand what cross-chain bridges are and the risks associated with using them.
Ethereum mainnet
Item Value LINK Token 0x514910771AF9Ca656af840dff83E8264EcF986CA
VRF Coordinator 0x271682DEB8C4E0901D1a1550aD2e64D568E69909
200 gwei Key Hash 0x8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef
500 gwei Key Hash 0xff8dedfbfa60af186cf3c830acbc32c05aae823045ae5ea7da1e45fbfaba4f92
1000 gwei Key Hash 0x9fe0eebf5e446e3c998ec9bb19951541aee00bb90ea201ae456421a2ded86805
Premium 0.25 LINK Max Gas Limit 2,500,000 Minimum Confirmations 3 Maximum Confirmations 200 Maximum Random Values 500
Sepolia testnet
Sepolia Faucets
Testnet LINK and ETH are available from faucets.chain.link .
Testnet ETH is also available from several public ETH faucets .
Goerli testnet
Goerli Faucets
Testnet LINK is available from https://faucets.chain.link/goerli
Testnet ETH is available from https://goerlifaucet.com/ or faucets listed at https://faucetlink.to/goerli
BNB Chain
Important
The LINK provided by the BNB Chain Bridge is not ERC-677 compatible, so cannot
be used with Chainlink oracles. However, it can be converted to the official LINK token on BNB Chain using
Chainlink's PegSwap service .
Item Value LINK Token 0x404460C6A5EdE2D891e8297795264fDe62ADBB75
VRF Coordinator 0xc587d9053cd1118f25F645F9E08BB98c9712A4EE
200 gwei Key Hash 0x114f3da0a805b6a67d6e9cd2ec746f7028f1b7376365af575cfea3550dd1aa04
500 gwei Key Hash 0xba6e730de88d94a5510ae6613898bfb0c3de5d16e609c5b7da808747125506f7
1000 gwei Key Hash 0x17cd473250a9a479dc7f234c64332ed4bc8af9e8ded7556aa6e66d83da49f470
Premium 0.005 LINK Max Gas Limit 2,500,000 Minimum Confirmations 3 Maximum Confirmations 200 Maximum Random Values 500
BNB Chain testnet
BNB Chain Faucet
Testnet LINK is available from https://faucets.chain.link/chapel
Polygon (Matic) mainnet
Important
The LINK provided by the Polygon (Matic) Bridge is not ERC-677
compatible, so cannot be used with Chainlink oracles. However, it can be converted to the official LINK token on
Polygon (Matic) using Chainlink's PegSwap service
Item Value LINK Token 0xb0897686c545045aFc77CF20eC7A532E3120E0F1
VRF Coordinator 0xAE975071Be8F8eE67addBC1A82488F1C24858067
200 gwei Key Hash 0x6e099d640cde6de9d40ac749b4b594126b0169747122711109c9985d47751f93
500 gwei Key Hash 0xcc294a196eeeb44da2888d17c0625cc88d70d9760a69d58d853ba6581a9ab0cd
1000 gwei Key Hash 0xd729dc84e21ae57ffb6be0053bf2b0668aa2aaf300a2a7b2ddf7dc0bb6e875a8
Premium 0.0005 LINK Max Gas Limit 2,500,000 Minimum Confirmations 3 Maximum Confirmations 200 Maximum Random Values 500
Polygon (Matic) Mumbai testnet
Mumbai Faucet
Testnet LINK and MATIC are available from the Polygon faucet and
https://faucets.chain.link/mumbai .
Avalanche mainnet
Item Value LINK Token 0x5947BB275c521040051D82396192181b413227A3
VRF Coordinator 0xd5D517aBE5cF79B7e95eC98dB0f0277788aFF634
200 gwei Key Hash 0x83250c5584ffa93feb6ee082981c5ebe484c865196750b39835ad4f13780435d
500 gwei Key Hash 0x89630569c9567e43c4fe7b1633258df9f2531b62f2352fa721cf3162ee4ecb46
1000 gwei Key Hash 0x06eb0e2ea7cca202fc7c8258397a36f33d88568d2522b37aaa3b14ff6ee1b696
Premium 0.005 LINK Max Gas Limit 2,500,000 Minimum Confirmations 1 Maximum Confirmations 200 Maximum Random Values 500
Avalanche Fuji testnet
Avax Fuji Faucet
Testnet LINK is available from https://faucets.chain.link/fuji
Fantom mainnet
Important
You must use ERC-677 LINK on Fantom. ERC-20 LINK will not work with Chainlink services.
Item Value LINK Token 0x6F43FF82CCA38001B6699a8AC47A2d0E66939407
VRF Coordinator 0xd5D517aBE5cF79B7e95eC98dB0f0277788aFF634
4000 gwei Key Hash 0xb4797e686f9a1548b9a2e8c68988d74788e0c4af5899020fb0c47784af76ddfa
10000 gwei Key Hash 0x5881eea62f9876043df723cf89f0c2bb6f950da25e9dfe66995c24f919c8f8ab
20000 gwei Key Hash 0x64ae04e5dba58bc08ba2d53eb33fe95bf71f5002789692fe78fb3778f16121c9
Premium 0.0005 LINK Max Gas Limit 2,500,000 Minimum Confirmations 1 Maximum Confirmations 200 Maximum Random Values 500
Fantom testnet
Fantom Testnet Faucet
Testnet LINK is available from https://faucets.chain.link/fantom-testnet
Arbitrum mainnet
Item Value LINK Token 0xf97f4df75117a78c1A5a0DBb814Af92458539FB4
VRF Coordinator 0x41034678D6C633D8a95c75e1138A360a28bA15d1
2 gwei Key Hash 0x08ba8f62ff6c40a58877a106147661db43bc58dabfb814793847a839aa03367f
30 gwei Key Hash 0x72d2b016bb5b62912afea355ebf33b91319f828738b111b723b78696b9847b63
150 gwei Key Hash 0x68d24f9a037a649944964c2a1ebd0b2918f4a243d2a99701cc22b548cf2daff0
Premium 0.005 LINK Max Gas Limit 2,500,000 Minimum Confirmations 1 Maximum Confirmations 200 Maximum Random Values 500
Arbitrum Goerli testnet
Arbitrum Goerli Testnet Faucet
Testnet LINK is available from https://faucets.chain.link/arbitrum-goerli
More