Struct ethcontract_mock::CallContext[][src]

pub struct CallContext {
    pub is_view_call: bool,
    pub from: Address,
    pub to: Address,
    pub nonce: U256,
    pub gas: U256,
    pub gas_price: U256,
    pub value: U256,
}
Expand description

Information about method call that’s being processed.

Fields

is_view_call: bool

If true, this is a view call, otherwise this is a transaction.

from: Address

Account that issued a view call or a transaction.

Can be zero in case of a view call.

to: Address

Address of the current contract.

nonce: U256

Current nonce of the account that issued a view call or a transaction.

gas: U256

Maximum gas amount that this operation is allowed to spend.

Mock node does not simulate gas consumption, so this value does not affect anything if you don’t check it in your test code.

gas_price: U256

Gas price for this view call or transaction.

Mock node does not simulate gas consumption, so this value does not affect anything if you don’t check it in your test code.

value: U256

Amount of ETH that’s transferred with the call.

This value is only non-zero if the method is payable.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

TODO: once 1.33.0 is the minimum supported compiler version, remove Any::type_id_compat and use StdAny::type_id instead. https://github.com/rust-lang/rust/issues/27745 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

Performs the conversion.

Should always be Self

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