Trait AnvilZksNamespaceServer

Source
pub trait AnvilZksNamespaceServer:
    Sized
    + Send
    + Sync
    + 'static {
    // Required methods
    fn commit_batch<'life0, 'async_trait>(
        &'life0 self,
        batch_number: L1BatchNumber,
    ) -> Pin<Box<dyn Future<Output = RpcResult<H256>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn prove_batch<'life0, 'async_trait>(
        &'life0 self,
        batch_number: L1BatchNumber,
    ) -> Pin<Box<dyn Future<Output = RpcResult<H256>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn execute_batch<'life0, 'async_trait>(
        &'life0 self,
        batch_number: L1BatchNumber,
    ) -> Pin<Box<dyn Future<Output = RpcResult<H256>> + 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 AnvilZksNamespace RPC API.

Required Methods§

Source

fn commit_batch<'life0, 'async_trait>( &'life0 self, batch_number: L1BatchNumber, ) -> Pin<Box<dyn Future<Output = RpcResult<H256>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Commit batch’s metadata to L1 (if there is one).

Assumes L1 contracts have no system log verification and no DA input verification.

§Arguments
  • batch_number - Number of the batch to be committed
§Returns

Finalized L1 transaction’s hash that successfully commited the batch.

Source

fn prove_batch<'life0, 'async_trait>( &'life0 self, batch_number: L1BatchNumber, ) -> Pin<Box<dyn Future<Output = RpcResult<H256>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Send batch’s proof to L1 (if there is one). Batch needs to be committed first.

Assumes L1 contracts allow empty proofs (see TestnetVerifier.sol).

§Arguments
  • batch_number - Number of the batch to be proved
§Returns

Finalized L1 transaction’s hash that successfully proved the batch.

Source

fn execute_batch<'life0, 'async_trait>( &'life0 self, batch_number: L1BatchNumber, ) -> Pin<Box<dyn Future<Output = RpcResult<H256>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Execute batch on L1 (if there is one). Batch needs to be committed and proved first.

§Arguments
  • batch_number - Number of the batch to be executed
§Returns

Finalized L1 transaction’s hash that successfully executed the batch.

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", so this trait is not object safe.

Implementors§