/// Sometimes data can be too big to be saved for a single key. This helps out by dividing the data
/// into different shards. Example:
////// `Address | 200` -> data is from block 0 to 200.
////// `Address | 300` -> data is from block 201 to 300.
#[derive(Debug, Default, Clone, Copy, Eq, PartialEq, Ord, PartialOrd, Hash)]pubstructShardedKey<T>{/// The key for this type.
pubkey: T,
/// Highest block number to which `value` is related to.
pubhighest_block_number:u64,
}implShardedKey<()>{/// Number of indices in one shard.
pubconstSHARD_COUNT:usize=2000;}impl<T>ShardedKey<T>{/// Creates a new `ShardedKey<T>`.
pubconstfnnew(key: T, highest_block_number:u64)->Self{Self{ key, highest_block_number }}/// Creates a new key with the highest block number set to maximum.
/// This is useful when we want to search the last value for a given key.
pubconstfnlast(key: T)->Self{Self{ key, highest_block_number:u64::MAX}}}