Trait pallet_gear_rpc::GearApiServer
source · pub trait GearApiServer<BlockHash, ResponseType>:
Sized
+ Send
+ Sync
+ 'static {
// Required methods
fn calculate_reply_for_handle(
&self,
origin: H256,
destination: H256,
payload: Bytes,
gas_limit: u64,
value: u128,
at: Option<BlockHash>,
) -> RpcResult<ReplyInfo>;
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§
fn calculate_reply_for_handle( &self, origin: H256, destination: H256, payload: Bytes, gas_limit: u64, value: u128, at: Option<BlockHash>, ) -> RpcResult<ReplyInfo>
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 Methods§
Object Safety§
This trait is not object safe.