[][src]Trait pallet_contracts_rpc_runtime_api::ContractsApi

pub trait ContractsApi<Block: BlockT, AccountId, Balance, BlockNumber>: Core<Block> where
    AccountId: Codec,
    Balance: Codec,
    BlockNumber: Codec
{ pub 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> { ... }
pub 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> { ... }
pub fn get_storage(
        &self,
        __runtime_api_at_param__: &BlockId<Block>,
        address: AccountId,
        key: [u8; 32]
    ) -> Result<GetStorageResult, Self::Error> { ... }
pub fn get_storage_with_context(
        &self,
        __runtime_api_at_param__: &BlockId<Block>,
        context: ExecutionContext,
        address: AccountId,
        key: [u8; 32]
    ) -> Result<GetStorageResult, Self::Error> { ... }
pub fn rent_projection(
        &self,
        __runtime_api_at_param__: &BlockId<Block>,
        address: AccountId
    ) -> Result<RentProjectionResult<BlockNumber>, Self::Error> { ... }
pub 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

pub 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.

pub 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.

pub 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.

pub 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.

pub 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.

pub 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...