use web3::transports::Http;
use web3::types::{BlockId, BlockNumber, U64};
use web3::Web3;
let transport = Http::new(
"https://goerli.infura.io/v3/<KEY>",
)
.unwrap();
let eth = Web3::new(transport).eth();
let block_id = BlockId::Number(BlockNumber::Number(U64::from(16504309)));
let block = eth.block_with_txs(block_id).await.unwrap();
dbg!(block);
I get "None" printed. If I do the same using curl I get block contents as expected:
To reproduce the issue I use the following code:
I get "None" printed. If I do the same using
curl
I get block contents as expected: