[][src]Trait near_vm_logic::External

pub trait External {
    fn storage_set(
        &mut self,
        key: &[u8],
        value: &[u8]
    ) -> Result<Option<Vec<u8>>, ExternalError>;
fn storage_get(&self, key: &[u8]) -> Result<Option<Vec<u8>>, ExternalError>;
fn storage_remove(
        &mut self,
        key: &[u8]
    ) -> Result<Option<Vec<u8>>, ExternalError>;
fn storage_has_key(&mut self, key: &[u8]) -> Result<bool, ExternalError>;
fn storage_iter(
        &mut self,
        prefix: &[u8]
    ) -> Result<IteratorIndex, ExternalError>;
fn storage_iter_range(
        &mut self,
        start: &[u8],
        end: &[u8]
    ) -> Result<IteratorIndex, ExternalError>;
fn storage_iter_next(
        &mut self,
        iterator_idx: IteratorIndex
    ) -> Result<Option<(Vec<u8>, Vec<u8>)>, ExternalError>;
fn storage_iter_drop(
        &mut self,
        iterator_idx: IteratorIndex
    ) -> Result<(), ExternalError>;
fn receipt_create(
        &mut self,
        receipt_indices: Vec<ReceiptIndex>,
        receiver_id: AccountId,
        method_name: Vec<u8>,
        arguments: Vec<u8>,
        attached_deposit: Balance,
        prepaid_gas: Gas
    ) -> Result<ReceiptIndex, ExternalError>;
fn storage_usage(&self) -> StorageUsage; }

Required methods

fn storage_set(
    &mut self,
    key: &[u8],
    value: &[u8]
) -> Result<Option<Vec<u8>>, ExternalError>

fn storage_get(&self, key: &[u8]) -> Result<Option<Vec<u8>>, ExternalError>

fn storage_remove(
    &mut self,
    key: &[u8]
) -> Result<Option<Vec<u8>>, ExternalError>

fn storage_has_key(&mut self, key: &[u8]) -> Result<bool, ExternalError>

fn storage_iter(
    &mut self,
    prefix: &[u8]
) -> Result<IteratorIndex, ExternalError>

fn storage_iter_range(
    &mut self,
    start: &[u8],
    end: &[u8]
) -> Result<IteratorIndex, ExternalError>

fn storage_iter_next(
    &mut self,
    iterator_idx: IteratorIndex
) -> Result<Option<(Vec<u8>, Vec<u8>)>, ExternalError>

fn storage_iter_drop(
    &mut self,
    iterator_idx: IteratorIndex
) -> Result<(), ExternalError>

fn receipt_create(
    &mut self,
    receipt_indices: Vec<ReceiptIndex>,
    receiver_id: AccountId,
    method_name: Vec<u8>,
    arguments: Vec<u8>,
    attached_deposit: Balance,
    prepaid_gas: Gas
) -> Result<ReceiptIndex, ExternalError>

fn storage_usage(&self) -> StorageUsage

Loading content...

Implementors

Loading content...