Trait pallet_gear_rpc_runtime_api::GearApi

source ·
pub trait GearApi<Block: BlockT>: Core<Block> {
    // Provided methods
    fn calculate_reply_for_handle(
        &self,
        __runtime_api_at_param__: <Block as BlockT>::Hash,
        origin: H256,
        destination: H256,
        payload: Vec<u8>,
        gas_limit: u64,
        value: u128,
        allowance_multiplier: u64,
    ) -> Result<Result<ReplyInfo, Vec<u8>>, ApiError> { ... }
    fn calculate_gas_info(
        &self,
        __runtime_api_at_param__: <Block as BlockT>::Hash,
        source: H256,
        kind: HandleKind,
        payload: Vec<u8>,
        value: u128,
        allow_other_panics: bool,
        initial_gas: Option<u64>,
        allowance_multiplier: Option<u64>,
    ) -> Result<Result<GasInfo, Vec<u8>>, ApiError> { ... }
    fn gear_run_extrinsic(
        &self,
        __runtime_api_at_param__: <Block as BlockT>::Hash,
        max_gas: Option<u64>,
    ) -> Result<<Block as BlockT>::Extrinsic, ApiError> { ... }
    fn read_state(
        &self,
        __runtime_api_at_param__: <Block as BlockT>::Hash,
        program_id: H256,
        payload: Vec<u8>,
        allowance_multiplier: Option<u64>,
    ) -> Result<Result<Vec<u8>, Vec<u8>>, ApiError> { ... }
    fn read_state_using_wasm(
        &self,
        __runtime_api_at_param__: <Block as BlockT>::Hash,
        program_id: H256,
        payload: Vec<u8>,
        fn_name: Vec<u8>,
        wasm: Vec<u8>,
        argument: Option<Vec<u8>>,
        allowance_multiplier: Option<u64>,
    ) -> Result<Result<Vec<u8>, Vec<u8>>, ApiError> { ... }
    fn read_metahash(
        &self,
        __runtime_api_at_param__: <Block as BlockT>::Hash,
        program_id: H256,
        allowance_multiplier: Option<u64>,
    ) -> Result<Result<H256, Vec<u8>>, ApiError> { ... }
    fn calculate_gas_info_before_version_2(
        &self,
        __runtime_api_at_param__: <Block as BlockT>::Hash,
        source: H256,
        kind: HandleKind,
        payload: Vec<u8>,
        value: u128,
        allow_other_panics: bool,
        initial_gas: Option<u64>,
    ) -> Result<Result<GasInfo, Vec<u8>>, ApiError> { ... }
    fn read_state_before_version_2(
        &self,
        __runtime_api_at_param__: <Block as BlockT>::Hash,
        program_id: H256,
        payload: Vec<u8>,
    ) -> Result<Result<Vec<u8>, Vec<u8>>, ApiError> { ... }
    fn read_state_using_wasm_before_version_2(
        &self,
        __runtime_api_at_param__: <Block as BlockT>::Hash,
        program_id: H256,
        payload: Vec<u8>,
        fn_name: Vec<u8>,
        wasm: Vec<u8>,
        argument: Option<Vec<u8>>,
    ) -> Result<Result<Vec<u8>, Vec<u8>>, ApiError> { ... }
    fn read_metahash_before_version_2(
        &self,
        __runtime_api_at_param__: <Block as BlockT>::Hash,
        program_id: H256,
    ) -> Result<Result<H256, Vec<u8>>, ApiError> { ... }
}

Provided Methods§

source

fn calculate_reply_for_handle( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, origin: H256, destination: H256, payload: Vec<u8>, gas_limit: u64, value: u128, allowance_multiplier: u64, ) -> Result<Result<ReplyInfo, Vec<u8>>, ApiError>

source

fn calculate_gas_info( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, source: H256, kind: HandleKind, payload: Vec<u8>, value: u128, allow_other_panics: bool, initial_gas: Option<u64>, allowance_multiplier: Option<u64>, ) -> Result<Result<GasInfo, Vec<u8>>, ApiError>

source

fn gear_run_extrinsic( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, max_gas: Option<u64>, ) -> Result<<Block as BlockT>::Extrinsic, ApiError>

Generate inherent-like extrinsic that runs message queue processing.

source

fn read_state( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, program_id: H256, payload: Vec<u8>, allowance_multiplier: Option<u64>, ) -> Result<Result<Vec<u8>, Vec<u8>>, ApiError>

source

fn read_state_using_wasm( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, program_id: H256, payload: Vec<u8>, fn_name: Vec<u8>, wasm: Vec<u8>, argument: Option<Vec<u8>>, allowance_multiplier: Option<u64>, ) -> Result<Result<Vec<u8>, Vec<u8>>, ApiError>

source

fn read_metahash( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, program_id: H256, allowance_multiplier: Option<u64>, ) -> Result<Result<H256, Vec<u8>>, ApiError>

source

fn calculate_gas_info_before_version_2( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, source: H256, kind: HandleKind, payload: Vec<u8>, value: u128, allow_other_panics: bool, initial_gas: Option<u64>, ) -> Result<Result<GasInfo, Vec<u8>>, ApiError>

👎Deprecated
source

fn read_state_before_version_2( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, program_id: H256, payload: Vec<u8>, ) -> Result<Result<Vec<u8>, Vec<u8>>, ApiError>

👎Deprecated
source

fn read_state_using_wasm_before_version_2( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, program_id: H256, payload: Vec<u8>, fn_name: Vec<u8>, wasm: Vec<u8>, argument: Option<Vec<u8>>, ) -> Result<Result<Vec<u8>, Vec<u8>>, ApiError>

👎Deprecated
source

fn read_metahash_before_version_2( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, program_id: H256, ) -> Result<Result<H256, Vec<u8>>, ApiError>

👎Deprecated

Trait Implementations§

source§

impl<Block: BlockT> RuntimeApiInfo for dyn GearApi<Block>

source§

const ID: [u8; 8] = _

The identifier of the runtime api.
source§

const VERSION: u32 = 2u32

The version of the runtime api.

Implementors§