Struct evm_adapters::sputnik::cheatcodes::backend::CheatcodeBackend[][src]

pub struct CheatcodeBackend<B> {
    pub backend: B,
    pub cheats: Cheatcodes,
}
Expand description

A cheatcode backend is a wrapper around the inner backend which returns the cheatcode value if it’s already been set, else it falls back to the default value inside the backend.

The cheatcode backend can be composed with other enhanced backends, e.g. the forking backend. You should always put the cheatcode backend on the highest layer of your stack of backend middlewares, so that it is always hit first.

Fields

backend: B

The inner backend type.

cheats: Cheatcodes

The enabled cheatcodes

Trait Implementations

Gas price. Unused for London.

Origin.

Environmental block hash.

Environmental block number.

Environmental coinbase.

Environmental block timestamp.

Environmental block base fee.

Environmental block difficulty.

Environmental block gas limit.

Environmental chain ID.

Whether account at address exists.

Get basic account information.

Get account code.

Get storage value of address at index.

Get original storage value of address at index, if available.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more