MCPcopy Create free account
hub / github.com/ChainSafe/Delorean-Protocol / block_number

Function block_number

fendermint/eth/api/src/apis/eth.rs:62–68  ·  view source on GitHub ↗

Returns the number of most recent block.

(data: JsonRpcData<C>)

Source from the content-addressed store, hash-verified

60
61/// Returns the number of most recent block.
62pub async fn block_number<C>(data: JsonRpcData<C>) -> JsonRpcResult<et::U64>
63where
64 C: Client + Sync + Send,
65{
66 let height = data.latest_height().await?;
67 Ok(et::U64::from(height.value()))
68}
69
70/// Returns the chain ID used for signing replay-protected transactions.
71pub async fn chain_id<C>(data: JsonRpcData<C>) -> JsonRpcResult<et::U64>

Callers

nothing calls this directly

Calls 1

latest_heightMethod · 0.45

Tested by

no test coverage detected