pub trait GearApiServer<BlockHash, ResponseType>: Sized + Send + Sync + 'static {
    // Required methods
    fn get_init_create_gas_spent(
        &self,
        source: H256,
        code_id: H256,
        payload: Bytes,
        value: u128,
        allow_other_panics: bool,
        at: Option<BlockHash>
    ) -> RpcResult<GasInfo>;
    fn get_init_upload_gas_spent(
        &self,
        source: H256,
        code: Bytes,
        payload: Bytes,
        value: u128,
        allow_other_panics: bool,
        at: Option<BlockHash>
    ) -> RpcResult<GasInfo>;
    fn get_handle_gas_spent(
        &self,
        source: H256,
        dest: H256,
        payload: Bytes,
        value: u128,
        allow_other_panics: bool,
        at: Option<BlockHash>
    ) -> RpcResult<GasInfo>;
    fn get_reply_gas_spent(
        &self,
        source: H256,
        message_id: H256,
        payload: Bytes,
        value: u128,
        allow_other_panics: bool,
        at: Option<BlockHash>
    ) -> RpcResult<GasInfo>;
    fn read_state(
        &self,
        program_id: H256,
        payload: Bytes,
        at: Option<BlockHash>
    ) -> RpcResult<Bytes>;
    fn read_state_batch(
        &self,
        batch_id_payload: Vec<(H256, Bytes)>,
        at: Option<BlockHash>
    ) -> RpcResult<Vec<Bytes>>;
    fn read_state_using_wasm(
        &self,
        program_id: H256,
        payload: Bytes,
        fn_name: Bytes,
        wasm: Bytes,
        argument: Option<Bytes>,
        at: Option<BlockHash>
    ) -> RpcResult<Bytes>;
    fn read_state_using_wasm_batch(
        &self,
        batch_id_payload: Vec<(H256, Bytes)>,
        fn_name: Bytes,
        wasm: Bytes,
        argument: Option<Bytes>,
        at: Option<BlockHash>
    ) -> RpcResult<Vec<Bytes>>;
    fn read_metahash(
        &self,
        program_id: H256,
        at: Option<BlockHash>
    ) -> RpcResult<H256>;

    // Provided method
    fn into_rpc(self) -> RpcModule<Self>
       where BlockHash: Send + Sync + 'static + DeserializeOwned,
             ResponseType: Send + Sync + 'static { ... }
}
Expand description

Server trait implementation for the GearApi RPC API.

Required Methods§

source

fn get_init_create_gas_spent( &self, source: H256, code_id: H256, payload: Bytes, value: u128, allow_other_panics: bool, at: Option<BlockHash> ) -> RpcResult<GasInfo>

source

fn get_init_upload_gas_spent( &self, source: H256, code: Bytes, payload: Bytes, value: u128, allow_other_panics: bool, at: Option<BlockHash> ) -> RpcResult<GasInfo>

source

fn get_handle_gas_spent( &self, source: H256, dest: H256, payload: Bytes, value: u128, allow_other_panics: bool, at: Option<BlockHash> ) -> RpcResult<GasInfo>

source

fn get_reply_gas_spent( &self, source: H256, message_id: H256, payload: Bytes, value: u128, allow_other_panics: bool, at: Option<BlockHash> ) -> RpcResult<GasInfo>

source

fn read_state( &self, program_id: H256, payload: Bytes, at: Option<BlockHash> ) -> RpcResult<Bytes>

source

fn read_state_batch( &self, batch_id_payload: Vec<(H256, Bytes)>, at: Option<BlockHash> ) -> RpcResult<Vec<Bytes>>

source

fn read_state_using_wasm( &self, program_id: H256, payload: Bytes, fn_name: Bytes, wasm: Bytes, argument: Option<Bytes>, at: Option<BlockHash> ) -> RpcResult<Bytes>

source

fn read_state_using_wasm_batch( &self, batch_id_payload: Vec<(H256, Bytes)>, fn_name: Bytes, wasm: Bytes, argument: Option<Bytes>, at: Option<BlockHash> ) -> RpcResult<Vec<Bytes>>

source

fn read_metahash( &self, program_id: H256, at: Option<BlockHash> ) -> RpcResult<H256>

Provided Methods§

source

fn into_rpc(self) -> RpcModule<Self>
where BlockHash: Send + Sync + 'static + DeserializeOwned, ResponseType: Send + Sync + 'static,

Collects all the methods and subscriptions defined in the trait and adds them into a single RpcModule.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<C, Block> GearApiServer<<Block as Block>::Hash, Result<u64, Vec<u8>>> for Gear<C, Block>
where Block: BlockT, C: 'static + ProvideRuntimeApi<Block> + HeaderBackend<Block>, C::Api: GearRuntimeApi<Block>,