Trait pallet_gear_rpc::GearRuntimeApi

pub trait GearRuntimeApi<Block>: Core<Block>
where Block: Block,
{ // Provided methods fn calculate_reply_for_handle( &self, __runtime_api_at_param__: <Block as Block>::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 Block>::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 Block>::Hash, max_gas: Option<u64>, ) -> Result<<Block as Block>::Extrinsic, ApiError> { ... } fn read_state( &self, __runtime_api_at_param__: <Block as Block>::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 Block>::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 Block>::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 Block>::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 Block>::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 Block>::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 Block>::Hash, program_id: H256, ) -> Result<Result<H256, Vec<u8>>, ApiError> { ... } }

Provided Methods§

fn calculate_reply_for_handle( &self, __runtime_api_at_param__: <Block as Block>::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 Block>::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 Block>::Hash, max_gas: Option<u64>, ) -> Result<<Block as Block>::Extrinsic, ApiError>

Generate inherent-like extrinsic that runs message queue processing.

fn read_state( &self, __runtime_api_at_param__: <Block as Block>::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 Block>::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 Block>::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 Block>::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

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

👎Deprecated

fn read_state_using_wasm_before_version_2( &self, __runtime_api_at_param__: <Block as Block>::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

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

👎Deprecated

Trait Implementations§

§

impl<Block> RuntimeApiInfo for dyn GearApi<Block>
where Block: Block,

§

const ID: [u8; 8] = _

The identifier of the runtime api.
§

const VERSION: u32 = 2u32

The version of the runtime api.

Implementors§