Open ArshilHapani opened 2 months ago
Hello, i'm having this issue too! :) The subId key provided by ChainLink is way too long, as explained by @ArshilHapani Example here
As far as I understand, you can now only get a subscription ID for VRF v2.5. There is a guide on how to migrate from v2: https://docs.chain.link/vrf/v2-5/migration-from-v2#overview
But there is no mock interface for v2.5 (or I couldn’t find it). So now you have two options:
I think option 1 is easier.
Chainlink documentation is now updated and they have included a example which works with v2.5 and subId of uint256
.\
https://docs.chain.link/vrf/v2-5/subscription/get-a-random-number
In VRF and Automations contract there is one parameter
subscriptionId
inrequestRandomWords
ofVRFCoordinatorV2Interface
interface andaddConsumer
function fromVRFCoordinatorV2Mock
interface. The issue is that the type ofsubscriptionId
isuint64
but the id provided by chainlink site is way to big e.g.15356376269897563744780985323350096414521302577903754215356556594835422566595
Something like this which leads to errorVersion