Trait noble_contracts_rpc_runtime_api::ContractsApi[][src]

pub trait ContractsApi<Block: BlockT, AccountId, Balance, BlockNumber>: Core<Block> where
    AccountId: Codec,
    Balance: Codec,
    BlockNumber: Codec
{ fn call(
        &self,
        __runtime_api_at_param__: &BlockId<Block>,
        origin: AccountId,
        dest: AccountId,
        value: Balance,
        gas_limit: u64,
        input_data: Vec<u8>
    ) -> Result<ContractExecResult, Self::Error> { ... }
fn call_with_context(
        &self,
        __runtime_api_at_param__: &BlockId<Block>,
        context: ExecutionContext,
        origin: AccountId,
        dest: AccountId,
        value: Balance,
        gas_limit: u64,
        input_data: Vec<u8>
    ) -> Result<ContractExecResult, Self::Error> { ... }
fn get_storage(
        &self,
        __runtime_api_at_param__: &BlockId<Block>,
        address: AccountId,
        key: [u8; 32]
    ) -> Result<GetStorageResult, Self::Error> { ... }
fn get_storage_with_context(
        &self,
        __runtime_api_at_param__: &BlockId<Block>,
        context: ExecutionContext,
        address: AccountId,
        key: [u8; 32]
    ) -> Result<GetStorageResult, Self::Error> { ... }
fn rent_projection(
        &self,
        __runtime_api_at_param__: &BlockId<Block>,
        address: AccountId
    ) -> Result<RentProjectionResult<BlockNumber>, Self::Error> { ... }
fn rent_projection_with_context(
        &self,
        __runtime_api_at_param__: &BlockId<Block>,
        context: ExecutionContext,
        address: AccountId
    ) -> Result<RentProjectionResult<BlockNumber>, Self::Error> { ... } }

The API to interact with contracts without using executive.

Provided methods

fn call(
    &self,
    __runtime_api_at_param__: &BlockId<Block>,
    origin: AccountId,
    dest: AccountId,
    value: Balance,
    gas_limit: u64,
    input_data: Vec<u8>
) -> Result<ContractExecResult, Self::Error>
[src]

Perform a call from a specified account to a given contract.

See the contracts’ call dispatchable function for more details.

fn call_with_context(
    &self,
    __runtime_api_at_param__: &BlockId<Block>,
    context: ExecutionContext,
    origin: AccountId,
    dest: AccountId,
    value: Balance,
    gas_limit: u64,
    input_data: Vec<u8>
) -> Result<ContractExecResult, Self::Error>
[src]

Perform a call from a specified account to a given contract.

See the contracts’ call dispatchable function for more details.

fn get_storage(
    &self,
    __runtime_api_at_param__: &BlockId<Block>,
    address: AccountId,
    key: [u8; 32]
) -> Result<GetStorageResult, Self::Error>
[src]

Query a given storage key in a given contract.

Returns Ok(Some(Vec<u8>)) if the storage value exists under the given key in the specified account and Ok(None) if it doesn’t. If the account specified by the address doesn’t exist, or doesn’t have a contract or if the contract is a tombstone, then Err is returned.

fn get_storage_with_context(
    &self,
    __runtime_api_at_param__: &BlockId<Block>,
    context: ExecutionContext,
    address: AccountId,
    key: [u8; 32]
) -> Result<GetStorageResult, Self::Error>
[src]

Query a given storage key in a given contract.

Returns Ok(Some(Vec<u8>)) if the storage value exists under the given key in the specified account and Ok(None) if it doesn’t. If the account specified by the address doesn’t exist, or doesn’t have a contract or if the contract is a tombstone, then Err is returned.

fn rent_projection(
    &self,
    __runtime_api_at_param__: &BlockId<Block>,
    address: AccountId
) -> Result<RentProjectionResult<BlockNumber>, Self::Error>
[src]

Returns the projected time a given contract will be able to sustain paying its rent.

The returned projection is relevant for the current block, i.e. it is as if the contract was accessed at the current block.

Returns Err if the contract is in a tombstone state or doesn’t exist.

fn rent_projection_with_context(
    &self,
    __runtime_api_at_param__: &BlockId<Block>,
    context: ExecutionContext,
    address: AccountId
) -> Result<RentProjectionResult<BlockNumber>, Self::Error>
[src]

Returns the projected time a given contract will be able to sustain paying its rent.

The returned projection is relevant for the current block, i.e. it is as if the contract was accessed at the current block.

Returns Err if the contract is in a tombstone state or doesn’t exist.

Loading content...

Trait Implementations

impl<Block: BlockT, AccountId, Balance, BlockNumber, __Sr_Api_Error__> RuntimeApiInfo for dyn ContractsApi<Block, AccountId, Balance, BlockNumber, Error = __Sr_Api_Error__>[src]

Implementors

Loading content...