Clarification on Using VRFCoordinatorV2_5 vs. VRFCoordinatorV2_5Mock for Creating Subscriptions Programmatically #3104
Replies: 1 comment 2 replies
-
Hey @YusufsDesigns, The main essence of Patrick writing a So for the Please ask questions if anything is confusing. |
Beta Was this translation helpful? Give feedback.
-
Question
I am working on the decentralized lottery smart contract project that requires creating a Chainlink VRF subscription programmatically. Below is an excerpt of my implementation:
Code Snippet
My Questions
Should I use
VRFCoordinatorV2_5(vrfCoordinator)
instead ofVRFCoordinatorV2_5Mock(vrfCoordinator)
when deploying to a live network (e.g., mainnet or testnet)?VRFCoordinatorV2_5
. Could you confirm this understanding?Is it possible to dynamically handle the switch between the mock and the real VRFCoordinator using my
HelperConfig
setup?HelperConfig
is designed to provide the correct VRFCoordinator address based on the chain ID. Would this approach suffice for seamless transitions between local testing and live deployments?Best Practices for Managing Helper Configurations
VRFCoordinatorV2_5
, are there any specific nuances or gotchas I should be aware of?I would appreciate any insights or recommendations for improving my implementation to handle subscriptions dynamically and effectively across different environments.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions