#[storage_fetch]
Expand description
Generate storage query for the latest state for functions that query storage at specified block.
§Note
- the docs must be end with
at specified block.
- the function name must be end with
_at
. - the last argument must be
Option<H256>
.
§Example
ⓘ
/// Imdocs at specified block.
#[storage_fetch]
pub fn query_storage_at(addr: Address, block_hash: Option<H256>) -> R {
// ...
}
will generate functions
ⓘ
/// Imdocs at specified block.
pub fn query_storage_at(addr: Address, block_hash: impl Into<Option<H256>>) -> R {
// ...
}
/// Imdocs.
pub fn query_storage(addr: Address) -> R {
query_storage_at(addr, None)
}