foundry_evm_fuzz::strategies::invariants

Function select_random_sender

Source
fn select_random_sender(
    fuzz_state: &EvmFuzzState,
    senders: Rc<SenderFilters>,
    dictionary_weight: u32,
) -> impl Strategy<Value = Address>
Expand description

Strategy to select a sender address:

  • If senders is empty, then it’s either a random address (10%) or from the dictionary (90%).
  • If senders is not empty, a random address is chosen from the list of senders.