This backwards-compatible patch release makes documentation improvements, along with one minor feature addition.
StorageKey
You can now implement custom keys for mappings.
impl StorageKey for Key {
fn to_slot(&self, root: B256) -> U256 {
// return a slot
}
}
The above then enables
sol_storage! {
mapping(Key => Value) map; // in solidity
}
#[solidity_storage]
pub struct Contract {
map: StorageMap<Key, Value>, // or in Rust
}