Skip to main content

prefetch_call

Function prefetch_call 

Source
pub(crate) fn prefetch_call<N: Network, B: ForkBlockEnv>(
    backend: &SharedBackend<N, B>,
    caller: Address,
    target: Address,
    value: U256,
    input: Bytes,
    local: Option<&Cache>,
    overrides: bool,
)
Expand description

Simulates a call on the fork’s endpoint and prefetches the state it touches, see SharedBackend::prefetch_access_list. With overrides, the local state over the fork goes along as overrides.

Calls to precompiles up to P256VERIFY at 0x100, to the cheatcode contract and to the console are skipped. A call sent without overrides is skipped when the fork loaded its target without code. It is also skipped when local holds its target but the fork never loaded it.