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: boolIf true, this is a view call, otherwise this is a transaction.
from: AddressAccount that issued a view call or a transaction.
Can be zero in case of a view call.
to: AddressAddress of the current contract.
nonce: U256Current nonce of the account that issued a view call or a transaction.
gas: U256Maximum 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: U256Gas 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: U256Amount of ETH that’s transferred with the call.
This value is only non-zero if the method is payable.
Auto Trait Implementations§
impl Freeze for CallContext
impl RefUnwindSafe for CallContext
impl Send for CallContext
impl Sync for CallContext
impl Unpin for CallContext
impl UnwindSafe for CallContext
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more