[−]Struct near_vm_logic::VMContext
Context for the contract execution.
Fields
current_account_id: AccountId
The account id of the current contract that we are executing.
signer_account_id: AccountId
The account id of that signed the original transaction that led to this execution.
signer_account_pk: PublicKey
The public key that was used to sign the original transaction that led to this execution.
predecessor_account_id: AccountId
If this execution is the result of cross-contract call or a callback then
predecessor is the account that called it.
If this execution is the result of direct execution of transaction then it
is equal to signer_account_id
.
input: Vec<u8>
The input to the contract call. Encoded as base64 string to be able to pass input in borsh binary format.
block_index: BlockHeight
The current block height.
block_timestamp: u64
The current block timestamp (number of non-leap-nanoseconds since January 1, 1970 0:00:00 UTC).
epoch_height: EpochHeight
The current epoch height.
account_balance: Balance
The balance attached to the given account. Excludes the attached_deposit
that was
attached to the transaction.
account_locked_balance: Balance
The balance of locked tokens on the given account.
storage_usage: StorageUsage
The account's storage usage before the contract execution
attached_deposit: Balance
The balance that was attached to the call that will be immediately deposited before the contract execution starts.
prepaid_gas: Gas
The gas attached to the call that can be used to pay for the gas fees.
random_seed: Vec<u8>
Initial seed for randomness
is_view: bool
Whether the execution should not charge any costs.
output_data_receivers: Vec<AccountId>
How many DataReceipt
's should receive this execution result. This should be empty if
this function call is a part of a batch and it is not the last action.
Trait Implementations
impl Clone for VMContext
[src]
impl<'de> Deserialize<'de> for VMContext
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for VMContext
[src]
Auto Trait Implementations
impl RefUnwindSafe for VMContext
impl Send for VMContext
impl Sync for VMContext
impl Unpin for VMContext
impl UnwindSafe for VMContext
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,