[][src]Trait near_vm_logic::External

pub trait External {
    fn storage_set(
        &mut self,
        key: &[u8],
        value: &[u8]
    ) -> Result<Option<Vec<u8>>, HostErrorOrStorageError>;
fn storage_get(
        &self,
        key: &[u8]
    ) -> Result<Option<Vec<u8>>, HostErrorOrStorageError>;
fn storage_remove(
        &mut self,
        key: &[u8]
    ) -> Result<Option<Vec<u8>>, HostErrorOrStorageError>;
fn storage_has_key(
        &mut self,
        key: &[u8]
    ) -> Result<bool, HostErrorOrStorageError>;
fn storage_iter(
        &mut self,
        prefix: &[u8]
    ) -> Result<IteratorIndex, HostErrorOrStorageError>;
fn storage_iter_range(
        &mut self,
        start: &[u8],
        end: &[u8]
    ) -> Result<IteratorIndex, HostErrorOrStorageError>;
fn storage_iter_next(
        &mut self,
        iterator_idx: IteratorIndex
    ) -> Result<Option<(Vec<u8>, Vec<u8>)>, HostErrorOrStorageError>;
fn storage_iter_drop(
        &mut self,
        iterator_idx: IteratorIndex
    ) -> Result<(), HostErrorOrStorageError>;
fn create_receipt(
        &mut self,
        receipt_indices: Vec<ReceiptIndex>,
        receiver_id: AccountId
    ) -> Result<ReceiptIndex, HostErrorOrStorageError>;
fn append_action_create_account(
        &mut self,
        receipt_index: ReceiptIndex
    ) -> Result<(), HostErrorOrStorageError>;
fn append_action_deploy_contract(
        &mut self,
        receipt_index: ReceiptIndex,
        code: Vec<u8>
    ) -> Result<(), HostErrorOrStorageError>;
fn append_action_function_call(
        &mut self,
        receipt_index: ReceiptIndex,
        method_name: Vec<u8>,
        arguments: Vec<u8>,
        attached_deposit: Balance,
        prepaid_gas: Gas
    ) -> Result<(), HostErrorOrStorageError>;
fn append_action_transfer(
        &mut self,
        receipt_index: ReceiptIndex,
        amount: Balance
    ) -> Result<(), HostErrorOrStorageError>;
fn append_action_stake(
        &mut self,
        receipt_index: ReceiptIndex,
        stake: Balance,
        public_key: PublicKey
    ) -> Result<(), HostErrorOrStorageError>;
fn append_action_add_key_with_full_access(
        &mut self,
        receipt_index: ReceiptIndex,
        public_key: PublicKey,
        nonce: u64
    ) -> Result<(), HostErrorOrStorageError>;
fn append_action_add_key_with_function_call(
        &mut self,
        receipt_index: ReceiptIndex,
        public_key: PublicKey,
        nonce: u64,
        allowance: Option<Balance>,
        receiver_id: AccountId,
        method_names: Vec<Vec<u8>>
    ) -> Result<(), HostErrorOrStorageError>;
fn append_action_delete_key(
        &mut self,
        receipt_index: ReceiptIndex,
        public_key: PublicKey
    ) -> Result<(), HostErrorOrStorageError>;
fn append_action_delete_account(
        &mut self,
        receipt_index: ReceiptIndex,
        beneficiary_id: AccountId
    ) -> Result<(), HostErrorOrStorageError>;
fn sha256(&self, data: &[u8]) -> Result<Vec<u8>, HostErrorOrStorageError>; }

Required methods

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

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

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

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

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

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

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

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

fn create_receipt(
    &mut self,
    receipt_indices: Vec<ReceiptIndex>,
    receiver_id: AccountId
) -> Result<ReceiptIndex, HostErrorOrStorageError>

fn append_action_create_account(
    &mut self,
    receipt_index: ReceiptIndex
) -> Result<(), HostErrorOrStorageError>

fn append_action_deploy_contract(
    &mut self,
    receipt_index: ReceiptIndex,
    code: Vec<u8>
) -> Result<(), HostErrorOrStorageError>

fn append_action_function_call(
    &mut self,
    receipt_index: ReceiptIndex,
    method_name: Vec<u8>,
    arguments: Vec<u8>,
    attached_deposit: Balance,
    prepaid_gas: Gas
) -> Result<(), HostErrorOrStorageError>

fn append_action_transfer(
    &mut self,
    receipt_index: ReceiptIndex,
    amount: Balance
) -> Result<(), HostErrorOrStorageError>

fn append_action_stake(
    &mut self,
    receipt_index: ReceiptIndex,
    stake: Balance,
    public_key: PublicKey
) -> Result<(), HostErrorOrStorageError>

fn append_action_add_key_with_full_access(
    &mut self,
    receipt_index: ReceiptIndex,
    public_key: PublicKey,
    nonce: u64
) -> Result<(), HostErrorOrStorageError>

fn append_action_add_key_with_function_call(
    &mut self,
    receipt_index: ReceiptIndex,
    public_key: PublicKey,
    nonce: u64,
    allowance: Option<Balance>,
    receiver_id: AccountId,
    method_names: Vec<Vec<u8>>
) -> Result<(), HostErrorOrStorageError>

fn append_action_delete_key(
    &mut self,
    receipt_index: ReceiptIndex,
    public_key: PublicKey
) -> Result<(), HostErrorOrStorageError>

fn append_action_delete_account(
    &mut self,
    receipt_index: ReceiptIndex,
    beneficiary_id: AccountId
) -> Result<(), HostErrorOrStorageError>

fn sha256(&self, data: &[u8]) -> Result<Vec<u8>, HostErrorOrStorageError>

Loading content...

Implementors

Loading content...