Cyfrin / foundry-smart-contract-lottery-cu

47 stars 38 forks source link

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

Closed ebok21 closed 7 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 10 months ago

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

crunter commented 7 months ago

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

PatrickAlphaC commented 7 months ago

@crunter got it!