foundry icon indicating copy to clipboard operation
foundry copied to clipboard

feat(cheatcodes): randomUint

Open yash-atreya opened this issue 1 year ago • 1 comments

Motivation

Closes #7958 Closes https://github.com/foundry-rs/foundry/issues/5407

Solution

Use rand::thread_rng

yash-atreya avatar May 21 '24 09:05 yash-atreya

Maybe we should add randomUintWithSeed as well? @mattsse

yash-atreya avatar May 21 '24 15:05 yash-atreya

What happened to this feature? I can't find any mention to it on the docs and I can't find any occurrence of randomUint inside forge-std

Mouradif avatar Oct 02 '24 18:10 Mouradif

@Mouradif You may need to update your foundry and forge-std versions, you can see it in forge-std here: https://github.com/foundry-rs/forge-std/blob/ab6de56ed94bed75866c78c62cad882e8a046348/src/Vm.sol#L1607-L1614

mds1 avatar Oct 02 '24 21:10 mds1