Trait pallet_gear_rpc::GearApiServer
source · 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.