Cyfrin / foundry-smart-contract-lottery-cu

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Subscription ID too large?

MorningLit opened this issue · comments

image
Currently following part 24 of the lottery smart contract series, and can't seem to fit my subscription id into uint64
https://www.youtube.com/watch?v=DgPYEyiE8NQ&list=PL2-Nvp2Kn0FPH2xU3IbKrrkae-VVXs1vk&index=132

My subscription id is
58702003961984393061086325485375073005356194632241668487883182282754836008638
on the sepolia chain

Can you create a screenshot of how you got that number? That' shouldn't be possible for your id to be that large.

image
I clicked on the clipboard icon on id and it also shows up in the URL

I've checked your video and it also looks to be that way I think
image

And thanks for replying so quickly Patrick!

Oh, found out the reason why there is the very large integer, it's because in version 2.5 of chainlink VRF, they increased the size from uint64 to uint256
Related docs here: https://docs.chain.link/vrf/v2-5/migration-from-v2

I see... Thanks for this!

The update was referred directly on the code: https://github.com/Cyfrin/foundry-smart-contract-lottery-f23/blob/d106fe245e0e44239dae2479b63545351ed1236a/src/Raffle.sol#L54

We also added a note on the written lesson on Updraft stating this update. Thanks a lot, @MorningLit and @PatrickAlphaC