Struct near_vm_logic::mocks::mock_external::MockedExternal[][src]

pub struct MockedExternal {
    pub fake_trie: HashMap<Vec<u8>, Vec<u8>>,
    pub validators: HashMap<AccountId, Balance>,
    // some fields omitted
}
Expand description

Emulates the trie and the mock handling code.

Fields

fake_trie: HashMap<Vec<u8>, Vec<u8>>validators: HashMap<AccountId, Balance>

Implementations

Get calls to receipt create that were performed during contract call.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Returns the “default value” for a type. Read more

Write value to the key of the storage trie associated with the current account. Read more

Read key from the storage trie associated with the current account. Read more

Removes the key from the storage trie associated with the current account. Read more

Removes all keys with a given prefix from the storage trie associated with current account. Read more

Check whether the key is present in the storage trie associated with the current account. Read more

Create a receipt which will be executed after all the receipts identified by receipt_indices are complete. Read more

Attach the [CreateAccountAction] action to an existing receipt. Read more

Attach the [DeployContractAction] action to an existing receipt. Read more

Attach the [FunctionCallAction] action to an existing receipt. Read more

Attach the [TransferAction] action to an existing receipt. Read more

Attach the [StakeAction] action to an existing receipt. Read more

Attach the [AddKeyAction] action to an existing receipt. Read more

Attach the [AddKeyAction] action an existing receipt. Read more

Attach the [DeleteKeyAction] action to an existing receipt. Read more

Attach the [DeleteAccountAction] action to an existing receipt Read more

Returns amount of touched trie nodes by storage operations

Returns the validator stake for given account in the current epoch. If the account is not a validator, returns None. Read more

Returns total stake of validators in the current epoch.

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.

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)

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.