[−][src]Struct near_vm_logic::mocks::mock_external::MockedExternal
Emulates the trie and the mock handling code.
Fields
fake_trie: HashMap<Vec<u8>, Vec<u8>>
validators: HashMap<AccountId, Balance>
Implementations
impl MockedExternal
[src]
pub fn new() -> Self
[src]
pub fn get_receipt_create_calls(&self) -> &Vec<Receipt>
[src]
Get calls to receipt create that were performed during contract call.
Trait Implementations
impl Default for MockedExternal
[src]
fn default() -> MockedExternal
[src]
impl External for MockedExternal
[src]
fn storage_set(&mut self, key: &[u8], value: &[u8]) -> Result<(), VMLogicError>
[src]
fn storage_get(
&self,
key: &[u8]
) -> Result<Option<Box<dyn ValuePtr>>, VMLogicError>
[src]
&self,
key: &[u8]
) -> Result<Option<Box<dyn ValuePtr>>, VMLogicError>
fn storage_remove(&mut self, key: &[u8]) -> Result<(), VMLogicError>
[src]
fn storage_has_key(&mut self, key: &[u8]) -> Result<bool, VMLogicError>
[src]
fn create_receipt(
&mut self,
receipt_indices: Vec<u64>,
receiver_id: String
) -> Result<u64, VMLogicError>
[src]
&mut self,
receipt_indices: Vec<u64>,
receiver_id: String
) -> Result<u64, VMLogicError>
fn append_action_create_account(
&mut self,
receipt_index: u64
) -> Result<(), VMLogicError>
[src]
&mut self,
receipt_index: u64
) -> Result<(), VMLogicError>
fn append_action_deploy_contract(
&mut self,
receipt_index: u64,
code: Vec<u8>
) -> Result<(), VMLogicError>
[src]
&mut self,
receipt_index: u64,
code: Vec<u8>
) -> Result<(), VMLogicError>
fn append_action_function_call(
&mut self,
receipt_index: u64,
method_name: Vec<u8>,
arguments: Vec<u8>,
attached_deposit: u128,
prepaid_gas: u64
) -> Result<(), VMLogicError>
[src]
&mut self,
receipt_index: u64,
method_name: Vec<u8>,
arguments: Vec<u8>,
attached_deposit: u128,
prepaid_gas: u64
) -> Result<(), VMLogicError>
fn append_action_transfer(
&mut self,
receipt_index: u64,
amount: u128
) -> Result<(), VMLogicError>
[src]
&mut self,
receipt_index: u64,
amount: u128
) -> Result<(), VMLogicError>
fn append_action_stake(
&mut self,
receipt_index: u64,
stake: u128,
public_key: Vec<u8>
) -> Result<(), VMLogicError>
[src]
&mut self,
receipt_index: u64,
stake: u128,
public_key: Vec<u8>
) -> Result<(), VMLogicError>
fn append_action_add_key_with_full_access(
&mut self,
receipt_index: u64,
public_key: Vec<u8>,
nonce: u64
) -> Result<(), VMLogicError>
[src]
&mut self,
receipt_index: u64,
public_key: Vec<u8>,
nonce: u64
) -> Result<(), VMLogicError>
fn append_action_add_key_with_function_call(
&mut self,
receipt_index: u64,
public_key: Vec<u8>,
nonce: u64,
allowance: Option<u128>,
receiver_id: String,
method_names: Vec<Vec<u8>>
) -> Result<(), VMLogicError>
[src]
&mut self,
receipt_index: u64,
public_key: Vec<u8>,
nonce: u64,
allowance: Option<u128>,
receiver_id: String,
method_names: Vec<Vec<u8>>
) -> Result<(), VMLogicError>
fn append_action_delete_key(
&mut self,
receipt_index: u64,
public_key: Vec<u8>
) -> Result<(), VMLogicError>
[src]
&mut self,
receipt_index: u64,
public_key: Vec<u8>
) -> Result<(), VMLogicError>
fn append_action_delete_account(
&mut self,
receipt_index: u64,
beneficiary_id: String
) -> Result<(), VMLogicError>
[src]
&mut self,
receipt_index: u64,
beneficiary_id: String
) -> Result<(), VMLogicError>
fn get_touched_nodes_count(&self) -> u64
[src]
fn reset_touched_nodes_counter(&mut self)
[src]
fn validator_stake(
&self,
account_id: &AccountId
) -> Result<Option<Balance>, VMLogicError>
[src]
&self,
account_id: &AccountId
) -> Result<Option<Balance>, VMLogicError>
fn validator_total_stake(&self) -> Result<Balance, VMLogicError>
[src]
Auto Trait Implementations
impl RefUnwindSafe for MockedExternal
impl Send for MockedExternal
impl Sync for MockedExternal
impl Unpin for MockedExternal
impl UnwindSafe for MockedExternal
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> 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, 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>,