Skip to content
Discussion options

You must be logged in to vote

I think I've answered my question:

use alloy::eips::BlockNumberOrTag;
use alloy::network::Ethereum;
use alloy::network::Network;
use jsonrpsee::http_client::HttpClient;

#[tokio::main]
async fn main() {
    let client =  HttpClient::builder()
        .build("RPC_URL")
        .unwrap();

    type TxReq = <Ethereum as Network>::TransactionRequest;
    type T = <Ethereum as Network>::TransactionResponse;
    type B = <Ethereum as Network>::BlockResponse;
    type R = <Ethereum as Network>::ReceiptResponse;
    type H = <Ethereum as Network>::HeaderResponse;

    let result = <HttpClient as reth_rpc_api::EthApiClient<TxReq, T, B, R, H>>::block_by_number(
        &client,
        BlockNumberO…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by Pzixel
Comment options

You must be logged in to vote
1 reply
@Pzixel
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants