Skip to main content

Module expect

Module expect 

Source

Re-exportsยง

use std::fmt; ๐Ÿ”’
use std::fmt::Display; ๐Ÿ”’
use crate::Cheatcode; ๐Ÿ”’
use crate::Cheatcodes; ๐Ÿ”’
use crate::CheatcodesCore; ๐Ÿ”’
use crate::CheatsCtxt; ๐Ÿ”’
use crate::Error; ๐Ÿ”’
use crate::Result; ๐Ÿ”’
use crate::expected_emit::ExpectedEmit; ๐Ÿ”’
use crate::expected_emit::observe_log; ๐Ÿ”’
use alloy_primitives::Address; ๐Ÿ”’
use alloy_primitives::Bytes; ๐Ÿ”’
use alloy_primitives::Log; ๐Ÿ”’
use alloy_primitives::LogData as RawLog; ๐Ÿ”’
use alloy_primitives::U256; ๐Ÿ”’
use alloy_primitives::hex; ๐Ÿ”’
use alloy_primitives::hex; ๐Ÿ”’
use alloy_primitives::keccak256; ๐Ÿ”’
use alloy_primitives::map::HashMap; ๐Ÿ”’
use alloy_primitives::map::hash_map::Entry; ๐Ÿ”’
use alloy_sol_types::SolCall; ๐Ÿ”’
use alloy_sol_types::SolValue; ๐Ÿ”’
use foundry_evm_core::evm::FoundryEvmNetwork; ๐Ÿ”’
use itertools::Itertools; ๐Ÿ”’
use revm::interpreter::CallScheme; ๐Ÿ”’
use revm::interpreter::InstructionResult; ๐Ÿ”’
use revm::interpreter::Interpreter; ๐Ÿ”’
use revm::interpreter::InterpreterAction; ๐Ÿ”’
use revm::interpreter::interpreter_types::LoopControl; ๐Ÿ”’
use tempo_contracts::precompiles::ISignatureVerifier; ๐Ÿ”’
use tempo_precompiles::SIGNATURE_VERIFIER_ADDRESS; ๐Ÿ”’
use super::revert_handlers::RevertParameters; ๐Ÿ”’
use crate::Vm::*; ๐Ÿ”’

Structsยง

ExpectedCallData
ExpectedCreate
ExpectedRevert

Enumsยง

CreateScheme
ExpectedCallScheme
Call kinds used by Foundry expectations independently of the execution engine.
ExpectedCallType
The type of expected call.
ExpectedRevertKind
The type of expected revert.

Functionsยง

call_scheme_rank ๐Ÿ”’
expect_call ๐Ÿ”’
Registers an expectation keyed by target, calldata and call scheme. Counted expectations require an exact count and cannot be registered twice or mixed with non-counted expectations. Repeated non-counted expectations increase the minimum call count.
expect_create ๐Ÿ”’
expect_emit ๐Ÿ”’
expect_keychain_verified ๐Ÿ”’
expect_logo_uri_updated ๐Ÿ”’
expect_revert ๐Ÿ”’
expect_safe_memory ๐Ÿ”’
first_unmet_call ๐Ÿ”’
Returns the failure message for the smallest unmet call expectation, if any.
first_unmet_create ๐Ÿ”’
Returns the failure message for the first unmet create expectation, if any.
handle_expect_emit ๐Ÿ”’
Applies an expectEmit failure for log by reverting the current call, when an interpreter is available.
observe_call ๐Ÿ”’
Counts a call against every matching expectation registered for one target.
observe_create ๐Ÿ”’
Removes the first create expectation matched by a completed create.

Type Aliasesยง

ExpectedCallTracker
Tracks the expected calls per address.
ExpectedCallsForTarget
Tracks calldata, scheme and count expectations for one target.