[−][src]Struct near_vm_logic::mocks::mock_external::MockedExternal
Emulates the trie and the mock handling code.
Fields
fake_trie: BTreeMap<Vec<u8>, Vec<u8>>
Methods
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<(), HostErrorOrStorageError>
[src]
&mut self,
key: &[u8],
value: &[u8]
) -> Result<(), HostErrorOrStorageError>
fn storage_get(
&self,
key: &[u8]
) -> Result<Option<Box<dyn ValuePtr>>, HostErrorOrStorageError>
[src]
&self,
key: &[u8]
) -> Result<Option<Box<dyn ValuePtr>>, HostErrorOrStorageError>
fn storage_remove(&mut self, key: &[u8]) -> Result<(), HostErrorOrStorageError>
[src]
fn storage_has_key(
&mut self,
key: &[u8]
) -> Result<bool, HostErrorOrStorageError>
[src]
&mut self,
key: &[u8]
) -> Result<bool, HostErrorOrStorageError>
fn storage_iter(
&mut self,
prefix: &[u8]
) -> Result<u64, HostErrorOrStorageError>
[src]
&mut self,
prefix: &[u8]
) -> Result<u64, HostErrorOrStorageError>
fn storage_iter_range(
&mut self,
start: &[u8],
end: &[u8]
) -> Result<u64, HostErrorOrStorageError>
[src]
&mut self,
start: &[u8],
end: &[u8]
) -> Result<u64, HostErrorOrStorageError>
fn storage_iter_next(
&mut self,
iterator_idx: u64
) -> Result<Option<(Vec<u8>, Box<dyn ValuePtr>)>, HostErrorOrStorageError>
[src]
&mut self,
iterator_idx: u64
) -> Result<Option<(Vec<u8>, Box<dyn ValuePtr>)>, HostErrorOrStorageError>
fn storage_iter_drop(
&mut self,
iterator_idx: u64
) -> Result<(), HostErrorOrStorageError>
[src]
&mut self,
iterator_idx: u64
) -> Result<(), HostErrorOrStorageError>
fn create_receipt(
&mut self,
receipt_indices: Vec<u64>,
receiver_id: String
) -> Result<u64, HostErrorOrStorageError>
[src]
&mut self,
receipt_indices: Vec<u64>,
receiver_id: String
) -> Result<u64, HostErrorOrStorageError>
fn append_action_create_account(
&mut self,
receipt_index: u64
) -> Result<(), HostErrorOrStorageError>
[src]
&mut self,
receipt_index: u64
) -> Result<(), HostErrorOrStorageError>
fn append_action_deploy_contract(
&mut self,
receipt_index: u64,
code: Vec<u8>
) -> Result<(), HostErrorOrStorageError>
[src]
&mut self,
receipt_index: u64,
code: Vec<u8>
) -> Result<(), HostErrorOrStorageError>
fn append_action_function_call(
&mut self,
receipt_index: u64,
method_name: Vec<u8>,
arguments: Vec<u8>,
attached_deposit: u128,
prepaid_gas: u64
) -> Result<(), HostErrorOrStorageError>
[src]
&mut self,
receipt_index: u64,
method_name: Vec<u8>,
arguments: Vec<u8>,
attached_deposit: u128,
prepaid_gas: u64
) -> Result<(), HostErrorOrStorageError>
fn append_action_transfer(
&mut self,
receipt_index: u64,
amount: u128
) -> Result<(), HostErrorOrStorageError>
[src]
&mut self,
receipt_index: u64,
amount: u128
) -> Result<(), HostErrorOrStorageError>
fn append_action_stake(
&mut self,
receipt_index: u64,
stake: u128,
public_key: Vec<u8>
) -> Result<(), HostErrorOrStorageError>
[src]
&mut self,
receipt_index: u64,
stake: u128,
public_key: Vec<u8>
) -> Result<(), HostErrorOrStorageError>
fn append_action_add_key_with_full_access(
&mut self,
receipt_index: u64,
public_key: Vec<u8>,
nonce: u64
) -> Result<(), HostErrorOrStorageError>
[src]
&mut self,
receipt_index: u64,
public_key: Vec<u8>,
nonce: u64
) -> Result<(), HostErrorOrStorageError>
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<(), HostErrorOrStorageError>
[src]
&mut self,
receipt_index: u64,
public_key: Vec<u8>,
nonce: u64,
allowance: Option<u128>,
receiver_id: String,
method_names: Vec<Vec<u8>>
) -> Result<(), HostErrorOrStorageError>
fn append_action_delete_key(
&mut self,
receipt_index: u64,
public_key: Vec<u8>
) -> Result<(), HostErrorOrStorageError>
[src]
&mut self,
receipt_index: u64,
public_key: Vec<u8>
) -> Result<(), HostErrorOrStorageError>
fn append_action_delete_account(
&mut self,
receipt_index: u64,
beneficiary_id: String
) -> Result<(), HostErrorOrStorageError>
[src]
&mut self,
receipt_index: u64,
beneficiary_id: String
) -> Result<(), HostErrorOrStorageError>
fn sha256(&self, data: &[u8]) -> Result<Vec<u8>, HostErrorOrStorageError>
[src]
fn get_touched_nodes_count(&self) -> u64
[src]
fn reset_touched_nodes_counter(&mut self)
[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>,