Trait era_test_node::namespaces::ZksNamespaceT
source · pub trait ZksNamespaceT: Sized + Send + Sync + 'static {
Show 22 methods
// Required methods
fn estimate_fee(&self, req: CallRequest) -> BoxFuture<Result<Fee>>;
fn estimate_gas_l1_to_l2(&self, req: CallRequest) -> BoxFuture<Result<U256>>;
fn get_main_contract(&self) -> BoxFuture<Result<Address>>;
fn get_testnet_paymaster(&self) -> BoxFuture<Result<Option<Address>>>;
fn get_bridge_contracts(&self) -> BoxFuture<Result<BridgeAddresses>>;
fn l1_chain_id(&self) -> BoxFuture<Result<U64>>;
fn get_confirmed_tokens(
&self,
from: u32,
limit: u8
) -> BoxFuture<Result<Vec<Token>>>;
fn get_token_price(
&self,
token_address: Address
) -> BoxFuture<Result<BigDecimal>>;
fn get_all_account_balances(
&self,
address: Address
) -> BoxFuture<Result<HashMap<Address, U256>>>;
fn get_l2_to_l1_msg_proof(
&self,
block: L2BlockNumber,
sender: Address,
msg: H256,
l2_log_position: Option<usize>
) -> BoxFuture<Result<Option<L2ToL1LogProof>>>;
fn get_l2_to_l1_log_proof(
&self,
tx_hash: H256,
index: Option<usize>
) -> BoxFuture<Result<Option<L2ToL1LogProof>>>;
fn get_l1_batch_number(&self) -> BoxFuture<Result<U64>>;
fn get_block_details(
&self,
block_number: L2BlockNumber
) -> BoxFuture<Result<Option<BlockDetails>>>;
fn get_miniblock_range(
&self,
batch: L1BatchNumber
) -> BoxFuture<Result<Option<(U64, U64)>>>;
fn get_transaction_details(
&self,
hash: H256
) -> BoxFuture<Result<Option<TransactionDetails>>>;
fn get_raw_block_transactions(
&self,
block_number: L2BlockNumber
) -> BoxFuture<Result<Vec<Transaction>>>;
fn get_l1_batch_details(
&self,
batch: L1BatchNumber
) -> BoxFuture<Result<Option<L1BatchDetails>>>;
fn get_bytecode_by_hash(
&self,
hash: H256
) -> BoxFuture<Result<Option<Vec<u8>>>>;
fn get_l1_gas_price(&self) -> BoxFuture<Result<U64>>;
fn get_protocol_version(
&self,
version_id: Option<u16>
) -> BoxFuture<Result<Option<ProtocolVersion>>>;
fn get_proof(
&self,
address: Address,
keys: Vec<H256>,
l1_batch_number: L1BatchNumber
) -> BoxFuture<Result<Proof>>;
// Provided method
fn to_delegate<M: Metadata>(self) -> IoDelegate<Self, M> { ... }
}
Required Methods§
fn estimate_fee(&self, req: CallRequest) -> BoxFuture<Result<Fee>>
fn estimate_gas_l1_to_l2(&self, req: CallRequest) -> BoxFuture<Result<U256>>
fn get_main_contract(&self) -> BoxFuture<Result<Address>>
fn get_testnet_paymaster(&self) -> BoxFuture<Result<Option<Address>>>
fn get_bridge_contracts(&self) -> BoxFuture<Result<BridgeAddresses>>
fn l1_chain_id(&self) -> BoxFuture<Result<U64>>
fn get_confirmed_tokens( &self, from: u32, limit: u8 ) -> BoxFuture<Result<Vec<Token>>>
fn get_token_price( &self, token_address: Address ) -> BoxFuture<Result<BigDecimal>>
fn get_all_account_balances( &self, address: Address ) -> BoxFuture<Result<HashMap<Address, U256>>>
fn get_l2_to_l1_msg_proof( &self, block: L2BlockNumber, sender: Address, msg: H256, l2_log_position: Option<usize> ) -> BoxFuture<Result<Option<L2ToL1LogProof>>>
fn get_l2_to_l1_log_proof( &self, tx_hash: H256, index: Option<usize> ) -> BoxFuture<Result<Option<L2ToL1LogProof>>>
fn get_l1_batch_number(&self) -> BoxFuture<Result<U64>>
fn get_block_details( &self, block_number: L2BlockNumber ) -> BoxFuture<Result<Option<BlockDetails>>>
fn get_miniblock_range( &self, batch: L1BatchNumber ) -> BoxFuture<Result<Option<(U64, U64)>>>
fn get_transaction_details( &self, hash: H256 ) -> BoxFuture<Result<Option<TransactionDetails>>>
fn get_raw_block_transactions( &self, block_number: L2BlockNumber ) -> BoxFuture<Result<Vec<Transaction>>>
fn get_l1_batch_details( &self, batch: L1BatchNumber ) -> BoxFuture<Result<Option<L1BatchDetails>>>
fn get_bytecode_by_hash(&self, hash: H256) -> BoxFuture<Result<Option<Vec<u8>>>>
fn get_l1_gas_price(&self) -> BoxFuture<Result<U64>>
fn get_protocol_version( &self, version_id: Option<u16> ) -> BoxFuture<Result<Option<ProtocolVersion>>>
fn get_proof( &self, address: Address, keys: Vec<H256>, l1_batch_number: L1BatchNumber ) -> BoxFuture<Result<Proof>>
Provided Methods§
sourcefn to_delegate<M: Metadata>(self) -> IoDelegate<Self, M>
fn to_delegate<M: Metadata>(self) -> IoDelegate<Self, M>
Create an IoDelegate
, wiring rpc calls to the trait methods.
Object Safety§
This trait is not object safe.