Improved return types: get_latest_block doesn't return Ok(None) anymore; rather, None is now translated into a web3::Error which would only ever be caused by a faulty JRPC provider.
get_latest_blocks now has a web3::Result per chain, rather than failing the whole function call whenever a single Web3 query fails.
Less redundant logging. I've removed logs there were redundant (e.s. logging the same information both at the call site and at the beginning of the function body) and added some where useful.
NetworksDiff now uses u64 internally, for consistency with the rest of the code.
Removed redundant subgraph state checks in registered_networks. Oracle::run already makes sure that the subgraph is not failed, so no need to do it twice.
Oracle::run now checks for subgraph freshness immediately after querying the subgraph.
BTreeMap
instead ofHashMap
.get_latest_block
doesn't returnOk(None)
anymore; rather,None
is now translated into aweb3::Error
which would only ever be caused by a faulty JRPC provider.get_latest_blocks
now has aweb3::Result
per chain, rather than failing the whole function call whenever a singleWeb3
query fails.calls_in_block_range
by usingEth::block_with_txs
rather thanEth::block
+Eth::transaction
.NetworksDiff
now usesu64
internally, for consistency with the rest of the code.registered_networks
.Oracle::run
already makes sure that the subgraph is not failed, so no need to do it twice.Oracle::run
now checks for subgraph freshness immediately after querying the subgraph.SubgraphQuery
.