Cyfrin / foundry-smart-contract-lottery-cu

47 stars 42 forks source link

No need for vm.roll() after vm.warp()!! #21

Closed ebok21 closed 9 months ago

ebok21 commented 1 year ago

@PatrickAlphaC always writes vm.warp() and vm.roll() one after the other which might give off the impression that one is dependent on the other BUT that's not true; warp() is used to set a custom block timestamp (needed to check if enough time has passed since the start of the raffle), whereas roll() is used to set the block number which we don't need at all!

moayaan1911 commented 1 year ago

Screenshot 2023-11-10 233330 Getting this error. EVM revert, I have entered subscription id manually from UI

crunter commented 9 months ago

actually, Patrick Says explicitly that it is not needed (05:14:02), but it is recommended!!

PatrickAlphaC commented 9 months ago

@crunter got it!