Skip to main content

TempoSimulateApiServer

Trait TempoSimulateApiServer 

Source
pub trait TempoSimulateApiServer:
    Sized
    + Send
    + Sync
    + 'static {
    // Required method
    fn simulate_v1<'life0, 'async_trait>(
        &'life0 self,
        payload: SimulatePayload<TempoTransactionRequest>,
        block: Option<BlockId>,
    ) -> Pin<Box<dyn Future<Output = RpcResult<TempoSimulateV1Response<RpcBlock<TempoNetwork>>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided method
    fn into_rpc(self) -> RpcModule<Self> { ... }
}
Expand description

Server trait implementation for the TempoSimulateApi RPC API.

Required Methods§

Source

fn simulate_v1<'life0, 'async_trait>( &'life0 self, payload: SimulatePayload<TempoTransactionRequest>, block: Option<BlockId>, ) -> Pin<Box<dyn Future<Output = RpcResult<TempoSimulateV1Response<RpcBlock<TempoNetwork>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Simulates transactions like eth_simulateV1 but enriches the response with TIP-20 token metadata for all tokens involved in Transfer events.

This eliminates the need for a second roundtrip to fetch token symbols/decimals after simulation.

Provided Methods§

Source

fn into_rpc(self) -> RpcModule<Self>

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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<N: FullNodeTypes<Types = TempoNode>> TempoSimulateApiServer for TempoSimulate<N>